Run the following command and enter your access token when prompted:
rudder-cli auth login
2. Create a project directory
Create a project directory to store your Data Catalog YAML files:
mkdir ~/tutorial-catalog
3. Define events, properties, and custom types
Create the following YAML files in your project directory:
Events (~/tutorial-catalog/events.yaml)
version:rudder/0.1kind:eventsmetadata:name:myeventsspec:events:- id:product_viewedname:"Product Viewed"event_type:trackdescription:"Triggered when a user views a product"
version:rudder/v0.1kind:custom-typesmetadata:name:identifier-typesspec:types:- id:sku_typename:"SKU Type"description:"Custom type for SKU validation"type:stringconfig:# Validation rules for the custom data typeminLength:5maxLength:255pattern:"^SKU-[0-9]+$"
version:rudder/v0.1kind:propertiesmetadata:name:mypropertiesspec:properties:- id:product_skuname:"SKU"type:"#/custom-types/identifier-types/sku_type"# Reference to custom typedescription:"Product SKU"
4. Create a Tracking Plan
Create a Tracking Plan that references your events and properties (~/tutorial-catalog/tracking-plan.yaml):
version:rudder/0.1kind:tpmetadata:name:ecomm-tracking-planspec:id:ecomm-tracking-plandisplay_name:"Product Tracking Plan"description:"Tracking plan for product-related events"rules:- type:event_ruleid:product_viewed_ruleevent:$ref:"#/events/myevents/product_viewed"allow_unplanned:falseproperties:- $ref:"#/properties/myproperties/product_sku"required:true- $ref:"#/properties/myproperties/price"required:true
This site uses cookies to improve your experience while you navigate through the website. Out of
these
cookies, the cookies that are categorized as necessary are stored on your browser as they are as
essential
for the working of basic functionalities of the website. We also use third-party cookies that
help
us
analyze and understand how you use this website. These cookies will be stored in your browser
only
with
your
consent. You also have the option to opt-out of these cookies. But opting out of some of these
cookies
may
have an effect on your browsing experience.
Necessary
Always Enabled
Necessary cookies are absolutely essential for the website to function properly. This
category only includes cookies that ensures basic functionalities and security
features of the website. These cookies do not store any personal information.
This site uses cookies to improve your experience. If you want to
learn more about cookies and why we use them, visit our cookie
policy. We'll assume you're ok with this, but you can opt-out if you wish Cookie Settings.