This site uses different types of cookies, including analytics and functional cookies (its own and from other sites). To change your cookie settings or find out more, click here. If you continue browsing our website, you accept these cookies.
So I don't know if this is possible...but figured it would be worth asking. The top data set I am creating a unique key with the formula tool. I then would like to use those new values (unique key generated) and somehow auto insert those unique key's created and only pull those back with my 2nd data set that is joined below and then using the join tool only produce the ID found in both data sets.
Thanks for the info, I guess my question still remains though if I can take the new "uniquekey" value that is created by dataset1 formula, and somehow have those values automatically "entered" into the SQL(for dataset2) as the dataset criteria for what to pull in to then join those unique values for the output.
As @benakesh mentioned, In-DB is probably the easiest way to go. However, if that's not an approach you can use for whatever the reason, the other option would be to use the Dynamic Input tool.
The template query (within the Dynamic Input tool) would be setup something like...
WHERE UniqueID IN('placeholder')
Next, you'd select the "Modify SQL Query" option and "Add" the option to "SQL: Update WHERE clause and configuring it to replace your "placeholder" string with the concatenated string.
One to watch out for though... there could be a limit to how long an IN statement can be. There's a setting that, by default, will cut it off at 1000 characters, which you can adjust. if the concatenated string is over that value, it'll prepare another query for execution with the next set of characters, however, it may have cut a value in the middle.
I know there's plenty of articles and posts around Community that talks about this in more detail in case you're still getting stuck.