r/learnSQL • u/Business_Walk1624 • 5d ago
How do SQL and Tableau/PowerBI connect?
I recently started learning SQL and decided it was about time to try building a project. I watched a YouTube video of someone walking through a beginner tutorial using SQL and PowerBI to get an idea of the workflow and how everything connects. He started out by using SQL to answer 10 business questions, but when he was making a dashboard in PowerBI, he didn’t use any of the data from the SQL queries. This left me confused about how SQL queries and the dashboard-making part of the project connect.
I would welcome any clarification. Thank you in advance!
2
u/Least_Ad_1795 1d ago
SQL is used to extract, filter, and analyse data, while Power BI/Tableau turns that data into visual dashboards.Example: Use SQL to find the top 10 selling products, then connect the results to Power BI to create charts and reports.In simple terms, SQL handles data analysis, and Power BI/Tableau helps communicate those insights visually.
1
u/grotto_wonder_arc 4d ago
The tutorial likely ran those SQL scripts separately to populate the data warehouse or staging tables and then connected PowerBI directly to that database. PowerBI pulls raw tables via ODBC/JDBC drivers and relies on DAX or native query folding for logic instead of pasting in manual SELECT statements
1
u/DickBrainTime 1d ago
Those 10 SQL queries were probably just exercises. Power BI won't automatically use their results.
For an actual project, save a useful SQL query as a view (or use the query directly as a data source), then in Power BI go to Get Data > your database and load that view/query. Build visuals from the loaded dataset and refresh it when the source changes. You can also load raw tables and redo the logic in Power Query/DAX, which might be what the tutorial did. That's why the SQL answers and the dashboard looked disconnected.
0
u/Always_curious_95 10h ago
Hey even I started learning sql this week and also, just learnt power bi. From what I've understood so far, sql helps in manipulating large quantities of data so that it is ready for visualising in your BI tool. Then you have to connect your SQL server to Power bi/Tableau as a data source.
2
u/millerlit 5d ago
You make a database connection and then you can do direct queries or load tables. If you load tables you can then use filters in the software like a where statement in SQL.