1. Is there a way to somehow manipulate the column...
# best-practices
c
1. Is there a way to somehow manipulate the column type of the table created by target-postgres? And is this a good practice? a. I would like to store blockchain addresses like
0x67cD25747494b5C8afaD60160186078b7A0625ee
or
0x0000000000000000000000000000000000000000
as a
bytea
instead of a string. b. I would like the
chain
field I have to be something like a postgresql
type
or
domain
to be more space efficient c. I would like some big numbers to be represented as pg
numeric
instead of text or int d. Some smaller numbers could benefit from the pg
smallint
type e. Maybe the idea is to create the data table ahead of time? In that case is there a way to forbid tap-postgres to create the tables itself? (to make sure the table is created) 2. Is there a way to have multiple primary key in the target column? And is this a good practice?
e
Hi Clement! Would something like https://github.com/meltano/sdk/issues/2102 help?
c
omg yes!
anything I can do to land this?
e
The spec is still not decided so any thoughts, ideas, suggestions, experiments, specific requests or anything really, are welcome in the issue!
c
ah, I was thinking of a much smaller timeframe tbh
e
I'd be happy to discuss the implementation details in a PR too 🙂
c
If meltano's devs are happy with the proposal, I would gladly contribute to an implementation
c
A simpler fix would be something like the datamill target-postgres https://hub.meltano.com/loaders/target-postgres--datamill-co/#before_run_sql-setting
or, but specific to my case, support the contentEncoding of jsonschema https://json-schema.org/understanding-json-schema/reference/non_json_data#contentencoding even though relying on jsonschema is not quite right as what's a good format for transport might not be the best format for storage
this solution looks somewhat extensible to column types too https://hub.meltano.com/loaders/target-postgres--transferwise/#schema_mapping-setting