Databricks - Data Export

Automatically export message events from OneSignal to Databricks.


Overview

The OneSignal + Databricks integration allows you to automatically export message event data from OneSignal to your Databricks lakehouse. This eliminates the need for manual data extraction and gives your team direct access to near real-time engagement data for advanced analysis, dashboarding, and reporting.

You’ll gain visibility into events across email, push notifications, in-app messages, and SMS, and can build custom analytics to inform marketing strategies and cross-functional insights.

Currently, we support message send and engagement events (e.g., clicks, opens). Future updates will expand event coverage to offer a more complete view of your users' journeys.


Requirements

OneSignal

  • Annual Plan is required to access this integration.

Databricks

  • Platform: AWS, Azure, or GCP
  • Plan: Premium or higher
  • Unity Catalog Enabled:
    • Required for permission management and schema creation.
    • Legacy deployments without Unity Catalog are not supported.
  • SQL Warehouse:
    • Used for ingesting and querying exported event data.

Setup

1. Configure Databricks

Collect SQL Warehouse Info

  1. Navigate to SQL Warehouses in your Databrick workspace.
  2. Select your warehouse and click the Connection details tab.
  3. Save the following values, you will need them shortly:
    1. Server Hostname
    2. Port
    3. HTTP Path

Create a Service Principal

  1. In Workspace Settings, go to Identity and Access > Service Principals.
  2. Click Add Service Principal, then Add New.
  3. Give it a recognizable name (e.g., onesignal-sync).

Generate a Secret for your Service Principal

  1. Click into the created Service Principal.
  2. Go to the Secrets tab.
  3. Click Generate Secret and save the resulting token.

📘

One time access!

⚠️ You won’t be able to view this secret again, so store it securely.

Add Permissions to your Service Principal

  1. Navigate to your Databricks Catalog.
  2. Open the Permissions tab.
  3. Click Grant, then:
    1. Select your Service Principal.
    2. Grant the following permissions:
      • USE CATALOG
      • USE SCHEMA
      • SELECT
      • MODIFY
      • CREATE SCHEMA
      • CREATE TABLE


2. Connect OneSignal to Databricks

  1. In OneSignal, navigate to Data > Integrations > Databricks.
  2. Paste the following from your Databricks workspace:
    • Server Hostname
    • Port
    • HTTP Path
    • Catalog Name
    • Schema Name
    • Service Principal credentials (ID + Secret)

  1. OneSignal Settings

    1. Set up Sync Frequency, the most frequent setting is 15 minutes
    2. Dataset and Destination Table names will be pre set
      1. Dataset is named as onesignal_events_your-appid
      2. Destination Table is names as message_events
      3. you can update these names if you need to
    3. Select the events you care to receive in your BigQuery dataset. Feel free to select them all.

  2. Click “Save” and wait for the success confirmation


3. Send a message to generate events

Once connected, send messages using OneSignal via any channel you use (push, email, in-app, SMS). Message Events will begin syncing into Databricks based on your integration settings.


4. View data in Databricks

  1. In Databricks, go to your Catalog.
  2. After syncing has succeeded, a new Schema (with the name provided during setup) will appear.
  3. Inside, you'll find tables containing exported event data.
  1. Click into a table to preview Sample Data.

📘

Need help?

If you run into any issues—such as:

  • Schema not appearing in Catalog
  • Permission errors on table creation
  • Unexpected event formats or data not syncing

Please reach out to [email protected].


Events and Properties

Below is an overview of the data available for the Databricks Data Export Integration. We will offer Message Event data in the beta, and will plan to offer more categories of event data and summary reports in the future.

For this integration, any event data generated by a user for the given OneSignal application will be exported to a customer's Databricks project. Customers will not be able to select specific event kinds or filter the events they receive.

Message Event Kinds

Type: String

The type of message and event (e.g. message.push.received, message.push.sent).

