Skip to content

Commit d28f4de

Browse files
authored
Merge pull request #116695 from julieMSFT/20200527_mtm
20200527 mtm
2 parents 32a9289 + 8816797 commit d28f4de

File tree

6 files changed

+60
-155
lines changed

6 files changed

+60
-155
lines changed

articles/synapse-analytics/quickstart-sql-on-demand.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -61,6 +61,9 @@ To run queries using SQL on-demand, create data source that SQL on-demand can us
6161
Execute the following code snippet to create data source used in samples in this section:
6262

6363
```sql
64+
-- create master key that will protect the credentials:
65+
CREATE MASTER KEY ENCRYPTION BY PASSWORD = <enter very strong password here>
66+
6467
-- create credentials for containers in our demo storage account
6568
CREATE DATABASE SCOPED CREDENTIAL sqlondemand
6669
WITH IDENTITY='SHARED ACCESS SIGNATURE',

articles/synapse-analytics/spark/apache-spark-overview.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ Spark pools in Azure Synapse offer a fully managed Spark service. The benefits o
3636
| Support for Azure Data Lake Storage Generation 2| Spark pools in Azure Synapse can use Azure Data Lake Storage Generation 2 as well as BLOB storage. For more information on Data Lake Storage, see [Overview of Azure Data Lake Storage](../../data-lake-store/data-lake-store-overview.md). |
3737
| Integration with third-party IDEs | Azure Synapse provides an IDE plugin for [Jetbrains' IntelliJ IDEA](https://www.jetbrains.com/idea/) that is useful to create and submit applications to a Spark pool. |
3838
| Pre-loaded Anaconda libraries |Spark pools in Azure Synapse come with Anaconda libraries pre-installed. [Anaconda](https://docs.continuum.io/anaconda/) provides close to 200 libraries for machine learning, data analysis, visualization, etc. |
39-
| Scalability | Apache Spark in Azure Synapse pools can have Auto-Scale enabled, so that pools scale up and down as needed. Also, Spark pools can be shut down with no loss of data since all the data is stored in Azure Storage or Data Lake Storage. |
39+
| Scalability | Apache Spark in Azure Synapse pools can have Auto-Scale enabled, so that pools scale by adding or removing nodes as needed. Also, Spark pools can be shut down with no loss of data since all the data is stored in Azure Storage or Data Lake Storage. |
4040

4141
Spark pools in Azure Synapse include the following components that are available on the pools by default.
4242

articles/synapse-analytics/sql/create-external-table-as-select.md

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -17,17 +17,16 @@ In this article, you'll learn how to store query results to storage using SQL On
1717

1818
## Prerequisites
1919

20-
Your first step is to review the articles below and make sure you've met the prerequisites:
20+
Your first step is to **create a database** where you will execute the queries. Then initialize the objects by executing [setup script](https://github.com/Azure-Samples/Synapse/blob/master/SQL/Samples/LdwSample/SampleDB.sql) on that database. This setup script will create the data sources, database scoped credentials, and external file formats that are used to read data in these samples.
2121

22-
- [First-time setup](query-data-storage.md#first-time-setup)
23-
- [Prerequisites](query-data-storage.md#prerequisites)
22+
Follow the instructions in this article to create data sources, database scoped credentials, and external file formats that are used to write data into the output storage.
2423

2524
## Create external table as select
2625

2726
You can use the CREATE EXTERNAL TABLE AS SELECT (CETAS) statement to store the query results to storage.
2827

2928
> [!NOTE]
30-
> Change the first line in the query, i.e., [mydbname], so you're using the database you created. If you have not created a database, please read [First-time setup](query-data-storage.md#first-time-setup). You need to change LOCATION for MyDataSource external data source to point to location you have write permission for.
29+
> Change the first line in the query, i.e., [mydbname], so you're using the database you created.
3130
3231
```sql
3332
USE [mydbname];
@@ -58,8 +57,9 @@ SELECT
5857
*
5958
FROM
6059
OPENROWSET(
61-
BULK 'https://sqlondemandstorage.blob.core.windows.net/csv/population-unix/population.csv',
62-
FORMAT='CSV'
60+
BULK 'csv/population-unix/population.csv',
61+
DATA_SOURCE = 'sqlondemanddemo',
62+
FORMAT = 'CSV', PARSER_VERSION = '2.0',
6363
) WITH (
6464
CountryCode varchar(4),
6565
CountryName varchar(64),
@@ -74,7 +74,7 @@ FROM
7474
You can use the external table created through CETAS like a regular external table.
7575

7676
> [!NOTE]
77-
> Change the first line in the query, i.e., [mydbname], so you're using the database you created. If you have not created a database, please read [First-time setup](query-data-storage.md#first-time-setup).
77+
> Change the first line in the query, i.e., [mydbname], so you're using the database you created.
7878
7979
```sql
8080
USE [mydbname];
@@ -91,4 +91,4 @@ ORDER BY
9191

9292
## Next steps
9393

94-
For more information on how to query different file types, refer to the [Query single CSV file](query-single-csv-file.md), [Query Parquet files](query-parquet-files.md), and [Query JSON files](query-json-files.md) articles.
94+
For more information on how to query different file types, see the [Query single CSV file](query-single-csv-file.md), [Query Parquet files](query-parquet-files.md), and [Query JSON files](query-json-files.md) articles.

articles/synapse-analytics/sql/overview-features.md

Lines changed: 22 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ Transact-SQL language is used in Synapse SQL serverless and provisioned model ca
1919

2020
## Database objects
2121

22-
Consumption models in Synapse SQL enable you to use different database objects. The comparison of supported object types is shown in the following table:
22+
Consumption models in Synapse SQL enables you to use different database objects. The comparison of supported object types is shown in the following table:
2323

2424
| | Provisioned | Serverless |
2525
| --- | --- | --- |
@@ -37,15 +37,15 @@ Consumption models in Synapse SQL enable you to use different database objects.
3737
| **[Table indexes](../sql-data-warehouse/sql-data-warehouse-tables-index.md?toc=/azure/synapse-analytics/toc.json&bc=/azure/synapse-analytics/breadcrumb/toc.json)** | Yes | No |
3838
| **[Table partitions](../sql-data-warehouse/sql-data-warehouse-tables-partition.md?toc=/azure/synapse-analytics/toc.json&bc=/azure/synapse-analytics/breadcrumb/toc.json)** | Yes | No |
3939
| **[Statistics](develop-tables-statistics.md)** | Yes | Yes |
40-
| **[Resource classes and concurrency](../sql-data-warehouse/resource-classes-for-workload-management.md?toc=/azure/synapse-analytics/toc.json&bc=/azure/synapse-analytics/breadcrumb/toc.json)** | Yes | No |
40+
| **[Workload management, resource classes, and concurrency control](../sql-data-warehouse/resource-classes-for-workload-management.md?toc=/azure/synapse-analytics/toc.json&bc=/azure/synapse-analytics/breadcrumb/toc.json)** | Yes | No |
4141

4242
## Query language
4343

4444
Query languages used in Synapse SQL can have different supported features depending on consumption model. The following table outlines the most important query language differences in Transact-SQL dialects:
4545

4646
| | Provisioned | Serverless |
4747
| --- | --- | --- |
48-
| **SELECT statement** | Yes. Transact-SQL query clauses [FOR XML/FOR JSON](/sql/t-sql/queries/select-for-clause-transact-sql?toc=/azure/synapse-analytics/toc.json&bc=/azure/synapse-analytics/breadcrumb/toc.json&view=azure-sqldw-latest), [MATCH](/sql/t-sql/queries/match-sql-graph?toc=/azure/synapse-analytics/toc.json&bc=/azure/synapse-analytics/breadcrumb/toc.json&view=azure-sqldw-latest) and [PREDICT](/sql/t-sql/queries/predict-transact-sql?toc=/azure/synapse-analytics/toc.json&bc=/azure/synapse-analytics/breadcrumb/toc.json&view=azure-sqldw-latest) are not supported. | Yes. Transact-SQL query clauses [FOR XML](/sql/t-sql/queries/select-for-clause-transact-sql?toc=/azure/synapse-analytics/toc.json&bc=/azure/synapse-analytics/breadcrumb/toc.json&view=azure-sqldw-latest), [MATCH](/sql/t-sql/queries/match-sql-graph?toc=/azure/synapse-analytics/toc.json&bc=/azure/synapse-analytics/breadcrumb/toc.json&view=azure-sqldw-latest), [PREDICT](/sql/t-sql/queries/predict-transact-sql?toc=/azure/synapse-analytics/toc.json&bc=/azure/synapse-analytics/breadcrumb/toc.json&view=azure-sqldw-latest), and query hints are not supported. [OFFSET/FETCH](/sql/t-sql/queries/select-order-by-clause-transact-sql?toc=/azure/synapse-analytics/toc.json&bc=/azure/synapse-analytics/breadcrumb/toc.json&view=azure-sqldw-latest#using-offset-and-fetch-to-limit-the-rows-returned) and [PIVOT/UNPIVOT](/sql/t-sql/queries/from-using-pivot-and-unpivot?toc=/azure/synapse-analytics/toc.json&bc=/azure/synapse-analytics/breadcrumb/toc.json&view=azure-sqldw-latest) can be used to only to query data in temporary tables (not external data). |
48+
| **SELECT statement** | Yes. Transact-SQL query clauses [FOR XML/FOR JSON](/sql/t-sql/queries/select-for-clause-transact-sql?toc=/azure/synapse-analytics/toc.json&bc=/azure/synapse-analytics/breadcrumb/toc.json&view=azure-sqldw-latest), [MATCH](/sql/t-sql/queries/match-sql-graph?toc=/azure/synapse-analytics/toc.json&bc=/azure/synapse-analytics/breadcrumb/toc.json&view=azure-sqldw-latest), and [PREDICT](/sql/t-sql/queries/predict-transact-sql?toc=/azure/synapse-analytics/toc.json&bc=/azure/synapse-analytics/breadcrumb/toc.json&view=azure-sqldw-latest) are not supported. | Yes. Transact-SQL query clauses [FOR XML](/sql/t-sql/queries/select-for-clause-transact-sql?toc=/azure/synapse-analytics/toc.json&bc=/azure/synapse-analytics/breadcrumb/toc.json&view=azure-sqldw-latest), [MATCH](/sql/t-sql/queries/match-sql-graph?toc=/azure/synapse-analytics/toc.json&bc=/azure/synapse-analytics/breadcrumb/toc.json&view=azure-sqldw-latest), [PREDICT](/sql/t-sql/queries/predict-transact-sql?toc=/azure/synapse-analytics/toc.json&bc=/azure/synapse-analytics/breadcrumb/toc.json&view=azure-sqldw-latest), and query hints are not supported. [OFFSET/FETCH](/sql/t-sql/queries/select-order-by-clause-transact-sql?toc=/azure/synapse-analytics/toc.json&bc=/azure/synapse-analytics/breadcrumb/toc.json&view=azure-sqldw-latest#using-offset-and-fetch-to-limit-the-rows-returned) and [PIVOT/UNPIVOT](/sql/t-sql/queries/from-using-pivot-and-unpivot?toc=/azure/synapse-analytics/toc.json&bc=/azure/synapse-analytics/breadcrumb/toc.json&view=azure-sqldw-latest) can be used to query system objects (not external data). |
4949
| **INSERT statement** | Yes | No |
5050
| **UPDATE statement** | Yes | No |
5151
| **DELETE statement** | Yes | No |
@@ -72,20 +72,31 @@ Synapse SQL enable you to use built-in security features to secure your data and
7272
| --- | --- | --- |
7373
| **Logins** | N/A (only contained users are supported in databases) | Yes |
7474
| **Users** | N/A (only contained users are supported in databases) | Yes |
75-
| [**Contained users**](/sql/relational-databases/security/contained-database-users-making-your-database-portable?toc=/azure/synapse-analytics/toc.json&bc=/azure/synapse-analytics/breadcrumb/toc.json&view=azure-sqldw-latest) | Yes. **Note:** only one AAD user can be unrestricted admin | Yes |
76-
| **Azure Active Directory (AAD) authentication** | Yes, AAD users | Yes, AAD logins and users |
77-
| **Storage AAD passthrough authentication** | Yes | Yes |
75+
| **[Contained users](/sql/relational-databases/security/contained-database-users-making-your-database-portable?toc=/azure/synapse-analytics/toc.json&bc=/azure/synapse-analytics/breadcrumb/toc.json&view=azure-sqldw-latest)** | Yes. **Note:** only one Azure AD user can be unrestricted admin | Yes |
76+
| **SQL username/password authentication**| Yes | Yes |
77+
| **Azure Active Directory (AAD) authentication**| Yes, Azure AD users | Yes, Azure AD logins and users |
78+
| **Storage Azure Active Directory (AAD) passthrough authentication** | Yes | Yes |
7879
| **Storage SAS token authentication** | No | Yes, using [DATABASE SCOPED CREDENTIAL](/sql/t-sql/statements/create-database-scoped-credential-transact-sql?toc=/azure/synapse-analytics/toc.json&bc=/azure/synapse-analytics/breadcrumb/toc.json&view=azure-sqldw-latest) in [EXTERNAL DATA SOURCE](/sql/t-sql/statements/create-external-data-source-transact-sql?toc=/azure/synapse-analytics/toc.json&bc=/azure/synapse-analytics/breadcrumb/toc.json&view=azure-sqldw-latest) or instance-level [CREDENTIAL](/sql/t-sql/statements/create-credential-transact-sql?toc=/azure/synapse-analytics/toc.json&bc=/azure/synapse-analytics/breadcrumb/toc.json&view=azure-sqldw-latest). |
7980
| **Storage Access Key authentication** | Yes, using [DATABASE SCOPED CREDENTIAL](/sql/t-sql/statements/create-database-scoped-credential-transact-sql?toc=/azure/synapse-analytics/toc.json&bc=/azure/synapse-analytics/breadcrumb/toc.json&view=azure-sqldw-latest) in [EXTERNAL DATA SOURCE](/sql/t-sql/statements/create-external-data-source-transact-sql?toc=/azure/synapse-analytics/toc.json&bc=/azure/synapse-analytics/breadcrumb/toc.json&view=azure-sqldw-latest) | No |
80-
| **Storage Managed Identity authentication** | Yes, using [Managed Service Identity Credential](../../azure-sql/database/vnet-service-endpoint-rule-overview.md?toc=/azure/synapse-analytics/toc.json&bc=/azure/synapse-analytics/breadcrumb/toc.json&view=azure-sqldw-latest) | Yes, using `Managed Identity` credential. |
81+
| **Storage [Managed Identity](../security/synapse-workspace-managed-identity.md) authentication** | Yes, using [Managed Service Identity Credential](../../sql-database/sql-database-vnet-service-endpoint-rule-overview.md?toc=/azure/synapse-analytics/toc.json&bc=/azure/synapse-analytics/breadcrumb/toc.json&view=azure-sqldw-latest) | Yes, using `Managed Identity` credential. |
8182
| **Storage Application identity authentication** | [Yes](/sql/t-sql/statements/create-external-data-source-transact-sql?toc=/azure/synapse-analytics/toc.json&bc=/azure/synapse-analytics/breadcrumb/toc.json&view=azure-sqldw-latest) | No |
8283
| **Permissions - Object-level** | Yes, including ability to GRANT, DENY, and REVOKE permissions to users | Yes, including ability to GRANT, DENY, and REVOKE permissions to users/logins on the system objects that are supported |
8384
| **Permissions - Schema-level** | Yes, including ability to GRANT, DENY, and REVOKE permissions to users/logins on the schema | Yes, including ability to GRANT, DENY, and REVOKE permissions to users/logins on the schema |
84-
| **Permissions** - [Database-level](/sql/relational-databases/security/authentication-access/database-level-roles?toc=/azure/synapse-analytics/toc.json&bc=/azure/synapse-analytics/breadcrumb/toc.json&view=azure-sqldw-latest) | Yes | Yes |
85-
| **Permissions** - [Server-level](/sql/relational-databases/security/authentication-access/server-level-roles) | No | Yes, sysadmin and other server-roles are supported |
85+
| **Permissions - [Database-level](/sql/relational-databases/security/authentication-access/database-level-roles?toc=/azure/synapse-analytics/toc.json&bc=/azure/synapse-analytics/breadcrumb/toc.json&view=azure-sqldw-latest)** | Yes | Yes |
86+
| **Permissions - [Server-level](/sql/relational-databases/security/authentication-access/server-level-roles)** | No | Yes, sysadmin and other server-roles are supported |
87+
| **Permissions - [Column-level security](/azure/synapse-analytics/sql-data-warehouse/column-level-security?toc=/azure/synapse-analytics/toc.json&bc=/azure/synapse-analytics/breadcrumb/toc.json)** | Yes | Yes |
8688
| **Roles/groups** | Yes (database scoped) | Yes (both server and database scoped) |
8789
| **Security &amp; identity functions** | Some Transact-SQL security functions and operators: `CURRENT_USER`, `HAS_DBACCESS`, `IS_MEMBER`, `IS_ROLEMEMBER`, `SESSION_USER`, `SUSER_NAME`, `SUSER_SNAME`, `SYSTEM_USER`, `USER`, `USER_NAME`, `EXECUTE AS`, `OPEN/CLOSE MASTER KEY` | Some Transact-SQL security functions and operators: `CURRENT_USER`, `HAS_DBACCESS`, `HAS_PERMS_BY_NAME`, `IS_MEMBER', 'IS_ROLEMEMBER`, `IS_SRVROLEMEMBER`, `SESSION_USER`, `SUSER_NAME`, `SUSER_SNAME`, `SYSTEM_USER`, `USER`, `USER_NAME`, `EXECUTE AS`, and `REVERT`. Security functions cannot be used to query external data (store the result in variable that can be used in the query). |
8890
| **DATABASE SCOPED CREDENTIAL** | Yes | Yes |
91+
| **SERVER SCOPED CREDENTIAL** | No | Yes |
92+
| **Row-level security** | [Yes](https://docs.microsoft.com/sql/relational-databases/security/row-level-security?toc=%2Fazure%2Fsynapse-analytics%2Ftoc.json&bc=%2Fazure%2Fsynapse-analytics%2Fbreadcrumb%2Ftoc.json&view=sql-server-ver15) | No |
93+
| **Transparent Data Encryption (TDE)** | [Yes](/azure/sql-database/transparent-data-encryption-azure-sql?toc=%2Fazure%2Fsynapse-analytics%2Ftoc.json&bc=%2Fazure%2Fsynapse-analytics%2Fbreadcrumb%2Ftoc.json&tabs=azure-portal) | No |
94+
| **Data Discovery & Classification** | [Yes](/azure/sql-database/sql-database-data-discovery-and-classification?toc=/azure/synapse-analytics/toc.json&bc=/azure/synapse-analytics/breadcrumb/toc.json) | No |
95+
| **Vulnerability Assessment** | [Yes](/azure/sql-database/sql-vulnerability-assessment?toc=/azure/synapse-analytics/toc.json&bc=/azure/synapse-analytics/breadcrumb/toc.json) | No |
96+
| **Advanced Threat Protection** | [Yes](/azure/sql-database/sql-database-threat-detection-overview?toc=/azure/synapse-analytics/toc.json&bc=/azure/synapse-analytics/breadcrumb/toc.json)
97+
| **Auditing** | [Yes](/azure/sql-database/sql-database-auditing?toc=/azure/synapse-analytics/toc.json&bc=/azure/synapse-analytics/breadcrumb/toc.json) | No |
98+
| **[Firewall rules](../security/synapse-workspace-ip-firewall.md)**| Yes | Yes |
99+
| **[Private endpoint](../security/synapse-workspace-managed-private-endpoints.md)**| Yes | Yes |
89100

90101
SQL pool and SQL on-demand use standard Transact-SQL language to query data. For detailed differences, look at the [Transact-SQL language reference](/sql/t-sql/language-reference).
91102

@@ -115,6 +126,7 @@ Data that is analyzed can be stored on various storage types. The following tabl
115126
| **Internal storage** | Yes | No |
116127
| **Azure Data Lake v2** | Yes | Yes |
117128
| **Azure Blob Storage** | Yes | Yes |
129+
| **Azure CosmosDB analytical storage** | No | Yes using [Synapse Link](/azure/cosmos-db/synapse-link?toc=/azure/synapse-analytics/toc.json&bc=/azure/synapse-analytics/breadcrumb/toc.json) (under [gated preview](/azure/cosmos-db/synapse-link?toc=/azure/synapse-analytics/toc.json&bc=/azure/synapse-analytics/breadcrumb/toc.json#limitations)) |
118130

119131
## Data formats
120132

@@ -128,6 +140,7 @@ Data that is analyzed can be stored in various storage formats. The following ta
128140
| **Hive ORC** | [Yes](/sql/t-sql/statements/create-external-file-format-transact-sql?toc=/azure/synapse-analytics/toc.json&bc=/azure/synapse-analytics/breadcrumb/toc.json&view=azure-sqldw-latest) | No |
129141
| **Hive RC** | [Yes](/sql/t-sql/statements/create-external-file-format-transact-sql?toc=/azure/synapse-analytics/toc.json&bc=/azure/synapse-analytics/breadcrumb/toc.json&view=azure-sqldw-latest) | No |
130142
| **JSON** | Yes | [Yes](query-json-files.md) |
143+
| **Avro** | No | No |
131144
| **[Delta-lake](https://delta.io/)** | No | No |
132145
| **[CDM](https://docs.microsoft.com/common-data-model/)** | No | No |
133146

0 commit comments

Comments
 (0)