Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

doc: Datatype documentation #234

Merged
merged 1 commit into from
Nov 28, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
66 changes: 66 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -149,3 +149,69 @@ meltano invoke target-postgres --version

See the [dev guide](https://sdk.meltano.com/en/latest/dev_guide.html) for more instructions on how to use the Meltano SDK to
develop your own Singer taps and targets.

## Data Types

The below table shows how this tap will map between jsonschema datatypes and Postgres datatypes.

| jsonschema | Postgres |
|--------------------------------|-----------------------------------------|
| integer | bigint |
| UNSUPPORTED | bigserial |
| UNSUPPORTED | bit [ (n) ] |
| UNSUPPORTED | bit varying [ (n) ] |
| boolean | boolean |
| UNSUPPORTED | box |
| UNSUPPORTED | bytea |
| UNSUPPORTED | character [ (n) ] |
| UNSUPPORTED | character varying [ (n) ] |
| UNSUPPORTED | cidr |
| UNSUPPORTED | circle |
| string with format="date" | date |
| UNSUPPORTED | double precision |
| UNSUPPORTED | inet |
| UNSUPPORTED | integer |
| UNSUPPORTED | interval [ fields ] [ (p) ] |
| UNSUPPORTED | json |
| array; object | jsonb |
| UNSUPPORTED | line |
| UNSUPPORTED | lseg |
| UNSUPPORTED | macaddr |
| UNSUPPORTED | macaddr8 |
| UNSUPPORTED | money |
| number | numeric [ (p, s) ] |
| UNSUPPORTED | path |
| UNSUPPORTED | pg_lsn |
| UNSUPPORTED | pg_snapshot |
| UNSUPPORTED | point |
| UNSUPPORTED | polygon |
| UNSUPPORTED | real |
| UNSUPPORTED | smallint |
| UNSUPPORTED | smallserial |
| UNSUPPORTED | serial |
| string without format; untyped | text |
| string with format="time" | time [ (p) ] [ without time zone ] |
| UNSUPPORTED | time [ (p) ] with time zone |
| string with format="date-time" | timestamp [ (p) ] [ without time zone ] |
| UNSUPPORTED | timestamp [ (p) ] with time zone |
| UNSUPPORTED | tsquery |
| UNSUPPORTED | tsvector |
| UNSUPPORTED | txid_snapshot |
| UNSUPPORTED | uuid |
| UNSUPPORTED | xml |

Note that while object types are mapped directly to jsonb, array types are mapped to a jsonb array.

If a column has multiple jsonschema types, the following order is using to order Postgres types, from highest priority to lowest priority.
- ARRAY(JSONB)
- JSONB
- TEXT
- TIMESTAMP
- DATETIME
- DATE
- TIME
- DECIMAL
- BIGINT
- INTEGER
- BOOLEAN
- NOTYPE
Loading