Skip to content

Commit 035ac94

Browse files
authored
Update sql-db-table.md
1 parent 6a83ab5 commit 035ac94

File tree

1 file changed

+14
-14
lines changed

1 file changed

+14
-14
lines changed

articles/stream-analytics/sql-db-table.md

Lines changed: 14 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -14,24 +14,24 @@ Azure Stream Analytics supports Azure SQL Database as an output for your streami
1414

1515
1. Create a Stream Analytics job.
1616

17-
2. Create a Azure SQL Database to which your Stream Analytics job will write output.
17+
2. Create an Azure SQL Database to which your Stream Analytics job will write output.
1818

1919
## Write to a new table in SQL Database
2020

21-
This section describes how you can configure your job to write to a table in your Azure SQL Database that has not yet been created.
21+
This section describes how you can configure your job to write to a table in your Azure SQL Database that hasn't yet been created.
2222

2323
1. In your Stream Analytics job, select **Outputs** under **Job topology**. Click **Add** and choose **SQL Database**.
2424

2525
:::image type="content" source="./media/sql-db-output-managed-identity/sql-database-output.png" alt-text="Screenshot showing SQL DB output in Stream Analytics" lightbox="./media/sql-db-output-managed-identity/sql-database-output.png":::
2626

27-
2. Select an output alias which will be used in your job’s query. Provide your database name and authentication mode. You can learn more about [SQL output configuration options](sql-database-output.md).
27+
2. Select an output alias that will be used in your job’s query. Provide your database name and authentication mode. You can learn more about [SQL output configuration options](sql-database-output.md).
2828

29-
3. Enter a **table name** that you want to create in your Azure SQL Database. Click **Save**. Note that saving this output doesn’t create the table in your SQL Database. Next steps provide more details on when the table gets created.
29+
3. Enter a **table name** that you want to create in your Azure SQL Database. Click **Save**. Note: Saving this output doesn’t create the table in your SQL Database. Next steps provide more details on when the table gets created.
3030

3131
:::image type="content" source="./media/sql-db-output-managed-identity/new-table-name.png" alt-text="Screenshot showing SQL DB output configuration in Stream Analytics" lightbox="./media/sql-db-output-managed-identity/new-table-name.png":::
3232

3333
4. Select **Query** under **Job Topology** and use the alias in your query to write the output in the table name you provided in previous step. Click **Test query** to test the query logic and view **Test results** which shows schema of the output that will be produced by the job.
34-
Note: To test your query, you need to have either incoming streaming data in your input source or you can upload sample data to test query. You can learn more about [Test Stream Analytics query](stream-analytics-test-query.md).
34+
Note: To test your query, you need to have either incoming streaming data in your input source, or you can upload sample data to test query. You can learn more about [Test Stream Analytics query](stream-analytics-test-query.md).
3535

3636
:::image type="content" source="./media/sql-db-output-managed-identity/input-preview.png" alt-text="Screenshot showing query testing in Stream Analytics" lightbox="./media/sql-db-output-managed-identity/input-preview.png":::
3737

@@ -41,7 +41,7 @@ Note: To test your query, you need to have either incoming streaming data in you
4141

4242
:::image type="content" source="./media/sql-db-output-managed-identity/create-table-popup.png" alt-text="Screenshot showing creating a table in SQL database from Stream Analytics" lightbox="./media/sql-db-output-managed-identity/create-table-popup.png":::
4343

44-
If your Stream Analytics query is modified to produce different schema, you will need to alter your table definition in your SQL Database. This ensures that the Stream Analytics job doesn’t encounter data conversion errors while trying to write to the sink.
44+
If your Stream Analytics query is modified to produce different schema, you'll need to alter your table definition in your SQL Database. This ensures that the Stream Analytics job doesn’t encounter data conversion errors while trying to write to the sink.
4545

4646
6. Once your query is final, select **Overview** and **Start** the job. You can then navigate to the SQL Database table to see your streaming query output.
4747

@@ -53,35 +53,35 @@ This section describes how you can configure your job to write to a table that a
5353

5454
:::image type="content" source="./media/sql-db-output-managed-identity/sql-database-output.png" alt-text="Screenshot showing SQL DB output in Stream Analytics" lightbox="./media/sql-db-output-managed-identity/sql-database-output.png":::
5555

56-
2. Select an output alias which will be used in your job’s query. Provide your database name and authentication mode. You can learn more about [SQL output configuration options](sql-database-output.md).
56+
2. Select an output alias that will be used in your job’s query. Provide your database name and authentication mode. You can learn more about [SQL output configuration options](sql-database-output.md).
5757

5858
3. You can pick an existing table from the selected SQL Database by entering your SQL Authentication details. This will load a list of table names from your Database. Select the table name from the list or manually enter table name and **Save**.
5959

6060
:::image type="content" source="./media/sql-db-output-managed-identity/existing-table.png" alt-text="Screenshot showing existing table in SQL database" lightbox="./media/sql-db-output-managed-identity/existing-table.png":::
6161

