Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

misc(spark-job-iceberg-data-export)Assign correct NULL/NOT NULL type to columns in Iceberg Data Export S… #1721

Merged
merged 3 commits into from
Feb 27, 2024

Conversation

nikitag55
Copy link
Contributor

@nikitag55 nikitag55 commented Feb 26, 2024

…chema

Pull Request checklist

  • The commit(s) message(s) follows the contribution guidelines ?
  • Tests for the changes have been added (for bug fixes / features) ?
  • Docs have been added / updated (for bug fixes / features) ?

Current behavior :

Currently, Iceberg Schema contains all columns as NULL type by default.

New behavior :

Assign correct NULL, NOT NULL to columns in Iceberg Schema for data export/

Changes to update the Iceberg Schema for Data Export are as follows:

  • In conf file, update label-column-mapping to also specify for eg: workspace column to be NULL or NOT NULL and determine equivalent StructType true or false dynamically for creating the schema.
        "label-column-mapping": [
         "_ws_", "workspace", "NOT NULL",
         "_ns_", "namespace", "NOT NULL"
        ]

  1. For all the other fixed columns in Iceberg Schema for data export, assign the correct NOT NULL type to some columns and also update the equivalent StructType defining the schema.

alextheimer
alextheimer previously approved these changes Feb 26, 2024
@nikitag55 nikitag55 merged commit d950f32 into develop Feb 27, 2024
1 check passed
@nikitag55 nikitag55 deleted the export_iceberg_column_changes branch February 27, 2024 17:55
alextheimer pushed a commit to alextheimer/FiloDB that referenced this pull request Mar 13, 2024
…to columns in Iceberg Data Export S… (filodb#1721)

* Assign correct NULL/NOT NULL type to columns in Iceberg Data Export Schema

* remove false/true value from labelColumn Mapping and determine it dynamically

* minor refactor
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.

2 participants