- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Producing Dynamic SQL in Dataflow
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.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
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.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi @richardrann ,
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?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
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.

Helpful resources
Join us at the Microsoft Fabric Community Conference
March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount!
Fabric Monthly Update - February 2025
Check out the February 2025 Fabric update to learn about new features.

Subject | Author | Posted | |
---|---|---|---|
04-13-2024 10:00 AM | |||
12-12-2024 02:06 PM | |||
01-13-2025 06:55 AM | |||
03-29-2024 02:57 AM | |||
02-20-2025 12:03 PM |
User | Count |
---|---|
6 | |
4 | |
2 | |
1 | |
1 |
User | Count |
---|---|
13 | |
10 | |
5 | |
5 | |
4 |