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

Redshift generates text fields that are too small #423

Open
JasonSanDiego opened this issue May 21, 2020 · 2 comments
Open

Redshift generates text fields that are too small #423

JasonSanDiego opened this issue May 21, 2020 · 2 comments
Labels
bug Something isn't working

Comments

@JasonSanDiego
Copy link

When syncing from MySQL to Redshift, a table with varchar >256 leads to a varchar(256) in Redshift, leading to errors in Redshift like:

Value too long for type character varying(256)

For example, my MySQL table has a varchar(500) but pipelinewise (really the underlying Singer target) only generates a varchar(256).

I was able to workaround this by manually changing the size to varchar(500).

@JasonSanDiego
Copy link
Author

I did some digging around and it looks like the Redshift target is fully custom to Pipelinewise. It looks totally different from the official Singer Redshift target. I also saw that the default length of characters is supposed to be 10K chars. So, I'm not sure why all of my text fields are 256 by default, and not expanding as needed.

Perhaps, the MySQL tap isn't generating the right properties file? How custom is that tap relative to the official Singer one?

@koszti
Copy link
Contributor

koszti commented May 28, 2020

You're right, target-redshift is written from scratch for PPW but as far as I know there is no official open source target-redshift connector by Singer. There is a target-redshift connector written by DataMill: https://github.com/datamill-co/target-redshift , but there are certain differences in the two implementations, for example denesting objects, or adding new columns.

Regarding your issue I think this seems to be a bug in the mysql-to-redshift fastsync. Fastsync and target-redshift column mappings should be in sync but seems like it's not the case. But fixing it looks relatively straightforward:

Colum mapping:

@louis-pie louis-pie added the bug Something isn't working label Aug 19, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

3 participants