Tunnel
Connect to another MentDB server and run MQL commands on it, directly or through a cluster. Typical uses: call a remote MentDB from a script, or spread work across several servers. mql and mql encode help pass MQL text without parsing it.
tunnel connecttunnel execute_hottunnel execute_hot clustertunnel execute clustertunnel executetunnel disconnecttunnel disconnect allmqlmql encode

tunnel connect <sessionId> <jsonObject>


Description

    Connect to a MentDB server.

Parameters

    sessionId:   The session id - string - required
    jsonObject:   The JSON object information - string - required
admin
tunnel connect "session1" {cm get "demo_cm_mentdb";};
mentdb
1
Used in use cases (1 recipe)

    File transfer & remote systems engineer › Watch a drop folder, push files over SSH and notify the head office
Often used with

    cm get  ·  date systimestamp  ·  execute  ·  file_watcher exist  ·  file_watcher kill  ·  file_watcher show  ·  file_watcher start  ·  mql

tunnel execute_hot <sessionId> <jsonObject> <mql>


Description

    Execute an MQL command on the fly.

Parameters

    sessionId:   The session id - string - required
    jsonObject:   The JSON object information - string - required
    mql:   The MQL command to execute - string - required
admin
-> "[local_var1]" "data1"; -> "[local_var2]" "data2"; -> "[result1]" (tunnel execute_hot "session1" {cm get "demo_cm_mentdb";} (concat "-> \"[remote_var1]\" \"" (mql encode [local_var1]) "\";" "-> \"[remote_var2]\" \"" (mql encode [local_var2]) "\";" (mql { concat [remote_var1] ":" [remote_var2] }) ));
mentdb
data1:data2
Used in use cases (1 recipe)

    File transfer & remote systems engineer › Watch a drop folder, push files over SSH and notify the head office
Often used with

    cm get  ·  date systimestamp  ·  execute  ·  file_watcher exist  ·  file_watcher kill  ·  file_watcher show  ·  file_watcher start  ·  mql

tunnel execute_hot cluster


Description

    Execute an MQL command on the fly through a cluster.

admin
include "cluster.1n.hot.exe" "[cluster_id]" "cluster_id_1" "[method]" "LB_50_50|SIGNAL" "[tunnel_id]" "tunnel_id_1" "[request]" "name" ;
mentdb
data1:data2

tunnel execute cluster


Description

    Execute an MQL command through a cluster.

admin
execute "cluster.1n.exe" "[cluster_id]" "cluster_id_1" "[method]" "LB_50_50|SIGNAL" "[request]" "name" ;
mentdb
data1:data2

tunnel execute <sessionId> <mql>


Description

    Execute an MQL command.

Parameters

    sessionId:   The session id - string - required
    mql:   The MQL command to execute - string - required
admin
-> "[local_var1]" "data1"; -> "[local_var2]" "data2"; -> "[result2]" (tunnel execute "session1" (concat "-> \"[remote_var1]\" \"" (mql encode [local_var1]) "\";" "-> \"[remote_var2]\" \"" (mql encode [local_var2]) "\";" (mql { concat [remote_var1] ":" [remote_var2] }) ));
mentdb
data1:data2
Used in use cases (1 recipe)

    File transfer & remote systems engineer › Watch a drop folder, push files over SSH and notify the head office
Often used with

    cm get  ·  date systimestamp  ·  execute  ·  file_watcher exist  ·  file_watcher kill  ·  file_watcher show  ·  file_watcher start  ·  mql

tunnel disconnect <sessionId>


Description

    Disconnect a session.

Parameters

    sessionId:   The session id - string - required
admin
tunnel disconnect "session1";
mentdb
1
Used in use cases (1 recipe)

    File transfer & remote systems engineer › Watch a drop folder, push files over SSH and notify the head office
Often used with

    cm get  ·  date systimestamp  ·  execute  ·  file_watcher exist  ·  file_watcher kill  ·  file_watcher show  ·  file_watcher start  ·  mql

tunnel disconnect all


Description

    Disconnect all sessions.

admin
tunnel disconnect all;
mentdb
0

mql <str>


Description

    Do not parse a string

Parameters

    str:   The string - string - required
admin
mql {name};
mentdb
name
Used in use cases (27 recipes)

    String & encoding developer › SQL table and API names from form labels
    Data validation developer › A shared catalogue of data quality rules
    JSON & document store developer › Export a JSON array to a CSV file and read it back
    SQL developer in MQL › CSV, XML and HTML for three partners
    CRUD & data API developer › Data quality check on the table
    Control flow › Reserve stock without overselling: synchronized
    and 21 more in the Use cases
Often used with

    json doc  ·  cm get  ·  execute  ·  json parse_array  ·  bot training_merge  ·  csv parse  ·  atom get  ·  bot create

mql encode <str>


Description

    To get the MQL encoding of a specific string

Parameters

    str:   The string to encode - String - required
admin
mql encode "ad\"mn"
mentdb
ad\"mn
Used in use cases (5 recipes)

    The MQL language in depth › Discount rules engine with mql and eval
    File transfer & remote systems engineer › Watch a drop folder, push files over SSH and notify the head office
    Cluster & high-availability engineer › Failover of a node
    File transfer & remote systems engineer › Send a file to the least loaded node of a cluster
    Cluster & high-availability engineer › Run MQL on the least loaded node of the cluster
Often used with

    mql  ·  execute  ·  include  ·  atom get  ·  atom size  ·  cluster node delete  ·  cluster node expels  ·  cluster node reinstate