Create an Azure SQL Data Source
Follow these steps to connect to a Azure SQL and create a Azure SQL data source:
Refer to Additional Information for additional performance tips and information about Azure SQL feature support.
Configure User Access Rights
We recommend that you create a dedicated user and user role for integration with the GoodData platform.
Steps:
Create a user role and grant the following access rights to it:
GRANT SELECT ON SCHEMA::{schema_name} TO {role_name} WITH GRANT OPTION;
Create a user and grant it with the user role:
ALTER ROLE {role_name} ADD MEMBER {user_name};
Create a Azure SQL Data Source
Once you have configured your Azure SQL user’s access rights, you can proceed to create a Azure SQL data source that you can then connect to.
Steps:
On the home page switch to Data sources.
Click Connect data.
Select Azure SQL.
Name your data source and fill in your Azure SQL credentials and click Connect:
Input your schema name and click Save:
Your data source is created!
Steps:
Create a Azure SQL data source with the following API call:
curl $HOST_URL/api/v1/entities/dataSources \ -H "Content-Type: application/vnd.gooddata.api+json" \ -H "Accept: application/vnd.gooddata.api+json" \ -H "Authorization: Bearer $API_TOKEN" \ -X POST \ -d '{ "data": { "type": "dataSource", "id": "<unique_id_for_the_data_source>", "attributes": { "name": "<data_source_display_name>", "url": "jdbc:sqlserver://<AZURE_HOST>:5432", "schema": "<AZURE_SCHEMA>", "type": "AZURESQL", "username": "<AZURE_USER>", "password": "<AZURE_PASSWORD>" } } }' | jq .
To confirm that the data source has been created, ensure the server returns the following response:
{ "data": { "type": "dataSource", "id": "<unique_id_for_the_data_source>", "attributes": { "name": "<data_source_display_name>", "url": "jdbc:sqlserver://<AZURE_HOST>:5432", "schema": "<AZURE_SCHEMA>", "type": "AZURESQL", "username": "<AZURE_USER>" } }, "links": { "self": "$HOST_URL/api/v1/entities/dataSources/<unique_id_for_the_data_source>" } }
Additional Information
Ensure you understand the following limitations and recommended practice.
Data Source Details
The JDBC URL must be in the following format:
jdbc:sqlserver://<host>:<port>
Basic authentication is supported. Specify user and password.
GoodData uses up-to-date drivers.
The following database versions are supported:
- 13.0 (SQL Server 2016)
- 14.0 (SQL Server 2017)
- 15.0 (SQL Server 2019)
- 16.0 (SQL Server 2022)
Unsupported Features
GoodData does not support the following features:
- Aggregation functions: CORREL, COVAR and SLOPE
Known Issues
SQL Commands and Filtering
Redshift, MSSQL, AzureSQL, and SynapseSQL databases remove trailing spaces in
WHERE
andHAVING
SQL commands, potentially affecting dashboard and workspace data filter functionality. For example, the commandSELECT * FROM table WHERE column = 'value '
would return both'value'
and'value '
(with a trailing space). Other databases retain trailing spaces in values.
Performance Tips
If your database holds a large amount of data, consider the following practices:
Denormalize the relational data model of your database. This helps avoid large JOIN operations. Because Azure SQL is a columnar database, queries read only the required columns and each column is compressed separately.
Index the columns that are most frequently used for JOIN and aggregation operations. Those columns may be mapped to attributes, labels, primary and foreign keys.
Query Timeout
The default timeout value for queries is 160 seconds. If a query takes longer than 160 seconds, it is stopped. The user then receives a status code 400 and the message Query timeout occurred
.
Query timeout is closely related to the ACK timeout. For proper system configuration, the ACK timeout should be longer than the query timeout. The default ACK timeout value is 170 seconds.
Permitted parameters
- AADSecurePrincipalId
- AADSecurePrincipalSecret
- accessToken
- applicationIntent
- applicationName
- authentication
- authenticationScheme
- columnEncryptionSetting
- connectRetryCount
- connectRetryInterval
- database
- databaseName
- delayLoadingLobs
- disableStatementPooling
- domainName
- domain
- enablePrepareOnFirstPreparedStatementCall
- encrypt
- hostNameInCertificate
- instanceName
- keyVaultProviderClientId
- keyVaultProviderClientKey
- lastUpdateCount
- msiClientId
- multiSubnetFailover
- packetSize
- port
- portNumber
- realm
- replication
- selectMethod
- sendStringParametersAsUnicode
- sendTemporalDataTypesAsStringForBulkCopy
- sendTimeAsDatetime
- server
- serverName
- serverNameAsACE
- serverPreparedStatementDiscardThreshold
- serverSpn
- sslProtocol
- TransparentNetworkIPResolution
- trustServerCertificate
- useFmtOnly
- workstationID
- xopenStates