Alteryx Designer Desktop Discussions

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

Joining databases

jonathangonzales
8 - Asteroid

Hello,

 I just signed up for alteryx and I have a couple questions on my first workflow.

I am joining 2 databeses and I need to add a column to identify each database.

 

Anybody have any ideas?

 

Thanks

3 REPLIES 3
jack_morgan
9 - Comet

Hey Jonathan,

Use a formula tool immediately after each of your inputs from you DBs to add that column. I usually do this and create a column named SOURCE that way as I blend and create things, i know where it came from. In the formula tool, your expression would be literal: "Database Name 1" or whatever you want to name it.

 

Hope that helps!

Jack

jdunkerley79
ACE Emeritus
ACE Emeritus

Use a formula tool to create a new field after each input with a database name field. Have attached a simple demo of this with a Union and a Join tool.

 

If you are reading from flat files you can make the input tool add the filename as field.

 

 

tom_montpool
12 - Quasar

You can also use the "Output File Name as Field" option in the Input Data tool -- that way you can get either the file name or the full path.

 

Have fun with the File function set in the Formula tool to parse the file name/path!

 

Good luck.

Labels