DP-203T00 Microsoft Azure Data Engineering-02

Download as pptx, pdf, or txt
Download as pptx, pdf, or txt
You are on page 1of 23

DP-203T00:

Run interactive
queries using Azure
Synapse Analytics
serverless SQL pools
Agenda

Lesson 01: Explore Azure Synapse serverless SQL pools capabilities

Lesson 02: Query data in the lake using Azure Synapse serverless SQL pools

Lesson 03: Create metadata objects in Azure Synapse serverless SQL pools

Lesson 04: Secure data and manage users in Azure Synapse serverless SQL
pools
Lesson 01: Explore Azure Synapse serverless SQL pools
capabilities
Azure Synapse serverless SQL Pools

Every Azure Synapse Analytics workspace comes with


serverless SQL pool endpoints so you can start
querying data in seconds to minutes in a data lake as
soon as the workspace is created. There's no
infrastructure to setup or clusters to maintain.
Comparing dedicated SQL Pools with serverless SQL pools in Azure
Synapse Analytics

Dedicated SQL pools Serverless SQL pools


• Used for Data Warehouse operations • Used for data preparation or ad-hoc
queries against unstructured data.

• Provides predictable performance and


costs • Provides an always available SQL
endpoint for unplanned workloads

• Reserves processing power for data


stored in SQL tables • Enables interactive querying
Explore Azure Synapse serverless SQL pools capabilities
Every Azure Synapse Analytics workspace comes with serverless SQL pool endpoints so you can start
querying data in seconds to minutes in a data lake as soon as the workspace is created. There's no
infrastructure to setup or clusters to maintain.

Data Exploration Data transformation Logical data warehouse


Browse the data lake and get initial Serverless SQL pool enables you to Create objects (such as VIEWs and
insights about the data. Using execute transformation statements External Tables) that provide you
Azure Synapse Studio, you can over the data in the lake and store with a SQL metadata layer over the
explore the data both graphically the results back to the data lake in data in the lake to create a logical
and programmatically.  a specified file format. data warehouse. Once these
objects are created, any tool that
can connect to serverless SQL pool
will see these objects as regular
SQL Server objects
Lesson 01: Query data in the lake using Azure Synapse
serverless SQL pools
Common files to query
Using Azure Synapse Studio to view data
Querying parquet files in a data lake
Lesson 01: Create metadata objects in Azure Synapse
serverless SQL pools
CREATE DATABASE [YourDatabaseName]
Database

CREATE DATABASE SCOPED CREDENTIAL [sqlondemand]


WITH IDENTITY='SHARED ACCESS SIGNATURE',
Database SECRET = 'sv=2018-03-28&ss=bf&srt=sco&sp=rl&'
scoped credential

Create
metadata CREATE EXTERNAL DATA SOURCE SqlOnDemandDemo WITH (
LOCATION = 'https://sqlondemandstorage.blob.core.windows.net',

objects in External data


source
CREDENTIAL = sqlondemand );

Azure Synapse CREATE EXTERNAL FILE FORMAT QuotedCsvWithHeaderFormat


serverless SQL WITH
( FORMAT_TYPE = DELIMITEDTEXT,
pools External file
format
FORMAT_OPTIONS ( FIELD_TERMINATOR = ',', STRING_DELIMITER = '"',
FIRST_ROW = 2 ) );

CREATE EXTERNAL TABLE populationExternalTable


( [country_name] VARCHAR (100) COLLATE Latin1_General_BIN2,
[year] smallint, [population] bigint )
WITH
External ( LOCATION = 'csv/population/population.csv’,
Table
DATA_SOURCE = sqlondemanddemo,
FILE_FORMAT = QuotedCSVWithHeaderFormat );
Lesson 01: Secure data and manage users in Azure Synapse
serverless SQL pools
Securing access to data in a data lake when using Azure Synapse Analytics

Authentication Authorization Access to storage


accounts
Choose an authentication method

Azure Synapse Analytics Azure Data Lake


dedicated SQL pool Store

Authentication options Authentication options


SQL Authentication Anonymous access
Or Shared access signature
Azure Active Directory Managed identity
Authentication User identity
Manage users in Azure Synapse serverless SQL pools

User Role assignment Storage account name

Bob Storage Blob Data Reader asadatalakeinaday84


Manage user access to data lake files
Review questions

Q01 – Which SQL function enables you to access files in Azure storage and
read the contents of a remote data source?
A01 – OPENROWSET

Q02 – Which metadata object allows you to reuse the queries that you
create and enable applications to view data in a serverless SQL pool?
A02 – Views

Q03 – Name the three permissions that can be set on a container object?
A03 – Read, write and execute
Lab: Run interactive queries using Azure Synapse Analytics
serverless SQL pools
Lab overview
In this lab, students will learn how to work with files stored in the data lake and external file sources,
through T-SQL statements executed by a serverless SQL pool in Azure Synapse Analytics. Students will
query Parquet files stored in a data lake, as well as CSV files stored in an external data store. Next, they
will create Azure Active Directory security groups and enforce access to files in the data lake through
Role-Based Access Control (RBAC) and Access Control Lists (ACLs).

Lab objectives
After completing this lab, you will be able to:

Querying a Data Lake Store using serverless SQL pools in Azure Synapse Analytics

Securing access to data through using a serverless SQL pool in Azure Synapse Analytics
Lab review

Question 1 – Where in Azure Synapse Studio, can you Select TOP 100 rows
of data stored in a data lake?

Question 2 – When scripting an External table using the “Create external


table” GUI method in Synapse Studio, what metadata objects are created?

Question 3 – Which CREDENTIAL identity type can be time limited?

Question 4 – Which role enables a user to create external table as select


(CETAS) against an Azure Data Lake Gen2 data store
Module summary
In this module, you have learned about:

Explore Azure Synapse serverless SQL pools Query data in the lake using Azure Synapse
capabilities serverless SQL pools

Create metadata objects in Azure Synapse Secure data and manage users in Azure
serverless SQL pools Synapse serverless SQL pools

Next steps
After the course, consider reading the documentation on the b
est practices for serverless SQL pool in Azure Synapse Analytics
© Copyright Microsoft Corporation. All rights reserved.

You might also like