dapr / dapr/components-contrib

[Bindings] Azure SQL DB / SQL Server Binding

Open
#3,414 2 comments 2 reactions 0 assignees View on GitHub
help wanted
Dominant language
Go
Stars
602
Forks
580
Avg merge
4d 9h
Merged PRs (30d)
6

Description

## 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](https://docs.dapr.io/reference/components-reference/supported-state-stores/setup-sqlserver/#component-format) 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:

```yaml
apiVersion: dapr.io/v1alpha1
kind: Component
metadata:
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.

Contributor guide

Open the contributing guide

Research direction

The issue names no implementation files, tests, or entry points. Start by reviewing the linked SQL Server and Azure SQL state-management component documentation, then clarify the binding API, supported operations, and authentication requirements. Done should be defined by an agreed component design with implementation and tests.

Written by the indexing model from the issue text.

Assessment

Tech stack
azure, go, sql
Domain
backend, databases
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Quiet
Clarity
Needs clarification
Newbie friendliness
30/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.