Session-level configuration🔗
-
Choose one of the following ways to configure legacy CREATE TABLE
behavior:
-
To configure legacy behavior in any JDBC client, include
hiveCreateAsExternalLegacy=true
in the connection string. For example, in Beeline, include the connection string to launch Hive:beeline -u jdbc:hive2://10.65.13.98:10000/default;hiveCreateAsExternalLegacy=true \ -n <your user name> -p
-
To configure legacy behavior within an existing beeline session, set
hive.create.as.external.legacy=true
. For example:hive> SET hive.create.as.external.legacy=true;
You can purge the table from the file system and metastore. You can change the DROP behavior, to remove metadata only. -
-
Override the configured legacy behavior at the session level (only) to
create a managed table by using the MANAGED keyword.
CREATE MANAGED TABLE test (id INT);
When your session ends, the create legacy behavior also ends. If you issue a CREATE TABLE statement, Hive creates either an insert-only or full ACID table, depending on how you set the following table properties:- hive.create.as.insert.only
- hive.create.as.acid