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;
If you intend to enable pre-aggregation caching, additional usage rights have to be granted for your pre-aggregation schema
cache_schema_name
:GRANT CREATE TABLE TO {role_name}; GRANT ALTER, SELECT, INSERT ON SCHEMA::{cache_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 the driver with version
11.2.0.jre11
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
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
Query timeout is configurable per application instance. It is a parameter of the sql-executor service, default value is 160 seconds.
Query timeout is closely related to the ACK timeout. Proper configuration of the system requires that ACK timeout is longer than query timeout. Default ACK timeout value is 170 seconds.
Temporary Limitation
When a query fails on query timeout, the REST API call returns error code 500. Please note that this is subject to change in a future release.
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