If you currently maintain or are planning to devel...
# singer-target-development
e
If you currently maintain or are planning to develop a SQL target, this might be of interest: I got a PR that tries to improve the way SQL target developers can customize the mapping from JSON schema to SQL types: meltano/sdk#2732. I've also started work on a reference implementation for MeltanoLabs/target-postgres: MeltanoLabs/target-postgres#469. Questions and suggestions are of course welcome!
🙌 4
v
I can put this in the PR but I think it's off topic a bit
NOTYPE
Is a valuable construct I think as it allows folks to take some json format they are struggling to get into their target (or they could do this for everything) and map it to something that just trys to convert us to a string. See https://github.com/MeltanoLabs/target-postgres/blob/422286df28b55184ed8f0535327007b5c246b17f/target_postgres/connector.py#L264C20-L264C26 and the NoType, SqlAlchemy type here https://github.com/MeltanoLabs/target-postgres/blob/422286df28b55184ed8f0535327007b5c246b17f/target_postgres/connector.py#L857-L879
Another one is allowing configuration to override the type mappings is very useful is some situations like if you want numbers to be Decimals or something (I can list out the use cases it'll just take me too much time right now) See the list here https://github.com/MeltanoLabs/target-postgres?tab=readme-ov-file#data-types
Generating the Readme for datatype mappings from this function see the readme here https://github.com/MeltanoLabs/target-postgres?tab=readme-ov-file#data-types
e
NOTYPE
Is a valuable construct I think as it allows folks to take some json format they are struggling to get into their target (or they could do this for everything) and map it to something that just trys to convert us to a string.
Yup, the PR doesn't get rid of that. I want (at some point) to add snapshot tests to stuff in MeltanoLabs to safeguard a bit more against regressions in things like discovery and, in the case of target-postgres, SQL schema generation.
Another one is allowing configuration to override the type mappings is very useful is some situations like if you want numbers to be Decimals or something (I can list out the use cases it'll just take me too much time right now) See the list here
Yeah, since the new API is just a class it's really easy to subclass it and accept arbitrary init args from the target.
Generating the Readme for datatype mappings from this function see the readme
That's a good one, I'll see if it needs updates though I think not
âž• 1