compile_query | R Documentation |
It compiles a GMQL query taken from file or inserted as text string, using the proper GMQL web service available on a remote server
compile_query(url, query)
compile_query_fromfile(url, filePath)
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 |
None
## 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)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.