web
You’re offline. This is a read only version of the page.
close
Skip to main content

Notifications

Announcements

Community site session details

Community site session details

Session Id :

Import Tab Delimited File

juresti Profile Picture Posted by juresti 319

 

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.

21.PNG

 

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.

22.PNG

 

This step will control how many records you are going to process.

01.PNG
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.

 

 

Categories:

Comments

  • ianruaraidh Profile Picture ianruaraidh
    Posted at
    Import Tab Delimited File

    @juresti  thanks.  It was tab delimited but with file extension .tab 

  • juresti Profile Picture juresti 319
    Posted at
    Import Tab Delimited File

    @ianruaraidh 

    Your file is not a plain text file. It should be saved as text tab delimited from excel with .txt extension.

    11.PNG

     

    Or it can be saved from within a text editor application with a .txt extension.

     

    10.PNG

  • ianruaraidh Profile Picture ianruaraidh
    Posted at
    Import Tab Delimited File

    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:

    "body": {
            "$content-type""application/octet-stream",
            "$content""RElTQw...

     

  • petew625 Profile Picture petew625
    Posted at
    Import Tab Delimited File

    Success.

     

    Thanks for coming back.

     

    Apologies but I followed the instructions here which were not appropriate.

    https://docs.microsoft.com/en-us/power-automate/import-flow-solution

     

    My mistake

     

    pete

  • juresti Profile Picture juresti 319
    Posted at
    Import Tab Delimited File

     

    @petew625 

    @Ariphmn 

    I was able to import it without any issues.

     

    Where are you trying to upload it to? It should import right into Power Automate.

     

    01.PNG02.PNG03.PNG04.PNG

  • petew625 Profile Picture petew625
    Posted at
    Import Tab Delimited File
     
    I'm getting the same type of error:-
    "The solution file is invalid. The compressed file must contain the following files at its root: solution.xml, customizations.xml, and [Content_Types].xml. Customization files exported from previous versions of Microsoft Dynamics 365 are not supported."
     
    is there any chance of an update ?
  • juresti Profile Picture juresti 319
    Posted at
    Import Tab Delimited File

    @Ariphmn 

     

    I'll check the file.

     

    Maybe I need to export a new one, there may have been server changes.

  • Ariphmn Profile Picture Ariphmn 12
    Posted at
    Import Tab Delimited File

    This solution MIGHT be exactly what I need in order to finally finish a project that's taken me about 2 weeks... BUT when I try to import  the solution to Power Automate, I get an error:

     

    The solution file is invalid. The compressed file must contain the following files at its root: solution.xml, customizations.xml, and [Content_Types].xml. Customization files exported from previous versions of Microsoft Dynamics 365 are not supported.

     

    Is the solution zip file from a previous version? I've done some google searches and am still having issues. 

     

    Also, thank you so much for posting solutions. I've come across other posts of yours that have been helpful. 

  • Community Power Platform Member Profile Picture Community Power Pla...
    Posted at
    Import Tab Delimited File

    Thanks for the response... been busy so haven't had a chance to try the new version. In my raw data I have a CR/LF according to Notepad++. Not sure where the comma comes from? 

     
     
     

    Annotation 2020-07-04 164723.png

     

     

     

  • juresti Profile Picture juresti 319
    Posted at
    Import Tab Delimited File

     

    @Anonymous  

     

    I looked at your data closer and the items do not have a comma separating them.

    Something is not correct in the original file? 

    32.PNG

    After the tab file is processed and placed in json array they are separated by commas then.

    It is possible though that version of the automation did not work correctly because my first files did not have "\r" in them so I could not have the problem. This version though handles the "\r" which could be the issue.

     

    I've uploaded a new version of the automation.

     

    It has changes mainly to handle larger data sets.