Bring your best ideas to the AI Use Case Contest! Enter to win 40 hours of expert engineering support and bring your vision to life using the powerful combination of Alteryx + AI. Learn more now, or go straight to the submission form.
Start Free Trial

Alteryx Designer Desktop Discussions

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

Using Directory to Create a Macro to Fix Error "different schema"

KamenRider
11 - Bolide

Hi,

 

I am a newbie to macro and I have been looking in the site about a directory converting to input macro however I can't find one to give me a solution. I have these tools as shown below where I have encountering problem "FileInfoReport" has a different schema". Can you please help how to create a macro or a sample solution?

 

KamenRider_0-1666541033547.png

 

Hoping for your assistance on my inquiry.

 

thanks

 

Kamen

8 REPLIES 8
Felipe_Ribeir0
16 - Nebula

Hi @KamenRider 

 

You can use the attached one, it came from this topic: The Ultimate Input Data Flowchart - Alteryx Community entrée de données eingabedaten

 

Felipe_Ribeir0_0-1666541700957.png

 

gyang3
Alteryx Alumni (Retired)

@KamenRider This alternative may be helpful as well. This macro will allow you to fee multiple different file types and different schemas all at once.

 

https://community.alteryx.com/t5/Alteryx-Designer-Discussions/Input-Batch-Macro-AKA-the-Extra-Dynami...

 

KamenRider
11 - Bolide

Hi @Felipe_Ribeir0 ,and everyone else to help.

 

I have tried the batch input however I am still encountering the same error of invalid schema. See screenshots.

 

KamenRider_0-1666604682071.png

 

KamenRider_1-1666604720585.png

 

In line to upatevalue tool, can you please help me how  can I update it. Can you please give me a sample? I have multiple excel files to read. Should I place full path + *.xlsx in the input file and the update file check the replace a specific string and type the name of the other file?

 

Thanks,

 

Kamen

 

Felipe_Ribeir0
16 - Nebula

Hi @KamenRider 

 

The attached file already is an example of a batch macro fully configured to input.xlsx files.

 

Just change the Directory Tool input to point to the folder location of your files, see if name of the sheet of the files that you want to open is "Sheet1". If it is not, change the name in the formula tool.

 

Felipe_Ribeir0_0-1666609665906.png

 

This should work, if it does not work, please send us prints of the error message.

 

KamenRider
11 - Bolide

Hi @Felipe_Ribeir0 

 

Question.. do I need to change something in the macro files?

 

1. Do I need to input something here?

KamenRider_0-1666623143304.png

 

2. This is automatic right?

KamenRider_2-1666623215814.png

3. Do I need to tick this or leave this blank?

KamenRider_3-1666623263417.png

 

4. I'm using a directory tool to read all excel files, do i need to change something in this part?

KamenRider_4-1666623665142.png

 

Looking forward for your clarifications.

 

Thanks,

Kamen

Felipe_Ribeir0
16 - Nebula

Hi @KamenRider 

 

For .xlsx files you do not need to change anything. These values that you highlighted will be replaced by your main workflow.

 

Felipe_Ribeir0_0-1666624561628.png

 

Felipe_Ribeir0
16 - Nebula

Hi @KamenRider 

 

It worked?

KamenRider
11 - Bolide

@Felipe_Ribeir0 

 

Sorry for late reply. For some how, I am still getting an error of invalid schema. I can't understand the work around of macro about it is being created and done. I am going to check more on this and will be back for questions. Feel free to share more solutions.

 

Thanks, 

Kamen

Labels
Top Solution Authors