How to update dates in a SQL input query before running workflow?
- 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
Hello guys.
I have to update a range of dates in 5 different queries that are inputted with input tool.
Those range of dates have a pattern, which is:
IF datetoday = 10/09/2021 THEN update the query with - 2 days. The query then would be like this:
The pattern is to take the datetoday and subtract 2 days, to create a range of 3 days of values.
However, I see that Alteryx does not have a functionality that change the dates before running the workflow. Example:
As you can see, the dynamic tool comes AFTER the input tool. For me that does not work due to a massive amount of data, millions of lines.
Is there any way to fix my problem? Any workaround?
Any input is appreciated.
Thanks
Solved! Go to Solution.
- Labels:
- Dynamic Processing
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
The dynamic input will replace the date before the input tool (the input tool in this case will NOT do any queries into your DB, it exists just to parametrize the replace the values into the dynamic, which will execute the query), what you will have to do is very simple:
Create a collum with these 3 dates (use a generate tool to do that) and then put the sql into dynamic input, configure it to replace the dates into your sql and it will work
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
That's outstanding! Love it.
So, Alteryx "understand's" that after the input tools we have a dinamic tool that replaces values in a query, so the workflow works backwards?
Dinamic tool > input tool > other tools Right?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
You can use something like this
where SDBANCO.VCOB_BAML_R_TITULOS_INTERGR_CC.DATA between CURRENT_DATE-2 and CURRENT_DATE
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
I think I expressed myself a little wrong. In this case, the dynamic input executes after the input, but the input will not query your db, it will just have the dates to replace into dynamic input
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
Joker Hazard, are you brazillian? I can explain better in portuguese...
If you want to use the dynamic to replace the dates, I can help you with that, but if you want to do this in the query, the Maskell_Rascal solution will help you
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
Yes I am! I will send a private message for us to talk.
Thanks 😉
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
How can I make the same thing with the other SQL table that was inner joined with the first one?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
