components-contrib
components-contrib copied to clipboard
[Bindings] Azure SQL DB / SQL Server Binding
Describe the proposal
Customers who heavily leverage SQL Server installations in their existing on-premises data centres and are also moving to the cloud and adopting Azure SQL DB during the move to the cloud. Furthermore, these customers likely have relatively complex data structures, tables, views, and a host of stored procedures to make their systems work.
Providing a Dapr binding for Azure SQL DB & SQL Server that looks the same as the Microsoft SQL Server & Azure SQL state management component YAML component but gives them the ability to interact with their existing databases through the abstraction of the Dapr API will help progress Dapr's adoption for these customers.
The YAML would likely look as follows:
apiVersion: dapr.io/v1alpha1
kind: Component
metadata:
name: <NAME>
spec:
type: bindings.sqlserver
version: v1
metadata:
# Authenticate using SQL Server credentials
- name: connectionString
value: Server=myServerName\myInstanceName;Database=myDataBase;User Id=myUsername;Password=myPassword;
# Authenticate with Microsoft Entra ID (Azure SQL only)
# "useAzureAD" be set to "true"
- name: useAzureAD
value: true
# Connection string or URL of the Azure SQL database, optionally containing the database
- name: connectionString
value: sqlserver://myServerName.database.windows.net:1433?database=myDataBase
Given the intended use case, I'm not sure focusing on a specific table or indexing policy makes sense to include in the binding YAML. That would be for the database developer to configure on their database.
This would ultimately give developers the ability to (re)build their systems using Dapr without having to change their state stores and lowering the barrier of entry into Dapr for those who heavily leverage SQL Server / Azure SQL DB.
#3409 is related.