Azure SQL Database

Datafly Signal delivers events to Azure SQL Database for fully managed, intelligent relational database storage on Azure.

Prerequisites

Before configuring Azure SQL Database in Signal, you need an Azure account with an Azure SQL server, a database, a target table, and firewall rules configured to allow Signal access.

Create an Azure Account

If you don’t already have one, sign up at azure.microsoft.com.

Create an Azure SQL Server

  1. In the Azure portal, search for SQL servers and click Create.
  2. Select your Subscription and Resource group.
  3. Enter a Server name (e.g. datafly-sql). The full hostname will be datafly-sql.database.windows.net.
  4. Select a Location close to your Signal deployment.
  5. Set the Server admin login and Password.
  6. Click Review + Create > Create.

Create a Database

  1. In the Azure portal, search for SQL databases and click Create.
  2. Select your server from the previous step.
  3. Enter a Database name (e.g. analytics).
  4. Choose a Compute + storage tier:
    • Basic or Standard for low-volume workloads.
    • General Purpose (vCore) for production workloads.
  5. Click Review + Create > Create.

Configure Firewall Rules

  1. Open your Azure SQL server in the portal.
  2. Go to Security > Networking.
  3. Under Firewall rules, add the IP addresses of your Signal deployment.
  4. Optionally enable Allow Azure services and resources to access this server if Signal runs within Azure.
  5. Click Save.
⚠️

Never set the firewall to allow all IP addresses (0.0.0.0 to 255.255.255.255) in production. Restrict access to only the IP addresses of your Signal infrastructure.

Create a Table

Connect to the database using Azure Data Studio, SSMS, or the Azure portal Query Editor:

CREATE TABLE dbo.events (
  event_id NVARCHAR(64) NOT NULL PRIMARY KEY,
  type NVARCHAR(20),
  event NVARCHAR(256),
  anonymous_id NVARCHAR(64),
  user_id NVARCHAR(256),
  timestamp DATETIME2,
  received_at DATETIME2,
  sent_at DATETIME2,
  context NVARCHAR(MAX),
  properties NVARCHAR(MAX),
  traits NVARCHAR(MAX),
  source_id NVARCHAR(64),
  integration_id NVARCHAR(64)
);
 
CREATE INDEX IX_events_timestamp ON dbo.events (timestamp DESC);

Create a Database User for Signal

Create a dedicated user with limited privileges:

CREATE LOGIN datafly_signal WITH PASSWORD = 'your_secure_password';
CREATE USER datafly_signal FOR LOGIN datafly_signal;
GRANT INSERT ON dbo.events TO datafly_signal;

Configuration

FieldTypeRequiredDescription
serverstringYesThe Azure SQL server hostname (e.g. myserver.database.windows.net).
databasestringYesThe target database name.
table_namestringYesThe target table name to insert rows into.
usernamestringYesThe database username for authentication.
passwordsecretYesThe database password for authentication.

Signal Setup

Quick Setup

  1. Navigate to Integrations in the sidebar.
  2. Open the Integration Library tab.
  3. Find Azure SQL Database or filter by Cloud Storage.
  4. Click Install, select a variant if available, and fill in the required fields.
  5. Click Install Integration to create the integration with a ready-to-use default blueprint.

API Setup

curl -X POST http://localhost:8084/v1/admin/integration-catalog/azure_sql/install \
  -H "Authorization: Bearer YOUR_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{
    "name": "Azure SQL Database",
    "variant": "default",
    "config": {
      "server": "datafly-sql.database.windows.net",
      "database": "analytics",
      "table_name": "events",
      "username": "datafly_signal",
      "password": "your_secure_password"
    },
    "delivery_mode": "server_side"
  }'

Testing

  1. Enable the integration in Signal and trigger a test event on your website.
  2. Connect to the Azure SQL database and query the target table:
SELECT TOP 10 * FROM dbo.events ORDER BY timestamp DESC;
  1. Verify that event rows are appearing with correct data.
  2. In Signal, check the Live Events view to confirm delivery status shows as successful.

Troubleshooting

ProblemSolution
Events not appearing in the tableVerify the server, database, and table name are correct.
Connection refused / timeoutCheck the firewall rules on the Azure SQL server. Add Signal’s IP addresses under Networking > Firewall rules.
Login failed for userThe username or password is incorrect. Verify the credentials. Check that the login exists at the server level and the user is mapped to the database.
INSERT permission deniedThe database user lacks INSERT permission on the table. Run GRANT INSERT ON dbo.events TO datafly_signal;.
Invalid object nameThe table does not exist or the user lacks access. Verify the table name and schema.
SSL/TLS errorsAzure SQL requires encrypted connections. Ensure your Signal deployment supports TLS 1.2+.
DTU/vCore throttlingThe database tier may be too small. Monitor DTU/vCore usage in the Azure portal and scale up if needed.

Visit Azure SQL Database documentation for full T-SQL reference, performance tuning, and scaling guides.