6262
4. Select **Query** under **Job Topology** and use the alias name in your query to write the output in the selected table. Click **Test query** to test the query logic and view **Test results**.
63-
Note: To test your query, you need to have either incoming streaming data in Event Hub/IoT Hub or you can upload sample data to test query. You can learn more about [Test Stream Analytics query](stream-analytics-test-query.md).
63+
Note: To test your query, you need to have either incoming streaming data in Event Hub/IoT Hub, or you can upload sample data to test query. You can learn more about [Test Stream Analytics query](stream-analytics-test-query.md).
6464

6565
:::image type="content" source="./media/sql-db-output-managed-identity/input-preview.png" alt-text="Screenshot showing query testing in Stream Analytics" lightbox="./media/sql-db-output-managed-identity/input-preview.png":::
6666

6767
:::image type="content" source="./media/sql-db-output-managed-identity/output-preview.png" alt-text="Screenshot showing query tests results in Stream Analytics" lightbox="./media/sql-db-output-managed-identity/output-preview.png":::
6868

69-
5. In **SQL table schema** tab, you can see a column name and its type from incoming data and in the selected table. You can see the status whether the incoming data type and selected SQL table match or not. If its not a match, you will be prompted to update your query to match table schema.
69+
5. In **SQL table schema** tab, you can see a column name and its type from incoming data and in the selected table. You can see the status whether the incoming data type and selected SQL table match or not. If it's not a match, you'll be prompted to update your query to match table schema.
7070

7171
:::image type="content" source="./media/sql-db-output-managed-identity/schema-match.png" alt-text="Screenshot showing schema comparison in Stream Analytics" lightbox="./media/sql-db-output-managed-identity/schema-match.png":::
7272

7373
6. Once your query is final, select **Overview** and **Start** the job. You can then navigate to the SQL Database table to see your streaming query output.
7474

7575
## Common data type mismatch reasons
7676

77-
It is very important to ensure that the output of your Stream Analytics job matches the column names and data types expected by your SQL Database table. If there is a mismatch, your job will run into data conversion errors and continuously retry until the SQL table definition is changed. You can [change your job’s behavior](stream-analytics-output-error-policy.md) to drop such output that cause data conversion errors and proceed to the next one. The most common schema mismatch reasons are described below.
77+
It's important to ensure that the output of your Stream Analytics job matches the column names and data types expected by your SQL Database table. If there's a mismatch, your job will run into data conversion errors, and continuously retry until the SQL table definition is changed. You can [change your job’s behavior](stream-analytics-output-error-policy.md) to drop such output that cause data conversion errors and proceed to the next one. The most common schema mismatch reasons are described below.
7878

79-
* **Type mismatch**: The query and target types are not compatible. Rows will not be inserted in the destination. Use a [conversion function](/stream-analytics-query/data-types-azure-stream-analytics) such as TRY_CAST() to align types in the query. The alternate option is to alter the destination table in your SQL database.
79+
* **Type mismatch**: The query and target types aren't compatible. Rows won't be inserted in the destination. Use a [conversion function](/stream-analytics-query/data-types-azure-stream-analytics) such as TRY_CAST() to align types in the query. The alternate option is to alter the destination table in your SQL database.
8080
* **Range**: The target type range is considerably smaller than the one used in the query. Rows with out-of-range values [may not be inserted](/stream-analytics-query/data-types-azure-stream-analytics) in the destination table, or truncated. Consider altering the destination column to a larger type range.
8181
* **Implicit**: The query and target types are different but compatible. The data will be implicitly converted, but this could result in data loss or failures. Use a [conversion function](/stream-analytics-query/data-types-azure-stream-analytics) such as TRY_CAST() to align types in the query, or alter the destination table.
82-
* **Record**: This type is not yet supported for this output. The value will be replaced by the string ‘record’. Consider [parsing](/stream-analytics-query/stream-analytics-parsing-json.md) the data, or using an UDF to [convert to string](/stream-analytics-query/stream-analytics-javascript-user-defined-functions.md).
83-
* **Array**: This type is not yet supported natively supported in Azure SQL Database. The value will be replaced by the string ‘record’. Consider [parsing](/stream-analytics-query/stream-analytics-parsing-json.md) the data, or using an UDF to [convert to string](/stream-analytics-query/stream-analytics-javascript-user-defined-functions.md).
84-
* **Column missing from destination table**: This column is missing from the destination table. The data will not be inserted. Add this column to your destination table if needed.
82+
* **Record**: This type isn't yet supported for this output. The value will be replaced by the string ‘record’. Consider [parsing](/stream-analytics-query/stream-analytics-parsing-json.md) the data, or using an UDF to [convert to string](/stream-analytics-query/stream-analytics-javascript-user-defined-functions.md).
83+
* **Array**: This type isn't yet supported natively in Azure SQL Database. The value will be replaced by the string ‘record’. Consider [parsing](/stream-analytics-query/stream-analytics-parsing-json.md) the data, or using an UDF to [convert to string](/stream-analytics-query/stream-analytics-javascript-user-defined-functions.md).
84+
* **Column missing from destination table**: This column is missing from the destination table. The data won't be inserted. Add this column to your destination table if needed.
8585

8686
## Next steps
8787

0 commit comments

Comments
 (0)