I’m surprised to see there’s no mapper plugin for ...
# plugins-general
r
I’m surprised to see there’s no mapper plugin for snake casing all properties (as most databases won’t allow arbitrary symbols). Would this be useful to others if I were to make this publicly available (or contribute to an existing mapper repo)?
p
yes that would be nice
1
theoretically targets should coerce the names to something they support but thats hard to do and we've struggled to come up with the best way to generically conform table/column names
I built this generic mapper https://github.com/pnadolny13/mapper-generic with the goal of helping others not reimplement new mappers for each new transformation they need to do. Its pretty new/hacky but it accepts a script that implements the mapper methods so you dont need a whole new mapper, just your custom script
👍 2
r
Nice one, I had come across that repo! I’ll quickly use this to get myself started, then transition to a repo with some pre-built general purpose transformations. It’d be a shame for each target to have to implement the same transformations (there’ll be overlap). Feels against the Unix way of each program doing a small thing well. Will update when I make progress
Finally got around to writing a mapper for standard out-of-the-box key and value transformations. Mostly for sanitizing fields and changing keys to suit targets (eg from camel case to snake case): https://github.com/rubenvereecken/map-sanitize/blob/main/map_sanitize/mapper.py What would be the steps to get this published to the Meltano Hub?
r
Fork https://github.com/meltano/hub, add a definition in
_data/meltano/mappers
and make a PR back.
1
r
Thanks @Reuben (Matatika)!
❤️ 1