We are celebrating the 10-year anniversary of the Alteryx Community! Learn more and join in on the fun here.
Start Free Trial

Alteryx Designer Desktop Discussions

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

Help with formatting columns based on a list of column metadata

csh8428
11 - Bolide

I am connecting to a Thoughtspot API. The JSON coming out of the API does not lend itself to parsing/formatting data as the naming conventions are not reliable enough in a way to programmatically parse the data accurately. This is because the user can name the columns whatever they want.

 

I have the API call to get the data values and the API call to get the column metadata that shows what data type each column is. What I'm having trouble with is using the column metadata list to parse/format the table data; most importantly dates. I want the date fields to be standard Alteryx format yyyy-mm-dd.

 

The date values are in epoch time; which adds that extra bit of complexity. I know how to do all this "in-line" using the multi-row formula tool and changing the data types, but this needs to be done programmatically as each API call will hit different Tspot tables and have different column names.

 

Attached is a sample workflow.

 

Thanks for any help!

 

 

3 REPLIES 3
alexnajm
18 - Pollux
18 - Pollux

Do you have any way of identifying which columns would need to be converted versus not?

csh8428
11 - Bolide

@alexnajm Every field that comes out the Column Metadata input that ISN'T a VARCHAR, since the default data type of the data values is string anyway. Put another way, anything that isn't a string needs to be correctly converted/formatted.

alexnajm
18 - Pollux
18 - Pollux

@csh8428 I think this could give you a good start then - essentially this will limit the columns based on the column metadata selections, and you can take it from there with a multi field formula tool to do the conversions. If you need to retain the other fields, you can always Join back to the original data on RecordID to retain those columns

Labels
Top Solution Authors