Get Inspire insights from former attendees in our AMA discussion thread on Inspire Buzz. ACEs and other community members are on call all week to answer!

Alteryx Designer Desktop Discussions

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

Adding a new column in in-database workflow

Ilango
7 - Meteor

Hi there,

 

I am trying to add a column with a static value to an in-database workflow. Could you please suggest me the right tool? I tried In-DB formula tool. It didn't work for me. It says "No In-Database data received".

 

Thank you.

Ilango

6 REPLIES 6
afv2688
16 - Nebula
16 - Nebula

Hello @Ilango ,

 

if you just want to add a constant to a workflow you can do it directly on the configuration page. Check this post

 

https://community.alteryx.com/t5/Alteryx-Designer-Knowledge-Base/All-About-Constants/ta-p/17458

 

If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

Regards

Ilango
7 - Meteor

Hello there,

 

The link given above explains how we can add a new column in a regular workflow. I am looking for similar one in an in-database workflow.

 

Thanks, Ilango

DanM
Alteryx Community Team
Alteryx Community Team

@llango,

 

You should be able to create a field with the Formula In-tool.

 

From Help: https://help.alteryx.com/2019.3/LockInFormula.htm

"The Formula In-DB tool creates or updates fields in an In-DB data stream with an expression using the native language of the database, such as SQL."

 

It may be the data type you are attempting to put into the table. You also need to use this in conjunction with the Write Data InDB 

Ilango
7 - Meteor

It worked. Thank you.

sudeeptandon
6 - Meteoroid

Could you please provide an example? I am trying to create a few columns: values of which are either picked from existing columns or are constant throughout the data like "1" and "0". I tried using UPDATE and INSERT commands but to no avail. Also, I am unable to figure the name of the table made after the joining of 2 tables in my DB since I have not written it to my DB.

Ilango
7 - Meteor

Hi Sudeep,

 

Refer attached example implemented in In-DB formula tool. The SQL expressions and functions should be specific to your target database.

 

Hope this helps.

 

Thanks, Ilango

Labels