Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

Join the FabCon + SQLCon recap series. Up next: Power BI, Real-Time Intelligence, IQ and AI, and Data Factory take center stage. All sessions are available on-demand after the live show. Register now

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
Microsoft Employee
Microsoft 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
April Power BI Update Carousel

Power BI Monthly Update - April 2026

Check out the April 2026 Power BI update to learn about new features.

New to Fabric survey Carousel

New to Fabric Survey

If you have recently started exploring Fabric, we'd love to hear how it's going. Your feedback can help with product improvements.

Power BI DataViz World Championships carousel

Power BI DataViz World Championships - June 2026

A new Power BI DataViz World Championship is coming this June! Don't miss out on submitting your entry.

FabCon and SQLCon Highlights Carousel

FabCon & SQLCon Highlights

Experience the highlights from FabCon & SQLCon, available live and on-demand starting April 14th.