Hugoberry / pbixray

PowerBI (pbix) file parser. Surfaces metadata and VertiPaq tables from PowerBI DataModel.
https://pbixray.streamlit.app/
MIT License
13 stars 4 forks source link

Any way to Compress in XPress9? #1

Open pauloeavf opened 2 months ago

pauloeavf commented 2 months ago

Hi,

This is a fantastic library! Is there any way to make changes in the model (e.g. repointing power queries to a new server) and rewriting it to the DataModel file? I saw that your DLL file only has a decompress function, not a compress.

Thanks!

Hugoberry commented 1 month ago

I didn't expose XPress9 compress method, but it's there. Given that I've taken a few shortcuts in the deserialization process, running the flow in reverse is not straightforward. The rewiring would be more involved than that. The serialization of changes would affect a few layers:

  1. The changes would have to be committed to a sqlite db.
  2. The sqlite db backup must be serialized to an ABF package.
  3. The DataModel from the PBIX must be replaced with the new one.

It's all doable, with a few safeguard checkpoints. I assume no data needs to be refreshed and that a change in the pq connection string won't trigger credentials invalidation.

Apart from reporting pq queries to another source, which you can do through other means, would you happen to have any particular functional you're after?