Community Spring Cleaning week is here! Join your fellow Maveryx in digging through your old posts and marking comments on them as solved. Learn more here!

Alteryx Designer Desktop Discussions

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

Input tool - Output File Name as Field default setting.

AndrewS
11 - Bolide

Hi, is there any way to change the default field name of 'FileName' when selecting the Output File Name as Field option (Full Path or File Name only) on the Input tool? I have a batch macro importing files across multiple systems, one of the fields at import is also named 'FileName' and gets changed to FileName2 and throws the rename warning message. Ideally, I'd like to change the default name to something else and not have to rename the fields after the import is complete. I've played around with the XML but couldn't get the name to change.

 

I have the option of passing a Record ID to a control parameter and then joining that back to get the filename post macro, but the dataset is pushing 100gig and I'd like to avoid adding any additional joins to the workflow where possible.

 

Cheers.

 

Filename.PNG

4 REPLIES 4
hlmess
7 - Meteor

This might fall under the realm of join you'd like to avoid but, if you're pulling from something other than .yxdb, you should be able to use a field info tool to pull out the file name from the 'Source' field and append that onto your data source with an append fields tool. That would be part of the batch macro and would be less resource intensive than a join on the complete data set. This would replace using the output file name option and you could name it whatever you want when you append. 

hlmess_0-1587394650719.png

 

AndrewS
11 - Bolide

Thanks @hlmess , it didn't occur to me to consider the source field as a way around it and I would have set it up as above. Turns out the input files are .yxdb. Why doesn't the Field Info tool pick up Source on .yxdb? My files are showing (Multiple Sources) on all the fields.

hlmess
7 - Meteor

I believe it won't work for .yxdb because it stores that metadata from the workflow where the file was created. Most file types don't store that level of detail so they default to the file name. Multiple sources means that that field was edited multiple times through the course of a workflow, I would guess. I'll keep thinking about it and let you know if I come up with another alternate solution. 

AndrewS
11 - Bolide

Thanks again @hlmess.

Labels