Create Hive Dynamic Tables
To automatically create Raw SQL tables from an HDFS directory, you must:
-
Download the
Create_Table_Hive.tarfrom our GitHub repository. -
In Saagie, create a job and upload the
Create_Table_Hive.tarfile as a package. -
Add the following script as a command line to start the job:
Rscript Create_Table.R "http://IP_HDFS:PORT_HDFS/webhdfs/v1" "jdbc:hive2://IP_HIVE:PORT_HIVE/;ssl=false" "USER_HDFS" "PWD_HDFS" "NAME_BDD" "PATH_DIRECTORY" "SEPARATOR_FILE" "QUOTE_FILE"
Where:
-
IP_HDFSis the Internet Protocol of HDFS. -
PORT_HDFSis the HDFS port. -
IP_HIVEis the Internet Protocol of Hive. -
PORT_HIVEis the Hive port. -
USER_HDFSis the HDFS user. -
PWD_HDFSis the HDFS password. -
NAME_BDDis the name of database. -
PATH_DIRECTORYis the path of the directory. -
SEPARATOR_FILEis the separator field in the files. -
QUOTE_FILEis the quote field in the files.
-