Skip to content

feat(converters): add Ataccama ONE → OSI catalog importer#174

Open
carabaestlein wants to merge 4 commits into
apache:mainfrom
carabaestlein:feat/ataccama-converter
Open

feat(converters): add Ataccama ONE → OSI catalog importer#174
carabaestlein wants to merge 4 commits into
apache:mainfrom
carabaestlein:feat/ataccama-converter

Conversation

@carabaestlein

@carabaestlein carabaestlein commented Jul 2, 2026

Copy link
Copy Markdown

Summary

Adds a new converter under converters/ataccama/ that imports metadata from Ataccama ONE into an OSI semantic model, using Ataccama's public Catalog and Data Quality REST APIs.

Given one or more catalog items (selected by URN), it produces a single OSI semantic model: each catalog item becomes a dataset, each catalog attribute becomes a field, business terms become ai_context, and data-quality results plus other governance metadata are attached as ATACCAMA custom extensions.

What it does

  • Live REST client — authenticates via OAuth2 client-credentials (short-lived tokens refreshed automatically) and follows the APIs' cursor pagination.
  • CLIataccama-to-osi, scoped by explicit catalog-item URNs (--urn repeatable, or --urns-file), since Ataccama catalogs hold tens of thousands of items and many are BI artifacts rather than tables.
  • Data-quality enrichment — overall, per-dimension, and per-column quality, plus the monitor's configured threshold and active-finding count; on by default, --no-dq skips.
  • Opt-in AI warnings--dq-ai-warnings appends a plain-language caveat to ai_context for datasets Ataccama flags as below quality.
  • Libraryataccama_to_osi(bundles, ...) returns an OSI document dict.

Mapping

Ataccama ONE OSI
CatalogItem dataset (name de-duplicated if repeated)
CatalogItem.locations + name dataset.source (best-effort dotted namespace)
CatalogItem.description (rich text) dataset.description (flattened to plain text)
assigned Terms ai_context (synonyms + instructions)
CatalogAttribute field (name → quoted ANSI_SQL identifier)
dataType ∈ {DATE, DATETIME, TIMESTAMP, TIME} field.dimension.is_time = true (inferred)
DQ overall/dimension quality + threshold + findings dataset custom_extensions (vendor_name: ATACCAMA) → data.dq
DQ per-attribute quality field custom_extensions (vendor_name: ATACCAMA) → data.dq
URNs, dataType, columnType, connection/source/stewardship/monitor custom_extensions (vendor_name: ATACCAMA) → data

Every dataset and field carries a single ATACCAMA custom extension; dq, attribute_urn, etc. are keys inside its data JSON string.

Data quality

DQ results (from the DQ API's latest processing on each item's primary monitor) are included by default:

  • Dataset: passed/failed, pass_rate_pct, threshold_pct + below_threshold (the monitor's configured bar), active_findings (0 = none open), per-dimension breakdown, and the DQ results link.
  • Field: per-column passed/failed/pass_rate_pct.

Opt-in warnings (--dq-ai-warnings): appends a caveat to a dataset's ai_context so any OSI consumer (not just tools that parse the vendor extension) is told to treat low-quality data with caution.

Scope & intentional deviations from the converter guide

Ataccama's APIs are a catalog/governance/DQ surface, while OSI is an analytics semantic
model, so this converter differs from converters/index.md in three deliberate ways:

  1. Import-only (Ataccama → OSI). The public Catalog API can only PATCH description/stewardship/aliases on existing items — it cannot create items, attributes, or relationships — so a faithful OSI → Ataccama export isn't possible.
  2. Tests use an Ataccama fixture, not the TPC-DS baseline. TPC-DS is an input only for OSI → Vendor converters; for this Vendor → OSI direction the input is Ataccama data, so a recorded catalog fixture is the correct analog. Output is still validated against the OSI JSON schema.
  3. No vendor-enum change. vendor_name is a free-form string per core-spec/spec.md, so ATACCAMA validates without touching the spec. This keeps the PR tooling-only.

Known limitations (see README)

  • Metrics — Ataccama has no analytics metrics; none emitted (DQ is an extension, not an OSI metric).
  • Data Trust Score / Index — not exposed by the public APIs; not emitted. The converter carries the DQ results and monitor threshold that the APIs do provide.
  • Relationships / primary_key / unique_keys — not exposed by the Catalog API.
  • source — only a folder hierarchy + originPath are available, not database.schema.table; source is a best-effort dotted namespace, with the authoritative connection/source URNs preserved in extensions.
  • Expressions are physical — columns map to quoted identifiers (ANSI_SQL only); derived/aggregated columns are not reconstructed.

Testing

  • 29 unit tests, run fully offline against a sanitized catalog fixture (synthetic tenant, host, and identifiers).
  • Output validated against core-spec/osi-schema.json plus unique-name and sqlglot SQL-parse checks.
cd converters/ataccama
uv sync --group dev
uv run pytest

carabaestlein and others added 4 commits July 2, 2026 11:55
Import selected Ataccama ONE catalog items into an OSI semantic model via the
public Catalog REST API (OAuth2 client-credentials auth, cursor pagination).

- CatalogItem -> dataset; CatalogAttribute -> field (quoted ANSI_SQL identifier)
- business terms -> ai_context; governance/DQ/source URNs -> ATACCAMA custom_extensions
- rich-text descriptions flattened to plain text; is_time inferred from DATE/DATETIME
- CLI `ataccama-to-osi`, scoped by explicit catalog-item URNs
- import-only: the public Catalog API cannot create catalog items/attributes,
  so OSI -> Ataccama export is out of scope (documented in the README)
- tests run offline against a sanitized fixture and validate output against the OSI schema

vendor_name is a free-form string per the spec, so no core-spec changes are required.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Fetch the latest DQ results (each item's primary monitor) and attach them to the
ATACCAMA custom extensions:
- dataset level: overall + per-dimension quality (passed/failed + derived
  pass_rate_pct) plus the DQ results link
- field level: per-attribute quality

DQ is fetched by default; `--no-dq` skips the calls. `pass_rate_pct` is derived from
the raw passed/failed counts and is not presented as Ataccama's official score
(the Data Trust Score/Index is not exposed by the public APIs). Rebuilds the test
fixture around BANK_TRANSACTIONS + aggregation (both carry DQ results), with all
tenant, host, URN, and personal identifiers sanitized to synthetic values.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
…t-in AI warnings

- Add the monitor's overall DQ threshold to the dataset dq block as `threshold_pct`
  + `below_threshold` (the pass/fail bar shown in Ataccama), fetched from the
  monitor-config endpoint; omitted when no threshold is configured.
- Always report `active_findings` (0 = no open findings) so the clean state is explicit.
- Opt-in `--dq-ai-warnings`: append a plain-language DQ caveat to
  `ai_context.instructions` for datasets Ataccama flags as below quality — below its
  configured threshold or with active findings. Ataccama is the sole source of truth:
  the converter never applies a threshold of its own, so items without a configured
  threshold (and columns) are never flagged.
- Reword `pass_rate_pct`: it is Ataccama's `overallQuality` as a percentage (the API
  returns counts, not a preformatted score), not a custom "derived" metric.
- README: clarify DQ lives inside the single ATACCAMA extension's `data`, document the
  threshold/findings fields and the opt-in warnings.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
@jbonofre
jbonofre self-requested a review July 14, 2026 18:44
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant