Conversation
Push things like auth methods / CSV locations down into sub-objects and accept either set of fields with `oneOf`. Note this isn't complete yet, as we need to figure out how to migrate existing configuration or how to get the data sources to accept/store multiple versions of the config schema. CU-1mz7fdd
Instead of writing a config migration interface for data sources, punt on it and get the CSV data source to attempt to migrate the parameters when it's initialized (see if they have `url` or `s3_object, ...` at toplevel and push them down into a separate `connection` object). We still flatten these back when initializing the FDW, as PostgreSQL only lets us pass a key-string value map (`OPTIONS ...`).
Use a similar hack to the CSV plugin (if the `secret` object doesn't exist, convert it before the JSONSchema validation and unpack it back when we're passing FDW params). #1mz7fdd
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Fixes to JSONSchemas for Socrata, Snowflake and CSV in S3.
CSV and Snowflake now have a changed JSONSchema (some credentials are pushed down into a separate object for better
oneOfergonomics), so added a compatibility layer to their__init__that lets them accept both old and new JSONSchemas. For example, the CSV plugin will accept both:{ "s3_endpoint": "objectstorage:9000", "s3_secure": false, "s3_bucket": "test_csv", "delimiter": "," }and
{ "delimiter": ",", "connection": { "connection_type": "s3", "s3_endpoint": "objectstorage:9000", "s3_secure": false, "s3_bucket": "test_csv", }, }This will let us kick down the road the problem of figuring out migrations for these configs.
Also, some minor stylistic fixes to other JSONSchemas (delete useless
nulltype, addminimum/maximum).CU-1gh1c5k