Oracle® Big Data Connectors User's Guide Release 4 (4.0) E55819-01 |
|
|
PDF · Mobi · ePub |
These functions are in the http://xmlns.oracle.com/hadoop/xquery
namespace. The oxh
prefix is predeclared and the module is automatically imported.
The Hadoop module is described in the following topic:
Hadoop Functions
The following functions are built in to Oracle XQuery for Hadoop:
Returns a sequence of file paths that match a pattern.
oxh:find($pattern as xs:string?) as xs:string*
$pattern
: The file pattern to search for
See Also:
For the file pattern, theglobStatus
method in the Apache Hadoop API at
Increments a user-defined MapReduce job counter. The default increment is one (1).
oxh:increment-counter($groupName as xs:string, $counterName as xs:string, $value as xs:integer oxh:increment-counter($groupName as xs:string, $counterName as xs:string
$groupName
: The group of counters that this counter belongs to.
$counterName
: The name of a user-defined counter
$value
: The amount to increment the counter
Prints a line of text to stdout
of the Oracle XQuery for Hadoop client process. Use this function when developing queries.
declare %updating function oxh:println($arg as xs:anyAtomicType?)
$arg
: A value to add to the output. A cast
operation first converts it to string
. An empty sequence is handled the same way as an empty string.
This example prints the values of data.txt
to stdout
:
for $i in text:collection("data.txt") return oxh:println($i)
Prints a line of text or XML to stdout
of the Oracle XQuery for Hadoop client process. Use this function when developing queries and printing nodes of an XML document.
declare %updating function oxh:println-xml($arg as item()?)
$arg
: A value to add to the output. The input item is converted into a text as defined by XSLT 2.0 and XQuery 1.0 Serialization specifications. An empty sequence is handled the same way as an empty string.