Forum Discussion
Load multiple files at a time
- 5 years ago
Hi Anonymous
This is odd, I can't figure out the reason for the error. I've checked your JSON files and they are valid JSON so I don't know why PQ is generating an error.
I fixed the problem by manuallay editing the Transform Sample File query and it now works.
Please download this PBIX file and test it with your files.
You will need to edit the Source step of the ev query sothat it points to your directory where you have your files.
Regards
Phil
Hi Anonymous
The column names in that new JSON file don't match the other files, that's why you are getting a null row.
In the main ev query if you click on the Expanded Table Column1 step the main part of the window shows you 2 columns, the name of the JSON file (that the record comes from) and a column of Records
You can click in the column beside the Record to get a preview of the data in the record. For the file Energy_EV_Meter_11 you can see the column headers are a mixture of upper and lower case
But for the new file Energy_EV_Meter_47 the column names are all upper case.
Power Query is case sensitive. When the ev query was first created it saw column headers in mixed case. The new file is all upper case column headers so when the ev query tries to Expand Columns in the last step, it can't find the column names it expects in the new file - and it just creteas null values
The ev query works correctly.
To fix this, the new JSON file must have column names that match all the other files.
Regards
Phil
- Anonymous5 years agoNot applicable
Thanks PhilipTreacy . Now I got the detailed understanding😊