Commit 6177b95 1 parent 2df95ac commit 6177b95 Copy full SHA for 6177b95
File tree 2 files changed +19
-18
lines changed
metadata-ingestion/src/datahub/ingestion/source/powerbi
2 files changed +19
-18
lines changed Original file line number Diff line number Diff line change @@ -271,26 +271,27 @@ def parse_custom_sql(
271
271
def create_table_column_lineage (self , urn : str ) -> List [ColumnLineageInfo ]:
272
272
column_lineage = []
273
273
274
- for column in self .table .columns :
275
- downstream = DownstreamColumnRef (
276
- table = self .table .name ,
277
- column = column .name ,
278
- column_type = SchemaFieldDataTypeClass (type = column .datahubDataType ),
279
- native_column_type = column .dataType or "UNKNOWN" ,
280
- )
281
-
282
- upstreams = [
283
- ColumnRef (
284
- table = urn ,
285
- column = column .name .lower (),
274
+ if self .table .columns is not None :
275
+ for column in self .table .columns :
276
+ downstream = DownstreamColumnRef (
277
+ table = self .table .name ,
278
+ column = column .name ,
279
+ column_type = SchemaFieldDataTypeClass (type = column .datahubDataType ),
280
+ native_column_type = column .dataType or "UNKNOWN" ,
286
281
)
287
- ]
288
282
289
- column_lineage_info = ColumnLineageInfo (
290
- downstream = downstream , upstreams = upstreams
291
- )
283
+ upstreams = [
284
+ ColumnRef (
285
+ table = urn ,
286
+ column = column .name .lower (),
287
+ )
288
+ ]
289
+
290
+ column_lineage_info = ColumnLineageInfo (
291
+ downstream = downstream , upstreams = upstreams
292
+ )
292
293
293
- column_lineage .append (column_lineage_info )
294
+ column_lineage .append (column_lineage_info )
294
295
295
296
return column_lineage
296
297
Original file line number Diff line number Diff line change @@ -239,7 +239,7 @@ def extract_lineage(
239
239
cll_lineage : List [FineGrainedLineage ] = []
240
240
241
241
logger .debug (
242
- f"Extracting lineage for table { table .full_name } in dataset { table .dataset .name } "
242
+ f"Extracting lineage for table { table .full_name } in dataset { table .dataset .name if table . dataset else None } "
243
243
)
244
244
245
245
upstream_lineage : List [
You can’t perform that action at this time.
0 commit comments