Repository navigation
feat(python): add ATACCAMA to OssieVendor - #629
Conversation
There was a problem hiding this comment.
Warning
Copilot couldn't run its full agentic review because it didn't start before the timeout. Make sure your repository has a runner available, or add a copilot-code-review.yml file specifying one with the runs-on attribute. See the docs for more details.
Copilot review overview
No open issues 🎉
What changed in this PR
Registers ATACCAMA as a well-known vendor across the Python model and core specification examples so converters can resolve the vendor name consistently.
Changes:
- Added
ATACCAMAto theOssieVendorPython enum. - Updated spec example lists (
spec.yaml,ossie-schema.json) to includeATACCAMA. - Extended the spec documentation table (
spec.md) withATACCAMA.
| File | Description |
|---|---|
| python/src/ossie/models.py | Adds ATACCAMA to the well-known vendor enum used by the Python models. |
| core-spec/spec.yaml | Updates vendor name examples to include ATACCAMA. |
| core-spec/spec.md | Adds ATACCAMA to the documented list of well-known vendor examples. |
| core-spec/ossie-schema.json | Updates JSON schema vendor examples to include ATACCAMA. |
Review effort: Lite
christianeu-db
left a comment
There was a problem hiding this comment.
fyi: in #617, we're aiming to remove specific vendor examples from the core spec into an extensions folder. this means that new vendors can register as a known-constant without the usual 7 day DISCUSS period on the mailing list before merging.
If you scope the change to just models.py, I can fold your vendor registration into 617 and get this merged today
|
Thank you for your first contribution to Apache Ossie (incubating)! A committer will review your PR. In the meantime, please ensure:
No ICLA is required to contribute. If you are elected as a committer in the future, you will need an Individual Contributor License Agreement (ICLA) on file with the ASF. Questions? Ask in the PR comments or join us on Slack. We appreciate your contribution! |
@christianeu-db Yes that would be great, thank you. Is there something you need from me for this? |
@rostislavosvald-ataccama just scope the PR down to the models.py change and revert the rest. I'll add | |
The Ataccama converter in apache/ossie-converters tags its custom extensions with the ATACCAMA vendor name. Adding it to OssieVendor lets the converter use the enum instead of a bare string. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
e5d22fb to
0c46e79
Compare
@christianeu-db Updated. |
Add the ATACCAMA token to the known-vendor table, per apache#629. Co-authored-by: Isaac <no-reply@databricks.com>
Bring in apache#596 (compliance portability fixtures), apache#618 (reject duplicate keys on load), and apache#629 (ATACCAMA vendor) from main. The only conflict was the import block of validation/validate.py, where this branch adds `difflib` plus the `Expression` dataclass/iterator imports and apache#618 adds `importlib.util` for the shared `_loading.py` bootstrap; resolved by keeping the union. apache#618's loader refactor merged cleanly onto the expression-iterator refactor, and apache#629's OssieVendor enum entry is complementary to this branch's vendors.md ATACCAMA row. Verified against validation-ci.yml: duplicate-key tests (59), validation pytest (268), python model tests (266), generator --check in sync, and all five example validations pass. Co-authored-by: Isaac <no-reply@databricks.com>
* feat(core-spec): decouple core spec from specific vendor dialects
Make the core specification vendor-neutral:
- `Dialect` becomes a free-form string (was a closed enum), mirroring the
already-free-form `Vendor`; generic schema `examples` replace concrete
product names.
- Move the known-dialect and known-vendor catalogs out of the normative spec
into a new top-level `extensions/` folder (README, dialects.md, vendors.md),
framed as a community registry whose listings do not imply endorsement.
- Add an optional top-level portable `expression` field (OSSIE_SQL_2026) to the
expression object; when both it and an OSSIE_SQL_2026 `dialects` entry are
present, the top-level field is authoritative. Demonstrated on
`customer_full_name` in examples/tpcds_semantic_model.yaml.
- Keep the normative text that non-OSSIE dialects are opaque and
declaration-only.
Kept in sync: the enum-sync generator no longer emits `dialects` (free-form,
like vendors); the Python SDK types `dialect` as a free-form string and gains
the optional portable `expression`; the reference validator treats unregistered
dialects as opaque (skipped) and validates the portable expression. Converters
are otherwise unchanged except where the now-string dialect required a fix (the
dbt dialect comparison uses `==`, and the sigma and hex converters no longer
call `.value` on a dialect) and where the new portable `expression` is handled:
the ontology converter carries it through its model and both conversion
directions, and omni's round-trip test documents the portable marker as a
normalization (its text survives as the dialect entry).
Co-authored-by: Isaac <no-reply@databricks.com>
* fix(core-spec): allow portable-only expressions without dialects
An Expression required `dialects` on both the JSON Schema and the SDK, so a
document carrying only the portable top-level `expression` (OSSIE_SQL_2026) was
rejected, contradicting the spec's stated semantics.
- Schema: replace `required: [dialects]` with an anyOf requiring at least one of
`expression` or `dialects`; `dialects` keeps `minItems: 1` when present.
- SDK: make `OssieExpression.dialects` optional and add a model_validator that
rejects an expression carrying neither form.
- Tests: cover portable-only, dialects-only, both-present, and the empty cases
on both the schema and the SDK.
- Docs: note the "at least one" rule in spec.md and spec.yaml.
Co-authored-by: Isaac <no-reply@databricks.com>
* feat(validation): warn on unknown dialects instead of skipping silently
An unrecognized dialect is opaque and legitimate under the free-form `Dialect`
model, so its SQL cannot be parse-checked. The validator skipped it silently,
which also hid typos such as `SNOWFLKE`.
`validate_sql` now tallies expressions whose dialect is not in `DIALECT_MAP` and
emits one nonfatal `ValidationWarning` per distinct unknown dialect, with the
count of affected expressions. Validation still passes. Known-but-unparseable
dialects (MDX, DAX, HOLISTICS_AQL, ...) stay silent, and the per-call
`validate_sql_expression` is unchanged.
Co-authored-by: Isaac <no-reply@databricks.com>
* refactor(core-spec): rename portable expression key to 'sql'
The portable top-level key of the Expression object was `expression`,
nested under a field/metric's own `expression:` block -- the doubled
`expression.expression` Jochen flagged on the thread. Rename it to
`sql` so the key reads cleanly and names what it holds: the portable
OSSIE_SQL (OSSIE_SQL_2026) form.
Scope is the portable key only. The field/metric `expression:` key
(which holds the Expression object) and the per-dialect
`dialects[].expression` key (already qualified by its `dialect:`) are
unchanged.
This key was introduced by this same unreleased PR, so the rename
carries no migration burden; no released spec ever had
`expression.expression`. No back-compat alias -- the old key is
rejected (schema additionalProperties:false, SDK extra=forbid).
Touches the schema anyOf + property, the SDK model and validator, the
validator's portable reads, spec.md/spec.yaml/docs prose and examples,
the tpcds portable example, and the mirrored tests.
Co-authored-by: Isaac <no-reply@databricks.com>
* fix(validation): check a dataset-scoped metric's portable sql
A dataset-scoped metric may be written with only the portable `sql`
form (no dialects). Such a metric escaped both checks: `validate_sql`
only walked its `dialects`, so the portable form was never parsed; and
`validate_metric_scoping` likewise only walked `dialects`, so the
single-namespace scoping rules (no qualified references, declared
fields only) were never applied to it.
Both now handle the portable `sql` exactly like a dialect expression:
it is parsed as OSSIE_SQL_2026 and scope-checked. A portable-only
dataset-scoped metric with a cross-dataset reference or an undeclared
field is now reported, as a dialect form already was.
Adds four tests covering the portable form: a declared single-part
field passes, a cross-dataset reference and an undeclared field are
rejected, and an invalid portable expression is reported.
Co-authored-by: Isaac <no-reply@databricks.com>
* refactor(validation): walk expressions through one iterator
`validate_sql` and `validate_metric_scoping` each walked the document
to find every expression. Introduce `iter_expressions`, the single
traversal both consume, yielding an `Expression` record per portable
`sql` form and per dialect expression, keyed by `kind`
(field / dataset_metric / model_metric).
Also folded in while here:
- Split the overloaded DIALECT_MAP into SQLGLOT_DIALECTS (parseable,
mapped to the sqlglot dialect) and NON_SQL_DIALECTS (carried but not
parsed); one guard in _parse_sql_expression indexes SQLGLOT_DIALECTS.
- Name the PORTABLE_DIALECT constant; drop the `.get("dialect",
"ANSI_SQL")` fallback, since the schema requires `dialect`.
- A dialect this validator cannot parse is reported as a nonfatal
warning that its expressions were not syntax-checked; it may be a
legitimate entry from extensions/dialects.md, not a mistake.
- Honor the spec's precedence rule: a top-level `sql` outranks an
OSSIE_SQL_2026 dialect entry, so that entry is non-authoritative. It
is not scope-checked, and an invalid one warns instead of failing the
document, since a client may still read it.
- Spec/docs wording: write OSSIE_SQL_2026 directly (no parenthetical),
"Any string is accepted", drop "Optional:" from the portable-form
comments, describe `data` as an opaque string (not JSON), and give
the glossary Dialect entry only ANSI_SQL as an example.
- models.py: optional `dialects` comment and the "convenience set, not
a closed one" phrasing removed; docstrings state any string is
accepted.
- Tests track the split, assert exact scope messages, cover the
precedence behavior, and compare dialects by value.
Co-authored-by: Isaac <no-reply@databricks.com>
* fix(validation): tighten sql/dialect handling per PR #617 review
Addresses review feedback on the decouple-core-spec PR
(#617):
- Require non-empty expression and identity strings: add minLength 1 to
`sql`, `dialect`, the per-dialect `expression`, and `vendor_name` in
both the schema and the SDK, so an empty value is rejected there
rather than slipping through -- an empty `sql`/`expression` reached
the SQL validator, an empty `dialect` produced an "is not supported"
warning, and an empty `vendor_name` was unchecked. Suggested by
@abolfazlmadanii.
- Warn when a non-authoritative OSSIE_SQL_2026 dialect entry drifts from
the authoritative top-level `sql`: a differing or invalid entry is
dead text a client might still read, so report it as a nonfatal
warning; an identical one stays silent.
- Suggest the closest known dialect on an unsupported one (difflib,
cutoff 0.8), so `SNOWFLKE` says "Did you mean 'SNOWFLAKE'?" without
flagging a genuinely new dialect.
- extensions/README.md: note that dialect and vendor tokens are matched
exactly and are case-sensitive, so `snowflake` is distinct from
`SNOWFLAKE`.
- Describe custom-extension `data` as an opaque string, not a JSON
string, in the schema and SDK, matching the spec/docs wording.
Co-authored-by: Isaac <no-reply@databricks.com>
* docs(extensions): register ATACCAMA in the vendor catalog
Add the ATACCAMA token to the known-vendor table, per #629.
Co-authored-by: Isaac <no-reply@databricks.com>
* fix(ci): point #630's precedence tests at SQLGLOT_DIALECTS
#630 added OSSIE_SQL_2026 precedence tests whose helper parses through
`DIALECT_MAP["OSSIE_SQL_2026"]`. This branch split that map into
`SQLGLOT_DIALECTS` (parseable) and `NON_SQL_DIALECTS`, so the merged-in
helper hit `AttributeError: module 'ossie_validate' has no attribute
'DIALECT_MAP'`. Point it at `SQLGLOT_DIALECTS[PORTABLE_DIALECT]`, the
same None (sqlglot default) entry, so the three tests pass unchanged.
Co-authored-by: Isaac <no-reply@databricks.com>
---------
Co-authored-by: Isaac <no-reply@databricks.com>
apache/ossie#629 added the enum member, and the ossie submodule is now pinned past it, so the stand-in string constant goes. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
apache/ossie#629 added the enum member, and the ossie submodule is now pinned past it, so the stand-in string constant goes. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
* feat(converters): add Ataccama ONE -> OSI catalog importer
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>
* feat(converters): enrich Ataccama import with data-quality scores
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>
* Update README
* feat(converters): enrich Ataccama DQ with threshold, findings, and opt-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>
* Add relationships (PK/FK)
* fix(ataccama): address Ossie converter review feedback
Rename the package, CLI, API, filenames, and documentation from OSI to Ossie. Add ASF license headers, declare jsonschema in the dev dependencies, and include a dependency lockfile.
Validate against core-spec/ossie-schema.json and emit the current model format with version, name, and datasets at the document root.
Compare data-quality thresholds against the unrounded pass rate, keeping rounding for display only. Add regression coverage for rounding boundaries, exact thresholds, and unevaluated checks.
Validation: 43 tests passed; Ruff lint and formatting passed; renamed CLI help and source/wheel builds verified.
* fix(ataccama): load --env-file via python-dotenv
The hand-rolled KEY=VALUE loader mis-parsed several common env-file
forms: surrounding quotes were kept verbatim (so a quoted secret was
sent with its quotes), a leading `export ` became part of the key, and
an unquoted inline comment was appended to the value.
Switch to python-dotenv, which handles all three. Use override=True so
an explicitly named --env-file wins over already-exported variables;
the previous setdefault meant a stale exported value silently beat the
file, making it impossible to switch tenants without unsetting first.
python-dotenv is BSD-3-Clause (ASF Category A) and is already present
in the repo's dependency graph, pulled in transitively by orionbelt's
optional obml-validation extra.
Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
* fix(ataccama): quote source segments that are not bare identifiers
Segments are joined with `.` to form a dotted source, so a segment that a SQL
parser would not read as one unquoted identifier has to be quoted: a dot adds
levels (orders.csv), a dash reads as subtraction (TX_2022-07), and a space or
newline ends the identifier.
A segment is left bare only when it reads as a plain identifier. The two
directions are not symmetric -- leaving a segment bare that needed quoting is a
parse error, while quoting one that did not costs only case sensitivity on that
segment -- so the test is the intersection of what the engines accept rather
than any one engine's full grammar:
- a letter or underscore first, since Snowflake, PostgreSQL, Oracle, SQL Server
and BigQuery all reject a leading digit (2022_SALES)
- no $, which Snowflake and Oracle allow unquoted but Databricks and BigQuery
do not
- not a reserved word, which needs quoting on every engine despite its
characters being fine (a catalog item named ORDER or JOIN)
Quoting stays conditional rather than unconditional: consumers case-fold
unquoted identifiers but preserve quoted ones, so quoting every segment would
make the common case case-sensitive and stop it matching the physical table.
The reserved-word list is deliberately short and not exhaustive -- each engine
reserves far more -- but it covers the names a catalog realistically produces.
Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
* refactor(ataccama): build Ossie output with the apache-ossie models
The converter assembled the Ossie side as raw dicts and serialized them with
its own yaml.dump, duplicating the version constant, the vendor name and the
dialect name as string literals. Depend on the in-repo apache-ossie package
instead and build OssieDocument/OssieDataset/OssieField directly, so the
output is validated by pydantic at construction and serialized by the
package's to_ossie_yaml().
ataccama_to_ossie() now returns an OssieDocument rather than a dict. Note
that version consequently serializes last, since pydantic orders subclass
fields after parent ones -- this matches what the dbt converter emits.
Registers ATACCAMA in OssieVendor, alongside the other converter vendors.
Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
* feat(ataccama): retry rate-limited requests
Retry HTTP 429 responses from the Ataccama API, honouring Retry-After
when the server sends it and falling back to exponential backoff.
Requests go through a single _request() helper so the token endpoint is
retried too, and the bearer token is minted per attempt so it cannot
expire while we back off.
Retry-After is parsed with urllib3, so both of its forms -- delay-seconds
and an HTTP-date -- are honoured, and a value that is neither falls back
to backoff. urllib3 is MIT (ASF Category A) and is already in the
dependency graph, required by requests; it is declared directly now that
the converter imports it.
Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
* refactor(ataccama): model the primary key as a single key
A table has at most one primary key, but the bundle carried a list and the
converter silently took the first entry. The list came from the Metadata
Entities API being a generic entity lister, not from real multiplicity.
Carry one key on the bundle and collapse the API's collection in the client,
where the mismatch is. More than one entity back means the catalog metadata
contradicts itself, so warn and keep the first rather than choose in silence.
Output is unchanged.
Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
* feat(ataccama): derive unique keys from unique indexes
dataset.unique_keys only ever restated the primary key, because primary keys
were the sole source read. Fetch unique indexes too, so it lists what it claims
to.
Only the columns an index marks unique are taken: a unique index may also carry
included (covering) columns, which it stores but does not enforce uniqueness on,
and taking those would widen the key past the real constraint.
The primary key itself is not restated in unique_keys. It is a unique constraint
by definition and dataset.primary_key already carries it, so repeating it adds
nothing -- and Snowflake rejects a semantic view that declares the same columns
as both. Every relational engine backs a primary key with a real unique index
(named PRIMARY in MySQL, indisprimary in Postgres, is_primary_key in SQL
Server), so that index does arrive from the catalog and has to be filtered out.
Key sets are compared as sets rather than ordered tuples: column order is a
property of the index, not of the uniqueness guarantee, so a unique index on
(b, a) is the same constraint as a primary key on (a, b).
Note that omitting the restatement is stricter than the spec requires --
spec.md's own example lists the primary key inside unique_keys -- but that
output is not loadable into Snowflake.
Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
* feat(ataccama): map dataType to the portable Ossie datatype
Ataccama's dataType reached the output only inside the ATACCAMA extension, so
a consumer that does not parse vendor blobs saw fields with no type at all.
Map it onto OssieField.datatype, which is the cross-vendor slot for this.
Ataccama's vocabulary is STRING, INTEGER, LONG, FLOAT, BOOLEAN, DATE and
DATETIME. It carries no exact-decimal type, so FLOAT maps to the approximate
Ossie Float even where the source column is NUMERIC -- columnType stays in the
extension for consumers that need the distinction back.
A type outside the mapping warns and omits datatype, as the spec prescribes
("Omit datatype when unknown"), rather than guessing or forcing Opaque. Should
Ataccama gain a type, a real run says so instead of silently mistyping.
dimension.is_time is unchanged: is_time_dimension() requires a dimension block,
so datatype supplements that signal rather than replacing it.
Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
* fix(ataccama): follow the data-quality API's breaking change
DQ enrichment stopped working after a breaking change to the Ataccama
data-quality API, which the converter had been written against before.
The API was in preview at the time, which allowed breaking changes; v1 is
now officially released, so the converter targets the released contract.
The results resource moved from .../processings/{p}/dq-results to
.../processings/{workflowUrn}/results/dq-evaluation, so every request
404'd, and a blanket `except HTTPError` turned that into "this item has no
DQ": catalog items came out with no dq block and nothing said why. Request
the current resource, and narrow the catch to 404, the one status that
genuinely means no monitor or a run that evaluated no DQ; auth failures
and server errors now surface instead of masquerading as absent data.
The payload's processingUrn and dqResultsLink were renamed to workflowUrn
and dqEvaluationResultsLink, so processing_urn and results_link came out
empty. Read the new names. Every other field the converter reads --
overallQuality, dimensionResults, overallDqFindings, dqAttributeResults --
is unchanged. The recorded fixture carried the old names and is updated to
match.
overallDqThresholds is now a map keyed by threshold id, not a list, so
thresholds[0] raised KeyError the moment a monitor had one configured.
Read the map. A monitor may carry several thresholds at different
severities and the DQ block reports one, so prefer CRITICAL and otherwise
the strictest bar, leaving the reported verdict unable to understate.
Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
* feat(ataccama): emit ai_context as a plain string with --flat-ai-context
Snowflake's Ossie parser rejects the ai_context object form outright. Both
forms are spec-valid -- AIContext is a oneOf over string and object, and
OssieAIContext is Union[str, OssieAIContextObject] -- so the flag renders
every ai_context as the string alternative instead:
<instructions>
Synonyms: a, b.
Examples: x; y.
Flattening runs as the last step on the finished document rather than during
mapping, so conversion keeps building the canonical object form and anything
that needs to read ai_context structurally still can. An absent ai_context
stays absent, and an object that renders empty collapses to None.
Default off; both forms validate against core-spec/ossie-schema.json.
Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
* refactor(ataccama): convert catalog items in a single pass
ataccama_to_ossie walked the bundles twice -- once to build datasets and
again to build relationships -- which forced every bundle to stay alive
until the document was assembled. A bundle is larger than the dataset it
produces: it carries raw rich-text descriptions for the item and every
attribute, the full DQ evaluation payload, and the terms dict, all of
which conversion flattens or summarizes away.
_build_relationships only ever read bundle.foreign_keys, pairing it with
its dataset by positional zip. Narrowing it to take those pairs directly
removes both the second pass and the zip, which silently assumed the
datasets were built in bundle order and were the same length.
The parameter widens to Iterable, so callers can stream bundles in and
let each one go once its dataset is built. Every existing caller passes
a list, so nothing changes for them.
* feat(ataccama): filter catalog items by connection, source, and location
Naming every table by URN is impractical when the natural unit of scoping
is "everything in this source". POST /catalog/v1/catalog-items/filter
takes those criteria, and it returns whole catalog items -- the same
payload the by-URN GET returns -- so discovered items need no follow-up
request each.
Named URNs go through the same endpoint as a filter.urn clause, so there
is one resolution path rather than two, and N per-item GETs collapse into
one POST. Every group is a filter criterion and they are OR-ed, which
means a URN matching nothing contributes nothing rather than failing the
run, as was already true of a source or location that matches nothing.
A named catalog item that matched nothing is still reported, as a warning,
since a typo would otherwise quietly shrink the model.
Only the first page is read up front. That is enough to learn meta.total,
so the run is sized -- and --max-items can warn and truncate -- before
anything is enriched, while the remaining pages are fetched as they are
consumed. Enrichment therefore starts on the first page instead of after
the whole scope has been paged through. Attributes, terms, DQ and keys
still cost a request each, as the API has no batch form for them.
Every listing now asks for 100 records per page, the maximum the API
specifies for the filter, attribute and entity endpoints alike. The
attribute and entity listings used to ask for 200, which the spec does not
allow even though the server happened to accept it.
Also sends include=effectiveStewardship on both read paths. The converter
has always emitted stewardship_group_urn, but neither call requested it,
so the field was never populated.
* feat(ataccama): allow stamping a different Ossie version with --ossie-version
Consumers pinned to a released spec reject this repo's in-development version
outright -- Snowflake will not accept 0.2.0.dev0. The flag stamps a different
version on the finished document so the export can be loaded, defaulting to
the converter's own version when not given.
This knowingly produces output that fails our own schema: ossie-schema.json
pins version to the const 0.2.0.dev0 and requires it. That is the point of the
flag, but it should not be silent, so the converter warns when the stamped
version differs from its own -- and stays quiet when the value matches, making
--ossie-version 0.2.0.dev0 a no-op rather than a warning. The test asserts the
overridden document is schema-invalid rather than pretending otherwise.
Note the cost: other Ossie tooling may reject the result. The Honeydew
converter hard-fails any document whose version is not 0.2.0.dev0, so this is
a one-way export switch, not a general-purpose knob.
Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
* fix(ataccama): retry transient gateway errors
A long export makes many requests in a row, and a gateway between the
client and the API can answer any one of them with a transient 502, 503
or 504. Only 429 was retried, so a run that had already enriched a
hundred items died on a single such response.
502, 503 and 504 now retry on the same backoff as a rate limit, honouring
Retry-After when the server sends one. 500 deliberately stays out: it
usually means the request itself provoked a fault, so retrying repeats it
and hides the cause, where a gateway error says nothing about the request.
The warning no longer calls every retryable response a rate limit, and
reports the status instead when it was not one.
* fix(ataccama): declare dataset and field names as resolvable identifiers
Consumers read dataset and field names as SQL identifiers, not as free-form
labels: uploading a model straight to Snowflake fails with "Invalid identifier
'TX_2022-07'. Consider adding double quotes." Ossie does not constrain `name`,
so the converter has to produce something declarable.
A name that already reads as a plain identifier is left alone, so it keeps
case-folding and matches the physical object. Anything else becomes a delimited
identifier. Delimiting rather than rewriting keeps the catalog name exact --
`Customer Name` stays recoverable as `"Customer Name"` instead of becoming
`Customer_Name` -- which also means two names that would sanitize alike stay
distinct and need no disambiguating suffix.
The de-duplication suffix is applied before rendering, so a repeated awkward
name becomes `"test coll_2"` rather than the unparseable `"test coll"_2`.
Keys and relationships are the reason this is more than a formatting change.
Foreign keys and indexes name physical tables and columns, so a reference would
dangle once a name is delimited; both ends now resolve through the converted set
and quote identically. A column-to-field mapping is threaded through for that,
since re-deriving the name at each reference site would not survive
de-duplication.
The same rule already decided source-segment quoting, so the two share one
function: the question "can a consumer resolve this as written" has one answer
whether the value is a name or a path segment.
Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
* fix(ataccama): keep foreign key column pairs aligned
The local and referenced column names of a foreign key were collected into two
lists and the missing names filtered out of each separately. When one row lacked
its local name and another its referenced name, both lists still came out the
same length, so the columns paired up wrongly and the equal-length check in
relationship building let the result through.
Pair the names row by row and drop a row whose local or referenced name is
missing, so the remaining pairs stay aligned. Warn about every dropped row and
about a foreign key whose columns name no referenced table or several, instead
of silently leaving the table unset.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
* fix(ataccama): fail on DQ threshold and term errors other than missing access
Fetching a monitor's overall DQ threshold caught every HTTPError and returned
None, so an auth failure or server error looked like a monitor with no
threshold and the DQ verdict silently disappeared. Only a 404 means there is no
monitor; let every other status raise, as the DQ results request already does.
Term lookups had the same blanket catch. A referenced term the caller cannot
read (403) or that no longer exists (404) is still skipped so one term does not
fail the run, but it is now reported with a warning, and any other status
raises.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
* fix(ataccama): resolve foreign key targets by schema, and warn when one cannot be
Foreign key targets were looked up by bare table name, keeping only the last
converted item of each name. Two tables called orders in different schemas
collapsed into one, so every foreign key to either attached to whichever came
last, without a word.
Each catalog item's schema is now known: its locations carry URNs, and the
Generic Metadata Entities API gives each location's concreteType, so the item
sits in the schemaLocation among them. The lookup is cached per location, so a
whole source costs one request per distinct location, and it is skipped when
relationships are not fetched. Foreign key columns carry referencedSchema next
to referencedTableName; the pair is read together, and columns that disagree on
it leave the target unresolved.
A target is matched by table name and, when the foreign key names its schema,
by an exact schema match. A candidate whose schema is unknown does not match a
named schema: a missing relationship is reported, a wrong one would not be.
A relationship needs both of its datasets in the model, so a foreign key whose
target is not among the converted items, is ambiguous, or names no table is
skipped. It used to be skipped silently, which left no trace of the
relationship the source declares. Each one now warns, so a partial conversion
says which relationships it could not emit.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
* feat(ataccama): infer the API root and token URL from the host and tenant
Connecting needed two URLs, and both carried path segments a user had to
know: the API root ends in /api, and the token endpoint is the tenant's
Keycloak realm at /auth/realms/<tenant>/protocol/openid-connect/token on
the same host. Getting either wrong only shows up as a failed request.
ATACCAMA_BASE_URL may now be the tenant's host as well as its API root, and
the token endpoint is derived from the host and the tenant. The tenant comes
from ATACCAMA_TENANT, or else from the scope URNs, which carry it as
urn:ata:<tenant>:..., so a run scoped by URN needs no tenant setting at all.
ATACCAMA_TOKEN_URL stays as an override for a deployment whose Keycloak does
not follow that layout.
AtaccamaClient takes token_url and tenant as keyword arguments, an explicit
token_url winning, and refuses to start with neither.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
* refactor(ataccama): rename the module to ossie_ataccama
Matches the ossie_<converter> module name every other converter uses.
The ataccama-to-ossie command is unchanged; library imports move from
ataccama_ossie to ossie_ataccama.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
* build(ataccama): publish as apache-ossie-ataccama with ASF metadata
Follows the other converters: the apache-ossie-<converter> distribution
name, the ASF as author with the converter's maintainers listed
separately, the Apache-2.0 license, keywords and project URLs.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
* ci(ataccama): lint and test the converter on every supported Python
Mirrors the other uv-based converter workflows, with the matrix matching
requires-python (3.12+) and a ruff check before the tests.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
* chore(ataccama): register the converter in the repository
Adds the converter/ataccama PR label, weekly dependabot updates for its
uv lock file, and the ATACCAMA row in the README's vendor table.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
* refactor(ataccama): name the vendor with OssieVendor.ATACCAMA
apache/ossie#629 added the enum member, and the ossie submodule is now
pinned past it, so the stand-in string constant goes.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
* fix(ataccama): align with 0.3.0.dev0 spec, register in interop matrix, and upgrade certifi
---------
Co-authored-by: Cara Baestlein <cara.baestlein@ataccama.com>
Co-authored-by: Claude Opus 4.8 <noreply@anthropic.com>
Co-authored-by: CaraBaestlein <cara.baestlein@gmail.com>
Co-authored-by: JB Onofré <jbonofre@apache.org>
The Ataccama converter in apache/ossie-converters tags its custom extensions with the ATACCAMA vendor name, which needs to be available on OssieVendor before the converter can resolve it against this package.
Summary
This PR adds
ATACCAMAamong known vendors to the python models and to the specification examples. We are in process of introducing Ataccama convertor, which will expose its custom extension.Related Issues
None
Checklist
Specification
core-spec/and follow the existing structureOntology
N/A
Converters
Convertor PR will be created soon, however there is a light dependency on the model change.
Validation
N/A
Documentation
N/A: some vendors are mentioned in the docs, but there doesn't seem to be a need to enumerate all
Examples
examples/are added or updated for any new spec constructs (no new constructs)Tests
pytest/ CI green)Compliance
NOTICEand/orLICENSEhave been updated per ASF policy (no such code)