Forum Discussion
Currents question
Currents consists of integrations with several partners, "Connectors", who can receive data. Whenever an event occurs within the system, Braze tracks it and forwards it to the Connector that you have enabled.
With Currents, you are able to export two categories of events:
-
Message Engagement Events
Events associated with messages sent via Braze, such as Email Clicks, Mobile Push Opens, In-App Message Impressions, and much more. -
User Behavior Events
Events associated with customer behavior, such as Sessions, Custom Events, and Purchases.
Event Delivery Semantics
It's important to remember that although all timestamps exported by Currents are sent in the UTC timezone, Braze also sends IANA timezone data in a 'timezone' field. Please be aware of this time difference and ensure that your ETL scripts are updated accordingly in order to reconcile data across export methods.
'ID' - Unique Identifiers
As a high-throughput system, Currents guarantees at-least-once delivery of events, meaning that duplicate events can occasionally be sent. If your use case requires exactly-once semantics, you can use the unique identifier field that is sent with every event ("id") to deduplicate events.
But Why Avro?
The Braze Currents data storage integrations output data in the .avro format (learn more here). We chose Avro because it is a flexible data format that natively supports schema evolution and is supported by a wide variety of data products.
Key Benefits of using the Avro File Type
-
Avro is supported by nearly every major data warehouse.
-
Avro compresses better than CSV and JSON.
-
Avro requires schemas when data is written or read. Most interesting is that you can use different schemas for serialization and deserialization, and Avro will handle the missing/extra/modified fields Schemas can be evolved over time to handle the addition of fields and Avro will handle natively.
Syntax
-
integration-id : The unique ID for this Currents integration.
-
event-type : The type of the event in the file (see event list below).
-
date : The hour that events are processed. Formatted YYYY-MM-DD-HH.
-
schema-id : Used to version .avro schemas for backwards-compatibility (integer)
Currents FAQs
Why can't I get historical data?
Currents is a real-time, live data stream, meaning that events can't be replayed. You can, however, store Currents data in a data warehouse such as S3 or Azure, so you're able to act on past events as you see fit. Data is retained for 30 days. For more historical data you can query Snowflake.
Why .avro And Not JSON?
.Avro, unlike schema-less JSON, natively supports schema evolution. You'll also benefit from the ability to send .avro files with less bandwidth as well as saved storage space because .avro is highly compressible.
How Do You Handle The Overhead Of Files?
Build out an ETL process. ETL (extract, transform, load) is a process that enables you to pull large amounts of data from one database to place and store in another.
Where Should We Store this Data for Querying?
Luckily, we've partnered some best-in-class data warehouses you can store your data in for querying. We recommend using S3 or Azure Blob Storage. We also partner with Google Cloud Storage.
Related Content
- 8 months ago