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

Provide a way to reflect modification on the ScalarDB side to the Analytics side #28

Open
choplin opened this issue Aug 30, 2023 · 0 comments
Labels
enhancement New feature or request schema-importer

Comments

@choplin
Copy link
Collaborator

choplin commented Aug 30, 2023

Description

When the database objects, including extensions, foreign data wrappers, user mappings, foreign tables, and views, already exist in the database, schema-importer skips to create them with IF NOT EXISTS for now. So, running schema-importer multiple times on the same database is fine.

However, this means that altering tables on the ScalarDB side will not be reflected on the Analytics side. The same goes for deleting a table. It would be better for users if we could provide a way to reflect such modifications to the Analytics side.

Possible approaches

The most efficient but complex approach to address this is to compare the schema between the ScalarDB side and the Analytics side, and if we find the differences, reflect them on the Analytics side.

A simpler way is to delete all database objects on the Analytics side and re-run the import process. This would be fine because the database objects created by schema-importer are stateless.

In conclusion, we will go with the second way, delete all and re-import, at first.

@choplin choplin added the enhancement New feature or request label Aug 30, 2023
@choplin choplin self-assigned this Aug 30, 2023
@choplin choplin removed their assignment Aug 30, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request schema-importer
Projects
None yet
Development

No branches or pull requests

1 participant