Power BI is turning 10, and we’re marking the occasion with a special community challenge. Use your creativity to tell a story, uncover trends, or highlight something unexpected.
Get startedJoin us at FabCon Vienna from September 15-18, 2025, for the ultimate Fabric, Power BI, SQL, and AI community-led learning event. Save €200 with code FABCOMM. Get registered
As we can't currently pass parameters from Pipeline to Dataflow in Fabric, a workaround is to access Dynamic SQL from a txt file.
We can use Table.FirstValue to read the first row of a txt file
let
DynSQLTable = Csv.Document(Web.Contents("https://DOMAIN.sharepoint.com/Documents/DynSQLTest.txt"), [Delimiter = "|", Columns = 1, QuoteStyle = QuoteStyle.None]),
DynSQLString = Table.FirstValue(DynSQLTable),
Source = Oracle.Database("SERVER:PORT/SERVICENAME", [Query = DynSQLString , HierarchicalNavigation = true])
in
Source
Solved! Go to Solution.
Hi,
I was just sharing a workaround for passing parameters into a Dynamic SQL query as we can't directly pass parameters to a Dataflow.
The snippet above was intended for anyone who wanted to do the same.
If you create a basic Gen2 Dataflow, and add a datasource....
then modify the code generated to read the Dynamic SQL from a file and parse it into the Query.
@Anonymous Very useful - thanks
Hi @Anonymous ,
Thanks for using Fabric Community.
Are you sharing any information or asking any query.
With the above context I am not able to get a bigger picture of it.
Could you please share few more details of your scenario and about your issue?
Hi,
I was just sharing a workaround for passing parameters into a Dynamic SQL query as we can't directly pass parameters to a Dataflow.
The snippet above was intended for anyone who wanted to do the same.
If you create a basic Gen2 Dataflow, and add a datasource....
then modify the code generated to read the Dynamic SQL from a file and parse it into the Query.