Hey everybody, currently I am trying to define pow...
# ask-community
e
Hey everybody, currently I am trying to define power bi assets dynamically. I call the api to pull the datasets and reports. I have connected the one to one relationship between them successfully. Nevertheless, to create a lineage from the dataaset assets to the dbt assets, I am struggling with the 1 to n relationships. I have tried the ideas below: sources = {"source": AssetIn(key=[dep[0], dep[1]]) for dep in dependencies} # Fill in the description description = 'PBI - Dataset Name: ' + dataset['dataset_name'] + ' , Id: ' + dataset['pbi_dataset_uuid'] # Compute the asset @asset(compute_kind="PBI", name=datasetName, group_name="PBI", description=description, ins=sources) def pbi(source): return dataset return pbi but since i have sources as a key from the dict, it only connects to one of the asset and not all the ones avaliable. I have tried using deps but because my folder structure for the dbt assets are as such: schema/key, I cant access the dbt assets. it creates assets in the highest component and does not connect them back to the dbt assets. Is there a way to do a dynamic one to many relationship with keys avaliable?
solved it, should have used deps with AssetKey