Message Event Kind (OneSignal)Event name (in data set)Event Description
Push Sentmessage.push.sentPush notification successfully sent.
Push Receivedmessage.push receivedPush notification successfully received. See Confirmed Delivery .
Push Clickedmessage.push.clickedPush notification touched on device
Push Failedmessage.push.failedPush failed to be sent. Check the failed message report in OneSignal.
Push Unsubscribedmessage.push.unsubscribedThe Subscription unsubscribed from push.
In-App Impressionmessage.iam.displayedIn-App Message successfully displayed on device
In-App Clickedmessage.iam.clickedIn-App Message clicked on device
In-App Page Displayedmessage.iam.pagedisplayedIn-App Message page is displayed
Email Sentmessage.email.sentEmail successfully sent
Email Receivedmessage.email.receivedEmail received by recipient
Email Openedmessage.email.openedEmail opened by recipient. See Email Message Reports for details.
Email Link Clickedmessage.email.clickedEmail link clicked on
Email Unsubscribedmessage.email.unsubscribedEmail unsubscribed by recipient
Email Reported As Spammessage.email.resporedasspamEmail reported as spam by recipient. See Email deliverability for details.
Email Bouncedmessage.email.hardbouncedEmail returned to sender due to permanent error. See Email Message Reports for details.
Email Failedmessage.email.failedCould not deliver the email to the recipient’s inbox
Email Suppressedmessage.email.supressedThe email was not sent because the email address is on the Suppression list .
SMS Sentmessage.sms.sentSMS sent to recipient
SMS Failedmessage.sms.failedSMS failed to send
SMS Deliveredmessage.sms.deliveredSMS successfully delivered
SMS Undeliveredmessage.sms.undeliveredThe SMS could not be sent

Message Events Properties (columns)

For each message event generated by a user, the following metadata will be attached to the record.

Column NameTypeDescriptionExample
event_idUUID/StringA unique ID that represents the eventdc76df03-287c-403a-aabd-b2d4fe44e5c6
event_timestamptimestampThe time at which the event happened 2025-04-09 19:59:27.832 UTC
event_kindstringThe type of event that occurred. message.email.opened
subscription_device_typestringThe type of device this subscription uses.SMS
languagestringThe language of this subscriptionen
versionstringThe version of the integration 1.1.0
device_osstringThe device version that the user received the message on17.5.1
device_typenumericalThe type of device a user received the message on7
tokenstringThe push token (push), phone number(SMS) or email address (email) of the subscriptionpush32313097a54ac11169ea64dfa459937d2907d220201442b3fa1d02bf2dcef367
SMS 15857778888
Email [email protected]
subscription_idUUIDA unique ID that represents the device/subscription6e8b6978-75a4-4882-878c-2d15a78c2409
subscribedbooleanThe subscription status for the individual for the message they receivedTRUE
onesignal_idUUIDThe onesignal_id of the user that made the impressiondc76df03-287c-403a-aabd-b2d4fe44e5c6
last_activestringWhen the subscription for which the event is for was last active in the application 1712787115
sdkstringThe version of the OneSignal SDK in use where the message was received 50207
external_idstringThe external_id of the user that made the impressionMyExternalId
app_idUUIDA unique ID that represents the OneSignal App ID events were generated inbc76df03-287c-403a-aabd-b2d4fe44e5c6
template_idUUIDA unique ID that represents the template used to send a message via API or Journeysc54dea04-256c-403a-aabd-b2d4fe44e5c6
message_idUUIDThe ID of the request to send the message. Each message request will have a unique ID. If you sent 1 message to multiple users, they will all have the same ID. If you send the same message multiple times, each will have a unique ID.

Each event for the message will reference the same message_id.
dc76df03-287c-403a-aabd-b2d4fe44e5c6
message_namestringThe human-readable id of the Notification/MessageCampaign 1
message_titlestringThe Title of the Notification/Message.
English only at this time
Bonus 50 coins when you play!
message_contentsstringThe Body of the message. (Truncated) English only at this time. Play against your friends and earn an additional...
_created
_id
_index
_fivetran_synced
Columns created by our syncing solution in every data set (Fivetran)

Notes

  • Syncs after saving/activating may take an additional 15-30 minutes to complete
  • Deactivating may still result in one final sync after deactivation.
  • To ensure efficient data synchronization in your BigQuery destination, our system automatically creates and manages staging datasets. These datasets, named with a pattern like fivetran_{two random words}_staging, temporarily store data during processing before it's integrated into your main schema. These staging datasets are essential for maintaining a streamlined workflow and should not be deleted, as they will be automatically recreated.

FAQ

Why do I see the same message title and/or message contents but different message ID?

This likely means you sent the same message more than once. Probably related to a transactional message or a template that was sent to different users at different times and/or via different requests.