-
Notifications
You must be signed in to change notification settings - Fork 72
New issue
Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? # to your account
feat: add ability to perform comprehensions in stream maps #2002
Comments
Hey @haleemur! Thanks for logging. Do you know if there are any significant downsides to using the For example, drastic performance penalties? I'm more confident about catching regressions in common expressions since we have tests for those but the project's currently lacking performance regression tests. |
Thank you @edgarrmondragon. I'll take a stab at writing out some performance tests this weekend. My initial draft turned out a little more complicated than i had assumed. the current way that type hints are provided (i.e. wrapping the transforming expression in an This makes it unwieldy to type out complex expressions (makes us increase complexity), which harm programmer ergonomics as well as performance. for example:
It would be nice to instead get the programmer to specify the resulting type explicitly in the tap config. |
Was reading the simple-eval docs, and it is mentioned
Meltano SDK currently does not do this, and I think this optimization is going to benefit stream map performance immensely. |
Feature scope
Taps (catalog, state, stream maps, tests, etc.)
Description
It would be helpful to have a way to parse out specific information from json fields. Currently my team is working on an integration where some information in an array of objects are considered too sensitive to bring into the data warehouse.
For instance, if a field
custom_fields
in streamtest_data
contains the json object[{"key": "a", "value": 1}, {"key": "b", "value": 2}, {"key": "c", "value": 10}]
, and the fieldsb
&c
are deemed sensitive and should not be brought into the data warehouse, then the following stream map definition would be ideal.however this is not currently possible, it fails with the error
Adding support for this should be fairly easy.
simpleeval
supports compound types through theEvalWithCompoundTypes
class.I believe the following changes would have to be made in
mapper.py
The text was updated successfully, but these errors were encountered: