Quantcast
Channel: Power Query topics
Viewing all articles
Browse latest Browse all 31369

Variable source connection in DataFlow

$
0
0

Hi all,

I want to achieve to load tables from variable source like below.

I set the parameters for source connection and was using those to load tables but I got many DataFlows and it's a burdent to change parameters in each DataFlow. So I was trying to read and use the data source connection information from a separate DataFlow. Below is the code to read the connection information from a DataFlow in a DataFlow:

 

---------------------------

let
  Source_dataflow = PowerPlatform.Dataflows(),
  Workspaces = Source_dataflow{[Id = "Workspaces"]}[Data],
  Workspace = Workspaces{[workspaceId = WorkspaceID]}[Data],
  Dataflow = Workspace{[dataflowId = DataflowID]}[Data],
  Entity = Dataflow{[entity = "Configuration"]}[Data],  <-- I could see data is loaded well here

  // HostName1= Table.First(Entity)[HostConnectionName], <-- When I use this , I got an error arelated with the credential
  HostName1= "blur blur blur", <--- When I use this, I got no error

  Source = Databricks.Catalogs(HostName1, "/sql/100/kkkhouse/somenumbers", [Catalog = null, Database = null, EnableAutomaticProxyDiscovery = "enabled"]),
  #"Navigation 1" = Source{[Name = "catalog_name", Kind = "Database"]}[Data],
  #"Navigation 2" = #"Navigation 1"{[Name = "schema_name", Kind = "Schema"]}[Data],
  #"Navigation 3" = #"Navigation 2"{[Name = "table_name", Kind = "Table"]}[Data]

in
  #"Navigation 3"
---------------------------
 
Actually, I am not that an expert on Power BI DataFlow and I do not stick above. I just want to get data in DataFlow from development or test environment based on the variables I defined somewhere. When the variables are changed, I just refresh DataFlows only. Any help or suggestion would be appreciated.

Viewing all articles
Browse latest Browse all 31369

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>