danielewood opened a new pull request #14682:
URL: https://github.com/apache/superset/pull/14682
### SUMMARY
This adds the quirks of Ascend.io's database to be handled using the Impala
driver.
Note: I'm unsure if this approach for adding the db_engine_specs is the
desired method, so I welcome feedback for needed changes.
Changes:
1. Use the default postgres time grain expressions to make charts work
2. Escape the schema name when calling get_table_names to account for dots
in schema/database name, which otherwise cause an error because the server
thinks you are referencing a table.
Example:
```sql
SHOW SCHEMA
```
namespace
|--|
MyProject
MyProject.Billing
MyProject.Compliance
MyProject.Mailchimp
MyProject.Zendesk
```python
DEBUG:impala.hiveserver2:get_result_schema: schema=[
('namespace', 'STRING', None, None, None, None, None)
]
```
3. Handle scenario where the return of show tables returns multiple columns:
```sql
SHOW TABLES IN `MyProject.Zendesk`
```
database | tableName | isTemporary
-- | -- | --
MyProject.Zendesk | Consumer_Bundle_Transform | false
MyProject.Zendesk | Zendesk_Webhook | false
```python
DEBUG:impala.hiveserver2:get_result_schema: schema=[
('database', 'STRING',None, None, None, None, None),
('tableName', 'STRING', None, None, None, None, None),
('isTemporary', 'BOOLEAN', None, None, None, None, None)
]
```
4. Updated docs.
5. Resolves #8027
### BEFORE/AFTER SCREENSHOTS OR ANIMATED GIF
<!--- Skip this if not applicable -->
### TEST PLAN
<!--- What steps should be taken to 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:
- [ ] 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
- [x] 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.
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]