Skip to content

FND-3848: add pyatlan_v9 creators for the 10 Cognos asset types - #1078

Open
sachi-atlan wants to merge 2 commits into
mainfrom
sachipatankar/fnd-3848
Open

sachi-atlan wants to merge 2 commits into
mainfrom
sachipatankar/fnd-3848

Conversation

@sachi-atlan

@sachi-atlan sachi-atlan commented Oct 14, 2026 •

Copy link
Copy Markdown

✨ Description

Adds creator() for the 10 Cognos asset types in pyatlan_v9: CognosReport, CognosDashboard, CognosExploration, CognosFile, CognosModule, CognosPackage, CognosDataset, CognosFolder, CognosDatasource, CognosColumn. This is the exemplar connector for the Fill creator gaps in pyatlan project; later connector PRs copy its structure.

CognosReport.creator(name="Quarterly Sales", connection_qualified_name="default/cognos/1712345678", cognos_id="i1A2B3C4D5E6F")
# qualified_name == "default/cognos/1712345678/report/i1A2B3C4D5E6F"
  • Exact app parity: each creator emits {connection_qualified_name}/<slug>/{cognos_id}, the string atlan-cognos-app emits today (FND-3838 census), including the dataSet2 slug for CognosDataset. A different string would re-key existing Cognos assets on every tenant.
  • Shape follows the Metabase creators: Cognos qualifiedNames are flat and id-based (the parent is not part of the name), so like MetabaseDashboard the creators take no parent; the caller sets the folder / column-parent relationship. The typedef keeps the folder requiredForCreation, so validate(for_creation=True) is unchanged.
  • Blank inputs raise (validate_required_fields).
  • CognosColumn cognos_id is the column uuid (the value its qualifiedName is keyed on). atlan-cognos-app does not set cognosId on columns today, so on adoption columns gain a cognosId value; their qualifiedName is unchanged.
  • Overlays in pyatlan_v9/model/assets/_overlays/cognos_*.py; the 10 classes are regenerated from atlanhq/models with these overlays (pkl sdkOnly=python + pre-commit, the same steps as sync-python-sdk.yaml).

Linear: FND-3848
Paired models PR: https://github.com/atlanhq/models/pull/2077 (merged); the classes here are regenerated from models master 585a201 on top of main after #1076. — adds the matching qualifiedNameFormula, which drives the regenerated _QUALIFIED_NAME_PATTERN.


🧩 Type of change

  • 🚀 New feature (non-breaking change that adds functionality)

✅ How has this been tested?

  • tests_v9/integration/cognos_asset_test.py (review follow-up): creates a Cognos connection and every Cognos type through its creator (folder, the 7 folder children with the folder link set by the caller, datasource, column under a dataset), retrieves each and asserts the exact qualifiedName, cognos_id, connector and parent link, then purges. Adds AtlanConnectorType.COGNOS, which Connection.creator needs.
  • tests_v9/unit/model/cognos_test.py (70 tests): literal app qualifiedName per type, name pattern match, validate(), missing / blank inputs, create alias.
  • Mutation check: changing the Dataset slug dataSet2 → dataset fails the parity tests.
  • Generator fidelity: generating from models master with main's overlays reproduces main's Cognos classes byte-for-byte; with the models PR branch, only the 10 Cognos classes change.
  • pytest tests_v9/unit: 7745 passed, 5 skipped. pre-commit clean on all changed files.
  • Production parity (read-only): all 9,752 Cognos assets on a production tenant match the new _QUALIFIED_NAME_PATTERN for their type (Column 9,618 · Dataset 52 · Report 43 · Folder 22 · Datasource 6 · Package 6 · Module 5); 0 do not. So the stricter pattern rejects no existing asset.
  • App vs creator: 240 records run through atlan-cognos-app's own transformers (all 10 types, every parent type, the exploration→dashboard path, ids with - _ . ~) give qualifiedNames identical to the creators.
  • The 12 failing legacy tests/integration jobs also fail on every recent run of this workflow (including the sync PRs and the merged ci: ignore anyio CVE-2026-63374 for the Python 3.9 lock entry in the Trivy gate #1074); this PR touches only pyatlan_v9.

📋 Checklist

  • My code follows the project’s style guidelines
  • I’ve performed a self-review of my code
  • There are no new warnings from my changes
  • I’ve added tests to cover my changes
  • All new and existing tests pass locally

🤖 Generated with Claude Code

@linear

linear Bot commented Oct 14, 2026

Copy link
Copy Markdown

FND-3848

@sachi-atlan
sachi-atlan marked this pull request as ready for review October 14, 2026 09:35

@Aryamanz29 Aryamanz29 left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good overall - two things:

  • could you please resolve the merge conflicts? Looks like they're just code formatting.
  • could you please also add integration tests for these creators? Assuming the typedefs are GA on the tenants, that'll confirm everything works as expected 🙏

Adds hand-written creator overlays for CognosReport, CognosDashboard,
CognosExploration, CognosFile, CognosModule, CognosPackage, CognosDataset,
CognosFolder, CognosDatasource and CognosColumn, and regenerates the classes
from atlanhq/models (the paired models change adds qualifiedNameFormula per type).

Each creator emits {connection_qualified_name}/{slug}/{cognos_id}, the exact
string atlan-cognos-app emits today (FND-3838 census), including the dataSet2
slug for CognosDataset. Cognos qualifiedNames are flat and id-based, so the
creators follow the Metabase creators: they take no parent, and the caller
sets the folder or column-parent relationship. Blank inputs raise.

tests_v9/unit/model/cognos_test.py asserts each literal app qualifiedName.
Review follow-up. tests_v9/integration/cognos_asset_test.py creates a Cognos
connection, then every Cognos type through its creator: a folder, the seven
folder children with the folder relationship set by the caller (as
atlan-cognos-app does), a datasource and a column under a dataset. It
retrieves each by guid and asserts the exact qualifiedName, cognos_id,
connector and parent relationship, then purges everything.

Connection.creator needs a connector type, and AtlanConnectorType had no
Cognos entry, so this adds COGNOS ("cognos", BI).

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

run_pyatlan_v9_integration_tests To trigger pyatlan v9 (msgspec-based) integration tests suite (name the workflow checks)

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants