How can I pass Dynamic value to sql in input tool in alteryxw
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Mute
- Printer Friendly Page
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
I am trying to pass the max timestamp value from a table in destination to load delta from the source table in another db. For that I am thinking of keeping a log table in destination db so after every load of db from source to destination i will update the log table with the max timestamp in destination table . So for next load the min timestamp will be the value in log table and max time stamp will be the current timestamp. I have seen examples were a constant value is replaced in alteryx, but here the value will be dynamic & have to be queried from a db every time.Can any one suggest some thing for this.
Solved! Go to Solution.
- Labels:
- Dynamic Processing
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
I would use a dynamic in-db and update the sql with a formula.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
Hi @Devu_GN,
I've done this once with an InDB integration, but this would work with the general tools as well.
Like already mentioned from @wwatson you have to use a Dynamic Input (with or without InDB).
In this attached IncrementLoadWF.yxmd you load at first the current max timestamp from your control table. Then you use this value to inject the SQL statement you want to pass to the real table you want to query. In this case I'm using the Dynamic Input In-DB Tool to process the datasets. I store them in the same database, and after this is done the control table gets updated with the new, latest timestamp.
The 2nd workflow "Source Table Creation" may help you to create some sample datasets.
Best regards,
David
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
yes it helped .. thanks

