This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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"] |