Forum Discussion
How to Remove All columns Error while importing Json table
- 7 years ago
Hi Negi1984,
Why not just following the built-in functions? Please refer to the snapshot below.
Best Regards,
Dale
Hi Rajender,
The function table.FromRecords has an optional parameter where you can specify how the function should handle missing fields
https://msdn.microsoft.com/en-us/query-bi/m/table-fromrecords
So you can add MissingField.UseNull to set finishTime to null - and you should set the second argument to specify you table's columns and data type as shown in the documentation.
/Erik
- Negi19847 years agoRegular Visitor
Hi Donsvensen,
Thanks a lot for your prompt feedback. I check the link but unable to understand.
Could you please assist , what modification exactly I need to require in 3rd line ?
let
Source = Json.Document(Web.Contents("XXXXXXXXXXXXXX")),
data1 = Source[data],
Table = Table.FromRecords(data1)in
TableMy Headers in Data are mentioned below :-
dataComplete finishTime hostName jobExecutionId jobExecutionNumber jobFinishedEventId jobInstance jobQueuedEventId jobStartedEventId queuedTime ran resultCode startTime track Thank you once again for your support.
- donsvensen7 years agoSkilled Sharer
Hi
Properly looks something like this
Table =Table.FromRecords(data1, {"dataComplete", "finishTime", "hostName", "jobExecutionId", "jobExecutionNumber", "jobFinishedEventId", "jobInstance", "jobQueuedEventId", "jobStartedEventId", "queuedTime", "ran", "resultCode", "startTime", "track"}, {"dataComplete", "finishTime", "hostName", "jobExecutionId", "jobExecutionNumber", "jobFinishedEventId", "jobInstance", "jobQueuedEventId", "jobStartedEventId", "queuedTime", "ran", "resultCode", "startTime", "track"}, MissingField.UseNull )
Hope this helps you
/Erik
- Negi19847 years agoRegular Visitor
Hi,
I replace the below code with my PQ code. but its giving me another error like below :-