Advent of Code is back! Unwrap daily challenges to sharpen your Alteryx skills and earn badges along the way! Learn more now.

Alteryx Designer Desktop Discussions

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

Data type

swhitmeyer
8 - Asteroid

Hi - I am trying to change the data Type, Size and Scale of one data source (right side) to another data source (left side), see sample data below.

NameTypeSizeScaleRight_NameRight_TypeRight_SizeRight_Scale
ACCUM_DIVD_AMTFixedDecimal194ACCUM_DIVD_AMTFixedDecimal192
ADMN_SYS_CDEV_WString50 ADMN_SYS_CDEString8 
ADV_PREM_REFUND_AMTFixedDecimal194ADV_PREM_REFUND_AMTFixedDecimal192
ADV_PREM_REFUND_QLTY_CDV_WString50 ADV_PREM_REFUND_QLTY_CDString10 
AGMT_HIST_FR_DTDate10 AGMT_HIST_FR_DTDateTime19 
AGMT_TOT_ANNUAL_PREM_AMTFixedDecimal194AGMT_TOT_ANNUAL_PREM_AMTFixedDecimal192
AGREEMENT_PAYMENT_TIME_PERIODV_WString50 AGREEMENT_PAYMENT_TIME_PERIODString4 
AGREEMENT_SOURCE_CDV_WString50 AGREEMENT_SOURCE_CDV_String20 
8 REPLIES 8
RolandSchubert
16 - Nebula
16 - Nebula

Hi @swhitmeyer ,

 

if you want to do this within a workflow, all changes should be possible using a Select tool, just select the data type and size. There is no specific conversion needed.

 

2021-09-22_14-39-30.jpg

 

Best,

 

Roland

swhitmeyer
8 - Asteroid

Thanks, I need to change over 300 fields for multiple tables so I was hoping there was some dynamic lookup way to do this. It would take too long to go through each field within the select tool. 

Christina_H
14 - Magnetar
dYoast
11 - Bolide

Where is your data coming from?  Is it possible to change the types at the source?

 

I know this could be done in SQL Server using views and CAST AS datatype.

Pravallika20
8 - Asteroid

Hi @swhitmeyer 

 

Did you try using Multi Field formula tool? You can change columns with the similar datatype at once

 

Pravallika20_0-1632316064720.pngPravallika20_1-1632316119563.png

 

swhitmeyer
8 - Asteroid

Unfortunately the data source changes so I want to convert the input data to look like it has in the past so it flows through all my workflows

Pravallika20
8 - Asteroid

Hi @swhitmeyer ,

Can you please provide the sample input , output files and elaborate your problem statement 

swhitmeyer
8 - Asteroid

@Pravallika20 Same data is provided in original post. I am trying to change the data Type, Size and Scale of one data source (see the first 4 fields of sample data) using the data Type, Size and Scale of the last 4 fields. For example for AGMT_HIST_FR_DT, I need to change from DateTime 19 to Date 10. Hopefully that makes sense.

Labels