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

Find everything you need to get certified on Fabric—skills challenges, live sessions, exam prep, role guidance, and more. Get started

Reply
Analitika
Post Prodigy
Post Prodigy

Syntax error at or near "[" in ODBC connection setup

Hello,

 

I am having issue. How to solve it?

 

DataSource.Error: ODBC: ERROR [42601] ERROR: syntax error at or near "[";
Error while executing the query
Details:
DataSourceKind=Odbc
DataSourcePath=database=name;driver={PostgreSQL Unicode(x64)};port=5869server=125.26.8.6
OdbcErrors=[Table]

 

Here is content of function via advanced editor:

Source= Odbc.Query("driver={PostgreSQL Unicode(x64)};server=152.25.100.20;port=3486database=name", ....

3 REPLIES 3
v-shex-msft
Community Support
Community Support

HI @Analitika,

The query edit 'syntax check' just checks the syntax of power query functions, it does not mean power query will also check the connection string valid.

In my opinion, I'd like to suggest you test the connection in odbc driver or UDL testing to check if this string works, then you can copy these connection strings to use in the data connector.

Universal Data Link (UDL) Configuration - OLE DB Driver for SQL Server | Microsoft Docs

Regards,

Xiaoxin Sheng

Community Support Team _ Xiaoxin
If this post helps, please consider accept as solution to help other members find it more quickly.
amitchandak
Super User
Super User

@Analitika , there is no delimiter between port and database

port=3486database=name"

 

Try

port=3486;database=name"

 

or

 

port=3486,database=name"

I have checked, syntax is ok maybe problem is somewhere in other place?

Analitika_0-1630487214967.png

Delimiter is included between server and port.

Also in same advanced editor I see that syntax is ok

Analitika_1-1630487413984.png

So I am not sure where the problem is with'[' as error message in previous message. Error message appears when I am on  table, selecting table.

 

Helpful resources

Announcements
July 2024 Power BI Update

Power BI Monthly Update - July 2024

Check out the July 2024 Power BI update to learn about new features.

PBI_Carousel_NL_June

Fabric Community Update - June 2024

Get the latest Fabric updates from Build 2024, key Skills Challenge voucher deadlines, top blogs, forum posts, and product ideas.

Top Solution Authors