0

One of our developers is using Azure Stream Analytics to pull data out of Azure blob storage and then insert it into an Azure SQL Database table. The target SQL table has columns which are integer data types. Azure Stream Analytics doesn't support integer types, only bigint types. So when SA attempts to insert a row into our table we get a data type mismatch error.

When writing rows to the SQL table, is there a way we can have Stream Analytics write the data as integers and not bigints (CASTing doesn't work since the INT type isn't recognized)?

Randy Minder
  • 47,200
  • 49
  • 204
  • 358
  • Couldn't you setup a stored procedure and cast the BIGINT to INT upon import? https://stackoverflow.com/questions/7097171/sql-safely-downcast-bigint-to-int – Sorceri Oct 13 '17 at 19:55
  • That might be possible if Stream Analytics allows a stored procedure to be called that then inserts the data instead of SA directly inserting rows into our table. – Randy Minder Oct 13 '17 at 19:58
  • you can setup a trigger for the table on insert that way it is all handled DB side. – Sorceri Oct 13 '17 at 20:00

1 Answers1

0

The scenario should be supported, as documented at: https://msdn.microsoft.com/en-us/library/azure/dn835065.aspx. Azure Stream Analytics does not do the conversion, rather, allows for SQL's implicit conversion to happen. If this is now what you are observing please provide further details and we will look into that.

Thanks, Kati Iceva, Microsoft