In short.
MetricFlow Ingest is an instruction file for data developers using a ktx assistant to translate MetricFlow definitions, but it depends on ktx tools and cannot directly represent every metric type. It maps models, measures, dimensions and relationships into ktx’s semantic layer, which describes how business metrics relate to warehouse data. It includes schema checks, inheritance handling and four examples. Cumulative metrics require SQL, conversion metrics require human handling, and cross-model calculations need careful review. Nothing was executed, so correctness, compatibility and operating costs remain unverified.
Researched and written by an AI model and checked by a second AI model. How it works
Coverage is limited to packages/cli/src/skills/metricflow_ingest at revision 49a4ae6f5b28c904da921afc0ee72da6db7ac202, represented by its SKILL.md, plus the repository-root LICENSE. The supplied manifest records complete coverage of that folder. The wider ktx codebase, referenced specifications, tool implementations and live warehouse behavior are outside scope. Nothing was installed or executed; runtime correctness, metric equivalence, compatibility and operating costs remain unverified.
The overview
Identity
The resource is the metricflow_ingest skill in Kaelio/ktx, specifically packages/cli/src/skills/metricflow_ingest/SKILL.md. Its declared caller is memory_agent. It tells an assistant how to translate YAML containing top-level semantic_models or metrics into ktx semantic-layer sources.
The original folder is [https://github.com/Kaelio/ktx/tree/main/packages/cli/src/skills/metricflow_ingest]. The assessed file belongs to revision 49a4ae6f5b28c904da921afc0ee72da6db7ac202. This is an assistant instruction resource, not a standalone migration application.
Fit assessment
The skill is useful for teams already working with ktx who want a consistent translation procedure for MetricFlow definitions. Its strongest features are explicit mapping rules, requirements to verify warehouse identifiers, and instructions to preserve the source of each generated definition.
It is best treated as migration guidance requiring technical review. The file describes intended behavior but provides no execution results demonstrating that a complete migration preserves metric values.
Intended users
The main audience is analytics engineers, data developers and maintainers of ktx ingestion assistants. Useful background includes YAML, SQL, dbt references and MetricFlow concepts such as measures, dimensions and entities.
Beginners can use the examples to understand how a definition becomes an aggregate such as sum(amount). Reviewing joins, cumulative windows and cross-model metrics requires stronger knowledge of the underlying data.
Capabilities
The documented mappings cover semantic models, aggregated measures, dimensions, primary or unique entities that define grain, and foreign entities that can become joins when a matching primary entity is discoverable. Grain identifies the fields that distinguish records. An overlay adds semantic definitions to an existing table; a standalone source supplies its own SQL.
The skill covers simple, filtered, derived and ratio metrics. It specifies inheritance flattening, dbt ref and source resolution, basic type mapping, and provenance markers. Cumulative metrics receive SQL fallbacks; conversion metrics and other unmappable definitions are documented for human handling.
Using it
Requirements
The procedure expects a compatible ktx assistant with discovery, warehouse inspection, source-writing, validation and documentation tools. Named dependencies include discover_data, entity_details, sl_discover, sql_execution, sl_write_source, sl_validate, read_raw_span and emit_unmapped_fallback.
It also expects access to the relevant MetricFlow files and warehouse connection. Some mappings rely on a dbt manifest or discoverable physical tables. Related files are assumed to arrive together in a WorkUnit, the ingestion system’s group of connected files. This file does not establish whether that grouping works in practice. Minimum runtime versions, supported warehouses and required permissions are unspecified.
How it works
The assistant is instructed to discover existing definitions, resolve physical tables and inspect identifiers before writing. It follows physical column expressions when they differ from logical names, combines inherited definitions, and adds references to the exact contributing file spans.
After each source write, the procedure requires sl_validate. Literal values may require distinct-value SQL probes when samples are insufficient. These checks can catch unresolved identifiers, but successful validation alone would not establish that the translated business calculation is equivalent.
Setup
The file declares that memory_agent should load this skill when handling YAML with semantic_models or metrics. A compatible environment would need the skill available to that caller, its required tools connected, and the relevant raw files accessible.
No installation command, registration procedure, authentication guide or end-to-end setup example is supplied. Copying the file into an unrelated assistant would not establish access to its ktx-specific tools.
Worked examples
The simplest example maps an orders semantic model onto an orders overlay. Its order_count measure becomes count(order_id), gross_amount becomes sum(amount), and order_id defines the grain. These are illustrative names, not verified warehouse identifiers.
Another example combines orders, its orders_ext child and a separate revenue definition into one overlay containing inherited and additional measures. A filtered metric example translates a MetricFlow Dimension reference into status = 'paid' and creates a separate paid_order_count measure. None of the examples was executed.
Assessment & evidence
Limitations
The document states that ktx’s v1 semantic layer lacks first-class cumulative and conversion primitives. Cumulative metrics therefore become standalone SQL sources, while conversion metrics become explanatory wiki pages rather than executable definitions. This reference to v1 does not identify an installed ktx release.
Cross-source references are also described as non-native. The skill allows an existing query context or a standalone SQL join, leaving important choices to the assistant. The cross-model example joins sales and costs by period_id before aggregating. As a technical inference, repeated keys on both sides could multiply rows and distort totals; the example supplies no evidence of input uniqueness.
SQL dialect compatibility, cumulative-window equivalence and the correctness of automatic time-column selection are unverified. Warehouse identifier checks cannot resolve all of these semantic questions.
Why the approach matters
Flattening inheritance and grouping connected files can help preserve definitions that would otherwise be split across several outputs. Provenance markers can make a generated measure traceable to its original YAML. These are intended benefits inferred from the procedure, not measured outcomes.
Several decisions remain interpretive: choosing which source owns a derived metric, deciding whether a base model deserves a separate output, and selecting a time column when configuration omits one. Those decisions can affect meaning even when the resulting SQL is valid.
Alternative approaches
The document itself offers three output paths: overlays on existing tables, standalone SQL sources and wiki definitions for unsupported cases. Overlays suit directly mappable definitions; SQL offers more control for cumulative or cross-table calculations; wiki notes retain intent without implementing it.
A developer could also apply the documented mappings manually rather than delegate the translation to an assistant. The evidence does not establish comparative effort, accuracy or performance, and provides no basis for ranking other migration tools.
Source evidence
The original skill text is available at [https://raw.githubusercontent.com/Kaelio/ktx/49a4ae6f5b28c904da921afc0ee72da6db7ac202/packages/cli/src/skills/metricflow_ingest/SKILL.md]. Its recorded SHA-256 is 528912693ed00b650d5d8aa2d747d264f41f59afdb996549b3c9694d186b7b91.
The accompanying root license is [https://raw.githubusercontent.com/Kaelio/ktx/49a4ae6f5b28c904da921afc0ee72da6db7ac202/LICENSE]. The available evidence establishes the written procedure and license terms. It does not include the surrounding tool implementations, runtime logs or verified migration outputs.
Access & freshness
Costs
Operating cost is unknown. The skill provides no prices, model requirements, token estimates, warehouse-query costs or migration benchmarks. Its discovery, SQL probes and validation steps could consume model or warehouse resources, depending on the environment.
The Apache license grants no-charge copyright permissions for the covered work. That does not establish the cost of a ktx deployment or any connected service.
License and reuse
The repository-root LICENSE contains Apache License 2.0, permitting reproduction, modification and redistribution under its conditions. Redistribution requires a license copy, retention of applicable notices and prominent change notices in modified files. Applicable NOTICE attribution must also be preserved if such a file accompanies the work.
The license includes a contributor patent grant with conditions, grants no general trademark rights and provides the work without warranties. The captured material contains the root license and skill file; no separate NOTICE file is included.
Version and freshness
The source snapshot was captured on 16 November 2026 at revision 49a4ae6f5b28c904da921afc0ee72da6db7ac202. The capture date is not a publication date or a last-maintained date.
No independent skill version, release date or compatibility matrix appears in the supplied file. Whether the current main branch or surrounding ktx interfaces differ from this revision is unknown.
Practical next steps
Before adoption, confirm that the intended ktx environment exposes the named tools and groups related MetricFlow files as the skill expects. Begin with one simple model and compare the translated measures with the original calculations on representative data.
Review inherited overrides, filtered dimensions, join cardinality and cumulative-window boundaries explicitly. Route conversion metrics to a human reviewer as documented. Keep the source references attached to generated definitions so discrepancies can be traced back to the original YAML.
