Transforming Data Using T-SQL
T-SQL is a procedural language that is used by both dedicated and Serverless SQL ingess in Synapse. Similar to the transformations that you have seen in Spark, T-SQL also provides a rich set of transformations.
Note
This section primarily focuses on the Transform data by using Transact-SQL (T-SQL) in Azure Synapse Analytics concept of the DP-203: Data Engineering on Microsoft Azure exam.
The following are some of the most important ones:
SELECT
: This command is used to select data from a subset of columns. Its syntax is as follows:SELECT[firstName], [lastName] from dbo.Driver WHERE [city] = ‘New York’;
ORDER BY
: This command is used to sort rows by a particular column. Its syntax is as follows:SELECT [firstName], [lastName] from dbo.Driver ORDER BY [firstName];
DISTINCT
: This command is used to select unique rows from the input. Its syntax is as follows:SELECT DISTINCT [firstName], [lastName] from dbo.Driver;
...