The ultimate Microsoft Fabric, Power BI, Azure AI, and SQL learning event: Join us in Stockholm, September 24-27, 2024.
Save €200 with code MSCUST on top of early bird pricing!
Find everything you need to get certified on Fabric—skills challenges, live sessions, exam prep, role guidance, and more. Get started
Dear PBI users, good afternoon.
Currently we are analyzing dividing the development team into front-end - UI / UX design (mostly focusing on the PBI charts , UI and overall UX) and Back-end (SQL Querying, Table optmization etc).
Esentialy the idea is to allow both teams to work on the report at the same time. The conclusion was, we would like the team to write the sql query into a TXT file and we would connect into the TXT and excute the query written on it.
Unfortunately I am not very known on this process, I know how to get the content of a txt but not to execute the written query against a database within PBI.
Would anyone have a clue how to do it?
Thank you!
Solved! Go to Solution.
I managed to apply the same mode in our team last year, i.e. we use PQ to read sql files stored in a centralized sql depository; we are able to compile sql easily.
let
// applicable to .txt / .sql files
Source = "C:\Users\Home\Downloads\Qry.sql",
SqlContent = Text.Combine(Table.ToColumns(Csv.Document(File.Contents(Source))){0}, "#(lf)")
in
SqlContent
Expertise = List.Accumulate( {Days as from Today}, {Skills and Knowledge}, (Current, Everyday) => Current & Day.LeanAndPractise(Everyday) ) |
Sql.Database("server", "database", [Query=SQLContent])
Expertise = List.Accumulate( {Days as from Today}, {Skills and Knowledge}, (Current, Everyday) => Current & Day.LeanAndPractise(Everyday) ) |
I managed to apply the same mode in our team last year, i.e. we use PQ to read sql files stored in a centralized sql depository; we are able to compile sql easily.
let
// applicable to .txt / .sql files
Source = "C:\Users\Home\Downloads\Qry.sql",
SqlContent = Text.Combine(Table.ToColumns(Csv.Document(File.Contents(Source))){0}, "#(lf)")
in
SqlContent
Expertise = List.Accumulate( {Days as from Today}, {Skills and Knowledge}, (Current, Everyday) => Current & Day.LeanAndPractise(Everyday) ) |
Exactly what we want to do , quick question @ThxAlot , and how do you execute it?
something like a blank query with
= Sql.Database("server", "view", [Query=SQLContent])?
Sql.Database("server", "database", [Query=SQLContent])
Expertise = List.Accumulate( {Days as from Today}, {Skills and Knowledge}, (Current, Everyday) => Current & Day.LeanAndPractise(Everyday) ) |
Amazing! Just out of curiosity, how was the development after implementing this method? Overall better?
In terms of performance, this mode isn't better than hard-coded PQ queries; the biggest advantage is segregation; front-end and back-end devs may focus on their domain respectively.
Expertise = List.Accumulate( {Days as from Today}, {Skills and Knowledge}, (Current, Everyday) => Current & Day.LeanAndPractise(Everyday) ) |
Join the community in Stockholm for expert Microsoft Fabric learning including a very exciting keynote from Arun Ulag, Corporate Vice President, Azure Data.
Check out the August 2024 Power BI update to learn about new features.
User | Count |
---|---|
119 | |
89 | |
75 | |
53 | |
45 |
User | Count |
---|---|
135 | |
120 | |
75 | |
65 | |
64 |