Forum Discussion
making sure the Lineage is updated once a query is modified
Hello,
I'm currently having an issue with an update to do on multiple dataflows.
Let's say I currently have this chaining of dataflows :
A -----> B ------> C
I would like to replace A with A2 (and have A2 -------> B -------> C), so I manually replace any references to the dataflow A in B with references to A2. But once the modification and refresh done, the lineage remains the same !!
To have the correct lineage, I have to add A2 as a datasource manually, then modify the queries using it, and that takes a lot of time.
Is there a simpler way to get the correct lineage in this case ?
Thansk in advance
Hi, Anonymous
I was facing the same issue a couple of days ago. The only solution I found is to rebuild the flow. Otherwise the lineage remains same.
So, I exported all the DF's and deleted older DF's then I imported again. it didn't took that much time. If you have so many reportes incorporated to the DF's, it will be time consuming at first. But the lineage will be correct.
If you find any other way other than rebuild let me know here.
3 Replies
- ChielFaber
Super User
One way to change this is to use parameters for the dataflow sources.
First create two parameters for your workspaceID and dataflowID:Then write the following m-code:
letGetWorkspaceDataflowEntity = (workspaceId as text, dataflowId as text, entityName as text) =>letSource = PowerBI.Dataflows([]),WorkspaceNav = Source{[workspaceId = workspaceId]}[Data],DataflowNav = WorkspaceNav{[dataflowId = dataflowId]}[Data],EntityNav = DataflowNav{[entity = entityName]}[Data]inEntityNav,WorkspaceId = pm_workspaceId,DataflowId = pm_dataflowId,EntityName = "TableName",Result = GetWorkspaceDataflowEntity(WorkspaceId, DataflowId, EntityName)inResult
TableName is the name of the dataflow your want to load. When you want to change the source dataflow you can just change the parameter value.Hope this helps! - rubayatyasmin
Community Champion
Hi, Anonymous
I was facing the same issue a couple of days ago. The only solution I found is to rebuild the flow. Otherwise the lineage remains same.
So, I exported all the DF's and deleted older DF's then I imported again. it didn't took that much time. If you have so many reportes incorporated to the DF's, it will be time consuming at first. But the lineage will be correct.
If you find any other way other than rebuild let me know here.
- AnonymousNot applicable
Hello,
This worked for me, and it seems to be the simplest approach. To replace the reference I had to :
1 - export the flow as json (let's call it B.json)
2- open B.json, replace the flowID of A with the one for A2
3- import B.json (it will be called B(2))
4- open B(2), copy all the queries
5- open B, delete all the queries then hit Ctrl + V to replace them with queries from B(2)
6- save and refresh B
7- check the lineage then remove B(2)
Thanks again,