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

tests: speed snowflake tests by removing reflection #428

Merged
merged 1 commit into from Jun 27, 2022
Merged

Conversation

machow
Copy link
Owner

@machow machow commented Jun 26, 2022

  • removes the use of reflection when loading data for snowflake tests

The problem what that snowflake sqlalchemy getting the columns of a table was taking ~10s. Below is an example query it would generate:

SELECT /* sqlalchemy:_get_schema_columns */
                   ic.table_name,
                   ic.column_name,
                   ic.data_type,
                   ic.character_maximum_length,
                   ic.numeric_precision,
                   ic.numeric_scale,
                   ic.is_nullable,
                   ic.column_default,
                   ic.is_identity,
                   ic.comment
              FROM information_schema.columns ic
             WHERE ic.table_schema='TESTS'
             ORDER BY ic.ordinal_position

(note that this may be related to the number of tables in our database? or could be improved somehow? idk)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

1 participant