Skip to content

[HUDI-9528] Support database and table name for Glue/ Datahub catalog #13424

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

Open
wants to merge 6 commits into
base: master
Choose a base branch
from

Conversation

vineethNaroju
Copy link

Change Logs

Added separate configs for glue and datahub to set database/table name in sync client.

Impact

Hudi database/table name can be configured for glue/datahub catalog separately.

Risk level (write none, low medium or high below)

If medium or high, explain what verification was done to mitigate the risks.

Documentation Update

hoodie.datasource.meta.sync.glue.database_name: "database"
hoodie.datasource.meta.sync.glue.table_name: "table"

hoodie.meta.sync.datahub.database.name: "database"
hoodie.meta.sync.datahub.table.name: "table"

Contributor's checklist

  • Read through contributor's guide
  • Change Logs and Impact were stated clearly
  • Adequate tests were added if applicable
  • CI passed

vineethNaroju and others added 2 commits May 31, 2025 12:25
Signed-off-by: Vineeth N. <37555814+vineethNaroju@users.noreply.github.com>
@github-actions github-actions bot added the size:S PR with lines of changes in (10, 100] label Jun 12, 2025
@vineethNaroju vineethNaroju force-pushed the hudi-oss-custom-db-table-name branch from 62c0823 to 505deb9 Compare June 12, 2025 16:32
@vineethNaroju vineethNaroju marked this pull request as ready for review June 12, 2025 16:34
@github-actions github-actions bot added size:M PR with lines of changes in (100, 300] and removed size:S PR with lines of changes in (10, 100] labels Jun 12, 2025
@vinishjail97
Copy link
Contributor

https://issues.apache.org/jira/browse/HUDI-9528
@vineethNaroju Use this JIRA for your PR.

@vineethNaroju vineethNaroju changed the title Support database and table name for Glue/ Datahub catalog [HUDI-9528] Support database and table name for Glue/ Datahub catalog Jun 19, 2025
@vineethNaroju
Copy link
Author

@hudi-bot run azure

@hudi-bot
Copy link

CI report:

Bot commands @hudi-bot supports the following commands:
  • @hudi-bot run azure re-run the last Azure build

@danny0405
Copy link
Contributor

danny0405 commented Jun 26, 2025

Added separate configs for glue and datahub to set database/table name in sync client.

@vineethNaroju can you explain why we need a new options key for the db/table name even though the existing options already work?

Copy link
Contributor

@danny0405 danny0405 left a comment

Choose a reason for hiding this comment

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

block to wait for some clarifications.

@vinishjail97
Copy link
Contributor

vinishjail97 commented Jun 26, 2025

Added separate configs for glue and datahub to set database/table name in sync client.

@vineethNaroju can you explain why we need a new options key for the db/table name even though the existing options already work?

@danny0405 We support database/table names being different for other catalogs/metastores like BigQuery for example. The restriction for user right now is that for Glue/DataHub, it always gets created with hoodie.table.name
https://github.com/apache/hudi/blob/master/hudi-gcp/src/main/java/org/apache/hudi/gcp/bigquery/BigQuerySyncConfig.java#L83

@danny0405
Copy link
Contributor

it always gets created with hoodie.table.name

@vinishjail97 I have no access to the link, I see there are already some options like hoodie.gcp.bigquery.sync.table_name in the BigQuerySyncConfig on master:

public static final ConfigProperty<String> BIGQUERY_SYNC_TABLE_NAME = ConfigProperty

@vineethNaroju
Copy link
Author

it always gets created with hoodie.table.name

@vinishjail97 I have no access to the link, I see there are already some options like hoodie.gcp.bigquery.sync.table_name in the BigQuerySyncConfig on master:

public static final ConfigProperty<String> BIGQUERY_SYNC_TABLE_NAME = ConfigProperty

Yes, we want to have similar config for glue and datahub catalog.

@danny0405
Copy link
Contributor

Yes, we want to have similar config for glue and datahub catalog.

That's okay, can we add similiar inference logic just in the config option so that we only need to change the specific sync tool:

public static final ConfigProperty<String> BIGQUERY_SYNC_TABLE_NAME = ConfigProperty
      .key("hoodie.gcp.bigquery.sync.table_name")
      .noDefaultValue()
      .withInferFunction(cfg -> Option.ofNullable(cfg.getString(HOODIE_TABLE_NAME_KEY))
          .or(() -> Option.ofNullable(cfg.getString(HOODIE_WRITE_TABLE_NAME_KEY))))
      .markAdvanced()
      .withDocumentation("Name of the target table in BigQuery");

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
size:M PR with lines of changes in (100, 300]
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants