Join us at FabCon Atlanta from March 16 - 20, 2026, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.
Register now!The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now! Learn more
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
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
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:
Javier
The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now!
| User | Count |
|---|---|
| 40 | |
| 36 | |
| 34 | |
| 31 | |
| 27 |
| User | Count |
|---|---|
| 136 | |
| 103 | |
| 66 | |
| 65 | |
| 56 |