Custom Types Support in Rudder CLI Alpha
- enterprise
2 minute read
- Date: Jul 17, 2025
Building on our recent Custom Types release, you can now define Custom Types directly in your workspace configuration files and deploy them using Rudder CLI. This enhancement brings Custom Types into your existing infrastructure-as-code workflows, enabling you to version control and programmatically manage complex data validation rules.
With workspace config and CLI support, you can now:
- Define Custom Types as code: Create a
custom-types.yamlfile alongside your existing Tracking Plan configurations, enabling version control and collaborative development of data governance rules. - Reference Custom Types in properties: Use Custom Types as property types in your
properties.yamlfiles, eliminating the need to redefine complex validation logic across multiple properties. - Deploy via CLI: Use the
rudderstack tp applycommand to push Custom Types and their associated properties to your workspace, integrating seamlessly with your existing deployment workflows.
This release complements the existing Data Catalog API and Git-Based Data Catalog and Tracking Plan Management, giving development teams full flexibility in how they manage data governance across their organization.
Get started
- Create a workspace config file: Add
custom-types.yamlto your Tracking Plan directory alongside your existing configuration files. - Define your Custom Types: Define your custom type rules.
- Reference your Custom Types: In your
properties.yamlfile, you can define a property that references your previously defined custom types. - Validate and Deploy with CLI: Use the Rudder CLI tool to validate the YAML configurations and apply changes to your workspace.
See the Use Custom Data Types in Rudder CLI guide for more details on creating and managing custom types using Rudder CLI.
Sample snippets
- Defining custom types in workspace configuration files
version: "rudder/v0.1"
kind: "custom-types"
metadata:
name: "ecommerce_types"
spec:
types:
# Product Type - Consolidates all product-related properties
- id: Product_Object
name: "Product_Object"
description: "Custom type for product information including ID, SKU, name, category, pricing"
type: "object"
properties:
- $ref: "#/properties/ecommerce_properties/product_id"
required: true
- $ref: "#/properties/ecommerce_properties/product_sku"
required: true
- $ref: "#/properties/ecommerce_properties/product_name"
required: true
- $ref: "#/properties/ecommerce_properties/product_category"
required: true
- $ref: "#/properties/ecommerce_properties/product_price"
required: true
- $ref: "#/properties/ecommerce_properties/product_msrp"
required: false- Reference custom types within a property configuration
version: "rudder/v0.1"
kind: "properties"
metadata:
name: "ecommerce_properties"
spec:
properties:
# Product Custom Type Property
- id: "product"
name: "product"
type: "#/custom-types/ecommerce_types/Product_Object"
description: "Product information object containing all product details"- Deploy the changes to your workspace
rudder-cli apply -l