用量
view: my_view {
derived_table: {
table_format: PARQUET
...
}
}
|
階層
table_format |
預設值
PARQUET
接受
PARQUET、ORC、AVRO、JSON 或 TEXTFILE
特別規則
table_format 僅支援特定方言
|
定義
table_format 參數會指定 永久衍生資料表 (PDT) 在 Athena 資料庫中的格式,可以是下列任一格式:
- Parquet
- 最佳化列欄 (ORC)
- Avro
- JavaScript 物件標記法 (JSON)
- 文字檔
詳情請參閱 Amazon Athena 說明文件。
如需支援
table_format的方言清單,請參閱「支援table_format的方言」一節。
table_format參數只能搭配持續性資料表使用,例如 PDT 和匯總資料表。如果衍生資料表沒有持續性策略,則不支援「table_format」。
範例
使用 ORC 格式在 Amazon Athena 資料庫中建立 customer_order_facts PDT:
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
}
}
支援 table_format 的方言
使用 table_format 的能力取決於 Looker 連線使用的資料庫方言。在最新版 Looker 中,下列方言支援 table_format:
| 方言 | 是否支援? |
|---|---|
| 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 |