Community Spring Cleaning week is here! Join your fellow Maveryx in digging through your old posts and marking comments on them as solved. Learn more here!

Alteryx Designer Desktop Discussions

Find answers, ask questions, and share expertise about Alteryx Designer Desktop and Intelligence Suite.
SOLVED

Add column to output

akasubi
8 - Asteroid

Hi,

 

Does anyone know how to add a column to output generated after running a workflow?

 

I've extracted some data from a SQL Server database using the "in-database" tool and I'd like to add a column to that output to show the current date that the data was extracted (e.g. getdate()) ). The column will basically have the same value for all rows each time it's run, but will be different when run on different dates (hope this makes sense).

 

Thank you!

 

 

afk

2 REPLIES 2
adamorse
9 - Comet

Provided I understand what you want correctly you can do this using the IN-DB Formula tool and the getdate() function. Configured as below, this will add a column to your in-db data stream with the day the workflow was run. If you want to add it after getting the data stream out of the in-db tools, you can do something similar with the formula tool and the alteryx formula DateTimeNow() instead of GETDATE() [EDIT: you should probably update the type from Double to DateTime....I forgot to do this)

today.PNG

akasubi
8 - Asteroid

This has worked, thank you!

Labels