- Posts: 9
Lookup Heater stop working
- Tim Latter
- Topic Author
- Offline
- User
thanks Tim
Please Log in or Create an account to join the conversation.
- FlowHeater-Team
- Offline
- Admin
There are some changes about SQL Server user/owner tables and schemas. Do you use the SQL-Server Adapter with the database Lookup Heater?
Best practices) The Lookup Heater is very strength. Please try to use the new SQL Heater instead of the Lookup Heater. With the SQL Heater it is very simple to implement a Database Lookup.
Here you can find an example how you can use the SQL Heater. Dynamic SQL Filter
If you want to use the Lookup Heater furthermore please post you’re FlowHeater Definition (zip) for more analytic.
Best wishes
Robert Stark
Did this answer your question? We would be grateful if you provide a brief comment as feedback. It may also help others who may have encountered a similar problem.
Please Log in or Create an account to join the conversation.
- Tim Latter
- Topic Author
- Offline
- User
- Posts: 9
When I tried the SQL heater, I received a message that stated “There is already an open DataReader associated with this Command which must be closed first.”
Any suggestion would be greatly appreciated.
Thanks tim
Please Log in or Create an account to join the conversation.
- FlowHeater-Team
- Offline
- Admin
Ups! This is an error with the SQL-Server Adapter on READ in connection with the SQL Heater. Maybe this is also the reason why your Database Lookup doesn’t work.
I’ve fix it. You can download the Fix (Beta) here . In the ZIP archive there’s no setup, you have to start FlowHeater.exe by double-click!
With the next version this is official fixed!
Thanks for the notification.
Best wishes
Robert Stark
Did this answer your question? We would be grateful if you provide a brief comment as feedback. It may also help others who may have encountered a similar problem.
Please Log in or Create an account to join the conversation.
- Tim Latter
- Topic Author
- Offline
- User
- Posts: 9
i have added an sql statement that is "select [address1] from communication_old where commtype = $comm$ and
commlocation = $location$". i have attached a picture of the heater properties.
when i run this i get the error message "lookup error - select [] from []" the read side is using the communication_old table as per the image.
i would appreciate any help as i don't think i can use the lookup heater to perform the function i need.
Please Log in or Create an account to join the conversation.
- FlowHeater-Team
- Offline
- Admin
are you sure that this error message occurs from the sql heater? this error occurs usually form the database lookup heater.
verify that no database lookup heater is on your definition and try it again please. if the error message occurs again please post your flowheater definition (zip).
in case of you want to select some information from the same table on read you have choose in the read adapter please try the following. go to the adapter properties on the read side and enter for the property "autocommitafter" the value -1.
Best wishes
Robert Stark
Did this answer your question? We would be grateful if you provide a brief comment as feedback. It may also help others who may have encountered a similar problem.
Please Log in or Create an account to join the conversation.
- Tim Latter
- Topic Author
- Offline
- User
- Posts: 9
Attachment oldCommtoComm.zip not found
Please Log in or Create an account to join the conversation.
- FlowHeater-Team
- Offline
- Admin
i don't know what your purpose? could you describe it please? i guess you want update the new table with some old content? in this case i think you can do it a bit simpler.
Best wishes
Robert Stark
Did this answer your question? We would be grateful if you provide a brief comment as feedback. It may also help others who may have encountered a similar problem.
Please Log in or Create an account to join the conversation.
- Tim Latter
- Topic Author
- Offline
- User
- Posts: 9
so i have to take a column from the old table called “address1” which holds the address, phone, email information and use criteria to put that information into new columns in the new table. i tried to use a sql heater (i also tried a lookup heater). when i use the sql heater, i used the sql statement “select communication.address1 from communication_old left join communication on communication_old.contactguid = communication.contactguid where communication.commtype = $comm$ and communication.commlocation = $location$” as per the definition file i sent you. the problem now is it takes the first value it finds in the old table (like a phone number) and repeats the same information for all rows in the new table. i have attached part of the definition run. i hope this explanation helps.
thank you
tim
Please Log in or Create an account to join the conversation.
- FlowHeater-Team
- Offline
- Admin
First I set the parameter "ContactGUID" with the content of the ContactGUID field. This parameter we need to build the Select in the SQL Heater.
For example)
Email field: Select Address1 from communication_old where ContactGUID = '$ContactGUID$' and CommType = '$commEmail$' and CommLocation = '$location$'
PhoneNumber field: Select Address1 from communication_old where ContactGUID = '$ContactGUID$' and CommType = '$commPhoneNumber$' and CommLocation = '$location$'
The parameters "CommType" and "CommLocation" are defined as static parameters. It's also possible to use the GUID without parameters.
Note: In the example I've used the GroupBy Heater . With this only one record per "ContactGUID" are imported/inserted in the new SQL Table. For this you have to use the following SQL select statement on the READ Side
select * from communication_old order by ContactGUID
Attachment sql_heater_example.zip not found
Best wishes
Robert Stark
Did this answer your question? We would be grateful if you provide a brief comment as feedback. It may also help others who may have encountered a similar problem.
Please Log in or Create an account to join the conversation.
- Tim Latter
- Topic Author
- Offline
- User
- Posts: 9
Please Log in or Create an account to join the conversation.
- Tim Latter
- Topic Author
- Offline
- User
- Posts: 9
Please Log in or Create an account to join the conversation.
- FlowHeater-Team
- Offline
- Admin
I guess it’s only. I don’t know your database schema. In my opinion our database looks like this.
CommGuid -> UniqueID (PrimaryKey)
ContactGuid -> per each contact unique
CommType -> Type of communication e.g. Email, Phone, …
CommLocation -> Home, Office, ..
Address1 -> the value for Phone, Email, …
Here a example without guid’s I’m using ID’s and Names.
First Contact
CommGuid1, ContactGuid1, CommType_Email, CommLocation_Home, Address1_Email1
CommGuid2, ContactGuid1, Commtype_Phone, CommLocation_Home, Address1_Phone1
Second Contact
CommGuid3, ContactGuid2, CommType_Email, CommLocation_Home, Address1_Email1
CommGuid4, ContactGuid2, Commtype_Phone, CommLocation_Home, Address1_Phone1
To select the home phone number from the second contact we need a SQL select like this
Select Address1 from communication_old where ContactGUID = ' ContactGuid2' and CommType = 'CommType_Email ' and CommLocation = 'CommLocation_Home '
If I have misunderstood you please post a short description of your database schema and some example data.
Best wishes
Robert Stark
Did this answer your question? We would be grateful if you provide a brief comment as feedback. It may also help others who may have encountered a similar problem.
Please Log in or Create an account to join the conversation.
- Tim Latter
- Topic Author
- Offline
- User
- Posts: 9
Please Log in or Create an account to join the conversation.
- Tim Latter
- Topic Author
- Offline
- User
- Posts: 9
commGUID
ContactGUID
Address1 (all information such as email, address, phone)
Commtype
CommLocation
To a table that looks like this:
CommGUID
ContactGUID
Address (for address)
Email (for email)
Phone (for phone number)
CommType
Commlocation
Basically I need to break up the address1 field in the old table (that holds all the user information for address, phone, email etc.) and add it to individual fields in the new table.
I hope this helps.
Tim
Please Log in or Create an account to join the conversation.
- FlowHeater-Team
- Offline
- Admin
I’m wondering why you want to import the field’s commType and commLocation to the WRITE side?
I have made a simple example including a little access database. Please have a look to the attachment.
Here I’ve replaced the commType and also commLocation GUID with the static words (Email, Phone, Home, Work). Also I’ve used numbers instead of GUID for the fields commGUID and contactGUID!
How does it work?
The GroupBy Heater groups all same contactGuids to one row on the WRITE. Then per each row the SetParameter Heater stores the actual contactGUID in the Parameter "$ContactGUID$". This parameter are used in the SQL Heater to build dynamic SQL Statements like this.
Select Address1 from communication_old where ContactGUID = '$ContactGUID$' and CommType = 'Email' and CommLocation = 'Work'
The parameter placeholder $ContactGUID$ is replaced with the current contactGUID of each row.
Attachment access_example.zip not found
Best wishes
Robert Stark
Did this answer your question? We would be grateful if you provide a brief comment as feedback. It may also help others who may have encountered a similar problem.
Please Log in or Create an account to join the conversation.