Skip to content

Commit 256606a

Browse files
authored
Merge pull request #109735 from Kat-Campise/rebrand_sqldw_v3
rebrand sql dw second 6
2 parents 85a2de3 + d3d8c06 commit 256606a

File tree

7 files changed

+77
-83
lines changed

7 files changed

+77
-83
lines changed
-85.2 KB
Loading
Lines changed: 17 additions & 36 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
---
2-
title: Connect to Azure SQL Data Warehouse
3-
description: Get connected to Azure SQL Data Warehouse.
2+
title: Connect to Synapse SQL pool
3+
description: Get connected to SQL pool.
44
services: synapse-analytics
55
author: XiaoyuMSFT
66
manager: craigg
@@ -13,21 +13,23 @@ ms.reviewer: igorstan
1313
ms.custom: seo-lt-2019
1414
---
1515

16-
# Connect to Azure SQL Data Warehouse
17-
Get connected to Azure SQL Data Warehouse.
16+
# Connect to Synapse SQL pool
17+
Get connected to SQL pool.
1818

1919
## Find your server name
20-
The server name in the following example is samplesvr.database.windows.net. To find the fully qualified server name:
20+
The server name in the following example is sqlpoolservername.database.windows.net. To find the fully qualified server name:
2121

22-
1. Go to the [Azure portal][Azure portal].
23-
2. Click on **SQL data warehouses**.
24-
3. Click on the data warehouse you want to connect to.
22+
1. Go to the [Azure portal](https://portal.azure.com).
23+
2. Click on **Azure Synapse Analytics**.
24+
3. Click on the SQL pool you want to connect to.
2525
4. Locate the full server name.
2626

2727
![Full server name](media/sql-data-warehouse-connect-overview/server-connect.PNG)
2828

2929
## Supported drivers and connection strings
30-
Azure SQL Data Warehouse supports [ADO.NET][ADO.NET], [ODBC][ODBC], [PHP][PHP], and [JDBC][JDBC]. To find the latest version and documentation, click on one of the preceding drivers. To automatically generate the connection string for the driver that you are using from the Azure portal, click on the **Show database connection strings** from the preceding example. Following are also some examples of what a connection string looks like for each driver.
30+
SQL pool supports [ADO.NET](https://msdn.microsoft.com/library/e80y5yhx(v=vs.110).aspx), [ODBC](https://msdn.microsoft.com/library/jj730314.aspx), [PHP](https://msdn.microsoft.com/library/cc296172.aspx?f=255&MSPPError=-2147217396), and [JDBC](https://msdn.microsoft.com/library/mt484311(v=sql.110).aspx). To find the latest version and documentation, click on one of the preceding drivers.
31+
32+
To automatically generate the connection string for the driver that you are using from the Azure portal, click on the **Show database connection strings** from the preceding example. Following are also some examples of what a connection string looks like for each driver.
3133

3234
> [!NOTE]
3335
> Consider setting the connection timeout to 300 seconds to allow your connection to survive short periods of unavailability.
@@ -55,36 +57,15 @@ jdbc:sqlserver://yourserver.database.windows.net:1433;database=yourdatabase;user
5557
```
5658

5759
## Connection settings
58-
SQL Data Warehouse standardizes some settings during connection and object creation. These settings cannot be overridden and include:
60+
SQL pool standardizes some settings during connection and object creation. These settings cannot be overridden and include:
5961

6062
| Database Setting | Value |
6163
|:--- |:--- |
62-
| [ANSI_NULLS][ANSI_NULLS] |ON |
63-
| [QUOTED_IDENTIFIERS][QUOTED_IDENTIFIERS] |ON |
64-
| [DATEFORMAT][DATEFORMAT] |mdy |
65-
| [DATEFIRST][DATEFIRST] |7 |
64+
| [ANSI_NULLS](https://msdn.microsoft.com/library/ms188048.aspx) |ON |
65+
| [QUOTED_IDENTIFIERS](https://msdn.microsoft.com/library/ms174393.aspx) |ON |
66+
| [DATEFORMAT](https://msdn.microsoft.com/library/ms189491.aspx) |mdy |
67+
| [DATEFIRST](https://msdn.microsoft.com/library/ms181598.aspx) |7 |
6668

6769
## Next steps
68-
To connect and query with Visual Studio, see [Query with Visual Studio][Query with Visual Studio]. To learn more about authentication options, see [Authentication to Azure SQL Data Warehouse][Authentication to Azure SQL Data Warehouse].
69-
70-
<!--Articles-->
71-
[Query with Visual Studio]:sql-data-warehouse-query-visual-studio.md
72-
[Authentication to Azure SQL Data Warehouse]:sql-data-warehouse-authentication.md
73-
74-
<!--MSDN references-->
75-
[ADO.NET]: https://msdn.microsoft.com/library/e80y5yhx(v=vs.110).aspx
76-
[ODBC]: https://msdn.microsoft.com/library/jj730314.aspx
77-
[PHP]: https://msdn.microsoft.com/library/cc296172.aspx?f=255&MSPPError=-2147217396
78-
[JDBC]: https://msdn.microsoft.com/library/mt484311(v=sql.110).aspx
79-
[ANSI_NULLS]: https://msdn.microsoft.com/library/ms188048.aspx
80-
[QUOTED_IDENTIFIERS]: https://msdn.microsoft.com/library/ms174393.aspx
81-
[DATEFORMAT]: https://msdn.microsoft.com/library/ms189491.aspx
82-
[DATEFIRST]: https://msdn.microsoft.com/library/ms181598.aspx
83-
84-
<!--Other-->
85-
[Azure portal]: https://portal.azure.com
86-
87-
<!--Image references-->
88-
[1]: media/sql-data-warehouse-connect-overview/server-connect.PNG
89-
70+
To connect and query with Visual Studio, see [Query with Visual Studio](sql-data-warehouse-query-visual-studio.md). To learn more about authentication options, see [Authentication to Azure Synapse Analytics](sql-data-warehouse-authentication.md).
9071

articles/synapse-analytics/sql-data-warehouse/sql-data-warehouse-develop-dynamic-sql.md

Lines changed: 9 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
---
22
title: Using dynamic SQL
3-
description: Tips for using dynamic SQL in Azure SQL Data Warehouse for developing solutions.
3+
description: Tips for development solutions using dynamic SQL in Synapse SQL pool.
44
services: synapse-analytics
55
author: XiaoyuMSFT
66
manager: craigg
@@ -13,12 +13,16 @@ ms.reviewer: igorstan
1313
ms.custom: seo-lt-2019
1414
---
1515

16-
# Dynamic SQL in SQL Data Warehouse
17-
Tips for using dynamic SQL in Azure SQL Data Warehouse for developing solutions.
16+
# Dynamic SQL in Synapse SQL pool
17+
Included in this article are tips for development solutions using dynamic SQL in SQL pool.
1818

1919
## Dynamic SQL Example
2020

21-
When developing application code for SQL Data Warehouse, you may need to use dynamic sql to help deliver flexible, generic, and modular solutions. SQL Data Warehouse does not support blob data types at this time. Not supporting blob data types might limit the size of your strings since blob data types include both varchar(max) and nvarchar(max) types. If you have used these types in your application code to build large strings, you need to break the code into chunks and use the EXEC statement instead.
21+
When developing application code for SQL pool, you may need to use dynamic SQL to help deliver flexible, generic, and modular solutions. SQL pool doesn't support blob data types at this time.
22+
23+
Not supporting blob data types might limit the size of your strings since blob data types include both varchar(max) and nvarchar(max) types.
24+
25+
If you've used these types in your application code to build large strings, you need to break the code into chunks and use the EXEC statement instead.
2226

2327
A simple example:
2428

@@ -33,7 +37,7 @@ EXEC( @sql_fragment1 + @sql_fragment2 + @sql_fragment3);
3337
If the string is short, you can use [sp_executesql](/sql/relational-databases/system-stored-procedures/sp-executesql-transact-sql) as normal.
3438

3539
> [!NOTE]
36-
> Statements executed as dynamic SQL will still be subject to all TSQL validation rules.
40+
> Statements executed as dynamic SQL will still be subject to all T-SQL validation rules.
3741
>
3842
>
3943

articles/synapse-analytics/sql-data-warehouse/sql-data-warehouse-develop-group-by-options.md

Lines changed: 14 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
---
22
title: Using group by options
3-
description: Tips for implementing group by options in Azure SQL Data Warehouse for developing solutions.
3+
description: Tips for implementing group by options in Synapse SQL pool.
44
services: synapse-analytics
55
author: XiaoyuMSFT
66
manager: craigg
@@ -13,21 +13,21 @@ ms.reviewer: igorstan
1313
ms.custom: seo-lt-2019
1414
---
1515

16-
# Group by options in SQL Data Warehouse
17-
Tips for implementing group by options in Azure SQL Data Warehouse for developing solutions.
16+
# Group by options in Synapse SQL pool
1817

19-
## What does GROUP BY do?
18+
In this article, you'll find tips for implementing group by options in SQL pool.
2019

21-
The [GROUP BY](/sql/t-sql/queries/select-group-by-transact-sql) T-SQL clause aggregates data to a summary set of rows. GROUP BY has some options that SQL Data Warehouse does not support. These options have workarounds.
20+
## What does GROUP BY do?
2221

23-
These options are
22+
The [GROUP BY](/sql/t-sql/queries/select-group-by-transact-sql) T-SQL clause aggregates data to a summary set of rows. GROUP BY has some options that SQL pool doesn't support. These options have workarounds, which are as follows:
2423

2524
* GROUP BY with ROLLUP
2625
* GROUPING SETS
2726
* GROUP BY with CUBE
2827

2928
## Rollup and grouping sets options
30-
The simplest option here is to use UNION ALL instead to perform the rollup rather than relying on the explicit syntax. The result is exactly the same
29+
30+
The simplest option here is to use UNION ALL to perform the rollup rather than relying on the explicit syntax. The result is exactly the same.
3131

3232
The following example using the GROUP BY statement with the ROLLUP option:
3333
```sql
@@ -79,11 +79,11 @@ JOIN dbo.DimSalesTerritory t ON s.SalesTerritoryKey = t.SalesTerritor
7979
To replace GROUPING SETS, the sample principle applies. You only need to create UNION ALL sections for the aggregation levels you want to see.
8080

8181
## Cube options
82-
It is possible to create a GROUP BY WITH CUBE using the UNION ALL approach. The problem is that the code can quickly become cumbersome and unwieldy. To mitigate this, you can use this more advanced approach.
82+
It's possible to create a GROUP BY WITH CUBE using the UNION ALL approach. The problem is that the code can quickly become cumbersome and unwieldy. To mitigate this issue, you can use this more advanced approach.
8383

84-
Let's use the example above.
84+
Using the previous example, the first step is to define the 'cube' that defines all the levels of aggregation that we want to create.
8585

86-
The first step is to define the 'cube' that defines all the levels of aggregation that we want to create. It is important to take note of the CROSS JOIN of the two derived tables. This generates all the levels for us. The rest of the code is really there for formatting.
86+
Take note of the CROSS JOIN of the two derived tables since this generates all the levels for us. The rest of the code is there for formatting:
8787

8888
```sql
8989
CREATE TABLE #Cube
@@ -114,7 +114,7 @@ SELECT Cols
114114
FROM GrpCube;
115115
```
116116

117-
The following shows the results of the CTAS:
117+
The following image shows the results of the CTAS:
118118

119119
![Group by cube](./media/sql-data-warehouse-develop-group-by-options/sql-data-warehouse-develop-group-by-cube.png)
120120

@@ -141,7 +141,7 @@ WITH
141141
;
142142
```
143143

144-
The third step is to loop over our cube of columns performing the aggregation. The query will run once for every row in the #Cube temporary table and store the results in the #Results temp table
144+
The third step is to loop over our cube of columns performing the aggregation. The query will run once for every row in the #Cube temporary table. The results are stored in the #Results temp table:
145145

146146
```sql
147147
SET @nbr =(SELECT MAX(Seq) FROM #Cube);
@@ -165,7 +165,7 @@ BEGIN
165165
END
166166
```
167167

168-
Lastly, you can return the results by simply reading from the #Results temporary table
168+
Lastly, you can return the results by reading from the #Results temporary table:
169169

170170
```sql
171171
SELECT *
@@ -174,7 +174,7 @@ ORDER BY 1,2,3
174174
;
175175
```
176176

177-
By breaking the code up into sections and generating a looping construct, the code becomes more manageable and maintainable.
177+
By breaking up the code into sections and generating a looping construct, the code becomes more manageable and maintainable.
178178

179179
## Next steps
180180
For more development tips, see [development overview](sql-data-warehouse-overview-develop.md).

articles/synapse-analytics/sql-data-warehouse/sql-data-warehouse-develop-label.md

Lines changed: 9 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
---
22
title: Using labels to instrument queries
3-
description: Tips for using labels to instrument queries in Azure SQL Data Warehouse for developing solutions.
3+
description: Tips for using labels to instrument queries in Synapse SQL pool for developing solutions.
44
services: synapse-analytics
55
author: XiaoyuMSFT
66
manager: craigg
@@ -13,12 +13,12 @@ ms.reviewer: igorstan
1313
ms.custom: seo-lt-2019
1414
---
1515

16-
# Using labels to instrument queries in Azure SQL Data Warehouse
17-
Tips for using labels to instrument queries in Azure SQL Data Warehouse for developing solutions.
16+
# Using labels to instrument queries in Synapse SQL pool
17+
Included in this article are tips for developing solutions using labels to instrument queries in SQL pool.
1818

1919

2020
## What are labels?
21-
SQL Data Warehouse supports a concept called query labels. Before going into any depth, let's look at an example:
21+
SQL pool supports a concept called query labels. Before going into any depth, let's look at an example:
2222

2323
```sql
2424
SELECT *
@@ -27,11 +27,13 @@ OPTION (LABEL = 'My Query Label')
2727
;
2828
```
2929

30-
The last line tags the string 'My Query Label' to the query. This tag is particularly helpful since the label is query-able through the DMVs. Querying for labels provides a mechanism for locating problem queries and helping to identify progress through an ELT run.
30+
The last line tags the string 'My Query Label' to the query. This tag is helpful because the label is query-able through the DMVs.
3131

32-
A good naming convention really helps. For example, starting the label with PROJECT, PROCEDURE, STATEMENT, or COMMENT helps to uniquely identify the query among all the code in source control.
32+
Querying for labels provides a mechanism for locating problem queries and helping to identify progress through an ELT run.
3333

34-
The following query uses a dynamic management view to search by label.
34+
A good naming convention really helps. For example, starting the label with PROJECT, PROCEDURE, STATEMENT, or COMMENT uniquely identifies the query among all the code in source control.
35+
36+
The following query uses a dynamic management view to search by label:
3537

3638
```sql
3739
SELECT *

articles/synapse-analytics/sql-data-warehouse/sql-data-warehouse-develop-loops.md

Lines changed: 11 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
---
22
title: Using T-SQL loops
3-
description: Tips for using T-SQL loops and replacing cursors in Azure SQL Data Warehouse for developing solutions.
3+
description: Tips for solution development using T-SQL loops and replacing cursors in Synapse SQL pool.
44
services: synapse-analytics
55
author: XiaoyuMSFT
66
manager: craigg
@@ -13,17 +13,21 @@ ms.reviewer: igorstan
1313
ms.custom: seo-lt-2019
1414
---
1515

16-
# Using T-SQL loops in SQL Data Warehouse
17-
Tips for using T-SQL loops and replacing cursors in Azure SQL Data Warehouse for developing solutions.
16+
# Using T-SQL loops in Synapse SQL pool
17+
Included in this article are tips for SQL pool solution development using T-SQL loops and replacing cursors.
1818

1919
## Purpose of WHILE loops
2020

21-
SQL Data Warehouse supports the [WHILE](/sql/t-sql/language-elements/while-transact-sql) loop for repeatedly executing statement blocks. This WHILE loop continues for as long as the specified conditions are true or until the code specifically terminates the loop using the BREAK keyword. Loops are useful for replacing cursors defined in SQL code. Fortunately, almost all cursors that are written in SQL code are of the fast forward, read-only variety. Therefore, [WHILE] loops are a great alternative for replacing cursors.
21+
Synapse SQL pool supports the [WHILE](https://docs.microsoft.com/sql/t-sql/language-elements/while-transact-sql?view=sql-server-ver15) loop for repeatedly executing statement blocks. This WHILE loop continues for as long as the specified conditions are true or until the code specifically terminates the loop using the BREAK keyword.
2222

23-
## Replacing cursors in SQL Data Warehouse
24-
However, before diving in head first you should ask yourself the following question: "Could this cursor be rewritten to use set-based operations?." In many cases, the answer is yes and is often the best approach. A set-based operation often performs faster than an iterative, row by row approach.
23+
Loops are useful for replacing cursors defined in SQL code. Fortunately, almost all cursors that are written in SQL code are of the fast forward, read-only variety. So, WHILE loops are a great alternative for replacing cursors.
2524

26-
Fast forward read-only cursors can be easily replaced with a looping construct. The following is a simple example. This code example updates the statistics for every table in the database. By iterating over the tables in the loop, each command executes in sequence.
25+
## Replacing cursors in Synapse SQL pool
26+
However, before diving in head first you should ask yourself the following question: "Could this cursor be rewritten to use set-based operations?"
27+
28+
In many cases, the answer is yes and is frequently the best approach. A set-based operation often performs faster than an iterative, row by row approach.
29+
30+
Fast forward read-only cursors can be easily replaced with a looping construct. The following example is a simple one. This code example updates the statistics for every table in the database. By iterating over the tables in the loop, each command executes in sequence.
2731

2832
First, create a temporary table containing a unique row number used to identify the individual statements:
2933

0 commit comments

Comments
 (0)