Skip to main content

Connect to Signals

If you're new to Signals, you'll need to set up a Signals connection. Log in to Snowplow Console and navigate to the Signals section.

Snowplow Console Signals section showing Enable button to set up connection

Click Enable to start setting up a Signals connection.

You'll need to:

  • Select which warehouse to use
  • Specify your warehouse account details
  • Specify your Snowplow atomic events table
  • Run the provided script

Click Test and create connection to trigger the Signals deployment. You'll be able to start using Signals as soon as the infrastructure is ready.

Snowplow Console

To use the UI to manage Signals, navigate to the Signals section.

Use the configuration interface to define attribute groups, services, and interventions.

Console Signals landing page with navigation for attribute groups, services, and interventions

Connection credentials

To connect to Signals using the Signals SDKs or API, you will need four values. Use the Console Overview page to access them.

ValueDescriptionWhere to get itFormat
Signals API URLThe API URL for your Signals deploymentConsole > Signals > Overviewhttps://{{123abc}}.signals.snowplowanalytics.com
API keyA Snowplow API keyGenerated by you in ConsoleUUID
API key IDA Snowplow API key IDGenerated by you in ConsoleUUID
Organization IDYour Snowplow organization IDConsole > Signals > OverviewUUID

Add these four tokens to your environment secrets.

Signals Python SDK

Use the Signals Python SDK to define attribute groups, services, and interventions via code. You can also retrieve calculated attributes and subscribe to interventions using this SDK.

To use the Python SDK, first choose where to store your Signals configurations. We recommend creating a new repository. The easiest way to use the SDK is within a Jupyter notebook.

Install the SDK into your environment:

pip install snowplow-signals

Once installed, you can start to define configuration components. To test or publish your configuration, or retrieve calculated attributes or interventions from the Profiles Store, you'll need to connect to your Signals deployment.

Create a Signals object by passing in the required values.

from snowplow_signals import Signals

sp_signals = Signals(
api_url=SIGNALS_DEPLOYED_URL,
api_key=CONSOLE_API_KEY,
api_key_id=CONSOLE_API_KEY_ID,
org_id=ORG_ID,
)

The created Signals object has the following methods:

MethodDescription
publishRegisters the provided objects with Signals
unpublishUnpublishes objects from Signals
deleteFully deletes objects from Signals (must unpublish first)
testTests an attribute group against the atomic events table
get_service_attributesRetrieves attributes for a specific service from the Profiles Store
get_group_attributesRetrieves attributes for a specific attribute group from the Profiles Store
get_attribute_groupRetrieves an attribute group from the Profiles Store
push_interventionPush an intervention to subscribers for a set of attribute keys
pull_interventionsOpen a streaming subscription of interventions for a set of attribute keys

Check out the attribute groups, services, and interventions pages to learn how to configure them programmatically.

Read more about retrieving calculated attributes here, and about interventions here.

Publishing and deleting

Use the same object management methods for attribute groups, services, attribute keys, and interventions:

  • Use publish() to register objects with Signals. This makes them available for real-time calculation and retrieval.
  • Use unpublish() to stop active calculation without losing the object definitions.
  • Use delete() to permanently remove objects from Signals. Objects must be unpublished before deletion. If you delete an attribute group, the calculated attributes in the Profiles Store will also be deleted.
from snowplow_signals import StreamAttributeGroup, Service, RuleIntervention

# Define your objects (assuming these are already created)
objects_to_manage = [my_attribute_group, my_service, my_intervention]

# 1. Publish objects
published_objects = sp_signals.publish(objects_to_manage)

# 2. Unpublish objects
unpublished_objects = sp_signals.unpublish(objects_to_manage)

# 3. Delete objects permanently - must unpublish first
sp_signals.delete(objects_to_manage)

Signals Node.js SDK

Use the Node.js SDK to retrieve calculated attributes.

Install the SDK into your application:

npm i @snowplow/signals-node
# or
yarn add @snowplow/signals-node
# or
pnpm i @snowplow/signals-node

Create a Signals object by passing in the required values.

import { Signals } from '@snowplow/signals-node';

const signals = new Signals({
baseUrl: SIGNALS_DEPLOYED_URL,
apiKey: CONSOLE_API_KEY,
apiKeyId: CONSOLE_API_KEY_ID,
organizationId: ORG_ID,
});

The created Signals object has the following methods:

MethodDescription
getServiceAttributesRetrieves attributes for a specific service from the Profiles Store
getGroupAttributesRetrieves attributes for a specific attribute group from the Profiles Store
getBatchServiceAttributesRetrieves attributes for multiple identifiers from a service

Read more about retrieving calculated attributes here, and about interventions here.

Signals API

The Signals API allows you to directly configure and retrieve attributes and interventions. To access the full Swagger API documentation for your Signals deployment, use your Signals API URL followed by /docs/:

{{API_URL}}/docs/

Your API documentation is linked in Console on the Overview page, under Configuration details.