This file contains 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 json | |
import pandas as pd | |
import sempy.fabric as fabric | |
dataset_name = "<>" | |
workspace_name = "<>" | |
def custom_flatten(json_object, dataset_name, table_name=None, table_properties=None, column_name=None, flat_list=None): | |
if flat_list is None: |
This file contains 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
## Get measure properties | |
(fabric | |
.evaluate_dax( | |
workspace=ws, dataset =ds, | |
dax_string= | |
""" | |
SELECT * FROM $SYSTEM.TMSCHEMA_MEASURES | |
""" |
This file contains 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 swifter | |
import json | |
def get_modes(dataset, workspace): | |
''' | |
Author: Sandeep Pawar | fabric.guru | |
Returns storage mode of a dataset as identified from TMSL | |
Fabric uses XMLA client so this will work only for the semantic models in Premium capacity | |
Swifter is used to process a long list faster using .apply method |