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

Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.

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!

charurock
Frequent Visitor

Hi,

 

I am following as I have exact same pain..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.

 

any resolution will be much appreciated.

 

@Planky , did u receive any solution?

Adam3
New Member

Hi, 

 

I had the same issue and I found a way how to set up the query with incremental refresh.

Instead of adding parameters directly into a query, create a function and then call it in the query.

 

Function:

Adam3_0-1686667799292.png

 

Query:

Adam3_1-1686667928363.png

 

Planky
Frequent Visitor

@charurockNo, I didn't. I long since abandoned this approach as no fix or acknowledgement from MS was ever provided.

 

@Adam3Im not certain that would avoid the issue of full table scans but I've don't have anyway to test so I'd have to take your word for it.