Forum Discussion
Load data from txt tab separated file
Hello,
I am trying to load 2 txt files with same format. As you see i have columns Name and Path in both files.
File1-below
Name Path
test.txt c:\local\test.txt
test6.txt c:\local\test6.txt
File2-below
Name Path
test.txt c:\local\test.txt
test6.txt c:\local\test6.txt
Objective is to load both content of files in one query. I am getting the header of second file as a row when it is not the objective. Header of second file is to be considered as row.
Thank you for your help
- Anonymous8 years ago
Hi jlpa,
When we use get data from Files, this structure is created:
You have to select the table Transform Sample File form <FolderName> and apply Use First Row as Headers to that table:
And this modifies the final table and solves the problem you're having.
Note: You must delete the last step Changed Type because the name of the columns will not match, due to the Promote Headers that we apply,
Regards.
4 Replies
- AnonymousNot applicable
Hi jlpa,
Apply Promote Headers ("Use First Row as Headers" in Transform menu) in the table Transform Sample File from <FolderName>, this should solve the problem.
Regards.
- jlpaRegular Visitor
Hello Felipe,
See picture below. When i load files First row are columns not recognized as headers.
Headers are not recognized
Even if a apply "Use First Row as Headers" in Transform menu, because i have 2 files (second one has headers also) i end up with following below, that has header of second file as a row :(. I have check files and they look ok.See that Header of second file is a row
Thank you for your help!
- AnonymousNot applicable
Hi jlpa,
When we use get data from Files, this structure is created:
You have to select the table Transform Sample File form <FolderName> and apply Use First Row as Headers to that table:
And this modifies the final table and solves the problem you're having.
Note: You must delete the last step Changed Type because the name of the columns will not match, due to the Promote Headers that we apply,
Regards.