Skip to content

Instantly share code, notes, and snippets.

@Hugoberry
Last active November 4, 2022 15:59
Show Gist options
  • Save Hugoberry/e3650217bbeb8fd6673684829827417f to your computer and use it in GitHub Desktop.
Save Hugoberry/e3650217bbeb8fd6673684829827417f to your computer and use it in GitHub Desktop.
A jq parser for the internal PowerBI file *.pbix/Report/Layout. It surfaces the columns from the datamodel used in the visualizations.
[.sections[] | {
page: .displayName,
visuals: [ .visualContainers[].config |
fromjson |
.singleVisual |
select(has("projections"))|
{
type:.visualType,
projections: .projections |
{(keys[0]):[.[keys[0]][] |
.queryRef |
match("([^/(])[^/(/)]+(?=[/)])",".*") |
.string
]}
}]
}]
@Hugoberry
Copy link
Author

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment