Description:
Create a Hive database connection.
Syntax:
hive_open(hdfsUrl,thriftUrl,dbname,hdfsUserName)
Note:
This HiveCli external library function (See External Library Guide) connects to a Hive database. The format of the parameter hdfsUrl is hdfs://ip:port, which represents the HDFS file’s IP and port number. The format of the parameter thriftUrl is thrift://ip:port, which represents the Thrift file’s IP and port number.
Parameter:
| hdfsUrl | HDFS file connection information. | 
| thriftUrl | Thrift file connection information. | 
| dbname | A database name. | 
| hdfsUserName | HDFS file user name. | 
Return value:
Cursor
Example:
| 
 | A | 
 | 
| 1 | =hive_open("hdfs://192.168.0.8:9000","thrift://192.168.0.8:9083","hive","asus") | Connect to the hive database. | 
Related function: