Azure Synapse Analytics is a limitless analytics service enabling insights across relational and non-relational big-data. At it's core is the SQL Pool (Previously Azure SQL Data Warehouse), a massively parallel processing database. You can learn more about this service here.
Discovery Hub began supporting Azure Synapse as a target database in version 19.11.2. This functionality enables the use of Azure Synapse Analytics as a target Data Warehouse or Staging Database. When also connected to Azure Data Lake via the ODX Server, users can simply drag and drop data from Data Lake to a Synapse SQL Pool.
In this article you will learn how to:
- Create and Access an Azure Synapse SQL Pool in the Azure Portal
- Connect to Azure Synapse SQL Pool from Discovery Hub
Create and Access an Azure Synapse SQL Pool in the Azure Portal
- You can view this Quickstart Guide to create the SQL Data Warehouse from the Azure Portal
- The resource can be created in an existing Azure SQL Server or you can create a new one.
- Create a Server Level Firewall Rule
- In the Azure SQL Server, click Firewalls and virtual networks, click Add client IP, click save.
Using the Server Admin, login to the server using SQL Server Management Studio to run the following queries.
Create your own SQL Server Login (More Info here). Sample statement:
--Create SQL Server Login in the Master Database
CREATE LOGIN USERNAME WITH PASSWORD = 'STRONGPASSWORD';
--Create User in the desired Data Warehouse
USE --***Insert Database Name Here***
CREATE USER USERNAME FROM LOGIN USERNAME;
--Assign User to the desired role in the Data Warehouse
EXEC sp_addrolemember 'db_owner', 'USERNAME'
Assign your user to the desire resource class (more about Resource Classes here). Sample Statement:
EXEC sp_addrolemember 'xlargerc', 'USERNAME'
Create a Master Key (more about Master Keys here). Sample Statement:
CREATE MASTER KEY ENCRYPTION BY PASSWORD ='STRONGPASSWORD';
Connect to Azure Synapse SQL Pool from Discovery Hub
- Add a Data Warehouse in Discovery Hub
- Right Click on Data Warehouses in Discovery Hub Solution Explorer > Add Data Warehouse.
- Type the Azure SQL Server name from the Azure portal
- Type the User Name and Password created earlier.
- Type the Data Warehouse name from the Azure portal.
- Go to Advanced Settings > Deployment Target > SQL Data Warehouse
- Right Click Data Warehouse > Create required objects for SQL Data Warehouse
- If you have not already, run a query to create a Master key in the SQL Data Warehouse. This can be done using the Discovery Hub Query Tool or Management Studio.
- Add Tables, ideally from ODX Server with Azure Data Lake storage.
- Right click a Table > Table Settings > SQL Data Warehouse Tab > Select desired Distribution method.
- Deploy & Execute!
Error: "An error occurred during executing this statement \r\n DELETE FROM [dbo].[TimeXtenderExtendedProperties]…"
- You need to Right Click Data Warehouse > Create required objects for SQL DW as indicated in step 2 of the instructions above.
Error: "Please create a master key in the database or open the master key in the session before performing this operation."
- You need to create the Master Key by running the SQL query directly against the database.
- More info in step 3 of the instructions above.
Error: "Unexpected error encountered filling record reader buffer: HadoopExecutionException: Could not find a delimiter after string delimiter."
- This is a known issue when using Polybase to copy data from Data Lake and there are values in the source file that contain double quotes ["]. To circumvent this issue you can switch to the "COPY command" by enabling SQL Data Warehouse Preview features. See more under the Copy Command in Currently Supported Features above.