Forum Discussion
sql server as a datasource, only dbo-tables/views visible
- 10 years ago
Hi Franky,
interesting. 10k tables are definitely a lot, i do not know how PBI handles that.
Have you tried "crafting" your own connection string without using the "get data" api?
Take your example database and copy the "advanced options" of the connection. It should look a bit like this (please be aware that i used pseudo-code, so it does not fit 100%).
let
Source = Sql.Databases("YOURSERVERNAME.database.windows.net"),
YOURSERVERNAME= Source{[Name="YOURDATABASENAME"]}[Data],
Schema_TableName = YOURDATABASENAME{[Schema="scheme",Item="TableName"]}[Data]
in
Schema_TableNameTry to replace the elements in the string with the elements of the big Navision Database. :)
- 10 years ago
You could also try using the SQL statement in the "Get Data" box to directly specify the tables and views you want rather than selecting from the list
I also do not have the problem. I can see all schemas.
Are you trying to access via PowerBI Desktop or the webservice? Try to install the enterprise gateway and then use the web-service. So you might be able to tell whether it is a local issue, web-service or database-side.
Hi,
thx for the feedback.
I'm using powerbi desktop (Version: 2.29.4217.341)
I made a small testdatabase with just a table in the dbo schema and a table and a view in the PBI schema.
All are visible. (dbo.Table1, PBI.Table1 and PBI.vw_Table2)
When I use the filter PBI, I only see PBI.Table1 and PBI.Table2, so this works correct.
But when I make a PBI schema and views in that schema in a Navision sql database (over 10 K tables) I cannot see them.
When I filter on PBI they also do not show, (So it's not a problem that there are to many tables to show)
So I would think the amount of tables/views are the problem. (both databases on same server, my laptop)
- Bjoern10 years agoContinued Contributor
Hi Franky,
interesting. 10k tables are definitely a lot, i do not know how PBI handles that.
Have you tried "crafting" your own connection string without using the "get data" api?
Take your example database and copy the "advanced options" of the connection. It should look a bit like this (please be aware that i used pseudo-code, so it does not fit 100%).
let
Source = Sql.Databases("YOURSERVERNAME.database.windows.net"),
YOURSERVERNAME= Source{[Name="YOURDATABASENAME"]}[Data],
Schema_TableName = YOURDATABASENAME{[Schema="scheme",Item="TableName"]}[Data]
in
Schema_TableNameTry to replace the elements in the string with the elements of the big Navision Database. :)
- itchyeyeballs10 years agoImpactful Individual
You could also try using the SQL statement in the "Get Data" box to directly specify the tables and views you want rather than selecting from the list
- Franky10 years agoRegular Visitor
Hi Bjoern,
thx, this fixes my problem without having to move my views to the dbo schema. (in which exists 1000's of tables and views)
- LGF899 years agoFrequent Visitor
Hello,
Thank you for your answer. What if I wanted more than one database with the same table's name?
let
Source = Sql.Databases("YOURSERVERNAME.database.windows.net"),
YOURSERVERNAME= Source{[Name="MORETHANONEDATABASE"]}[Data],
Schema_TableName = MORETHANONEDATABASE{[Schema="scheme",Item="SameTableName"]}[Data]
in
Schema_TableNameI've done the following to get what I am trying to describe above but I bet there's a way better way of doing it using something similar to what you suggested:
let
Source = Sql.Databases("YOURSERVERNAME"),
#"Filtered Rows1" = Table.SelectRows(Source, each ([Name] = "DATABASE1" or [Name] = "DATABASE2" or [Name] = "DATABASE3")),
#"Expanded Data" = Table.ExpandTableColumn(#"Filtered Rows1", "Data", {"Name", "Data"}, {"Data.Name", "Data.Data"}),
#"Filtered Rows2" = Table.SelectRows(#"Expanded Data", each ([Data.Name] = "SameTableName")),
#"Removed Other Columns" = Table.SelectColumns(#"Filtered Rows2",{"Data.Data"}),
#"Expanded Data.Data" = Table.ExpandTableColumn(#"Removed Other Columns", "Data.Data", {"COLUMN1", "COLUMN2"})Can you think of a way of doing this?
Thanks a lot!
Laura