rhive-api {RHive}R Documentation

R functions to get informations of table from HIVE

Description

R functions to get informations of table from HIVE

Usage

rhive.list.databases(pattern)
rhive.show.databases(pattern)
rhive.use.database(databaseName)
rhive.list.tables(pattern)
rhive.show.tables(pattern)
rhive.desc.table(tableName, detail=FALSE)
rhive.load.table(tableName, fetchSize=50, limit=-1)
rhive.load.table2(tableName, limit=-1, remote=TRUE)
rhive.exist.table(tableName) 
rhive.size.table(tableName)
rhive.drop.table(tableName, list)
rhive.set(key, value)
rhive.unset(key)

Arguments

databaseName

hive database name.

tableName

hive table name.

remote

hiveserver mode.

detail

a flag on whether to show detail of table info.

limit

total fetch size. -1 means full fetch

fetchSize

the count of record to load at one time

pattern

an optional regular expression. Only names matching 'pattern' are returned. 'glob2rx' can be used to convert wildcard patterns to regular expressions.

list

a character vector naming tables to be removed. or rhive.list.tables's result.

key

hive configuration key

value

hive configuration value

Author(s)

rhive@nexr.com

Examples

## try to connect hive server
## Not run: rhive.connect("hive-server-ip")

## get list of databases in the Hive
## Not run: rhive.list.databases()

## set current database
## Not run: rhive.use.database('default')

## get list of tables in the Hive
## Not run: rhive.list.tables()

## get table info in the Hive
## Not run: rhive.desc.table('emp')

## get detail information of a table in the Hive
## Not run: rhive.desc.table('emp', TRUE)

## retrieve data from hive
## Not run: emp <- rhive.load.table('emp')

## display column names
## Not run: colnames(emp)

## display row count
## Not run: length(rownames(emp))

## close connection
## Not run: rhive.close()

[Package RHive version 2.0-0.10 Index]