Nutzung
view: my_view {
derived_table: {
table_format: PARQUET
...
}
}
|
Hierarchie
table_format |
Standardwert
PARQUET
Akzeptiert
PARQUET, ORC, AVRO, JSON oder TEXTFILE
Besondere Regeln
table_format wird nur für bestimmte Dialekte unterstützt.
|
Definition
Mit dem Parameter table_format wird das Format angegeben, das eine persistente abgeleitete Tabelle (Persistent Derived Table, PDT) in einer Athena-Datenbank haben soll. Folgende Formate sind möglich:
- Parquet
- Optimized Row Columnar (ORC)
- Avro
- JavaScript Object Notation (JSON)
- Textdatei
Weitere Informationen finden Sie in der Amazon Athena-Dokumentation.
Eine Liste der Dialekte, die
table_formatunterstützen, finden Sie im Abschnitt Dialektunterstützung fürtable_format.
Der Parameter
table_formatfunktioniert nur mit persistenten Tabellen wie PDTs und aggregierten Tabellen.table_formatwird für abgeleitete Tabellen ohne Persistenzstrategie nicht unterstützt.
Beispiele
So erstellen Sie eine customer_order_facts-PDT in einer Amazon Athena-Datenbank mit dem ORC-Format:
view: customer_order_facts {
derived_table: {
explore_source: order {
column: customer_id { field: order.customer_id }
column: date { field: order.order_time }
column: city { field: users.city }
column: age_tier { field: users.age_tier }
derived_column: num_orders {
sql: COUNT(order.customer_id) ;;
}
}
table_format: ORC
table_compression: SNAPPY
datagroup_trigger: daily_datagroup
}
}
Dialektunterstützung für table_format
Die Möglichkeit, table_format zu verwenden, hängt vom Datenbankdialekt ab, den Ihre Looker-Verbindung verwendet. In der aktuellen Version von Looker wird table_format von den folgenden Dialekten unterstützt:
| Dialekt | Unterstützt? |
|---|---|
| Actian Avalanche | |
| Amazon Athena | |
| Amazon Aurora MySQL | |
| Amazon Redshift | |
| Amazon Redshift 2.1+ | |
| Amazon Redshift Serverless 2.1+ | |
| Apache Druid | |
| Apache Druid 0.13+ | |
| Apache Druid 0.18+ | |
| Apache Hive 2.3+ | |
| Apache Hive 3.1.2+ | |
| Apache Spark 3+ | |
| ClickHouse | |
| Cloudera Impala 3.1+ | |
| Cloudera Impala 3.1+ with Native Driver | |
| Cloudera Impala with Native Driver | |
| DataVirtuality | |
| Databricks | |
| Denodo 7 | |
| Denodo 8 & 9 | |
| Dremio | |
| Dremio 11+ | |
| Exasol | |
| Google BigQuery Legacy SQL | |
| Google BigQuery Standard SQL | |
| Google Cloud PostgreSQL | |
| Google Cloud SQL | |
| Google Spanner | |
| Greenplum | |
| HyperSQL | |
| IBM Netezza | |
| MariaDB | |
| Microsoft Azure PostgreSQL | |
| Microsoft Azure SQL Database | |
| Microsoft Azure Synapse Analytics | |
| Microsoft SQL Server 2008+ | |
| Microsoft SQL Server 2012+ | |
| Microsoft SQL Server 2016 | |
| Microsoft SQL Server 2017+ | |
| MongoBI | |
| MySQL | |
| MySQL 8.0.12+ | |
| Oracle | |
| Oracle ADWC | |
| PostgreSQL 9.5+ | |
| PostgreSQL pre-9.5 | |
| PrestoDB | |
| PrestoSQL | |
| SAP HANA | |
| SAP HANA 2+ | |
| SingleStore | |
| SingleStore 7+ | |
| Snowflake | |
| Teradata | |
| Trino | |
| Vector | |
| Vertica |