"select
a,
b,
c,
d,
e,
f,
g,
h
from
ab.pqr.xyz
where
a in ('12345')"
I am using the above sql query t fetch the the details. And query is running fine.
But I have list of 30,000 entries to fetch. I have created the concatenated list of these 30000 entires and break them in 3 groups consisting of 9999 entries. Below is the sample
Now i want to pass these values in the sql query i have written in formula tool but i dnt know how to read these multiple values
Batch_ID | a |
1 | 1234','3244','7008','6208','1211','4009' |
2 | 3411','2414','1108','4454','7653','7369' |
3 | 3455','1144','6788','2570','1771','9478' |
Solved! Go to Solution.
Hey @PB41091, if I'm understanding your ask correctly, are you looking to generate the IN lists like so?
If so, we just interrupt the hard-coded query value to insert our field containing the list, as shown above.
You can use a Batch Macro, where a Control Parameter feeds in your 3 different lists of values to an Input Data tool in the macro, and use an Action tool to "Replace a specific string" in the Input Data tool.
Or you can use the tools under the In-Database palette.
But there isn't much help for those tools. Check out this video: https://community.alteryx.com/t5/Videos/In-Database-Workflows/m-p/330566
We use these tools: Connect In-DB, Data Stream, Join In-DB
We upload our values (your 3000 values) to a TEMP table in the database, then use Join In-DB to join from the Temp table to the "primary" database table we're reading.
Unfortunately my company is currently blocking all uploads, screenshots and sample workflows, so I can't provide any examples.
Chris
I put your query in a text input tool.
I have a second datasource with my 3000 entities.
I configure a summarize tool and concatenate them
with ' ',' ' as my dividers.
I append the two datastreams.
I replace '12345' with my conctanated values.
I use dynamic input In-DB