Skip to content

Latest commit

 

History

3 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Encode & Decode Datasets

Python PowerQuery PowerBI

Table of Contents
  1. Background
  2. How To

Background

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.

(back to top)

How To

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.

(back to top)

Import Static Data in Power BI

Encode

If you want to import data that is base64 encoded and compressed, then you could

  1. load your original data as a pandas Dataframe and
  2. run function encode_base64_with_compression in encode_and_decode.py.
  3. 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.

(back to top)

Identify Data

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.

(back to top)

About

Encode/Decode and Compress/Decompress data in Python. Encoded and compressed data could be imported into PowerBI via query editor (Power Query).

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages