Support Questions

Find answers, ask questions, and share your expertise

Passing in multiple attributes to ExecuteSQL

avatar
Expert Contributor

Hello,

I have an executeSQL processor that takes in two attributes ($fromDate and $toDate)

ex. select * from table where date > $fromDate and date <$toDate.

The data for these attributes are stored in separate files so my flow looks like this:

fetchFile->extractText->

executeSQL

fetchFile->extractText->

Even though both extractText are connected to the same execute SQL, what I'm noticing is that executeSQL will take only one of these variables and run. I want tobe able to pass in both at the same time before running. I am also surprised it's even able to run with only one parameter. Example, if I disabled either the top or bottom flow, the sql still executes fine. Does it used a cached value?

1 ACCEPTED SOLUTION

avatar
Expert Contributor

nevermind, it looked like I was setting my attributes correctly. I combined both the toDate and fromDate into one file, and now my flow looks like:

fetchFile->extractText->executeSQL

fetchFile is from local FS, I use regex to pull the fields I need from the file and set them to their respective variables and use those variables in my executeSQL

View solution in original post

2 REPLIES 2

avatar
Expert Contributor

nevermind, it looked like I was setting my attributes correctly. I combined both the toDate and fromDate into one file, and now my flow looks like:

fetchFile->extractText->executeSQL

fetchFile is from local FS, I use regex to pull the fields I need from the file and set them to their respective variables and use those variables in my executeSQL

avatar
Contributor

Hi mliem,can you share screenshot of the processor(properties)