Hive Properties:-: Hive - Metastore.warehouse - Dir Path You Want To Store Your Table and Database Directory and Its
Hive Properties:-: Hive - Metastore.warehouse - Dir Path You Want To Store Your Table and Database Directory and Its
Default location where database and table directories are created is: - “/user/hive/warehouse
hive.metastore.warehouse.dir = Path you want to store your table and database directory and its
content (in hive-site.xml)
Hive.exec.mode.local.auto = true
“By setting this property hive uses local mode more aggressively.
It means hive uses local mode whenever it feels will be better as per performance like when small
data set is there. Even when we are running hadoop in distributed or psedodistributed mode”
javax.jdo.option.ConnectionURL: -
jdbc:derby:;databaseName=/home/me/hive/metastore_db;create=true
Here in database name part of the value string, we have given the location where metadata will be
stored. This change eliminates the problem of Hive dropping the metastore_db directory in the
current working directory every time we start a new Hive session. Now, we’ll always have access to
all our metadata, no matter what directory we are working in.
Below is default behaviour of Hive metastore: - default location is current working directory: -
Creating a metastore_db subdirectory under whatever working directory you happen to be in is not
convenient, as Derby “forgets” about previous metastores when you change to a new working
directory.
Don’t invoke interactive commands that require user input. Shell “pipes” don’t work and neither do
file “globs.” For example, ! ls *.hql; will look for a file named *.hql;, rather than all files that end with
the .hql extension.
---------------------------------------------------------------------
You can run the hadoop dfs ... commands from within the hive CLI; just drop the hadoop word from
the command and add the semicolon at the end:
------------------------------------------------
Values of the new TIMESTAMP type can be integers, which are interpreted as seconds since
the Unix epoch time (Midnight, January 1, 1970), floats, which are interpreted as seconds
since the epoch time with nanosecond resolution (up to 9 decimal places), and
strings, which are interpreted according to the JDBC date string format convention,
YYYY-MM-DD hh:mm:ss.fffffffff.
----------------------------------------------------------------------------
Hive QL DDL
-Show databses;
- Show datbases like ‘h.*’