This section shows how to read or load the text file data into the Alteryx designer with an example. To demonstrate the Alteryx read text files, we used the Customers_text file which has teh 15 records of simple customer information with hire date.
How to Read Text Files in Alteryx?
First, drag and drop the Input Data Tool into the newly created Alteryx workflow. Next, within the Configuration tab, click on the down arrow button to connect to a Text File.
It opens the following Data Connections window. Please select the Files tab and click on the Select File to select the text file.
It opens a new dialogue window called Open a Data File. Let me choose the Customers_text text file from the Input Files folder.
Once you click on the Open folder, the following Resolve File Type window will open.
- Read it as a built-in type: By default, it selects the Alteryx database type. Here, you have to change the file type.
- Read it as a fixed-width text file: Choose this option if your source file columns are separated by fixed width.
- Read it as a delimited text file: Choose this option for all the regular text files. Here, you have multiple delimiter options such as Comma, Tab, and Space to choose from. Or select the Other option and specify the delimiter, for instance, the semi-colon.
- First Row Contains Field Names: If your text file contains the header or its first row has the column names, checkmark this option.
As you all know, the columns in our text file are separated by a Comma delimiter. We have chosen the Read it as a delimited text file option and selected the Comma.
You can see the Customers_text text file information and the preview of the first 100 records on the left side configuration pane.
Drag and drop the Browse tool, connect the text file Input Data tool to Browse, and click the Run button. From the below Alteryx read text file image, you can see all the records in that text file.