Skip to content

FND-3858: add pyatlan_v9 creators for the 5 Salesforce asset types - #1085

Open
cmgrote wants to merge 1 commit into
mainfrom
FND-3858
Open

cmgrote wants to merge 1 commit into
mainfrom
FND-3858

Conversation

@cmgrote

@cmgrote cmgrote commented Oct 14, 2026

Copy link
Copy Markdown
Collaborator

✨ Description

Adds creator() for the 5 Salesforce asset types in pyatlan_v9: SalesforceOrganization, SalesforceObject, SalesforceField, SalesforceReport, SalesforceDashboard. The structure follows the Cognos exemplar (#1078).

org = SalesforceOrganization.creator(name="Acme", connection_qualified_name="default/salesforce/1712345678", source_id="00D5g000004XyZaEAK")
obj = SalesforceObject.creator(name="Account", api_name="Account", organization_qualified_name=org.qualified_name)
fld = SalesforceField.creator(name="Annual Revenue", api_name="Annual_Revenue__c", object_qualified_name=obj.qualified_name)
# fld.qualified_name == "default/salesforce/1712345678/00D5g000004XyZaEAK/Account/Annual_Revenue__c"
Type qualifiedName Parent relationship set
SalesforceOrganization {conn}/{source_id} none
SalesforceObject {org}/{api_name} organization
SalesforceField {object}/{api_name} object
SalesforceReport {org}/{source_id} organization
SalesforceDashboard {org}/{source_id} organization
  • Exact app parity: each creator emits the string atlan-salesforce-app emits today (FND-3838 census). A different string would re-key existing Salesforce assets.
  • The census listed 3 SalesforceObject templates (the object itself, a field's parent-object ref, a field's lookup-object refs). All 3 are the same {org}/{api_name} shape.
  • Parent-qn inputs: the child creators take the parent qualifiedName and set:
    • the denormalised organization_qualified_name / object_qualified_name
    • the parent relationship, which is requiredForCreation in the typedef
    • connection_qualified_name, derived from the parent qn when it isn't passed
  • name (the Salesforce label) and api_name are separate inputs, as in the app.
  • Blank inputs raise (validate_required_fields). A parent qn with too few segments also raises.
  • No paired models PR. The containment-derived _QUALIFIED_NAME_PATTERN already matches these shapes. A {organizationQualifiedName}/… formula would make the pattern looser. SalesforceOrganization has no pattern because it has no containment parent.
  • Report/Dashboard collision (census note): both use {org}/{id}, but a collision can't happen in practice. Salesforce ids carry a per-object key prefix (00O for reports, 01Z for dashboards).

Linear: FND-3858. The analysis table is in the issue comments.


🧩 Type of change

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

✅ How has this been tested?

  • tests_v9/unit/model/salesforce_test.py (48 tests) covers:
    • the literal app qualifiedName for each type
    • the name pattern and validate(for_creation=True)
    • missing, blank and too-short parent inputs
    • an explicit connection_qualified_name
    • the create alias
  • App vs creator: I ran 108 records through atlan-salesforce-app's own map_* functions (origin/main) and compared each against the creator output. Compared fields: qn, connection qn, connector, api_name / source_id, the denormalised qns and the parent ref qn. Result: 0 mismatches.
  • Generator fidelity: generating from models master with main's overlays reproduces main's Salesforce classes byte-for-byte. With the new overlays, only the 5 Salesforce classes change, and pre-commit makes no rewrites.
  • pytest tests_v9/unit: 7967 passed, 5 skipped.
  • tests_v9/integration/salesforce_asset_test.py is added. It creates a connection and all 5 types through the creators, retrieves each, asserts the exact qn and the parent links, then purges everything. It has not been run locally against a tenant yet.

📋 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

https://claude.ai/code/session_019fLee6iVYNyoTkguJombqF

Adds hand-written creator overlays for SalesforceOrganization,
SalesforceObject, SalesforceField, SalesforceReport and SalesforceDashboard,
and regenerates the 5 classes from atlanhq/models master with them.

Each creator emits the exact qualifiedName atlan-salesforce-app emits today
(FND-3838 census):
  Organization {conn}/{source_id}
  Object       {org}/{api_name}
  Field        {object}/{api_name}
  Report       {org}/{source_id}
  Dashboard    {org}/{source_id}

Object, Field, Report and Dashboard take the parent qualifiedName, set the
denormalised parent qns and the requiredForCreation parent relationship, and
derive connection_qualified_name from the parent when it is not given. Blank
inputs and too-short parent qns raise.

No models change: the containment-derived _QUALIFIED_NAME_PATTERN already
matches these shapes.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_019fLee6iVYNyoTkguJombqF
@linear

linear Bot commented Oct 14, 2026

Copy link
Copy Markdown

FND-3858

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

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant