NativeQuery in DirectQuery mode using Teradata Presto odbc driver data source is not working

58 Views Asked by At

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 in all three ways (without a native query for both modes and with a native query for import only) it worked as expected, however, I could not load the data to the power BI with a native query in DirectQuery, though I can preview the data.

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

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)
    in
        result;

output:

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.

0

There are 0 best solutions below