Skip to content

Commit 6ba930d

Browse files
committed
Merge branch 'm-kovalsky/1014'
2 parents 5a3ad6c + ecf29ce commit 6ba930d

File tree

1 file changed

+3
-11
lines changed

1 file changed

+3
-11
lines changed

src/sempy_labs/directlake/_update_directlake_partition_entity.py

Lines changed: 3 additions & 11 deletions
Original file line numberDiff line numberDiff 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}]"

0 commit comments

Comments
 (0)