Read Text File in Alteryx

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 below Customers_text file.

Read Text File in Alteryx 0

How to Read Text File 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.

Read Text Files 1

It opens the following Data Connections window. Please select the Files tab and click on the Select File to select the text file.

Working with Text files

Let me choose the Customers_text text file from the Input Files folder.

Alteryx txt file 3

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: If your source file columns separate by fixed width, choose this option.
  • 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, 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.
Read Text File in Alteryx 4

As you all know, the columns in our text file are separated by Comma delimiter. We have chosen the Read it as a delimited text file option and selected the Comma.

Read Text File in Alteryx 5

You can see the Customers_text text file information and the preview of the first 100 records on the left side configuration pane.

Read Text File in Alteryx 6

Drag and drop the Browse tool and connect the text file Input Data tool to Browse and click the Run button.

Read Txt File in Alteryx 7

From the below Alteryx read text file image, you can see all the records in that text file.

Read Text File in Alteryx 8