Our Community is getting an upgrade! To get everything ready for the relaunch, we’ll be placing the site in read-only mode starting September 21st.
We really appreciate your understanding while we get things set up behind the scenes. Catch up on all the exciting details about the move here.
Need help or have questions? Drop us a line at [email protected]
Created 12-08-2016 04:31 PM
Beloved forum,
is it possible to have dynamic query using ExecuteSQL processor ?
e.x.
FileX.txt content (comma separated) XXXXX, BBBBB, CCCCC, CCCDD XXXXX, EEEEE, CCCCC, DDDDD outputstream XXXXX, BBBBB, CCCCC, CCCDD, 'select customer_name from table where id=CCCDD limit 1' XXXXX, EEEEE, CCCCC, DDDDD, 'select customer_name from table where id=DDDDD limit 1'
I want to amend the select statement result to the original file ?
Thankssss
Created 12-08-2016 05:39 PM
So if the customer_name value for id=CCCDD was "Matt" then you'd like the first output row to read:
XXXXX, BBBBB, CCCCC, CCCDD, Matt
Is that correct? If so, you could do the following:
Created 12-08-2016 05:39 PM
So if the customer_name value for id=CCCDD was "Matt" then you'd like the first output row to read:
XXXXX, BBBBB, CCCCC, CCCDD, Matt
Is that correct? If so, you could do the following:
Created 12-08-2016 11:21 PM
its working, many thanks..
is it possible to have the same through executescript processor ?
Created 12-13-2016 01:50 AM
is it possible to route files based on file content,
route to processor A if field2 = BBBBB, and to processor B if field2 = AAAA ? @Matt Burgess
Created 12-13-2016 02:44 PM
Yes, you can use something like the regex from step 2 above in a RouteOnContent processor, or after the ExtractText (step 2 above) you can use RouteOnAttribute looking for values of column.2.
Created 12-13-2016 04:00 PM
Thanks @Matt Burgess
shall I put the regex as property ? can you advise further how to define it ?
Thanks a million
Created 12-14-2016 02:47 PM
Yes you can add a dynamic property whose value is a regular expression (see the documentation for more details).