DRDataRaft/ docs
GitHub ↗

dr_catalog_openmetadata_dbt()

Run metadata ingest -c using the separately installed OpenMetadata ingestion CLI. OpenMetadata interprets models, tests, descriptions, tags and SQL lineage; dataraft supplies verified artifacts from one dataraft.dbt::dr_dbt_build() or dataraft.dbt::dr_dbt_test() invocation. No data rows or database connections are transferred by this adapter. The database service and its table inventory must already exist in OpenMetadata. Refresh database ingestion after creating new physical RAW release relations or dbt models; the dbt engine enriches existing table entities and can omit lineage edges when a table cannot be found. delivered means the CLI returned zero, not that every intended graph edge was verified. This is separate from dr_catalog_openmetadata(), which publishes ordinary product table metadata over HTTP.

Usage

dr_catalog_openmetadata_dbt(
  endpoint,
  service,
  token_env = "OPENMETADATA_JWT_TOKEN",
  executable = "metadata",
  timeout = 300,
  options = list()
)

Arguments

endpoint
OpenMetadata server base URL, without /api or /api/v1.


service
Name of an existing OpenMetadata database service.


token_env
Name of the environment variable containing the JWT token. Its value is resolved only when delivering metadata.


executable
Name or path of the OpenMetadata metadata CLI.


timeout
Positive timeout in seconds, or Inf.


options
Optional named list of OpenMetadata dbt pipeline settings: dbtUpdateDescriptions, dbtUpdateOwners, includeTags, searchAcrossDatabases, overrideLineage (logical), dbtClassificationName (string), and parsingTimeoutLimit (positive integer). Credentials, artifact paths and arbitrary CLI flags are not accepted here.

Value

A catalog adapter for the catalog argument of dataraft.dbt::dr_dbt_build() and dataraft.dbt::dr_dbt_test(). dataraft.core::dr_publish_metadata(adapter, result) returns a delivery list with status, destination, invocation_id, attempt, timestamps, exit_status, error_class, message and recorded. It never changes the dbt result's success or status fields.

Details

Install openmetadata-ingestion[dbt] in a separate Python environment and supply its metadata executable. Version 2.0.0.0 (Python >= 3.10) is the tested minimum; match the ingestion engine to your OpenMetadata server. OpenMetadata's own version compatibility check remains enabled. The adapter does not install Python, provision a server or replace its governance API.

Authentication uses an environment variable. The official CLI expands an environment placeholder in a temporary JSON configuration; the resolved token is passed only in the child environment. CLI output is captured and discarded because third-party errors may contain credentials. Configuration, logs and artifact copies are removed after the attempt. The original dbt artifacts remain project data and can contain SQL and database messages.

A successful metadata delivery does not mean that dbt tests passed or that a dataraft release was published. Both successful and failed dbt invocations can supply valid metadata. Delivery errors return pending with a warning; invalid or changed artifacts return blocked without starting the CLI. Retry with dataraft.core::dr_publish_metadata(adapter, result). A small credential-free receipt beside the original artifacts records attempts across R sessions; an already delivered invocation is not sent again. Use one coordinated writer per artifact directory. After refreshing missing table inventory, explicitly redeliver with dataraft.core::dr_publish_metadata(adapter, result, force = TRUE). An interruption after remote ingestion but before the receipt is saved can cause a repeated delivery: this is at-least-once, not an exactly-once transaction.

Examples

catalog <- dr_catalog_openmetadata_dbt(
  "https://metadata.example", service = "warehouse"
)
dataraft.core::dr_inspect(catalog)
# After configuring the external service, CLI and token environment:
# result <- dataraft.dbt::dr_dbt_build(project, catalog = catalog, stop_on_failure = FALSE)
# delivery <- dataraft.core::dr_publish_metadata(catalog, result)

See also

dataraft.dbt::dr_dbt_status(), dataraft.dbt::dr_dbt_publish()
Documentation source snapshot · View source at 2f9432d ↗
Code examples are documented source examples; they are not executed in this website build.

Search documentation

Search functions, packages and guides.