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

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now! Learn more

Reply
Mer123
New Member

Cannot Load Model

I was wondering if anyone can help with the below problem.

 

I'm using Teradata presto ODBC driver to retrieve data from the source to power bi. The power bi connector I'm using is a custom connector, which I feed the parameters to the odbc.* functions. The power BI connector has two modes, import and DirectQuery, and there is also a native query (optional) that takes custom queries.

 

So, the challenge here is I couldn't load a model into Power BI using a custom connector in DirectQuery mode with a native query, but it worked as expected in all the rest three ways (without a native query for both modes and with a native query for import).

 

Assume the connection string has the DSN, host, port, and basic authentication.

 

The exact error is below

 

> Cannot Load Model:
>
> DirectQuery error: DirectQuery may not be used with this data source - please consider moving to a supported data source or upgrading the SQL Server data source to the latest available version.

 

2 REPLIES 2
amitchandak
Super User
Super User

@Mer123 , Native query is not always supported in Direct query.

Sometimes additional steps in power query will stop rolling the native query

Are you using the Standard ODBC driver or some third-party connector?

 

 

Share with Power BI Enthusiasts: Full Power BI Video (20 Hours) YouTube
Microsoft Fabric Series 60+ Videos YouTube
Microsoft Fabric Hindi End to End YouTube

Hi @amitchandak ,

 

Thanks for your reply.
I'm using a third-party ODBC (Teradata presto ODBC driver) and a custom power query connector.
Below is a sample of the code.

 // Use Odbc.Query with the provided NativeQuery
        QueryConnectionOptions = [
            CredentialConnectionString = EncryptedConnectionString
        ],


       result = if NativeQuery <> null then
                    // Use Odbc.Query with the provided NativeQuery
                    Odbc.Query(ConnectionString, NativeQuery, QueryConnectionOptions)
            else
                // Use Odbc.DataSource if native query is not provided
                    Odbc.DataSource(ConnectionString, ConnectionOptions)

Helpful resources

Announcements
Power BI DataViz World Championships

Power BI Dataviz World Championships

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now!

December 2025 Power BI Update Carousel

Power BI Monthly Update - December 2025

Check out the December 2025 Power BI Holiday Recap!

FabCon Atlanta 2026 carousel

FabCon Atlanta 2026

Join us at FabCon Atlanta, March 16-20, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.