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
AusSam74
Frequent Visitor

SQL database names missing with DQ - syntax to let source direct?

Hi, I am trying to access a table on a database in SQL.

 

The syntax I am using is the following -

 

 

let
Source = Sql.Database("SERVERNAME", "DATABASE NAME"),
dbo_TABLENAME= Source{[Schema="dbo",Item="TABELNAME"]}[Data]

in

dbo_TABLENAME

 

But the error keeps appearing saying the following:

 

"unable to connect: "Microsoft SQL: Incorrect syntax near '='."

 

The only thing is that this database is setup in SQL under Synonyms not under TABLES.

 

I can see the TABLES when I try to access this database but the not the tables under synonyms, that is why I am trying to access this table direct with DX - any help please?

 

THKS.

 

Samir.

 

 

1 REPLY 1
v-sihou-msft
Employee
Employee

@AusSam74

 

Power BI uses ADO.net provider to retrieve data from SQL Server, it only supports Tables/Views, Scalar functions, Table functions. See: Power BI Data Source Prerequisites.

 

However, Synonyms can be created for many objects like stored procedures, CLR functions, etc. See: Synonyms (Database Engine). Data Provider can't determine the type of the database objects under Synonyms. So you can't connect Synonyms directly in Power BI Desktop.

 

Regards,

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.