compile_query: Compile GMQL query

View source: R/web-services.R

compile_queryR Documentation

Compile GMQL query

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

compile_query(url, query)

compile_query_fromfile(url, filePath)

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


## 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)


DEIB-GECO/RGMQL documentation built on Feb. 17, 2024, 10:39 p.m.