Power BI is turning 10, and we’re marking the occasion with a special community challenge. Use your creativity to tell a story, uncover trends, or highlight something unexpected.
Get startedJoin us for an expert-led overview of the tools and concepts you'll need to become a Certified Power BI Data Analyst and pass exam PL-300. Register now.
I downloaded a .pbix file and remamed it to .pbit so I could extract DataModelSchema.json.
Has anyone else had luck reading this .json into a python pandas dataframe? In this example, I changed the file name from DataModelSchema.json to datamodelschemasampledl.json
Is there a certain encoding I should use with the .json from Power Bi? Thanks in advance for any suggestions
This code:
import json
with open("C:\datamodelschemasampledl.json", "r") as f:
schema_data = json.load(f)
gives me the error:
JSONDecodeError: Expecting property name enclosed in double quotes: line 1 column 2 (char 1)
I'm having this same issue. Did you ever figure this out?
HI @jch,
The 'DataModelSchema' file should be stored in the pbix file but you cannot directly extract it from pbix file. For this scenario, you can try to import some libraries about compression to analyze the file (pbix file can be recognized with compression software), then you can looping from the recognize folder/path to find out the corresponding contents. (notice: these operations may not directly execute in power bi desktop when you open the report, they may face the read/write protected/permission issues)
Regards,
Xiaoxin Sheng
I know this topic is very old and outdated, but I just put the answer out there : this file is encoded in utf-16le
This is your chance to engage directly with the engineering team behind Fabric and Power BI. Share your experiences and shape the future.
Check out the June 2025 Power BI update to learn about new features.
User | Count |
---|---|
11 | |
6 | |
4 | |
2 | |
2 |
User | Count |
---|---|
4 | |
4 | |
3 | |
3 | |
3 |