{"id":47917231,"url":"https://github.com/metabase/representations","last_synced_at":"2026-04-04T05:44:20.831Z","repository":{"id":348119397,"uuid":"1193970022","full_name":"metabase/representations","owner":"metabase","description":null,"archived":false,"fork":false,"pushed_at":"2026-04-02T19:58:04.000Z","size":373,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"main","last_synced_at":"2026-04-04T05:44:19.944Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"other","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/metabase.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE.txt","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2026-03-27T19:22:25.000Z","updated_at":"2026-04-02T19:58:09.000Z","dependencies_parsed_at":null,"dependency_job_id":null,"html_url":"https://github.com/metabase/representations","commit_stats":null,"previous_names":["metabase/representations"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/metabase/representations","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/metabase%2Frepresentations","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/metabase%2Frepresentations/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/metabase%2Frepresentations/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/metabase%2Frepresentations/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/metabase","download_url":"https://codeload.github.com/metabase/representations/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/metabase%2Frepresentations/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":31389391,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-04-04T04:26:24.776Z","status":"ssl_error","status_checked_at":"2026-04-04T04:23:34.147Z","response_time":60,"last_error":"SSL_read: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"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":[],"created_at":"2026-04-04T05:44:20.416Z","updated_at":"2026-04-04T05:44:20.824Z","avatar_url":"https://github.com/metabase.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Metabase Representation Format\n\nMetabase represents user-created content as a tree of YAML files. Each file represents one entity (a collection, card, dashboard, etc.). The format is designed to be **portable** across Metabase instances: numeric database IDs are replaced with human-readable names and entity IDs.\n\nThis repository contains the specification and examples for the Metabase Representation Format.\n\n## Contents\n\n- **[core-spec/v1/spec.md](core-spec/v1/spec.md)** — Full specification (v1.0.0) covering entity keys, folder structure, MBQL and native queries, parameters, and all entity types.\n- **[core-spec/v1/schemas/](core-spec/v1/schemas/)** — YAML schemas (JSON Schema format) for each entity type.\n- **[examples/v1/](examples/v1/)** — Complete examples using the Sample Database.\n\n## Entity Types\n\n| Entity | Description |\n|--------|-------------|\n| Collection | Folder-like container for organizing content |\n| Card | Question, model, or metric — holds an MBQL or native query |\n| Dashboard | Grid layout of cards with filter parameters and tabs |\n| Segment | Saved filter definition scoped to a table |\n| Measure | Saved aggregation definition scoped to a table |\n| Snippet | Reusable SQL fragment for native queries |\n| Transform | Materializes query or Python script results into a database table |\n| TransformTag | Label for categorizing transforms (built-in or custom) |\n| TransformJob | Scheduled job that executes tagged transforms |\n| PythonLibrary | Shared Python source file available to Python transforms |\n\n## Schema Validation\n\n### CLI\n\nValidate a folder of YAML files against the schemas:\n\n```sh\nnpx @metabase/representations validate-schema --folder ./my-export\n```\n\nOmit `--folder` to validate the current directory.\n\n### Programmatic\n\n```js\nimport { validateSchema } from \"@metabase/representations\";\n\nconst { results, passed, failed } = validateSchema({\n  folder: \"./my-export\",\n});\n\nfor (const result of results) {\n  if (result.status === \"fail\") {\n    console.log(result.file, result.errors);\n  }\n}\n```\n\n## Publishing to NPM\n\nReleases are published via the **Release to NPM** GitHub Actions workflow.\n\n1. Go to **Actions \u003e Release to NPM \u003e Run workflow**.\n2. Enter the version (e.g. `1.1.0`) and pick a dist-tag (`latest`, `next`, or `canary`).\n3. Click **Run workflow**.\n\nThe workflow requires an `NPM_RELEASE_TOKEN` secret with publish access to the `@metabase` npm org.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmetabase%2Frepresentations","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmetabase%2Frepresentations","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmetabase%2Frepresentations/lists"}