Metadata pipeline config
This page explains the Nilus metadata pipeline config shape, a single workflow that extracts catalog metadata, column profiles, classification tags, query lineage, and query usage from a...
Nilus metadata pipelines are authored as
type: nilusresources withspec.type: metadata.
This page explains the Nilus metadata pipeline config shape, a single workflow that extracts catalog metadata, column profiles, classification tags, query lineage, and query usage from a connected data system and lands them in the DataOS metadata catalog. You author one Nilus resource per source system; Nilus expands it into a multi-stage DAG behind the scenes. A required mode field (shallow or deep) controls how many of those stages run.
For the conceptual model, see Metadata pipeline config. For ready-to-edit YAML by source, see Metadata sample configs.
Choosing a mode
mode is required on every metadata pipeline and decides how much of the DAG runs. It lets you group lighter and heavier extraction work and trigger them on different cadences.
shallow
metadata + lineage
You want the source inventory and column-level lineage kept current, without the heavier profiling, classification, and usage scans. Lighter and faster, so it can run on a tighter schedule.
deep
metadata + lineage + profiler + classification + usage
You want the full enrichment, column statistics, sensitive-data tags, and query-usage analytics in addition to inventory and lineage. Heavier, so it is usually scheduled less frequently.
deep is a strict superset of shallow: it runs the same metadata and lineage stages and adds profiler, classification, and usage. A common pattern is a frequent shallow pipeline for fresh structure and lineage plus a less frequent deep pipeline for the full profile.
How a metadata pipeline expands
When you submit a spec.type: metadata resource, Nilus's domain template renders it into a scheduled workflow whose DAG shape depends on mode. The metadata stage always runs first; once it succeeds, the remaining stages run in parallel.
mode: shallow (Snowflake / Databricks):
mode: deep (Snowflake / Databricks):
Each DAG node sets its own source_table internally ("metadata", "lineage", "profiler", "classification", "usage") and receives the relevant slice of your source.options. You never set source_table yourself on a metadata resource.
What each stage produces
metadata
shallow, deep
Database, schema, table, and column entities. Foundation for everything else.
lineage
shallow, deep
Column-level data lineage extracted by parsing query history.
profiler
deep
Per-column statistics (null counts, distinct counts, min/max, basic distributions).
classification
deep
Auto-classification tags applied to columns (e.g. PII heuristics).
usage
deep
Query history and usage frequency from the service's query log.
The customer-facing schedule applies to the whole DAG, one cron, one workflow run, every stage the mode selects.
Configuration elements
Fields are grouped below by function.
1. Pipeline metadata
name
Unique pipeline identifier. Used as the prefix for every DAG node name ({name}-metadata, {name}-profiler, ...).
version
Use v1alpha for the current Nilus resource shape.
type
Must be nilus for Nilus-managed pipelines.
tags
Optional labels for search, grouping, and operations.
description
Optional human-readable summary.
2. Nilus spec
spec.type
Yes
Must be metadata for catalog / lineage / profiler / classification / usage extraction.
mode
Yes
shallow or deep. Selects how much of the DAG runs, shallow is metadata + lineage; deep adds profiler, classification, and usage. Required on every metadata pipeline.
compute
Yes
Compute profile used to run each DAG node. The reference template uses comet-compute.
logLevel
No
DEBUG, INFO, WARNING, or ERROR. Applies to every stage in the DAG.
runAsUser
No
Optional runtime identity. When omitted, Nilus uses the resource owner.
resources
No
Optional CPU and memory requests / limits applied to every DAG node. Metadata workflows are typically lightweight, 200m / 512Mi is a sensible starting point. deep runs more stages, so give it more headroom than shallow.
schedule
No
Optional cron schedule for the whole workflow. One cron drives every stage the mode selects.
use
No
Optional secret projection rules. Same projections are applied to every DAG node.
source
Yes
The source system Nilus introspects and the per-stage options.
3. Schedule
schedule controls the entire DAG. Each scheduled run executes every stage the mode selects (or just metadata for Lakehouse) end-to-end. Start with a 6-hour cadence; tighten only if downstream consumers need fresher catalog data. A shallow pipeline is lighter, so it can run more often than a deep one over the same source.
cronsis an array, not a singlecronstring.If
scheduleis omitted, the workflow behaves like an instance that must be triggered manually.
4. Source
The source block identifies the source system Nilus introspects.
source.options reference
These are the customer-facing source.options keys that the current metadata domain template maps into the rendered workflow. Keep the authored resource to this contract even though lower-level extraction code has additional internal knobs.
service_type
Yes
all
Identifies the source-system kind Nilus is introspecting. Documented today: snowflake, databricks, lakehouse (alias iceberg). Drives both the extractor and the catalog entity type that gets registered.
database_filter
No
Optional include/exclude regexes against database / catalog / warehouse names. Does not override a database already bound on the depot or URI.
schema_filter
No
all
Restrict by schema / namespace name. Same shape as database_filter.
table_filter
No
all
Restrict by table / view name. Same shape as database_filter.
query_log_duration
No
lineage, usage
Days of query history to ingest per run. Defaults to 1. Used by lineage (both modes) and usage (deep only); ignored by metadata, profiler, and classification.
result_limit
No
lineage, usage
Maximum number of query-history rows to fetch per run. Defaults to 10000000. Used by lineage (both modes) and usage (deep only); ignored by metadata, profiler, and classification.
threads
No
profiler, usage, lineage
Number of parallel workers Nilus uses to parse query history and publish profile/usage/lineage results. Integer ≥ 1; omit for serial processing. Raising it cuts wall-clock runtime on large profiler and usage workflows; scale it with the warehouse's available compute and the volume of objects/queries being processed.
Filter pattern examples
Filter Pattern Examples
All three filter options share the same shape: a nested includes / excludes block whose values are arrays of regex patterns evaluated against the corresponding catalog object name. They are optional. schema_filter and table_filter are the reliable production levers on every connector. database_filter only changes inventory when the connection has no bound database.
How database_filter is evaluated
database_filter is forwarded to every stage that accepts it, but stages do not treat it the same way:
metadata
Honoured only when nothing is bound on the connection. Otherwise ignored.
classification, profiler
Honoured against databases already in the DataOS metadata catalog for this source — not as a live discovery scan of the warehouse. A name that is not already catalogued is dropped silently; the stage can complete green with no work.
lineage, usage (Snowflake)
Ignore both the depot database and database_filter. They read account-level query history.
A list with several includes entries is honoured for every matching catalogued database, not just the first — on the stages that honour the filter.
Source
Can the connection omit a database?
metadata + database_filter
classification / profiler with no filter
Snowflake
Depot: no (database is required). Direct URI: yes, omit the /DATABASE path.
Depot/URI with a database: ignored. URI with no database: drives discovery (unfiltered = every database the role can see).
Unfiltered deep run covers every database already catalogued under this source, not just the depot database. Set the filter on deep runs.
Databricks
Yes — omit ?catalog=. There is no depot.
With ?catalog=: ignored. Without it: drives discovery (unfiltered = every catalog the token can reach, including system and samples).
Follows the filter against catalogued catalogs.
PostgreSQL
No — depot and URI both require a database.
Ignored. Inventory is the bound database.
Stay in the bound database when the filter is omitted. Named extras that are already catalogued are classified/profiled.
MongoDB
The catalog models the server as one database named default. Real Mongo databases sit at the schema level.
database_filter matching a Mongo database name matches nothing. Use schema_filter with the Mongo database name.
Same — filter on schema (Mongo database), not database_filter.
DataOS Lakehouse
Catalog comes from the depot/URI host. Each catalog is its own source, with one database named after itself.
No-op. A filter naming another catalog does not reach it.
Those stages do not run.
Microsoft Fabric Warehouse / Lakehouse
No — warehouse/lakehouse name is required in the URI path.
Ignored. Inventory is the bound warehouse/lakehouse.
Silent no-op if the filter names a warehouse that is not already in the catalog.
Direct URI vs depot address
Use
dataos://<depot>?purpose=rwwhen the credentials and host details should come from a DataOS depot. This is the canonical pattern for Snowflake and Lakehouse metadata pipelines, the depot spec handles the connection target (account/host, database, warehouse) and the depot's connection secret handles the username, optional role, and credentials. Databricks has no DataOS depot variant, so it always uses the direct-URI form below.Use a direct connector URI (
snowflake://...,databricks://...,lakehouse://...) when the service is not depot-backed (and always for Databricks). Do not addmetadata+yourself:spec.type: metadataadds that internal routing prefix automatically. Project secrets throughspec.use.projectionand reference them as{ENV_VAR}placeholders insource.address.
Source-specific requirements
Metadata pipelines need broader read permissions than row-copy pipelines because they inspect source metadata and, for some sources, query history:
Snowflake
Grant access to the warehouse, database, schemas, tables/views in scope, and account-usage surfaces such as query history, tag references, procedures, and functions. If lineage for policy-tagged views is incomplete, the source role may also need the relevant policy/tag privileges. See Snowflake (Metadata) → Required permissions for the detailed grant pattern.
Databricks
Grant the token principal access to the workspace SQL warehouse plus the catalog/schema/table metadata in scope. For Unity Catalog, plan for USE CATALOG, USE SCHEMA, and table-level read privileges.
DataOS Lakehouse
Use a DataOS Lakehouse depot. The current metadata path publishes catalog inventory only; profiler, classification, lineage, and usage stages are skipped.
5. Secrets and projections
For direct connector URIs, project credentials under spec.use.projection and reference them as {ENV_VAR} placeholders in source.address. The same projection wiring is applied to every DAG node:
When using dataos://<depot>?purpose=rw, the depot supplies the credentials automatically and spec.use.projection is usually unnecessary.
6. Execution rendering
When you submit the resource, the Nilus domain template renders it as follows:
For
service_type: snowflake | databrickswithmode: shallow→ aworkflowresource with a 2-node DAG.metadatais the root;lineagedeclaresdependencies: [{name}-metadata]and runs after it.For
service_type: snowflake | databrickswithmode: deep→ aworkflowresource with a 5-node DAG.metadatais the root;lineage,profiler,classification, andusagedeclaredependencies: [{name}-metadata]and run in parallel after the root completes.For
service_type: lakehouse→ aworkflowresource with a 1-node DAG containing just themetadatastage, regardless ofmode.Every node uses the same
compute,resources,runAsUser,logLevel, anduse.projectionfrom your spec. Every node receives a stack-level catalog sink injected by Nilus, you do not author, see, or override it on the customer resource.Each node's internal
stackSpec.source.options.source_tableis hardcoded by the template to that node's stage name.
You don't see the expanded workflow directly, kubectl get workflow {name} (or the DataOS resource browser) will show you the materialized resource with all DAG nodes. The Nilus resource you authored remains your single source of truth.
Validation notes
Use
type: niluswithspec.type: metadatafor catalog / lineage / profiler / classification / usage extraction.modeis required and must beshallowordeep.shallowrunsmetadata+lineage;deepaddsprofiler,classification, andusage. A metadata resource withoutmodeis rejected at schema validation.service_typeis required undersource.options. This guide documentssnowflake,databricks, andlakehouse(aliasiceberg).You do not set
source_tableon a metadata resource, Nilus hardcodes one value per DAG node.Keep the authored
source.optionsblock to the seven customer-facing options in the table above (service_type, three filters,threads,query_log_duration,result_limit). Lower-level extraction knobs are internal until the Nilus domain template exposes them.For
service_type: lakehouse, only themetadatastage runs in both modes.modeis still required, but lineage / profiler / classification / usage are skipped at template-render time.Always set
schema_filter/table_filteron production deployments. Unbounded scopes against a large warehouse can take hours per stage.database_filterdoes not expand a depot- or URI-bound database; see Howdatabase_filteris evaluated.Use
spec.use.projectiononly when the source URI is direct. Usedataos://...purpose=rwwhen the connection should come from a depot.
Related docs
Last updated
Was this helpful?