File tree Expand file tree Collapse file tree 1 file changed +3
-11
lines changed
src/sempy_labs/directlake Expand file tree Collapse file tree 1 file changed +3
-11
lines changed Original file line number Diff line number Diff line change @@ -66,8 +66,7 @@ def update_direct_lake_partition_entity(
6666 f"{ icons .red_dot } The '{ dataset_name } ' semantic model within the '{ workspace_name } ' workspace is not in Direct Lake mode."
6767 )
6868
69- for tName in table_name :
70- i = table_name .index (tName )
69+ for i , tName in enumerate (table_name ):
7170 eName = entity_name [i ]
7271 part_name = next (
7372 p .Name
@@ -86,15 +85,8 @@ def update_direct_lake_partition_entity(
8685
8786 # Update source lineage tag
8887 if schema :
89- # Only set schema for DL over SQL (not DL over OneLake)
90- expression_source_name = (
91- tom .model .Tables [tName ]
92- .Partitions [part_name ]
93- .Source .ExpressionSource .Name
94- )
95- expr = tom .model .Expressions [expression_source_name ].Expression
96- if "Sql.Database" in expr :
97- tom .model .Tables [tName ].Partitions [
88+ # Updated to all DL patterns (DLOL, DLSQL)
89+ tom .model .Tables [tName ].Partitions [
9890 part_name
9991 ].Source .SchemaName = schema
10092 tom .model .Tables [tName ].SourceLineageTag = f"[{ schema } ].[{ eName } ]"
You can’t perform that action at this time.
0 commit comments