Description Usage Arguments Value Escaping Handling our hadoop/hive setup See Also Examples
Queries Hive
1 2 3 4 5 6 7 8 |
query |
a Hive query |
heap_size |
|
use_nice |
Whether to use |
use_ionice |
Whether to use |
use_beeline |
Whether to use |
debug |
Whether to print the query and any messages/info which could be useful for debugging. |
A data.frame
containing the results of the query, or a TRUE
if
the user has chosen to write straight to file.
hive_query
works by running the query you provide through the CLI via a
system()
call. As a result, single escapes for meaningful characters
(such as quotes) within the query will not work: R will interpret them
only as escaping that character /within R/. Double escaping (\\) is thus
necessary, in the same way that it is for regular expressions.
The webrequests
table is documented on Wikitech,
which also provides a set of example queries. When it comes to manipulating the rows with Java before they get to you, Nuria has written a
brief tutorial on loading UDFs
which should help if you want to engage in that.
lubridate::ymd_hms()
for converting the "dt" column in the
webrequests table to proper datetime, and mysql_read()
and
global_query()
for querying our MySQL databases
1 2 3 4 | ## Not run:
query_hive("USE wmf; DESCRIBE webrequest;")
## End(Not run)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.