Bug Report - Unable to use INFO() DAX functions with ExecuteQueries REST API
StevanLopes, Dantezin, Sayantan I have been able to automate the usage of INFO.* functions through a Fabric Notebook scheduled and run by a Fabric . Leveraging the Semantic-Link library I was able to post DAX queries to the different semantic models in the company tenant.
The piece of code is fairly simple:
import sempy.fabric as fabric
# Set variables
ws = workspace_name
ds = semantic_model_name
ds_table = 'data_source_table'
relative_path = 'root/path'
# Evaluate Dax
annotations = fabric.evaluate_dax(dataset=ds,workspace=ws,dax_string="""EVALUATE INFO.ANNOTATIONS()""")
measures = fabric.evaluate_dax(dataset=ds,workspace=ws,dax_string="""EVALUATE INFO.MEASURES()""")
# Save output as spark dataframes
spark_df_annot = spark.createDataFrame(annotations)
spark_df_meas = spark.createDataFrame(measures) #
# Save to ADLS as Parquet
spark_df_annot.write.mode("overwrite").parquet(f"{relative_path}/{ws}_{ds}_annotations")
spark_df_meas.write.mode("overwrite").parquet(f"{relative_path}/{ws}_{ds}_measures")
Unfortunately, this lib is only available through Fabric and not databricks, self-hosted jupyter notebooks nor ADF notebooks. Therefore, I had to use Fabric.