“Import from Text” Managed Tables Group is an instruction that allows the user to import data from a text/CSV file into a managed table.
It is required to have managed table with the same numbers of columns as columns in the Text/CSV file. If you have not created a managed table already, then please refer to the article on how to create a managed table.
- Create a new action step by right-clicking on a group and then selecting "Add action step":
- Under "Manipulating Data" select "Multiple file manipulations" and then click on "Add the selected step to my process":
- In the instruction search bar type "import from text".
- Then select the "Import from Text" instruction that has the grey icon:
- For Steps 6-12 refer to the image below:
- Click on “Link” under the source section to select the text/CSV file to be imported. Note: the text/CSV file needs to be added in a data step earlier in the process.
- Next, click on “Link” under the Target section to select the managed table to import the data into.
- The number of lines/rows to skip in the text/CSV file can be specified.
- If the text/CSV file has a headings row, then you should tick the checkbox to the left of “Include Column headings?”
- If you want to clear the managed table before importing the data, then check the “Clear old data?” checkbox.
- The delimiters for the text file can be changed to match the source file. For a CSV the delimiter should be a comma.
- The “Dates are in the format” option is used to specify the format of any dates in the Text/CSV file. This will allow you to store dates as a DateTime object in the managed table.
Tips and Tricks
If there is 1 header row, then the “Number of lines to be skipped for header from source file” option set to 1 (Step 8) and the “Include column headings?” (Step 9) perform a very similar function.
There, however, is a small difference. If the Text/CSV file was just a header row (with no entries) then setting the “Number of lines to be skipped for header from source file” option to 1 would cause the step to fail, whereas ticking “Include column headings?” would cause the step to continue.
Note: Most of the time you would not use both the “Include column headings?” option and the “Number of lines to be skipped for header from source file” option at the same time.