cancel
Showing results for 
Search instead for 
Did you mean: 

Unknown credential for dsn

I am using the following odbc query to get data from AWS Athena.

 

let
    Source = Odbc.Query("dsn=master", "Select * from data WHERE year >= " & DateTime.ToText(RangeStart, "yyyy") & "
AND month >= " & DateTime.ToText(RangeStart, "MM") & "
AND year < " & DateTime.ToText(RangeEnd, "yyyy") & "
")
in
    Source

 

The rows download and I can see the status change to detecting relationships before it fails with the following:

Planky_1-1663988008749.png

PowerBINonFatalError:
{"AppName":"PBIDesktop","AppVersion":"2.108.603.0","ModuleName":"Microsoft.PowerBI.Client.Windows.dll","Component":"Microsoft.PowerBI.Client.Windows.QueryFolding.FoldedArtifactsGenerator","Error":"System.InvalidOperationException","MethodDef":"GetUserInfo","ErrorOffset":"43"}

 

In another report, I am able to use odbc.datasource with the same dsn without issue - I receive no credentials error. The main difference here being that its not leveraging query folding:

 

 

  Source = Odbc.DataSource("dsn=master", [HierarchicalNavigation=true]),
    AwsDataCatalog_Database = Source{[Name="AwsDataCatalog",Kind="Database"]}[Data],
    billing_Schema = AwsDataCatalog_Database{[Name="billing",Kind="Schema"]}[Data],

 

 

I can provide the additional power bi error details/trace logs/etc on request

 

Status: Needs Info

Hi @Planky 

So I have a doubt , if you can connect to AWS Athena with no issue in other report , why did you use the power query below ?

Ailsamsft_0-1664265364516.png

Best Regards,
Community Support Team _ Ailsa Tao

Comments
v-yetao1-msft
Community Support
Status changed to: Needs Info

Hi @Planky 

So I have a doubt , if you can connect to AWS Athena with no issue in other report , why did you use the power query below ?

Ailsamsft_0-1664265364516.png

Best Regards,
Community Support Team _ Ailsa Tao

Planky
Frequent Visitor

Because using the other method does not work with query folding and results in full table scans, loading the entire table every refresh. It prevents incremental refresh from working.

 

Using the ODBC query above correctly scans the appropriate partition(s) for the date ranges specified via the rangeStart / rangeEnd parameters and downloads a much smaller subset of data as a result; Incremental refresh works correctly.

 

Regardless, using odbc.query against Athena shouldnt result in the error reported

 

Cheers!