Learn R Programming

RImpala (version 0.1.6)

rimpala.query: Function to run a Query in Impala

Description

This function executes the Query specified as an argument in Impala. If no query is passed, the show tables query is run as default

Usage

rimpala.query(Q="show tables",isDDL="false",fetchSize="10000")

Arguments

Q
The Query to be executed on Impala. The default query is show tables.
isDDL
Flag Parameter to indicate if the query is DDL - "true" / "false" ( Default: false)
fetchSize
Set the Number of rows to be retrieved with each Impala roundtrip call (Default : 10000)

Value

The result of the Query is returned into a dataframe if the Query is valid and does not have any errors.

Examples

Run this code
## Not run: 
# library("RImpala")
# rimpala.init()
# rimpala.connect(IP="127.0.0.1",port="21050")
# res = rimpala.query(Q="Select * from sample_table")
# res = rimpala.query(Q="Select * from sample_table",fetchSize="10000")
# rimpala.query(Q="drop table sample_table",isDDL="true")
# ## End(Not run)

Run the code above in your browser using DataLab