Load Data with <invoke>
You can load datasets, for analysis with RAQL, from any Presto mashable or mashup using <invoke>. Mashable or mashup results must be a document.
Note: | Currently, <invoke> does not support dataset streaming, so large datasets may present performance issues. |
The following example loads results from the Yahoo local search mashable, one of the sample mashable you may register when you install Presto:
Some points to note with this example:
Streaming is
not set for either the
searchResults variable that holds the results of invoking Yahoo local search or for the
<invoke> statement itself.
RAQL executes the query even though the result dataset is not streamed.
To help clarify the exact XML elements in the mashable results that are considered a row for the
RAQL query, the From clause uses both the variable name for the dataset and the full path to the element that is a row. Paths are sometimes useful to clarify rows when datasets are XML. See
Dataset Paths, Names and Datatypes for more information.
The results for Yahoo local search and the results from the subsequent query are shown below:
All of the direct children of <Result> in the Yahoo local search results are accessible as columns in the RAQL query. Currently however, the following types of XML content are not accessible:
Ancestors of rows, such as
<ResultSetMapUrl>Descendants of row columns, such as
<AverageRating>Attributes, such as
ResultSet/@TotalResultsAvailable