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

Extractor attributes and "dumb" extractors #193

Open
andrus opened this issue Sep 2, 2021 · 0 comments
Open

Extractor attributes and "dumb" extractors #193

andrus opened this issue Sep 2, 2021 · 0 comments

Comments

@andrus
Copy link
Contributor

andrus commented Sep 2, 2021

I recently wrote a non-open source extractor (and a matching connector) that generates a stream of data by listing S3 bucket contents. S3 object keys are parsed by a stage listener into a set of columns that match the target DB object properties (this required a new @AfterSourceRowsExtracted annotation per #192).

However this change confuses RowConverter in its attempt to "normalize" the columns. If no explicit attributes are defined in the extractor, it tries to match S3 object attributes to the target entity (this is a meaningless operation, and for coincidentally overlapping names it tries to do type conversions!). If transformed attributes are defined in the extractor XML, they are incorrectly applied to the source S3 columns.

I think the problem here is in the implicit assumption in the RowConverter is that the Extractor is flexible enough to produce attributes that are close enough to the target structure. This works for JDBC extractor, that allows SQL scripting in the XML, but does not work for the S3 extractor.

To solve this we may possibly need an extra processing stage, and / or the ability to redefine RowAttribute[] dynamically from stage to stage.

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

No branches or pull requests

1 participant