Skip to content

Feature Repository Setup

Creating a Feature Repository

Run the command tecton init to create a new feature repository.

$ tecton init
✅ .tecton directory created
Local feature repository root set to /Users/john/foo

💡 We recommend tracking the contents of this directory in git: /Users/john/foo/.tecton
💡 Run `tecton apply` to apply the feature repository to the Tecton cluster.

This creates a directory called .tecton, which represents the root of your feature repository.

Example Feature Repository

Use tecton init --getting-started to create a sample feature repository. The sample repository can be applied using tecton apply without any additional configuration.

$ tecton init
✅ .tecton directory created
Local feature repository root set to /Users/ravi/foo

💡 We recommend tracking the contents of this directory in git: /Users/ravi/foo/.tecton
💡 Run `tecton apply` to apply the feature repository to the Tecton cluster.
Initializing the feature repository with sample files...
Success

$ tree
└── feature_repo
    └── shared
        ├── data_sources.py
        ├── entities.py
        ├── feature_services.py
        └── features
            ├── ad_ground_truth_ctr_performance_7_days.py
            ├── ad_impression_count_monthly.py
            ├── ad_is_displayed_inline.py
            ├── ad_partner_total_bids.py
            ├── user_ad_impression_counts.py
            └── user_total_ad_frequency_counts.py

Example Directory Structure

If your organization has multiple Tecton users we recommend keeping a single top-level directory (e.g. feature_repo) containing at least two subdirectories: shared and users. Features under shared are typically accepted and established within your organization, while features under users subdirectories can be experimental in nature. For example:

$ tree
.
└── feature_repo
    ├── shared
    │   ├── data_sources.py
    │   ├── entities.py
    │   ├── feature_services.py
    │   └── features
    │       ├── ad_ground_truth_ctr_performance_7_days.py
    │       ├── ad_impression_count_monthly.py
    │       ├── ad_is_displayed_inline.py
    │       ├── ad_partner_total_bids.py
    │       ├── user_ad_impression_counts.py
    │       └── user_total_ad_frequency_counts.py
    └── users
        ├── jane
        │   ├── exp1_data_sources.py
        │   └── exp1_features.py
        └── sally
            ├── exp2_data_sources.py
            └── exp2_features.py