{"id":13703756,"url":"https://github.com/fal-ai/dbt_feature_store","last_synced_at":"2025-07-01T18:07:10.601Z","repository":{"id":42660345,"uuid":"458211476","full_name":"fal-ai/dbt_feature_store","owner":"fal-ai","description":"Build your feature store with macros right within your dbt repository","archived":false,"fork":false,"pushed_at":"2022-12-16T14:08:38.000Z","size":39,"stargazers_count":38,"open_issues_count":1,"forks_count":4,"subscribers_count":4,"default_branch":"main","last_synced_at":"2025-06-26T09:26:06.398Z","etag":null,"topics":["dbt","dbt-packages","feature-store"],"latest_commit_sha":null,"homepage":"https://hub.getdbt.com/fal-ai/feature_store","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/fal-ai.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2022-02-11T14:07:30.000Z","updated_at":"2024-12-10T17:19:32.000Z","dependencies_parsed_at":"2023-01-29T14:15:27.001Z","dependency_job_id":null,"html_url":"https://github.com/fal-ai/dbt_feature_store","commit_stats":null,"previous_names":[],"tags_count":3,"template":false,"template_full_name":null,"purl":"pkg:github/fal-ai/dbt_feature_store","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/fal-ai%2Fdbt_feature_store","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/fal-ai%2Fdbt_feature_store/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/fal-ai%2Fdbt_feature_store/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/fal-ai%2Fdbt_feature_store/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/fal-ai","download_url":"https://codeload.github.com/fal-ai/dbt_feature_store/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/fal-ai%2Fdbt_feature_store/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":263013720,"owners_count":23399813,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["dbt","dbt-packages","feature-store"],"created_at":"2024-08-02T21:00:59.755Z","updated_at":"2025-07-01T18:07:10.575Z","avatar_url":"https://github.com/fal-ai.png","language":"Python","funding_links":[],"categories":["Packages"],"sub_categories":[],"readme":"# dbt_feature_store\n\n\u003c!--This table of contents is automatically generated. Any manual changes between the ts and te tags will be overridden!--\u003e\n\u003c!--ts--\u003e\n* [dbt_feature_store](#dbt_feature_store)\n* [About](#about)\n* [Usage](#usage)\n   * [Inside of dbt Models](#inside-of-dbt-models)\n   * [From fal client (coming soon)](#from-fal-client-coming-soon)\n* [Macros](#macros)\n      * [create_dataset (\u003ca href=\"/macros/create_dataset.sql\"\u003esource\u003c/a\u003e)](#create_dataset-source)\n      * [latest_timestamp (\u003ca href=\"/macros/latest_timestamp.sql\"\u003esource\u003c/a\u003e)](#latest_timestamp-source)\n   * [Building block Macros](#building-block-macros)\n      * [next_timestamp (\u003ca href=\"/macros/next_timestamp.sql\"\u003esource\u003c/a\u003e)](#next_timestamp-source)\n      * [label_feature_join (\u003ca href=\"/macros/label_feature_join.sql\"\u003esource\u003c/a\u003e)](#label_feature_join-source)\n* [feature_table object](#feature_table-object)\n\n\u003c!-- Added by: runner, at: Fri Feb 11 20:52:02 UTC 2022 --\u003e\n\n\u003c!--te--\u003e\n\n# About\n\nThis package contains dbt macros to help you build a feature store right within your dbt repository.\n\n# Usage\n\n## Inside of dbt Models\n\n\u003e **NOTE:** to see a full example of the package in use, go to [dbt_feature_store_example](https://github.com/fal-ai/dbt_feature_store_example)\n\nYou can build models with these macros to maintain a feature store updated with your dbt runs.\n\n## From fal client (coming soon)\n\nTrigger feature calculations from the fal Python client to quickly iterate and discover the best features for your ML model from your notebook.\n\n\n# Macros\n\n### create_dataset ([source](/macros/create_dataset.sql))\n\nThis macro creates a table that holds the label and the historical features. This table should be ready to be used as training data without any additional transformations\n\nConstructor: `feature_store.create_dataset(label, features)`\n\n- `label`: [feature_table object](#feature_table-object)\n- `features`: list of [feature_table objects](#feature_table-object)\n\nExample:\n\n```jinja\nSELECT * \nFROM (\n\n  {{ create_dataset(\n      { \n        'table': source('dbt_bike', 'bike_is_winner'), \n        'columns': ['is_winner'] \n      },\n      [\n        { \n          'table': ref('bike_duration'), \n          'columns': ['trip_duration_last_week', 'trip_count_last_week'] \n        }\n      ]\n  ) }}\n\n)\n```\n\n### latest_timestamp ([source](/macros/latest_timestamp.sql))\n\nThis macro creates a table with a only latest timestamp rows of a feature, this is useful to make predictions with the latest information available for an entity.\n\nConstructor: `feature_store.latest_timestamp(feature)`\n\n- `feature`: [feature_table object](#feature_table-object)\n\n\n## Building block Macros\n\n### next_timestamp ([source](/macros/next_timestamp.sql))\n\nConstructor: `feature_store.next_timestamp(entity_column, timestamp_column)`\n\n- `entity_column`: column name of id of rows for joining a label tables and feature tables\n- `timestmap_column`: column name of timestamp/date of rows for joining a label tables and feature tables\n\n### label_feature_join ([source](/macros/label_feature_join.sql))\n\nConstructor: `feature_store.label_feature_join(label_entity_column, label_timestamp_column, feature_entity_column, feature_timestamp_column, feature_next_timestamp_column)`\n\n- `label_entity_column`: column name of the entity id that is used for predictions, this column is used to join labels to features\n- `label_timestamp_column`: column name of the timestamp/date, this column is used to join labels to features\n- `feature_entity_column`: column name of the entity id that is used for predictions, this column is used to join labels to features\n- `feature_timestamp_column`: column name of the timestamp/date, this column is used to join labels to features\n- `feature_next_timestamp_column`: column pre-calculated (normally in a CTE) with the call of the macro [feature_store.next_timestamp(feature_entity_column, feature_timestamp_column)](#next_timestamp)\n\n\n# feature_table object\n\nA feature_table object is a Python dict with the following properties:\n\n- `table`: a `ref`, `source` or name of a CTE defined in the query\n- `columns`: a list of columns from the label relation to appear in the final query\n- `entity_column` (optional): column name of the entity id that is used for predictions, this column is used to join labels to features\n- `timestmap_column` (optional): column name of the timestamp/date, this column is used to join labels to features\n\nIf you pass a [ref](https://docs.getdbt.com/reference/dbt-jinja-functions/ref/) or [source](https://docs.getdbt.com/reference/dbt-jinja-functions/source/) in the `table` property, you can skip the `entity_column` and `timestamp_column` properties, as they will be loaded from the [schema.yml](https://docs.getdbt.com/reference/resource-properties/schema) `meta` for models or sources.\n\n```yml\nversion: 2\nsources:\n  - name: dbt_bike\n    tables:\n      - name: bike_is_winner\n        meta:\n          # source example\n          fal:\n            feature_store:\n              entity_column: bike_id\n              timestamp_column: date\n\nmodels:\n  - name: bike_duration\n    meta:\n      # model example\n      fal:\n        feature_store:\n          entity_column: bike_id\n          timestamp_column: start_date\n```\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ffal-ai%2Fdbt_feature_store","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ffal-ai%2Fdbt_feature_store","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ffal-ai%2Fdbt_feature_store/lists"}