Advance your Data & AI career with 50 days of live learning, dataviz contests, hands-on challenges, study groups & certifications and more!
Get registeredGet Fabric Certified for FREE during Fabric Data Days. Don't miss your chance! Learn more
 
					
				
		
Hello everyone,
I am trying to modify a pbit archive in java in my application.
The point is to update the data source of a pbit without using any PowerBI application so I have to modify the DataModelSchema entry.
My problem is : when I read the file with an InputStream and display it in the console, there are blank spaces added between each letter so I am not able to search and replace the right string. Even if I add artificially blank spaces in my string.
For example if i search "content" or even "c o n t e n t", it never finds it.
That problem never appears when I read "normal" .zip archives.
An overview of my ouput when i read the file with additional blank spaces :
So I would like to get to know if there is a special encoding in pbit templates which might add special spaces or whatever if there is a way to read it properly.
Thanks for your help,
Regards
J.MARQUE
 
					
				
		
Thank you for your answer,
Unfortunately, due to the difficulty to unzip/zip a pbit properly, I think I will not have other option than using Power API.
Regards
J.MARQUE
Hi @Anonymous
Yes, Power API is the better choice. Actually, Power BI should not allow make changes to the pbix/pbit file except themes JSON files in it. If you make some changes to other files in the pbix/pbit and then re-zip it and restore it to a pbix/pbit file,This file will be destroyed because of unexpected character error like as the following.
Best Regards
Caiyun Zheng
Is that the answer you're looking for? If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Hi @Anonymous
Compression stores the same information in a more efficient way by removing redundancy. The JSON file of DataModeSchema has been compressed and saved in PBIT, I think it is possible that the compression affects the content you read into Java.
Best Regards
Caiyun Zheng
Is that the answer you're looking for? If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
 
					
				
				
			
		
Advance your Data & AI career with 50 days of live learning, contests, hands-on challenges, study groups & certifications and more!
Check out the October 2025 Power BI update to learn about new features.
