Azure SQL Database

Datafly Signal writes first-party events into an Azure SQL Database table over the SQL Server wire protocol, with TLS encryption required.

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).
portstringNoTCP port. Defaults to 1433.
databasestringYesThe target database name.
schema_namestringNoThe schema to write to. Defaults to dbo.
table_namestringYesThe target table name to insert rows into.
usernamestringYesThe database username for authentication.
passwordsecretYesThe database password for authentication.
encryptstringYesSet to true — Azure SQL requires TLS.

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 Database.
  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",
      "port": "1433",
      "database": "analytics",
      "schema_name": "dbo",
      "table_name": "events",
      "username": "datafly_signal",
      "password": "your_secure_password",
      "encrypt": "true"
    },
    "delivery_mode": "server_side"
  }'

Schema

Signal writes the standard event envelope. The recommended table definition:

ColumnAzure SQL typeNotes
event_idNVARCHAR(64) NOT NULL PRIMARY KEYUnique per event.
typeNVARCHAR(20)Event type.
eventNVARCHAR(256)Event name.
anonymous_idNVARCHAR(64)First-party visitor identifier.
user_idNVARCHAR(256)Logged-in user identifier (nullable).
timestampDATETIME2Client event time.
received_atDATETIME2Time Signal received the event.
sent_atDATETIME2Time the row was delivered.
contextNVARCHAR(MAX)JSON document — page, device, consent metadata.
propertiesNVARCHAR(MAX)JSON document — custom event properties.
traitsNVARCHAR(MAX)JSON document — user traits.
source_idNVARCHAR(64)Pipeline source identifier.
integration_idNVARCHAR(64)Signal integration identifier.

Query JSON columns with JSON_VALUE(), JSON_QUERY(), and OPENJSON().

Azure SQL is a first-party destination under your control. The default blueprint forwards all events. Apply consent filtering via pipeline transforms or downstream views on context if your governance requires it.

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.

See also