kazanzhy / kafka-connect-transform-record2row Goto Github PK
View Code? Open in Web Editor NEWLicense: Apache License 2.0
License: Apache License 2.0
This SMT seems super helpful, I was surprised something like this didn't exist already. However, there is one issue I have with it right now that would require some workarounds to bring our data into a nice shape.
Before the field value is converted to JSON, you wrap it with a struct first, which would transform a field called "nested" with a value like the following
{
"obj": { "a": "foo", "b": "bar" },
"arr": [1, 2, 3]
}
into the string value
"{\"nested\":{\"obj\":{\"a\":\"foo\",\"b\":\"bar\"},\"arr\":[1,2,3]}}"
that gets written back to the nested
field in the output record. When this data now gets inserted into e.g. a Postgres JSONB column, I'd have to query the obj.a
value like this:
SELECT nested -> 'nested' -> 'obj' -> 'a' FROM table;
That seems like unnecessary duplication to me and is a little unergonomic for the user. It would be nicer if they could just write
SELECT nested -> 'obj' -> 'a' FROM table;
Thus, an option to skip the struct-nesting step of the transformation would be much appreciated. I might give implementing it myself a go if that's welcome.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.