Presto Analytics : RAQL Samples
RAQL Samples
With the Presto installation some additional samples are installed.
You can install the samples located in presto-install/samples/emml/raql using the presto-install/prestocli/bin/publish-mashups scripts. These scripts will install any of the samples located in presto-install/samples/emml and its subfolders.
After installation, the samples are shown in the Mashup Editor under My Mashups and can be opened directly from there.
#
Sample name
Short Description
1
cache-load-store.emml
Cache initialization logic using <storeto/> and <loadfrom/> for subsequent RAQL queries.
2
correlate1.emml
RAQL query to correlate 2 column values (stock volume & closing price) grouped by months.
Uses group aggregation to get only summary values;
Uses windows aggregation to get summary values along-with record details.
3
correlate2.emml
Correlation of Stock Closing price & Volume over 3-month Periods.
4
covariance.emml
Computes Covariance of 2 columns(Stock closing price, volume) for each stock symbol.
5
date-num-funcs.emml
Showcases Conversion and Locale-based Formatting functions :
Currency formatting, Number formatting, Percent formatting, Integer formatting with group separators, Data to/from Epoc conversions. Date Formatting.
6
datefmts.emml
Use of to_date(...) date conversion function
7
di-cache-stream.emml
Invokes REST service URL endpoint and stores data into a BigMemory declarative cache.
8
dom-cache.emml
Stores XML DOM in cache using <storeto/>; then retrieves this DOM from Cache using <loadfrom/> for querying using RAQL .
9
except.emml
Usage of RAQL except operator to find difference between 2 datasets
10
hierarchy-agg.emml
Chained RAQL queries to compute Monthly, Quarterly and Yearly Aggregations
11
intersect.emml
RAQL intersect operator to find intersection of 2 datasets
12
join-raql.emml
Various RAQL Join queries to illustrate Join of two Stream Sources; two DOM Sources; and a Stream Source with DOM source.
13
join2-raql.emml
RAQL Join cross diverse data formats - joins XML and CSV datasources.
RAQL Join on columns transformed using functions and cast functions.
14
joinBigMemory.emml
RAQL Joins 2 BigMemory cache sources; Also illustrates join between BigMemory and Stream/DOM sources.
15
kmeans1.emml
RAQL query for K-Means clustering using Euclidean and Manhattan measures
16
kmeans2.emml
RAQL K-Means centroids computation using Euclidean and SquaredEuclidean measures
17
legislators.emml
Diverse RAQL queries to illustrate usage of - select columns; limit results; distinct records; filter expressions; like search; group aggregations; order by.
18
linear_regression_1.emml
Use of RAQL Linear Regression analytic function
19
load-decl-cache.emml
Loads 'Legislators' sample data into cache; for subsequent analysis using assorted queries from query-decl-cache.emml
20
load-stocks-cache.emml
Loads 'Stocks' data into cache; for subsequent analysis using assorted queries from query-stock-cache.emml
21
math1.emml
Use of basic arithmetic operators in RAQL queries
22
mfgplants-cache.emml
Loads 'mfgPlants.csv' CSV dataset into cache; for subsequent analysis using query-mfgplants-cache.emml
23
mfgplants.emml
Various RAQL queries (Group by, Filter, Sub-query) on CSV dataset
24
mysql-raql.emml
Use of SQL with RAQL. SQL does base query and sends results to RAQL for windows aggregation.
25
parallel-query1.emml
ForEach parallel statement to perform RAQL queries in parallel and then combine results using <fuse/> statement
26
percent-change-subquery.emml
RAQL query to calculate Volume Mean Percentage change over a certain threshold value, across each quarter. This is done using Sub Query.
27
percent-change.emml
RAQL query to calculate Volume Mean Percentage change over a certain threshold value, across each quarter. This is done using Chained Query.
28
query-decl-cache.emml
see load-decl-cache.emml
29
query-mfgplants-cache.emml
see load-mfgplants-cache.emml
30
query-stocks-cache.emml
see load-stocks-cache.emml
31
schema2.emml
EMML In-line Schema definition for RAQL datasources
32
snapshot.emml
Query Presto Snapshot data using RAQL
33
snapshot2.emml
Use of alternate pattern to query Presto Snapshots using RAQL
34
stocks-group-avg.emml
Group avg aggregation of stocks by month, quarter, year
35
stocks-group-count.emml
Group count aggregation stocks by month, quarter , year
36
stocks-group-max.emml
Group max aggregation of stocks by month, quarter , year
37
stocks-group-min.emml
Group min aggregation of stocks by month, quarter , year
38
stocks-group-stddev.emml
Group stddev of stocks by month, quarter, year
39
stocks-group-sum.emml
Group sum aggregation by month, quarter, year
40
stocks-group-variance.emml
Group variance of stocks by month, quarter, year
41
stocks-price-chg.emml
Using RAQL chained queries compute min and max opening price change between weeks.
42
stocks-running-avg.emml
Running avg of stocks by month, quarter, year
43
stocks-running-count.emml
Running count by month, quarter, year
44
stocks-running-max.emml
Running max of stocks by month, quarter, year
45
stocks-running-min.emml
Running min of stocks by month, quarter, year
46
stocks-running-stddev.emml
Running stddev of stocks by month, quarter, year
47
stocks-running-sum.emml
Running sum of stocks by month, quarter, year
48
stocks-running-variance.emml
Running variance of stocks by month, quarter, year
49
subquery1.emml
RAQL query to calculate mean percentage chagne in stock volume over 5% between quarters; implemented using RAQL Sub Query
51
udf-sample.emml
RAQL query using User-defined Functions
52
union.emml
RAQL union operator illustrates combining datasets with following properties
*2 stream sources
*2 DOM sources
*XML and CSV source formats
53
window-functions-using-cache.emml
Query against BigMemory cache using Window functions - rank, dense_rank, lag, lead, first_value, last_value, row_number
54
window-functions.emml
Query against file datasource using Window functions - rank, dense_rank, lag, lead, first_value, last_value, row_number
Copyright © 2006-2015 Software AG, Darmstadt, Germany.

Product LogoContact Support   |   Community   |   Feedback