Skip to content

Commit

Permalink
fix(ingest/powerbi): fix powerbi chart input handling (datahub-projec…
Browse files Browse the repository at this point in the history
  • Loading branch information
looppi authored and Salman-Apptware committed Dec 15, 2023
1 parent 5c8e27f commit 6ecca2b
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 14 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -504,7 +504,9 @@ def to_datahub_chart_mcp(

logger.info(f"{Constant.CHART_URN}={chart_urn}")

ds_input: List[str] = self.to_urn_set(ds_mcps)
ds_input: List[str] = self.to_urn_set(
[x for x in ds_mcps if x.entityType == Constant.DATASET]
)

def tile_custom_properties(tile: powerbi_data_classes.Tile) -> dict:
custom_properties: dict = {
Expand Down Expand Up @@ -927,7 +929,9 @@ def to_chart_mcps(

logger.debug(f"{Constant.CHART_URN}={chart_urn}")

ds_input: List[str] = self.to_urn_set(ds_mcps)
ds_input: List[str] = self.to_urn_set(
[x for x in ds_mcps if x.entityType == Constant.DATASET]
)

# Create chartInfo mcp
# Set chartUrl only if tile is created from Report
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1400,9 +1400,6 @@
}
},
"inputs": [
{
"string": "urn:li:container:6ac0662f0f2fc3a9196ac505da2182b2"
},
{
"string": "urn:li:dataset:(urn:li:dataPlatform:powerbi,library-dataset.public_issue_history,DEV)"
},
Expand Down Expand Up @@ -1546,9 +1543,6 @@
}
},
"inputs": [
{
"string": "urn:li:container:977b804137a1d2bf897ff1bbf440a1cc"
},
{
"string": "urn:li:dataset:(urn:li:dataPlatform:powerbi,hr_pbi_test.dbo_book_issue,DEV)"
},
Expand Down Expand Up @@ -2387,9 +2381,6 @@
}
},
"inputs": [
{
"string": "urn:li:container:6ac0662f0f2fc3a9196ac505da2182b2"
},
{
"string": "urn:li:dataset:(urn:li:dataPlatform:powerbi,library-dataset.public_issue_history,DEV)"
},
Expand Down Expand Up @@ -2514,9 +2505,6 @@
}
},
"inputs": [
{
"string": "urn:li:container:6ac0662f0f2fc3a9196ac505da2182b2"
},
{
"string": "urn:li:dataset:(urn:li:dataPlatform:powerbi,library-dataset.public_issue_history,DEV)"
},
Expand Down

0 comments on commit 6ecca2b

Please sign in to comment.