Skip to content

Conversation

@cyrixsimon
Copy link

@cyrixsimon cyrixsimon commented Oct 30, 2025

Summary:
This PR adds support for optionally specifying a schema in ExportSource::Table and ImportBuilder.
Previously, table names were always unqualified, which caused issues when working with multiple schemas or when the default schema was not sufficient.

Changes:

  • Updated ExportSource::Table to accept an optional schema (e.g. Option<&str>).
  • Adjusted ImportBuilder to include the schema if specified, resulting in queries like SCHEMA.TABLE instead of just TABLE.
  • Ensured backward compatibility — if no schema is provided, behavior remains unchanged.

Closes #40

Copy link
Owner

@bobozaur bobozaur left a comment

Choose a reason for hiding this comment

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

Thanks for the PR!

Looking at this, I think I'd rather take a slightly different approach.

Instead of a single constructor (ExportBuilder::new), let's have two separate ones, new_from_table and new_from_query.

This way, consumers don't have to deal with ExportSource and that can be made internal only and removed from the public API. It would also allow the ExportSource::Table variant to be a struct variant instead of a tuple variant, as that would increase clarity a bit.

The rest would pretty much remain the same.

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.

Add optional schema support for ExportSource::Table and ImportBuilder

2 participants