Table of Contents
In case you are e.g. working with PowerBI, you might import Static Data tables directly within the Query Editor. Thus, there won't be any need to set up a Data Flow or Lakehouse for those data tables.
For demonstration purpose, I set up an Excel File with example data: example_data.xlsx
For Encoding and Decoding, functions are used that you can find in encode_and_decode.py.
Encode
If you want to import data that is base64 encoded and compressed, then you could
- load your original data as a pandas Dataframe and
- run function encode_base64_with_compression in encode_and_decode.py.
- The resulting string can then be used in the import statement in PowerBI's Query Editor. Note that you might need to adapt the column headers in the Power Query Import Statement. Make sure, that the column data types are set accordingly.
Decode
If you come across a PowerBI dataset, which already contains an import of base64 encoded and compressed data, you might view it within PowerBI itself.
Or you take the string of the PowerBI's Query Editor and use it with function decode_base64_with_compression in encode_and_decode.py.
Be aware that you can create tables directly within PowerBI - which is cumbersome. for bigger tables. When you create a table in PowerBI this way, PowerBI automatically encodes and compresses it.