Comments (5)
Hey @sibis thanks for wanting to contribute and sorry for the delay in getting back to you!
Yes, we want to make the system transformers into an enum so that they're typed. We have sections in our codebase where we are hardcoding a system transformer and we want to type those fields. For example, here,
for _, col := range cols {
if col.Transformer != nil && col.Transformer.Source != "" && col.Transformer.Source != "passthrough" && col.Transformer.Source != "generate_default" {
we want to update this:
col.Transformer.Source != "passthrough"
to something like:
col.Transformer.Source != systemTransformer.Passthrough
There are a few other instances (particularly in our tests) where this occurs. I think the majority of them will be the "Passthrough" transformer but there could be others as well.
So this will require creating an enum in the protos file and then updating any instances where we're hardcoding those system transformers with the reference to the enum.
@nickzelei anything else to add in here?
from neosync.
Hi @sibis - sorry I missed this thread here.
I think the property is called source
now, for the jobmappingtransformer message
https://github.com/nucleuscloud/neosync/blob/main/backend/protos/mgmt/v1alpha1/job.proto#L131
This is just a string, but my thinking is that it can be made into a proto enum.
This (at least today) corresponds 1:1 with the source key for SystemTransformer
https://github.com/nucleuscloud/neosync/blob/main/backend/protos/mgmt/v1alpha1/transformer.proto#L82
The worker process that processes the transformers when it turns them into a sync config uses a big switch statement and cases off of those string values:
https://github.com/nucleuscloud/neosync/blob/main/worker/pkg/workflows/datasync/activities/activities.go#L624
Ideally, I'd like this to be more statically typed instead of just strings so that we're not passing around string values everywhere.
If the JobMappingTransformer is user defined (meaning: custom) the source is custom
today.
from neosync.
Awesome! Will check it out.
from neosync.
Hello @evisdrenova 👋
I'd like to take this up, but I need some clarification on what exactly needs to be changed.
Could you please provide more details on the specific changes expected? For instance, are we looking to create an enum for different types of system transformers, or is there something else that needs to be addressed in the proto file?
Any additional information or examples would be of great help.
from neosync.
Thanks a lot for the detailed explanation, @nickzelei and @evisdrenova. I have made changes to the PR.
from neosync.
Related Issues (20)
- Error on making Connections HOT 2
- [NEOS-763] Update postgres init statement to handle correct types
- [NEOS-766] Add support for transforming array datatypes
- Error when running make compose-up HOT 5
- [NEOS-767] Beef up worker logs
- [NEOS-775] Update mutations to handle non-standard column names
- [NEOS-785] support PascalCase table names
- [NEOS-787] check that pascal cased schema names don't throw errors
- [NEOS-790] Expand Neosync Schema Creation/Sync Capabilities
- [NEOS-794] Setting Job WorkflowOptions does not update schedule after job creation
- [NEOS-795] update schema and table subset query validation to check for database
- Wrong path in Helm Chart HOT 4
- [NEOS-807] Neosync doesnt surface when a job times out HOT 1
- make: *** [compose-up] Error 125 HOT 1
- [NEOS-838] skeletons need to be reviewed for layout and updated
- [NEOS-840] Using the connection clone doesn't seem to copy over all connection information
- [NEOS-856] Add job id to schedule so runs spawn with job id
- [NEOS-862] Add backend middleware to gracefully recover from nil pointers
- [NEOS-863] Add nil pointer recovery support to worker
- [NEOS-870] Investigate upper case column issues
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from neosync.