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.
SOLVED

Different Schema erro in using Dynamic Input

Laky
7 - Meteor

Hi all,

 

Recently, i"ve just done a quiet easy logic in Alteryx:

1.  Use 'Dirctory button' to locate a folder;

2.  Use 'Dynamic input button' to change entire file path;

3.  Do some data cleaning;

4.  Union all the files in this folder.

But When i run the logic there is an error in 'Dynamic input' saying that the schema is inconsitent with the first file.

Though, all my input file is .xlsx---directly extrated from ERP system

Any ideas or instructions?

 

I've attached screenshot in the word for your reference.

Hope your guys could help me to handle this.

 

Best regards,

lakt

17 REPLIES 17
JordanB
Alteryx
Alteryx

Hi @Laky

 

Do you have multiple sheets in these xlsx files? 

 

Best,

 

Jordan Barker

Solutions Consultant

Laky
7 - Meteor

Hi JardanB

 

Thanks for ur reply.

Not yet, one tab in one excelSmiley Mad

 

Regards,

laky

Laky
7 - Meteor

Do you have any idea about this, Jordan?

Cuz i just tried that if i use several 'input file' button, then union them, it does work.

So i think the painpoint is about the Dirctory & Dynamic input

 

Regards,

Laky

JordanB
Alteryx
Alteryx

Hi @Laky

 

Within this article it shows how to use the Directory tool to read all files from a folder and then use a batch macro to read in all files with differing field schema's.

 

Workflow examples are available for download at the bottom of that article.

 

A batch macro will read in files with different field schemas. 

 

Best,

 

Jordan

Laky
7 - Meteor

Dear,

 

I've tried it.

I'd like to know that is it because every excel every tab has its own name, ie the tab name is different, resulting the failure to dynamic input?

JordanB
Alteryx
Alteryx

Hi @Laky

 

Yes that is the cause. If you want to use the dynamic input you will have to append the sheet name to the end of the xlsx files with thier associated sheet name.

 

Note: This has to be .xlsx|`Sheet1$`

 

Best,

 

Jordan Barker

Solutions COnsultant

Laky
7 - Meteor

Jordan,

 

But how to add?

Is it add into the Dynamic Input???

I've attached it.

 

Regards,

Laky

JordanB
Alteryx
Alteryx

Hi @Laky

 

In the last post you said every sheet name was different for each of these xlsx files? 

 

If so you can do the following:

 

1) Directory tool input to read all of your files in

2) Text input with a list of all unique sheet names

3) Join tool on 'record position' to get the same file paths and sheets on the same row

4) Formula tool to add the file path and sheet name together ([Full Path]+"|`"+[Sheet Names]+"$`")>>>This is the formula >>replace sheet names and full path with your field names

5) Feed into the dynamic input and select 'replace full path' in the dropdown

Pic 1.png

 

This is still dependent on all of these files having the same field schema. 

 

I have attached a sample layout workflow built in Alteryx 10.6

 

Best,

 

Jordan Barker

Solutions Consultant 

 

 

Laky
7 - Meteor

Dear,

 

I still have no idea, that it doesn't work.

Or on the other hand, would u plz tell me what is different schema mean?

Thus may be i could do some imporvement about my raw data.

 

Best regards,

Laky

Labels