Forum Discussion

Misq's avatar
Misq
Icon for Helper I rankHelper I
2 years ago

Measure table in Lakehouse

Hello all,
I have a question regarding creating a measure table in lakehouse. I readed some materials in web and I'm stuck. Below are steps that I did:
1. I've created a measure table via Notebook:
 

 

data = [(1, 'MeasureTable')]
columns = ['ID', 'Col1']
measure_df = spark.createDataFrame(data, columns)
measure_df.show()
spark.sql("DROP TABLE IF EXISTS MeasureTable")
measure_df.write.format("delta").saveAsTable('MeasureTable')

 

2. In SQL Endpoint I added measures to the table, when I'm clicking New Report button, I can see measureTable, properly formatted. But... there is no option to download this report with connection to SQL endpoint (button is inactive).

 
3. When I go back to the lakehouse and I creating new semantic model, my measure table don't show measures that I added before to default semantic model in SQL Endpoint. And it show only table added in the notebook:
+--+----------------------+
| ID|      Col1                     | 
+--+----------------------+
| 1 |      MeasureTable       |
+--+----------------------+
 
Do you know how to handle that case, where you want to have a default measures added to the model?
 
I will be very appreciate for your help and advice 😉