用量
视图:my_view {
derived_table:{
table_shrink: GZIP
...
}
}
derived_table:{
table_shrink: GZIP
...
}
}
层次结构
table_compression |
默认值
GZIP 接受
GZIP 或 SNAPPY 特殊规则
table_compression 仅适用于特定方言
|
定义
table_compression
参数指定永久性派生表 (PDT) 在雅典数据库 GZIP
或 SNAPPY
中采用的压缩方式。
如需了解详情,请参阅 Amazon Athena 文档。
请参阅下面的为
table_compression
的方言支持部分,获取支持table_compression
的方言列表。
table_compression
参数仅适用于永久性表,例如 PDT 和汇总表。没有持久性策略的派生表不支持table_compression
。
示例
使用 SNAPPY 压缩在 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_compression
能否使用 table_compression
取决于 Looker 连接的数据库方言。在最新版 Looker 中,以下方言支持 table_compression
: