Skip to main content
simply more productive

The Data Specialist

Thanks to our intuitive transformation designer, you can convert data effortlessly to a variety of formats without knowing how to program. It’s not only efficient, it’s also easy to use.
Up to 100,000 records can be processed with the freeware version!
Flowheater Chart

Use Stop Heater with condition

More
8 years 4 months ago #2786 by JD Cox
Hey guys. I’m trying to run this def prior to the import def. Basically I’m filtering out records that do not contain any data in the “Account number” field. Then I do a lookup to see if the account exists in our WMS. Then I look at the length of the ID# returned from the lookup. If zero 0 I want to notify the user of the new account.

Everything works fine with the exception of the IF/Stop. The length is read properly and the IF is looking for 0 but I get the message even if the account does exist.

The IF logic is AND, and Condition =0, the Stop Heater is “with error message”.

Thanks in advance for any help, JD

Attachments:

Please Log in or Create an account to join the conversation.

More
8 years 4 months ago #2787 by FlowHeater-Team
Replied by FlowHeater-Team on topic Use Stop Heater with condition - Post(2787)
Hi JD,

This behavior is related to the processing sequence of the Control (Yellow) Heaters. The Stop Heater are executed before the Filter Heater could filtered out not necessary rows!

In this case the Lookup Heater returns the value DBNULL for this account. DBNULL has also a length of 0 and the Stop Heater stops the processing with the defined error message.

You can solve this with a simple workaround. You’ll find an example in the attachment.

Note: If you are executing the attached example the Stop Heater never stops this definition. In case you’re removing the pipe/connection showing in the screenshot below the Stop Heater will stop the Definition.



File Attachment:

File Name: filter-and-stop.zip
File Size:2 KB

Best wishes
Robert Stark

Please Log in or Create an account to join the conversation.

More
8 years 4 months ago #2788 by JD Cox
Replied by JD Cox on topic Use Stop Heater with condition - Post(2788)
:) Robert,

Thanks again for your help. Your explanation about the stop heater running prior to the filter made perfect sense. I was unable to get the desired results but I did find a workaround. Not sure if it’s the version or the lookup heater. Either way your assistance helps with production.

Stay safe

JD

Please Log in or Create an account to join the conversation.

More
8 years 4 months ago - 11 months 4 weeks ago #2789 by FlowHeater-Team
Replied by FlowHeater-Team on topic Use Stop Heater with condition - Post(2789)
Hi JD,

You’re welcome.

The Lookup Heater is indeed tricky and because this outdated. Try to use the SQL Heater instead. With the SQL Heater you can perform any SQL statements.

For example if you want to perform a data lookup you have to use the following SQL statement.
select FIELDNAME from T_TABLENAME where KEY-FIELD-NAME = ‘$KEY-PARAMETER$’

In this case you must set the FlowHeater Parameter $KEY-PARAMETER$’ with the Set Parameter Heater , that’s all.

You’ll find a lot of examples here in the forum: SQL Heater Examples

Best wishes
Robert Stark
Last edit: 11 months 4 weeks ago by FlowHeater-Team.

Please Log in or Create an account to join the conversation.

More
8 years 4 months ago #2790 by JD Cox
Replied by JD Cox on topic Use Stop Heater with condition - Post(2790)
Thanks for the info Robert,

We do a lot of lookups during the imports I will make good use of this.

Always grateful, JD

Please Log in or Create an account to join the conversation.

More
8 years 2 months ago #2869 by JD Cox
Replied by JD Cox on topic Use Stop Heater with condition - Post(2869)
Hey Robert,

I am using this more and more. But, how do I run this with two Key Parameters.
select FIELDNAME from T_TABLENAME where KEY-FIELD-NAME = ‘$KEY-PARAMETER$’

I tried it a few different was and was unsuccessful searching for a solution.
A simple line will be fine and is there anything unique about the data types in the structure?

I need to narrow the search by only looking at customer products for the SKU's PK.

Thanks, JD

Please Log in or Create an account to join the conversation.

More
8 years 2 months ago - 8 years 2 months ago #2870 by FlowHeater-Team
Replied by FlowHeater-Team on topic Use Stop Heater with condition - Post(2870)
Hi JD,

You can use as much parameters you need. You just have to set each parameter with the Set Parameter Heater before.

Here you`ll find some examples
select FIELDNAME from T_TABLENAME where KEY-FIELD-NAME in (‚$KEY1$‘, ‚$KEY2‘)
select FIELDNAME from T_TABLENAME where KEY-FIELD-NAME1 = '$KEY1$' and KEY-FIELD-NAME2 = '$KEY2$'

Note: The SQL Heater just return the value of the first available record!

Best wishes
Robert Stark
Last edit: 8 years 2 months ago by FlowHeater-Team.

Please Log in or Create an account to join the conversation.

More
8 years 2 months ago #2871 by JD Cox
Replied by JD Cox on topic Use Stop Heater with condition - Post(2871)
After seeing your response I knew the problem had to be with data types.
And it was with the data types after the SQL Heater.

All is good up and run.

As always thanks for your time and help.

JD

Please Log in or Create an account to join the conversation.

Time to create page: 0.315 seconds
FlowHeater Logo

FlowHeater - The Data Specialist

Efficient data integration and transformation with FlowHeater – the perfect solution for a seamless transfer of your data.

Legal information

Support & Contact

Contact

Phone:
0951 / 9933 9792

eMail:
This email address is being protected from spambots. You need JavaScript enabled to view it.


Copyright © 2009-2024 by FlowHeater GmbH. All rights reserved.