You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Sep 23, 2024. It is now read-only.
Describe the bug
An incoming value of "" gets sent to the database as NULL. In most cases this isn't a big deal (though it's not technically correct...) but we have a table where a field containing empty strings is part of the PK, so the value sent to Postgres can't be NULL. (Our source in this case is MySQL but I don't think that actually matters.)
To Reproduce
Steps to reproduce the behavior:
Create a table in MySQL with a varchar not null in the PK, e.g.
CREATE TABLE EmptyStringTest (x int NOT NULL, y varchar(10) NOT NULL, PRIMARY KEY (x,y))
Add a row where the varchar column in the PK is the empty string
INSERT INTO EmptyStringTest VALUES(1, '')
Setup and run a pipeline from MySQL to Postgres
Execution will fail with a "column cannot be null" error
This doesn't seem to be a problem with columns that are not part of a PK as they seem to be created as nullable in the target even if they're declared NOT NULL in the source.
Expected behavior
The value inserted in PG should be an empty string
Environment
Version of target: github latest
Version of python 3.8
Meltano latest
The text was updated successfully, but these errors were encountered:
Describe the bug
An incoming value of "" gets sent to the database as NULL. In most cases this isn't a big deal (though it's not technically correct...) but we have a table where a field containing empty strings is part of the PK, so the value sent to Postgres can't be NULL. (Our source in this case is MySQL but I don't think that actually matters.)
To Reproduce
Steps to reproduce the behavior:
This doesn't seem to be a problem with columns that are not part of a PK as they seem to be created as nullable in the target even if they're declared NOT NULL in the source.
Expected behavior
The value inserted in PG should be an empty string
Environment
The text was updated successfully, but these errors were encountered: