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.
Hello,
Is it possible to add tables from a data source (SQL Server) that weren't initially imported into a dataset?
I thought that in the Desktop I had seen a view that looked like the Navigation page when you initially select Enter Data, that allowed you to tick or untick tables from the existing dataset, but I might have imagined it
Thanks,
Chris
Solved! Go to Solution.
when you first connect and select multiple tables each table is actually created separately, the easy way to edit it is to go to Query editor
the easiest way to add new table is to add new data source (no need to go to Query Editor at all). I think you will see all the tables there, so you could possibly load the same table twice, but that's easy to fix
I think so, I didn't use the data gateways much
you can see the dependencies in the query editor, inthe View Tab
I expect you to see your DW at the top with arrows pointing to multiple tables (regardless whether they were created in the begining or added later)
You can review the M code that got generated for different tables in Advanced Editor in the Home tab, so you can compare it for the original and added tables - top 2 rows should be identical (if it's all same database)
you just create a new query as a connection to SQL Server and you will have the same interface again
@StachuHi. How do you create a new one? Presumably it is in Edit Queries, but I can only see how to modify an existing one.
Is there no easy way to see which tables I haven't imported?
Chris
when you first connect and select multiple tables each table is actually created separately, the easy way to edit it is to go to Query editor
the easiest way to add new table is to add new data source (no need to go to Query Editor at all). I think you will see all the tables there, so you could possibly load the same table twice, but that's easy to fix
Thanks for replying. Does this mean I would have two datasets, as forum posts suggest this can increase refresh issues?
Thinking about it, it just sounds easier to duplicate an existing query, and then modify it to import from a different table. It does seem like a bit of a long winded way though. I might make a suggestion on Power BI ideas.
Chris
both ways have the same result. M query with syntax similar to his one:
let Source = Sql.Databases("server addres"), #"DW" = Source{[Name="DW address"]}[Data], dimTable = #"DW"{[Schema="dbo",Item="TableName"]}[Data] in dimTable
whether you will do it by copying existing query, or adding "new" data source etc. it doesn't matter, it's just a different way of achieving the same outcome
PowerBI will treat each table as a separate query in the same dataset
if you work with multiple environments I would suggest to split the process a bit to something like this
Query SQL_Connection (connection to SQL server that is then referenced by all the tables)
let Source = Sql.Databases("server addres"), #"DW" = Source{[Name="DW address"]}[Data] in #"DW"
Dimension1 (referencing previous query)
let Source = SQL_Connection,
dimTable1 = #"DW"{[Schema="dbo",Item="TableName"]}[Data]
in
dimTable1
Dimension2
let Source = SQL_Connection,
dimTable1 = #"DW"{[Schema="dbo",Item="TableName"]}[Data]
in
dimTable2
that way you only need to update the server address in one query (e.g. when switching from DEV to QA or PROD), and whenever you need to add a new table you just reference SQL_Connection and navigate to the new table
@StachuAah, does that mean if I do a second Get Data whick looks at the same data source as my existing dataset, then the new tables are added to the exisitng dataset exactly the same as if they were included in the Get Data initially ? If so, then for a scheduled refresh through a data gateway will all the queries run in the same manner, irrespective of the number of Get Datas that were run when creating the dataset?
Thanks again,
Chris
I think so, I didn't use the data gateways much
you can see the dependencies in the query editor, inthe View Tab
I expect you to see your DW at the top with arrows pointing to multiple tables (regardless whether they were created in the begining or added later)
You can review the M code that got generated for different tables in Advanced Editor in the Home tab, so you can compare it for the original and added tables - top 2 rows should be identical (if it's all same database)
glad to help 🙂
A bit late to the party, but there is a much quicker option IMO where you do not have to enter any details about server etc.
Thanks, helped a lot.
Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City
Check out the April 2024 Power BI update to learn about new features.
User | Count |
---|---|
112 | |
99 | |
73 | |
72 | |
49 |
User | Count |
---|---|
145 | |
109 | |
109 | |
90 | |
64 |