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

Support transformation from data coming from pull sources #952

Open
vklimontovich opened this issue Jul 19, 2022 · 2 comments
Open

Support transformation from data coming from pull sources #952

vklimontovich opened this issue Jul 19, 2022 · 2 comments
Assignees

Comments

@vklimontovich
Copy link
Contributor

Problem

Currently, JavaScript Transformations allows to transform data coming from event stream (API Keys). Sometimes, users want to transform data coming to sources too.

While transforming data coming from sources is generally a bad idea — data is better to be processed after it got to database with a tool such as DBT — in some cases it make sense. Those cases are trivial changes, such as renaming fields and column typing. The later is something that can't be done with DBT efficiently.

Solution

All data coming from sources should go through JS engine. To distinguish data coming from events and sources, users would need to opt-in to data coming from sources by:

$.DATA_PULL_TRANSFORM=true
$.DATA_PUSH_TRANSFORM=false // to disable event transform
//transformation

Certain features can be disabled for sources transforms if it's they make implementation harder:

  • Multiplexing. There's no real use-case for that. If the transform produces multiple events, error could be thrown
  • Table routing (via $.JITSU_TABLE_NAME). It's nice to have, but not necessary. If not implemented, expression test should throw an error if the property is set
@sashayakovtseva
Copy link

+1 for this one

@absorbb
Copy link
Contributor

absorbb commented Dec 12, 2022

@sashayakovtseva
Experimental support design was added in 1.43.3

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants