Skip to content

feat(input-mapping): AJDA-2714 read description from table definition - #533

Merged
odinuv merged 1 commit into
mainfrom
odin/AJDA-2714
Jun 29, 2026
Merged

feat(input-mapping): AJDA-2714 read description from table definition#533
odinuv merged 1 commit into
mainfrom
odin/AJDA-2714

Conversation

@odinuv

@odinuv odinuv commented Jun 25, 2026

Copy link
Copy Markdown
Member

Link to issue

https://linear.app/keboola/issue/AJDA-2714/input-mapping-read-description-primarily-from-table-definition

Description

Input Mapping now exposes the table/column description from the native first-class definition field in the table manifest, and adds a new first-class schema node mirroring the output-mapping schema shape.

ManifestCreator::writeTableManifest adds two native-sourced fields (purely additive — the legacy columns/column_metadata/metadata structures are left untouched):

  • description (top-level): taken from definition.description; omitted when absent/empty.
  • schema: one entry per selected column with name, data_type (base + the table's actual backend type, including length/default when present), nullable, primary_key, and the native description. Emitted for both typed and non-typed tables (non-typed columns simply omit data_type/nullable); a table with no definition serializes an empty schema: [].

Key decisions:

  • Native is the only source for the new fields. Description fallback is not resolved by Input Mapping — the legacy KBC.description metadata is left intact and Connection backfills the native description into it, so consumers without native support keep working. This also avoids having to pick a winner among multiple multi-provider KBC.description records.
  • No schema[].metadata — it would require collapsing multiple metadata records into a single map (lossy/ambiguous). Raw records stay in the untouched column_metadata.
  • Single backenddata_type reflects the table's actual backend only (base + that one backend), matching the real state of the table.

Justification

Native description is now a first-class field on table/column definitions in Storage. See the linked Linear issue.

Plans for Customer Communication

None.

Impact Analysis

Additive change to the table manifest only (new description and schema keys; every manifest now also carries schema, empty when there is no definition). No existing manifest fields change, so current consumers are unaffected. Not gated by a feature flag.

Deployment Plan

Release a tagged version.

Rollback Plan

Revert this PR.

Post-Release Support Plan

None.

@linear

linear Bot commented Jun 25, 2026

Copy link
Copy Markdown

AJDA-2714

@odinuv
odinuv requested review from kudj and zajca June 25, 2026 18:44
@odinuv

odinuv commented Jun 25, 2026

Copy link
Copy Markdown
Member Author

@kudj Chystaná změna input manifestu na komponentě - kvůli přidání description, současně přidává i schema v co nejpodobnějším tvaru jako je na output mappingu.

@zajca zajca 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.

Přijde mě to cajk nenapadá mě kde by to mohlo zhučat, necháme sa překvapit.

@soustruh

Copy link
Copy Markdown

LGTM ദ്ദി(•ᴗ•)

@odinuv
odinuv requested a review from ondrajodas June 29, 2026 07:38
@odinuv
odinuv marked this pull request as ready for review June 29, 2026 12:29

@keboola-pr-reviewer-bot keboola-pr-reviewer-bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Verdict: needs_human (risk 3/5) · profile ajda

This PR makes an ungated, observable behavior change to platform-libraries (input-mapping), which AJDA policy treats as load-bearing.

Concerns:

  • libs/input-mapping/src/Helper/ManifestCreator.php: Ungated observable change in platform-libraries: every manifest now serializes schema, visible to all consumers.
  • libs/input-mapping/src/Configuration/Table/Manifest.php: New schema and description nodes added to manifest config with no feature-flag gate.

@odinuv

odinuv commented Jun 29, 2026

Copy link
Copy Markdown
Member Author

Docs PR keboola/developers-docs#400

@ondrajodas ondrajodas left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

🤞

->prototype('array')
->children()
->scalarNode('name')->isRequired()->end()
->variableNode('data_type')->end()

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

na OM to je trochu striktnější ten data_type kde validujeme i jeho obsah

@odinuv odinuv Jun 29, 2026

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

nj, to je pravda - ale to bych tu musel zavést, že existuje snowflake a bigquery a na to mě ta validace nepřijede natolik důležitá (jakože tady se ten manifest jen produkuje) kvůli tomu zanášet takovou závislost

@odinuv
odinuv merged commit 817ea7d into main Jun 29, 2026
84 of 86 checks passed
@odinuv
odinuv deleted the odin/AJDA-2714 branch June 29, 2026 14:24
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.

5 participants