-
Notifications
You must be signed in to change notification settings - Fork 70
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
feat: define a maxLength limit for varchar at the connector level #1812
Comments
This was solved in target-snowflake in MeltanoLabs/target-snowflake#68. That has some logic specific to target-snowflake so using something like Edgar suggested in MeltanoLabs/target-snowflake#68 (comment) would probably be best for the SDK. |
This has been marked as stale because it is unassigned, and has not had recent activity. It will be closed after 21 days if no further activity occurs. If this should never go stale, please add the |
That's not it, since that's for taps. This is for targets, and a little more involved so punting to a later milestone. |
One thing I have run into with SQL Server is that Primary Keys and Foreign Keys of a table cannot be larger that 900 bytes. Which means you really have two max length checks. The other thing I would point out is JSONSchema validates on character length while SQL Server is validating on size in bytes. Here is link to Microsoft's remark about byte size vs character length. https://learn.microsoft.com/en-us/sql/t-sql/data-types/char-and-varchar-transact-sql?view=sql-server-ver16#remarks |
This will be made easier IMHO after #2732 lands, and this is still planned for 0.43.0 |
Originally raised in slack https://meltano.slack.com/archives/C01TCRBBJD7/p1688652938423919
The meltanolabs target-snowflake was throwing an error because its accepting the max length
4294967295
from the schema message as the varchar length which is larger than what snowflake accepts16777216
. It looks like currently we just pass that value through to sqlalchemy with no validation to limit it from being too large and ultimately the DDL fails.I'm going to fix it in target-snowflake but it does feel like something that should be handled by the SDK because its going to be relevant for most ever target. If we had a property method that needed to be implemented or a default class property that could be overridden. Another thing that might be worth checking out is if the sqlalchemy dialect package could tell us this generically somehow.
The text was updated successfully, but these errors were encountered: