Last post Jun 17, 2020 03:37 PM by bruce (sqlwork.com)
Member
179 Points
721 Posts
Jun 16, 2020 05:32 PM|shabbir_215|LINK
Hi All,
Is there a way can we straight insert API json data into Azure SQL Database also is it possible to do scheduling ?
Thanks,
Shabbir
All-Star
58254 Points
15674 Posts
Jun 16, 2020 11:26 PM|bruce (sqlwork.com)|LINK
Sure, azure sql, just like Sqlserver stores json in a text column. You use the azure scheduler for scheduled events
https://docs.microsoft.com/en-us/azure/scheduler/scheduler-intro
Jun 17, 2020 03:58 AM|shabbir_215|LINK
Jun 17, 2020 03:37 PM|bruce (sqlwork.com)|LINK
var data = new { message = "hello" }; using (var conn = new SqlConnection(connectionString)) { using (var cmd = conn.CreateCommand()) { conn.Open(); cmd.CommandText = "INSERT MyTable (JsonData) Values (@data)"; cmd.Parameters.AddWithValue("@data", JsonConvert.SerializeObject(data)); cmd.ExecuteNonQuery(); } }
Member
179 Points
721 Posts
API to Azure SQL Database
Jun 16, 2020 05:32 PM|shabbir_215|LINK
Hi All,
Is there a way can we straight insert API json data into Azure SQL Database also is it possible to do scheduling ?
Thanks,
Shabbir
All-Star
58254 Points
15674 Posts
Re: API to Azure SQL Database
Jun 16, 2020 11:26 PM|bruce (sqlwork.com)|LINK
Sure, azure sql, just like Sqlserver stores json in a text column. You use the azure scheduler for scheduled events
https://docs.microsoft.com/en-us/azure/scheduler/scheduler-intro
Member
179 Points
721 Posts
Re: API to Azure SQL Database
Jun 17, 2020 03:58 AM|shabbir_215|LINK
Many thanks
Shabbir
All-Star
58254 Points
15674 Posts
Re: API to Azure SQL Database
Jun 17, 2020 03:37 PM|bruce (sqlwork.com)|LINK