hive_table()

Read(143) Label: hivedatabase, orc, parquet,

Description:

Obtain a list of certain table names in the specified Hive database and locations of the corresponding HDFS files.

Syntax:

hive_table(con,[dbname])

Note:

External library function (See External Library Guide for uses).

 

It gets a list of certain table names in the specified Hive database and locations of the corresponding HDFS files. List all tables when no option works.

Parameter:

con

Database connection string.

dbname

Database name; return all tables by default.

Option:

@o

List ORC tables.

@p

List Parquet tables.

Return value:

Table sequence

Example:

 

A

 

1

=hive_open("hdfs://192.168.0.8:9000","thrift://192.168.0.8:9083","hivetest","asus")

Connect to a Hive database.

2

=hive_table(A1)

Return all tables in hivetest database.

3

=hive_table(A1,"myhive")

Return all tables in myhive database.

4

=hive_table@o(A1)

Return all ORC tables in hivetest database.

5

=hive_table@p(A1,"myhive")

Return all Parquet tables in myhive database.

6

=hive_close(A1)