The ultimate Fabric, Power BI, SQL, and AI community-led learning event. Save €200 with code FABCOMM.
Get registeredEnhance your career with this limited time 50% discount on Fabric and Power BI exams. Ends August 31st. Request your voucher.
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
Solved! Go to Solution.
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.
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.
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!
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.
Hello Felipe,
Solved. Thank for your help 🙂