Skip to content

Instantly share code, notes, and snippets.

View dankkom's full-sized avatar
🐢
I'm busy

dankkom dankkom

🐢
I'm busy
View GitHub Profile
@svavassori
svavassori / powerbi_extractor.py
Last active July 1, 2024 19:42
PowerBi Extractor in Python
import sys
import csv
import json
# Converts the JSON output of a PowerBI query to a CSV file
def extract(input_file, output_file):
input_json = read_json(input_file)
data = input_json["results"][0]["result"]["data"]
dm0 = data["dsr"]["DS"][0]["PH"][0]["DM0"]