This is an automated email from the ASF dual-hosted git repository.

beto pushed a commit to branch db-diagnostics
in repository https://gitbox.apache.org/repos/asf/superset.git


The following commit(s) were added to refs/heads/db-diagnostics by this push:
     new ae298e0df6 Working on docs
ae298e0df6 is described below

commit ae298e0df6f922be6a4bb198c994c785fbcfa609
Author: Beto Dealmeida <[email protected]>
AuthorDate: Tue Jul 25 17:12:36 2023 -0700

    Working on docs
---
 superset/db_engine_specs/README.md | 10 ++++++++--
 1 file changed, 8 insertions(+), 2 deletions(-)

diff --git a/superset/db_engine_specs/README.md 
b/superset/db_engine_specs/README.md
index e6aba4b6f7..e05ac9cab1 100644
--- a/superset/db_engine_specs/README.md
+++ b/superset/db_engine_specs/README.md
@@ -3,7 +3,7 @@ Database engine specifications
 
 Superset uses [SQLAlchemy](https://www.sqlalchemy.org/) as an abstraction 
layer for running queries and fetching metadata from tables (like column names 
and types). Unfortunately, while SQLAlchemy offers enough functionality to 
allow connecting Superset to dozens of databases, there are still 
implementation details that differ across them. Because of this, Superset has 
an additional abstraction on top of SQLAlchemy, called a "database engine 
specification" or, simply, "DB engine spec".
 
-DB engine specs were created initially because there's no SQL standard for 
computing aggregations at different time grains. For example, to compute a 
daily metric in Trino or Postgres we would run a query like this:
+DB engine specs were created initially because there's no SQL standard for 
computing aggregations at different time grains. For example, to compute a 
daily metric in Trino or Postgres we could run a query like this:
 
 ```sql
 SELECT
@@ -34,7 +34,9 @@ Note that DB engine specs are completely optional. Superset 
can connect to any d
 Features
 --------
 
-|                            | Details                                         
                                       | Base                          | Amazon 
Athena                   | Amazon DynamoDB                   | Amazon Redshift  
                 | Apache Drill                   | Apache Druid                
   | Apache Hive                   | Apache Impala                   | Apache 
Kylin                   | Apache Pinot                   | Apache Solr          
         | Apac [...]
+The table below summarizes the information about the status of all DB engine 
specs Superset is aware of (note that this includes 3rd party DB engine specs):
+
+| Feature                    | Details                                         
                                       | Base                          | Amazon 
Athena                   | Amazon DynamoDB                   | Amazon Redshift  
                 | Apache Drill                   | Apache Druid                
   | Apache Hive                   | Apache Impala                   | Apache 
Kylin                   | Apache Pinot                   | Apache Solr          
         | Apac [...]
 
|----------------------------|----------------------------------------------------------------------------------------|-------------------------------|---------------------------------|-----------------------------------|-----------------------------------|--------------------------------|--------------------------------|-------------------------------|---------------------------------|--------------------------------|--------------------------------|-------------------------------|-----
 [...]
 | Module                     |                                                 
                                       | superset.db_engine_specs.base | 
superset.db_engine_specs.athena | superset.db_engine_specs.dynamodb | 
superset.db_engine_specs.redshift | superset.db_engine_specs.drill | 
superset.db_engine_specs.druid | superset.db_engine_specs.hive | 
superset.db_engine_specs.impala | superset.db_engine_specs.kylin | 
superset.db_engine_specs.pinot | superset.db_engine_specs.solr | supe [...]
 | Limit method               | In general, FORCE_LIMIT > WRAP_SQL > FETCH_MANY 
                                       | FETCH_MANY                    | 
FORCE_LIMIT                     | FORCE_LIMIT                       | 
FORCE_LIMIT                       | FORCE_LIMIT                    | 
FORCE_LIMIT                    | FORCE_LIMIT                   | FORCE_LIMIT    
                 | FORCE_LIMIT                    | FORCE_LIMIT                 
   | FORCE_LIMIT                   | FORC [...]
@@ -92,5 +94,9 @@ Features
 | Query cost estimation      |                                                 
                                       |             FALSE             |        
      FALSE              |               FALSE               |               
FALSE               |              FALSE             |              FALSE       
      |             FALSE             |              FALSE              |       
       FALSE             |              FALSE             |             FALSE   
          |      [...]
 | SQL validation             | Implemented outside the spec.                   
                                       |             FALSE             |        
      FALSE              |               FALSE               |               
FALSE               |              FALSE             |              FALSE       
      |             FALSE             |              FALSE              |       
       FALSE             |              FALSE             |             FALSE   
          |      [...]
 
+Database information
+--------------------
 
+A DB engine spec has attributes that describe the underlying database engine, 
so that Superset can know how to build and run queries. For example, some 
databases don't support subqueries, which are needed for some of the queries 
produced by Superset for certain charts. When a database doesn't support 
subqueries the query is run in two-steps, using the results from the first 
query to build the second query.
 
+These attributes and their default values (set in the base class, 
`BaseEngineSpec`) are described below:

Reply via email to