Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.

Reply
analyticsyc
Frequent Visitor

Should I use SQL or Power Query for Data Transformations? Or something else?

I work with Syspro (an ERP system) which sits on top of an SQL Database. It records all of our company's sales information, and I use PowerBI to tie together multiple tables and create reports for different departments. I currently have 1 main underlying model, which I adjust visuals for different end users. As the number of reports has grown, I am struggling to keep changes consistent throughout all my models. I make my data transformations in Power Query, which is great, until I need to make the same change across 10+ different files. 

 

I'm hoping someone has advice on how to create a sustainable method of data transformations rather than using Power Query. My initial thought was using SQL to transform my data, and then linking all my models to that transformed data. I would store the transformed data in Azure. That way, when I need to make a change (say adding a calculated column), I only have to make the change in SQL and all my PowerBI files are automatically updated the next time they refresh. One requirement is that wherever this transformed data is stored, I need to be able to schedule refreshes through power automate. Using SQL is just my initial idea though, and I'm interested in hearing other's opinions on what works best.

1 ACCEPTED SOLUTION
Daryl-Lynch-Bzy
Resident Rockstar
Resident Rockstar

Hi @analyticsyc - Roche's Maxim - do transformation as far upstream as possible and downstream when necessary.

 

By creating SQL views for the basis of your all your extracts is advantageous.  When changes are made to the main database, the views can be subject to System Testing before production deployment.  That said, it is unlikely that tables in ERP system to be changed.  But, how easy is it for you to include and make changes to views in the main ERP.  Also, when you make changes to these views, the changes won't necessary load into your Power BI Data models.

 

I would create pipeline before you import into Power BI Dataset files to pull the ERP data and then transform it.  

 

Personally, I like Dataflows for this it does things in a No-Code/Low-Code way and uses query folding against the source.  This allow you centralise the Power Query in one place, but you won't have the flexibilty or scale of other Azure data lake solutions.

 

So, it makes sense to replicate the ERP into a lakehouse for bronze, silver and gold transformations.  I would recommend using Azure pipeline to replicate the ERP database.  Here are couple of videos to watch:
Modern Data Lakehouse? Where do you even start??? Azure Synapse of course! - YouTube
Merging your data in a modern lakehouse data warehouse - YouTube.

View solution in original post

2 REPLIES 2
Rickmaurinus
Helper V
Helper V

Good question, not per se an easy answer.

 

Power Query and SQL are not adversaries; they're allies, each offering unique advantages.

 

Power Query is known for its user-friendly interface, making it great for beginners and quick tasks. It also serves as a bridge for Excel users, allowing more sophisticated data transformations, especially in on-the-spot situations.

 

On the other hand, SQL is unmatched in its performance, scalability, and in executing precise and secure operations. It provides superior control, robust security, and ensures data reliability.

 

Depending on your project, one may fit better, but understanding and leveraging the strengths of both can be a great combination.

 

I wrote an article on this to further explain the concepts: 

https://gorilla.bi/power-query/power-query-vs-sql/

Daryl-Lynch-Bzy
Resident Rockstar
Resident Rockstar

Hi @analyticsyc - Roche's Maxim - do transformation as far upstream as possible and downstream when necessary.

 

By creating SQL views for the basis of your all your extracts is advantageous.  When changes are made to the main database, the views can be subject to System Testing before production deployment.  That said, it is unlikely that tables in ERP system to be changed.  But, how easy is it for you to include and make changes to views in the main ERP.  Also, when you make changes to these views, the changes won't necessary load into your Power BI Data models.

 

I would create pipeline before you import into Power BI Dataset files to pull the ERP data and then transform it.  

 

Personally, I like Dataflows for this it does things in a No-Code/Low-Code way and uses query folding against the source.  This allow you centralise the Power Query in one place, but you won't have the flexibilty or scale of other Azure data lake solutions.

 

So, it makes sense to replicate the ERP into a lakehouse for bronze, silver and gold transformations.  I would recommend using Azure pipeline to replicate the ERP database.  Here are couple of videos to watch:
Modern Data Lakehouse? Where do you even start??? Azure Synapse of course! - YouTube
Merging your data in a modern lakehouse data warehouse - YouTube.

Helpful resources

Announcements
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

Check out the April 2024 Power BI update to learn about new features.

April Fabric Community Update

Fabric Community Update - April 2024

Find out what's new and trending in the Fabric Community.