Skip to content

Commit

Permalink
Update 2024-06-25 - import a list of json files.pq
Browse files Browse the repository at this point in the history
  • Loading branch information
ninmonkey authored Jun 25, 2024
1 parent 94e1d00 commit e96ef2b
Showing 1 changed file with 4 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -28,12 +28,15 @@ let
(row) => [
// I threw in extra record fields to make errors easier to read
// you only need the field "Table"
JsonList = Json.Document( row[Content] ),
JsonList = Json.Document( row[Content] ),
Table = Table.FromRecords( JsonList ),
HasError = (try Table)[HasError]
],
type [ JsonList = list, Table = Table.Type, HasError = logical ]
),
// if you want json to be a table, it expects it to be an array (aka list) at
// the top level. if yours is not, you'll need to either shape it, or drill down into an array.

#"Expanded Json" = Table.ExpandRecordColumn(Column_ConvertJson,
"Json",
{"Table", "HasError" },
Expand Down

0 comments on commit e96ef2b

Please sign in to comment.