Skip to content
Draft
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
35 changes: 35 additions & 0 deletions docs/data-product-studio/data-products/ui/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -104,3 +104,38 @@ If the new version of the Data Structure introduces incompatibilities with the e
![Conflict resolution Event Specification](images/conflict_resolution.png)

This mechanism ensures that teams can benefit from updated Data Structures while maintaining the integrity and accuracy of their Event Specifications. Users are empowered to make informed decisions during the upgrade process, with clear visual cues and options to handle conflicts effectively.

## Event Specification Code Generation

To accelerate your implementation of event tracking, Snowplow Console includes pre-generated code snippets specifically for custom self-describing events. These snippets can be accessed directly within the Console interface to significantly reduce the time and effort required for integrating event tracking functionality into your applications.

### Working with Event Specifications

When viewing an event specification, the "Working with this event" section provides two key tabs:

- **Implementation**: Access ready-to-use tracking code for your event
- **Querying**: View example SQL queries to retrieve your event data from the warehouse

:::note
_For standard Snowplow events (page views, screen views, page pings, and self-describing events), tracking code is available out of the box without requiring any additional configuration._
:::

### Implementation - Code Snippets

The Implementation tab generates tracking code snippets tailored to your event specification. You can:

- **Select your tracker type**: Choose between JavaScript tracker options (tag-based or npm-based)
- **Toggle Snowtype integration**: Enable Snowtype to generate type-safe tracking code with full TypeScript support
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

we need to remove the TS part, as we support only JS for now

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done

- **Copy code directly**: Use the generated code snippets immediately in your application

:::note
_Draft data structures can't be used for event validation during testing or production._
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If schemas are not loaded into Iglu validation will fail, but an user can set custom an iglu registry, at least for what I understood for our conversation with @patofp
https://docs.snowplow.io/docs/data-product-studio/data-quality/snowplow-micro/advanced-usage/
can we revise the text?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I took that from the info box in the component. What about this:

"Draft data structures can't be used for event validation during testing or production since they aren't loaded into Iglu. Validation will fail without schemas in an Iglu registry, though you can configure a custom registry if needed. Deploy your draft to the development environment when you're ready to test."

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

yes thanks, I like it!

:::

### Querying - SQL Examples

The Querying tab provides example SQL queries to help you retrieve and analyze your event data. You can:

- **Select your warehouse**: Choose from Snowflake, BigQuery, Redshift, Databricks, and other supported warehouses
- **View tailored queries**: See SQL examples optimized for your selected warehouse
- **Access event data**: Query both the event properties and attached entities