Got a question about adding a user config for pref...
# singer-target-development
h
Got a question about adding a user config for prefixing table names in SQL targets that uses the SDK (a number of other targets have this), so I’m thinking about where it would make most sense to set it. My initial instinct is to do it in the init of the SQLSink so as to get it out of the way, but there is not a lot of code in the init, and there might be a reason. In any case, this is perhaps of general interest for the SDK as well? I imagine it is something that could be generic as it is basically a mapping.
k
The simplest supported approach would be to alias the stream using Inline Stream Maps 🙂
Otherwise, overloading the
SQLSink.table_name
property to mutate the name by checking for a map in
self.config
would also work.
h
Ok, we are on the same page then. Maps are so often the answer for people deep in the meltano ecosystem, but I don’t like it as an entry point for casual users or as a solution for simple and common issues.