You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: articles/stream-analytics/sql-db-table.md
+4Lines changed: 4 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -17,6 +17,7 @@ Azure Stream Analytics supports Azure SQL Database as an output for your streami
17
17
2. Create a Azure SQL Database to which your Stream Analytics job will write output.
18
18
19
19
## Write to a new table in SQL Database
20
+
20
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
22
22
23
1. In your Stream Analytics job, select **Outputs** under **Job topology**. Click **Add** and choose **SQL Database**.
@@ -45,6 +46,7 @@ Note: To test your query, you need to have either incoming streaming data in you
45
46
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.
46
47
47
48
## Select an existing table from SQL Database
49
+
48
50
This section describes how you can configure your job to write to a table that already exists in your Azure SQL Database.
49
51
50
52
1. In your Stream Analytics job, select **Outputs** under **Job topology**. Click **Add** and choose **SQL Database**.
@@ -71,6 +73,7 @@ Note: To test your query, you need to have either incoming streaming data in Eve
71
73
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.
72
74
73
75
## Common data type mismatch reasons
76
+
74
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.
75
78
76
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.
@@ -81,6 +84,7 @@ It is very important to ensure that the output of your Stream Analytics job matc
81
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
85
83
86
## Next steps
87
+
84
88
*[Use SQL reference data as input source](/sql-reference-data.md)
85
89
*[Azure Stream Analytics Query Language Reference](/stream-analytics-query/stream-analytics-query-language-reference)
86
90
*[Query examples for common Stream Analytics usage patterns](stream-analytics-stream-analytics-query-patterns.md)
0 commit comments