Hello Bharath,
Welcome to the Microsoft Q&A platform.
Are you using GET DATA to create the data source by selecting “ODBC”?
And when using the native query to build the expression, you get this error.
Please correct me if this is not correct
if this is correct, Value.NativeQuery doesn't support ODBC data sources. But ODBC has a special function for native query.
Please see the below reference document:
https://learn.microsoft.com/en-us/powerquery-m/odbc-query
Odbc.Query(connectionString as any, query as text, optional options as nullable record) as table
Example: Odbc.Query("dsn=your_dsn", "select * from Customers")
output: table
I hope this helps. let me know if you have any further questions.