Opt-in to handle errors caused by long comments on tables #9
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Allow clients to opt-in to handling long-comment tables by using a
SHOW TABLES
query. Thefetch_all
function is using a bound 'remarks' column that is configured to have a max_length of 254 characters. That max length is not configurable and the column cannot be unbound. So when a table with a comment longer than 254 characters exists in the result set, we run into thenegative string size (or size too big)
error.This change uses a
show tables
query which generates a comment column definition with the max length allowed in snowflake. This allows us to pull down tables with any size comment. Since the result set is different between theshow tables
query and thefetch_all
function on the tables ODBC:Statement object, the application must opt-in to using this functionality by definingsilo_fetch_all_tables
in the database.yml file (see below).