Title: Import Tab Delimited File
Description: This flow allows you to import tab delimited files into a destination table.
Detailed Instructions: Import the package attached below into your own environment.
You need to change the action where I get the file content from, such as sharepoint, onedrive, or other storage locations.
Please read the comments within the flow steps, they should explain using this flow.
If you have number types remove the quotes (around the variables) at this step where the items are appended.
Notice all my variables have quotes and are all string type. If one were a number type it would not have quotes.
All column names should remain with quotes. You will also rename your columns here and add or remove.
Just keep the format - comma after each column name : data item except the last one.
Also make note of how each column is accessed here with the formula variables('varname')[0], then variables('varname')[1] ... and so on where [0] is the place of the column in your data in order starting from 0.
zero is one, 1 is two, 2 is three, and so on.
You will need to modify the JSON schema to match your column names and types, you should be able to see where the column names and types are within the properties brackets.
There is no need to rebuild the entire schema, simply rename the columns and change their type if needed.
Also add and remove columns, as this JSON will allow you to select the columns dynamically for writing your data.
The current column names are col0, col1, col2, etc... and I set them all type string.
The names and types should match your appended json from image above.
I don't have memorized all the types but there is string, integer, float? maybe? and other and will need to be looked up.
This step will control how many records you are going to process.
The flow is set up to process 100 rows and should not be changed or due to the nesting of loops it will go over the limit.
You should change the number of loops though. In the pic it is set it to 5 loops. That's 5 x 100 rows = 500 rows.
So if you have 8,000 rows you would have 80 loops.
Questions: If you have any issues running it, most likely I can figure it out for you.
Anything else we should know: You can easily change the trigger type to be scheduled, manual, or when a certain event occurs.
The tab delimited file file must be text based as in saved as tab delimited text format.
If your system or excel allows you to export or save as text tab delimited, this should be the correct file type.
Hi
I'm getting an error from the set data rows array step.
InvalidTemplate. Unable to process template language expressions in action 'set_data_rows_array' inputs at line '1' and column '3033': 'The template language function 'replace' expects its first parameter 'string' to be a string. The provided value is of type 'Object'. Please see https://aka.ms/logicexpressions#replace for usage details.'.
The get file content using path is outputting a body that starts:
Your file is not a plain text file. It should be saved as text tab delimited from excel with .txt extension.
Or it can be saved from within a text editor application with a .txt extension.