Forum Discussion
table name prefix
Anonymous,
In which view or situation do you see the "Tablename" format in Power BI Desktop? Based on my test, when you import tables under MART schema into Power BI, all tables will be named as Mart TableName. If you import tables under dbo schema, all tables will be named as TableName.
Regards,
Lydia
- Anonymous7 years agoNot applicable
Hi Lydia
Unfortunately it is not the case in this instance. Since I wrote yesterday, I have tested it by loading the same table in my current model and in a new blank model. In the former case it names it without "Mart" and in the latter case it uses "Mart" as prefix.
According to my client there haven't been any changes in the SQL setup. So it seems strange? Any idea to what can be wrong?
- Anonymous7 years agoNot applicable
Anonymous,
What version of Power BI Desktop do you use? Could you please post the SQL script that you use to create these tables so that I can test?
Regards,
Lydia- Anonymous7 years agoNot applicable
Hi again
Both tables are in Mart Schema in SQL.
1. This is the script in Advanced Editor for the one without "Mart"-prefix:
let
Source = Sql.Database("server", "Financials", [Query="SELECT [mart].[DimVersion].* #(tab)#(tab)FROM [mart].[DimVersion]"]),
#"Renamed Columns" = Table.RenameColumns(Source, {{"VersionKey", "VersionKey"}, {"VersionName", "VersionName"}, {"Type", "Type"}, {"VersionDate", "VersionDate"}, {"VersionCurrent", "VersionCurrent"}}),
#"Changed Type" = Table.TransformColumnTypes(#"Renamed Columns", {{"VersionKey", Int64.Type}, {"VersionName", type text}, {"Type", type text}, {"VersionDate", type datetime}, {"VersionCurrent", Int64.Type}})
in
#"Changed Type"2. This is the script in AE for the one with the Mart Prefix:
let
Source = Sql.Database("server", "Financials"),
mart_DimVendor = Source{[Schema="mart",Item="DimVendor"]}[Data]
in
mart_DimVendorDoes this provide you with any hints?