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

Join us for an expert-led overview of the tools and concepts you'll need to become a Certified Power BI Data Analyst and pass exam PL-300. Register now.

Reply
Anonymous
Not applicable

Problem adding datasource to a gateway using profile connection AWS

Hi, 

I have a problem to connect a datasource to a datagateway, I am using this endpoint 

 

POST https://api.powerbi.com/v1.0/myorg/gateways/{gatewayId}/datasources

 

and I am passig this as body:

 

{
    "connectionDetails": {"extensionDataSourceKind": "AmazonAthena", "extensionDataSourcePath": "Simba Athena connection1"},
    "credentialDetails": {
        "privacyLevel": "None",
        "encryptionAlgorithm": "RSA-OAEP",
        "credentials": "<Credentials created by new CredentialDetails>",
        "credentialType": "Anonymous",
        "encryptedConnection": "Encrypted"
    },
    "dataSourceType": "Extension",
    "dataSourceName": "app-nonprod-ci-athena-sandbox",
}

 

the credentials were created following this: https://learn.microsoft.com/en-us/power-bi/developer/embedded/configure-credentials?tabs=sdk3 I have the username and password of the powerbi admin user.

 

I also tested the connection using the ODBC from microsoft (dsn=Simba Athena connection1) and I am getting a success response. The DSN is using a profile connection already set on the machine .aws/config. It is working fine.

 

The problem is when I want to consume that endpoint it is responding with this error:

 

Invoke-PowerBIRestMethod: C:\temp\script_datasource_connection.ps1:89
Line |
  89 |      Invoke-PowerBIRestMethod -Url ('gateways/'+$thisGatewayObjectId.T …
     |      ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
     | One or more errors occurred. ({   "code": "DM_GWPipeline_Gateway_MashupDataAccessError",   "pbi.error": {
     | "code": "DM_GWPipeline_Gateway_MashupDataAccessError",     "parameters": {},     "details": [       {
     | "code": "DM_ErrorDetailNameCode_UnderlyingErrorCode",         "detail": {           "type": 1,
     | "value": "-2147467259"         }       },       {         "code":
     | "DM_ErrorDetailNameCode_UnderlyingErrorMessage",         "detail": {           "type": 1,           "value":
     | "ODBC: ERROR [HY000] No AWS profile found: dev\r\nERROR [HY000] No AWS profile found: dev"         }       },
     | {         "code": "DM_ErrorDetailNameCode_UnderlyingHResult",         "detail": {           "type": 1,
     | "value": "-2147467259"         }       },       {         "code":
     | "Microsoft.Data.Mashup.ValueError.DataSourceKind",         "detail": {           "type": 1,           "value":
     | "AmazonAthena"         }       },       {         "code": "Microsoft.Data.Mashup.ValueError.DataSourcePath",
     | "detail": {           "type": 1,           "value": "Simba Athena nonprod-ci-dev"         }       },       {
     | "code": "Microsoft.Data.Mashup.ValueError.OdbcErrors",         "detail": {           "type": 1,
     | "value": "#table({\"SQLState\", \"NativeError\", \"Message\"}, {})"         }       },       {         "code":
     | "Microsoft.Data.Mashup.ValueError.Reason",         "detail": {           "type": 1,           "value":
     | "DataSource.Error"         }       }     ],     "exceptionCulprit": 1   } })
Invoke-PowerBIRestMethod: C:\temp\script_datasource_connection.ps1:89
Line |
  89 |      Invoke-PowerBIRestMethod -Url ('gateways/'+$thisGatewayObjectId.T …
     |      ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
     | Encountered errors when invoking the command: {   "code": "DM_GWPipeline_Gateway_MashupDataAccessError",
     | "pbi.error": {     "code": "DM_GWPipeline_Gateway_MashupDataAccessError",     "parameters": {},     "details": [
     | {         "code": "DM_ErrorDetailNameCode_UnderlyingErrorCode",         "detail": {           "type": 1,
     | "value": "-2147467259"         }       },       {         "code":
     | "DM_ErrorDetailNameCode_UnderlyingErrorMessage",         "detail": {           "type": 1,           "value":
     | "ODBC: ERROR [HY000] No AWS profile found: dev\r\nERROR [HY000] No AWS profile found: dev"         }       },
     | {         "code": "DM_ErrorDetailNameCode_UnderlyingHResult",         "detail": {           "type": 1,
     | "value": "-2147467259"         }       },       {         "code":
     | "Microsoft.Data.Mashup.ValueError.DataSourceKind",         "detail": {           "type": 1,           "value":
     | "AmazonAthena"         }       },       {         "code": "Microsoft.Data.Mashup.ValueError.DataSourcePath",
     | "detail": {           "type": 1,           "value": "Simba Athena nonprod-ci-dev"         }       },       {
     | "code": "Microsoft.Data.Mashup.ValueError.OdbcErrors",         "detail": {           "type": 1,
     | "value": "#table({\"SQLState\", \"NativeError\", \"Message\"}, {})"         }       },       {         "code":
     | "Microsoft.Data.Mashup.ValueError.Reason",         "detail": {           "type": 1,           "value":
     | "DataSource.Error"         }       }     ],     "exceptionCulprit": 1   } }

 

  

Seems like in somewhere the profile is not available when I want to consume the endpoint, please help me

2 REPLIES 2
Anonymous
Not applicable

Hi @Anonymous 

 

Did you install the Amazon Athena ODBC driver and set up the connection profile on the gateway computer? 

 

In addition, if you try to add the same data source to the same gateway manually via the Power BI Service, will this succeed?

 

Best Regards,
Jing

Anonymous
Not applicable

Hi Jing,

 

thanks for your response, yes I do have the driver 2.x. That is why I can create the ODBCs.

 

I tried manually too, but I am getting same error:

Unable to create connection for the following reason: Unable to connect to the data source. Either the data source is inaccessible, a connection timeout occurred, or the data source credentials are invalid. Please verify the data source configuration and contact a data source administrator to troubleshoot this issue.\n\nDetails: ODBC: ERROR [HY000] No AWS profile found: qa ERROR [HY000] No AWS profile found: qa Please have this information handy if you choose to create a support ticket. Session Id: XXX RequestId: XXX Cluster URI: https://api.powerbi.com Status code: 400 Time: xxx
Best,

Javier

Helpful resources

Announcements
Join our Fabric User Panel

Join our Fabric User Panel

This is your chance to engage directly with the engineering team behind Fabric and Power BI. Share your experiences and shape the future.

June 2025 Power BI Update Carousel

Power BI Monthly Update - June 2025

Check out the June 2025 Power BI update to learn about new features.

June 2025 community update carousel

Fabric Community Update - June 2025

Find out what's new and trending in the Fabric community.