betodealmeida opened a new pull request, #24918: URL: https://github.com/apache/superset/pull/24918
<!--- Please write the PR title following the conventions at https://www.conventionalcommits.org/en/v1.0.0/ Example: fix(dashboard): load charts correctly --> ### SUMMARY <!--- Describe the change below, including rationale and design decisions --> This PR adds a README for DB engine specs, describing all their features and functionality. It also adds a new command to test DB engine specs, SQLAlchemy dialects, and database connections: ``` superset test-db sqlite:// Loaded your LOCAL configuration at [/Users/beto/Projects/github/superset/superset_config.py] Collecting additional connection information... SQLAlchemy URI: sqlite:// > Do you want to configure connection arguments? [y/N] Checking for a DB engine spec... 👍 Found DB engine spec: SQLite About the database: - Method used to apply LIMIT to queries: FORCE_LIMIT - FORCE_LIMIT: modifies the query, replacing an existing LIMIT or adding a new one - WRAP_SQL: wraps the original query in a SELECT * with a LIMIT - FETCH_MANY: runs the query unmodified but fetchs only LIMIT rows from the cursor - Method used to limit the rows in the subquery: FORCE_LIMIT - Supports JOINs: True - Supports subqueries: True - Allows aliases in the SELECT statement: True - Allows referencing aliases in the ORDER BY statement: True - Supports secondary time columns: False - Allows ommiting time filters from inline GROUP BYs: False - Able to use source column when an alias overshadows it: False - Allows aggregations in ORDER BY not present in the SELECT: True - Allows expressions in ORDER BY: False - Allows CTE as a subquery: True - Allows LIMIT clause (instead of TOP): True - Maximum column name: None - Allows comments: True - Colons must be escaped: True Checking for basic features... Supported time grains: - SECOND: True (+1) - FIVE_SECONDS: True (+1) - THIRTY_SECONDS: True (+1) - MINUTE: True (+1) - FIVE_MINUTES: True (+1) - TEN_MINUTES: True (+1) - FIFTEEN_MINUTES: True (+1) - THIRTY_MINUTES: True (+1) - HALF_HOUR: True (+1) - HOUR: True (+1) - SIX_HOURS: True (+1) - DAY: True (+1) - WEEK: True (+1) - WEEK_STARTING_SUNDAY: True (+1) - WEEK_STARTING_MONDAY: True (+1) - WEEK_ENDING_SATURDAY: True (+1) - WEEK_ENDING_SUNDAY: True (+1) - MONTH: True (+1) - QUARTER: True (+1) - QUARTER_YEAR: True (+1) - YEAR: True (+1) Masks/unmasks encrypted_extra: False Has column type mappings: False Returns a list of function names: True (+10) Checking for nice-to-have features... Supports user impersonation: False Support file upload: True (+10) Returns extra table metadata: False Maps driver exceptions to Superset exceptions: False Parses error messages and returns Superset errors: False Supports changing the schema per-query: False Supports catalogs: False Supports changing the catalog per-query: False Can be connected thru an SSH tunnel: False Allows query to be canceled: False Returns additional metrics on dataset creation: False Supports querying the latest partition only: False Checking for advanced features... Expands complex types (arrays, structs) into rows/columns: False Supports query cost estimation: False Supports validating SQL before running query: False Overall score: 41/201 Testing the SQLAlchemy dialect... Checking functions used by the inspector... - get_schema_names: True - get_table_names: True - get_view_names: True - get_indexes: True - get_table_comment: True - get_columns: True - get_unique_constraints: True - get_check_constraints: True - get_pk_constraint: True - get_foreign_keys: True Checking dialect attributes... - dbapi: sqlite3.dbapi2 - name: sqlite - driver: pysqlite - supports_multivalues_insert: True Supports do_ping: True Can quote identifiers: True Doesn't require name normalization: True Testing the database connectivity... 👍 Connected successfully! Checking that we can run queries... sql> SELECT 1; > 1 Checking that we can create tables... Tables created! Checking that we can insert data... sql> INSERT INTO user (user_name, email_address, nickname) VALUES ('beto', '[email protected]', 'Beto') Checking that we can read data... sql> SELECT user.user_id, user.user_name, user.email_address, user.nickname FROM user WHERE user.user_name = 'beto' > [(1, 'beto', '[email protected]', 'Beto')] Checking that we can drop tables... Done! Running engine-specific tests... Testing datetime support... Creating a table with a timestamp column... Table created! Inserting timestamp value... Reading timestamp value... 👍 Succcess! ``` ### BEFORE/AFTER SCREENSHOTS OR ANIMATED GIF <!--- Skip this if not applicable --> ### TESTING INSTRUCTIONS <!--- Required! What steps can be taken to manually verify the changes? --> ### ADDITIONAL INFORMATION <!--- Check any relevant boxes with "x" --> <!--- HINT: Include "Fixes #nnn" if you are fixing an existing issue --> - [ ] Has associated issue: - [ ] Required feature flags: - [ ] Changes UI - [ ] Includes DB Migration (follow approval process in [SIP-59](https://github.com/apache/superset/issues/13351)) - [ ] Migration is atomic, supports rollback & is backwards-compatible - [ ] Confirm DB migration upgrade and downgrade tested - [ ] Runtime estimates and downtime expectations provided - [ ] Introduces new feature or API - [ ] Removes existing feature or API -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: [email protected] For queries about this service, please contact Infrastructure at: [email protected] --------------------------------------------------------------------- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
