Alteryx Designer Desktop Discussions

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

Dynamic Input - What is the template for if its schema is ignored?

jkellar
5 - Atom

I'm curious what purpose the template file has. I assumed incorrectly that it was used to establish the data types and structure of the files to follow, but it doesn't.

 

I created a template .xlsx file specifically to 'force' the schema to use so that Alteryx wouldn't guess it based on the content of the first file. The template is very basic and has every column populated and data-typed in a way that is correct for all columns. I have to process files that are inconsistently populated, but are always compatible with the schema of the template, eg: a due date may come in null in one file, but populated in another. I don't have control over how the files come in, other than they must conform to the published template, which is all text strings and time/date.

 

Everything processes fine one file per run, but not with more than one with a wildcard input.

 

I get that I have to work around this with a macro, but why specify a template if it's going to be ignored?

 

Why wouldn't you combine the files first and then determine the schema even if you do ignore the template?

 

How about allowing the specification of the order of the processing so that I could include a throwaway file in the input?

 

Thanks for listening.

6 REPLIES 6
BrandonB
Alteryx
Alteryx

Hi @jkellar 

 

This is one of my favorite Alteryx articles that goes over the different ways that you can bring in multiple files and the nuances between methods: https://community.alteryx.com/t5/Alteryx-Designer-Knowledge-Base/The-Ultimate-Input-Data-Flowchart/t... 

 

I hope this helps!

danilang
19 - Altair
19 - Altair

Hi @jkellar 

 

The template in the dynamic input is way to specify the type of data source that will be used as opposed to the schema of the data source.  If you specify that the template is an .xlsx file, then all the files flowing through the Dynamic Input have to be .xlsx files.  You can't have a mix of .xlsx and .csv or even .xls files even if you change all the extensions to .xlsx. 

 

For file input, the template is a way to let the Alteryx Engine know what driver to use when opening and parsing the files.  Once this is specified, the various rules that apply to the same file type in the Input tool, apply to the driver in the Dynamic Input tool.  Using a wild card(*.xlsx)  in an Input tool will complain and skip files that don't have an identical schema, the same as it will in the Dynamic Input

 

Dan    

jkellar
5 - Atom

yep - Thanks @BrandonB. I've read it a couple of times. It's probably something that everybody reads after they have a problem. I'd suggest making it part of the intro course material.

 

I'm really looking for some insight about why the tool works the way it does, because based on the number of times people ask, I'm not the only person that finds it non-intuitive.

 

Perhaps it's lost in time or turnover. 

jkellar
5 - Atom

Thanks @danilang. Makes sense what you're saying. I guess it's one of those assumptions I have to get over. 

 

 

 

 

 

 

 

jason_scarlett
10 - Fireball

Then why not just ask for the type of file, instead of requiring the file itself? I hate having to create files ahead of time.

 

I find the whole template part very "undynamic" and rather static a rigid.

BrandonB
Alteryx
Alteryx

@jason_scarlett you can absolutely do this with a macro and allow for changes in schema by changing a couple of options within the interface view. 

 

These links will share some other approaches that don't require a template:

 

https://community.alteryx.com/t5/Alteryx-Designer-Knowledge-Base/The-Ultimate-Input-Data-Flowchart/t...

 

https://community.alteryx.com/t5/Engine-Works/The-Ultimate-Alteryx-Holiday-gift-of-2015-Read-ALL-Exc...

Labels