设置事务性-table 属性会导致外部 table
Setting transactional-table properties results in external table
我正在通过 Impala
创建一个 托管 table,如下所示:
CREATE TABLE IF NOT EXISTS table_name
STORED AS parquet
TBLPROPERTIES ('transactional'='false', 'insert_only'='false')
AS ...
这会导致 managed table
不支持 HIVE-ACID
。
但是,当我 运行 命令时,我仍然以外部 table 结束。
这是为什么?
我在 Cloudera documentation 中发现在创建 table 时忽略 EXTERNAL 关键字并不意味着 table将被管理:
When you use EXTERNAL keyword in the CREATE TABLE statement, HMS stores the table as an external table. When you omit the EXTERNAL keyword and create a managed table, or ingest a managed table, HMS might translate the table into an external table or the table creation can fail, depending on the table properties.
因此,设置 transactional=false
和 insert_only=false
会在 Hive Metastore.
的解释中导致 External Table
有趣的是,仅设置 TBLPROPERTIES ('transactional'='false')
会被完全忽略,并且仍会导致托管 table 具有 transactional=true
)。
我正在通过 Impala
创建一个 托管 table,如下所示:
CREATE TABLE IF NOT EXISTS table_name
STORED AS parquet
TBLPROPERTIES ('transactional'='false', 'insert_only'='false')
AS ...
这会导致 managed table
不支持 HIVE-ACID
。
但是,当我 运行 命令时,我仍然以外部 table 结束。
这是为什么?
我在 Cloudera documentation 中发现在创建 table 时忽略 EXTERNAL 关键字并不意味着 table将被管理:
When you use EXTERNAL keyword in the CREATE TABLE statement, HMS stores the table as an external table. When you omit the EXTERNAL keyword and create a managed table, or ingest a managed table, HMS might translate the table into an external table or the table creation can fail, depending on the table properties.
因此,设置 transactional=false
和 insert_only=false
会在 Hive Metastore.
External Table
有趣的是,仅设置 TBLPROPERTIES ('transactional'='false')
会被完全忽略,并且仍会导致托管 table 具有 transactional=true
)。