Alteryx Server Discussions

Find answers, ask questions, and share expertise about Alteryx Server.
SOLVED

Text/ Flat File as source with Alteryx Server

goutdelete
8 - Asteroid

Hi,

 

Not sure why I can't seem to find a similar thread while I think this should be a rather common use case: we have a text file (flat file) output from a system that we would use Alteryx to parse and perform the data transformation. 

 

With designer all works fine with the template that we generated.  But unfortunately when we implement the Server, the server doesn't seem to recognize the template and basically no longer can truly be automate.  I'm wondering if it's because in Designer a window will pop up for users to pick how to proceed with the text file and Server just doesn't have that (as screenshot below).  And if so how other people solve similar problem?

 

I have a sample file here but really we have tons of "system generated text files" to process; some are internal systems some are from external vendors and there is just no way to change the file format or output and so we just need to deal with the status quo.  Traditionally solutions may involve IT's data team to do coding to parse out the flat file as per spec but I believe if this is solvable in Alteryx Server then business users and achieve more agile digital transformation and process improvement.

 

Thanks a million in advance!

 

5 REPLIES 5
TimN
13 - Pulsar

Hi,

I believe you need to save the template to a place where the workflow can access it.  I have a few workflows where we parse fixed length files similar to your example implemented on the server and the template file is saved in a network drive mounted to the server.

 

X:\AlteryxApplications\FileSpecs\XXX099R02.flat

 

 

This approach runs without issue.

caltang
17 - Castor
17 - Castor

If it's specific to this file and the fixed width length is similar, what @TimN said is the best approach. You will need to keep a copy of the lengths (you can also see it via XML).

 

image.png

 

From the export you can reuse it if it's mapped on the server, or I believe you can add an interface to drop that file in.

 

It looks like this:

 

image.png

Calvin Tang
Alteryx ACE
https://www.linkedin.com/in/calvintangkw/
caltang
17 - Castor
17 - Castor

This is what the configuration of the input looks like:

image.pngimage.png

 

Of course, the first effort is to make those lines and save it via Export, then use that as a base. 

 

Next, adding the interface (if you use it on Server and you mention usage by others, I presume they will need to feed in an input & a template (you can also fix it to a path stored on the Server as well - but I want to illustrate the idea here more):

 

image.pngimage.pngimage.pngimage.png

image.png

Calvin Tang
Alteryx ACE
https://www.linkedin.com/in/calvintangkw/
caltang
17 - Castor
17 - Castor

From there, you can choose the flat file that has the lengths you want:

image.png

 

I made two (you can edit with Notepad++ or Notepad is fine too):

image.png

 

The original goes up to Field 16, and the COPY goes up to Field 15. If I use both, here are the results:

 

image.pngimage.png

 

Hope this helps @goutdelete !

 

Calvin Tang
Alteryx ACE
https://www.linkedin.com/in/calvintangkw/
goutdelete
8 - Asteroid

Thanks @caltang the top part is exactly what we've done (exporting a template and then "Use Field Setting from File").  But that referencing somehow triggered some issue earlier once the team migrated the workflow into the server.  I believe they did upload the file as @TimN suggested too but yet whatever the reason it didn't work for them.  I'm not sure if there's anything to do with the path or those "include assets" options when they uploaded the workflow or not.

 

 

Nonetheless your screenshot of XML provided inspiration and I simply tried the other option of the radio button sets, namely "Embed Filed Settings in Workflow" directly and with that method the whole field definition inbrained directly (images below) so once I migrated/ uploaded into the server it works like a charm.  I've sent off the sample solution to the team for implementation.  Thanks both!

 

image.png

 

image (1).png

Hopefully this post helps future people that requires to process daily text files either received from external or internal systems with a scheduled automation task in the server.