Skip to content
This repository has been archived by the owner on Sep 23, 2024. It is now read-only.

Limited column type support #56

Open
adnan-shahpurwala opened this issue Aug 17, 2021 · 1 comment
Open

Limited column type support #56

adnan-shahpurwala opened this issue Aug 17, 2021 · 1 comment
Labels
help wanted Extra attention is needed

Comments

@adnan-shahpurwala
Copy link

Why can't we use the different datatypes supported by postgres?
I'm trying to insert a column of type "arrays" but they always get changed to "jsonb"

Could it be as simple as modifying the function target_postgres.db_sync.column_type? If no, why?

@adnan-shahpurwala adnan-shahpurwala added the help wanted Extra attention is needed label Aug 17, 2021
@adnan-shahpurwala
Copy link
Author

adnan-shahpurwala commented Aug 17, 2021

More context: This is my schema and dummy data:

schema = {
	'properties': {
		'id': {'type': 'string', 'key': True},
		'relative_position': {'type': 'array', 'items': {'type': 'number'}, 'key': False},
	}
}

# Rows/Docs to dump
rows = [
    {'id': 'a', 'relative_position': (0, 1, 2)},
    {'id': 'b', 'relative_position': (0, 1, 2)},
]

However, when I run the pipeline on dummy data, this is what I see in postgres:

image

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
help wanted Extra attention is needed
Projects
None yet
Development

No branches or pull requests

1 participant