compile_query: Compile GMQL query

Description Usage Arguments Value Examples

View source: R/web-services.R

Description

It compiles a GMQL query taken from file or inserted as text string, using the proper GMQL web service available on a remote server

Usage

1
2
3

Arguments

url

string url of server: It must contain the server address and base url; service name is added automatically

query

string text of a GMQL query

filePath

string path of txt file containing a GMQL query

Value

None

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
## Login to GMQL REST services suite as guest

remote_url = "http://www.gmql.eu/gmql-rest/"
login_gmql(remote_url)

## This statement gets the query as text string and runs the compile 
## web service

compile_query(remote_url, "DATASET = SELECT() Example_Dataset_1;
    MATERIALIZE DATASET INTO RESULT_DS;")


## This statement defines the path to the file "query1.txt" in the 
## subdirectory "example" of the package "RGMQL" and run the compile 
## web service

test_path <- system.file("example", package = "RGMQL")
test_query <- file.path(test_path, "query1.txt")
compile_query_fromfile(remote_url, test_query)

## Logout from GMQL REST services suite

logout_gmql(remote_url)

RGMQL documentation built on Nov. 8, 2020, 5:59 p.m.