Uploaded image for project: 'MariaDB Server'
  1. MariaDB Server
  2. MDEV-16418

CONNECT Engine - Feature Request: Remote Script Execution

Details

    Description

      1. Objective

      To give the possibility to call the execution of external:

      Scripts directly from MariaDB, just as SQL Server, from 2017 Edition onward, allows to do so:

      And PostgreSQL so does for Python:

      The ultimate objetive is, for example, to trigger the execution of a remote Python/R Code for updating a predictive model in keras/h2o/tensorflow/... when new data is introduced into the database, or as part of a SQL procedure.

      2. OPTION A: Through a Table

      2.1 Implementation

      One possible implementation could be as follows:

      2.1.1. Enable External Script Execution: my.ini

      [mysqld]
      connect_enable_execute_external_script = {0|1}
      connect_python_exe_dir = "C:/Users/J-tel/AppData/Local/Programs/Python/Python36-32/python.exe"
      connect_r_exe_dir = "C:/Program Files/Microsoft/R Open/R-3.4.3/bin/Rscript.exe"
      connect_max_exe_parallel = {1(Default)|Number}
      

      2.1.2. Script Repository Creation: CREATE TABLE

      For using the "CONNECT REMOTE_TABLE" Engine, the user will have to create an empty table as follows:

      CREATE [OR REPLACE] [IF NOT EXISTS] TABLE tbl_name_connect
        ENGINE = CONNECT
        TABLE_TYPE = REMOTE_TABLE
        LANGUAGE = {R|Python}
        [PARALLEL={0|1}]
        [WITH VERSION CONTROL];
      

      2.1.3. Call a Script: SELECT

      There will be 3 main ways of calling a R / Python Script from MariaDB:

      A. To Import an R / Python Script on the fly an call it from MariaDB Server:

      SELECT
        LOAD_FILE('/path/.../script_file_name.txt'))
      FROM
        tbl_name_connect;
      

      B. To write a Script directly in the IDE and call it from MariaDB Server:

      SELECT
        QUOTE("... [R or Python Script] ...")
      FROM
        tbl_name_connect;
      

      C. To call a previously saved R / Python Script into tbl_name:

      SELECT
        (SELECT Col_Script FROM tbl_name_script_repository LIMIT 1;)
      FROM
        tbl_name_connect;
      

      2.2 Internals

      Connect will:

      1. Send the Script Text to the .exe file.
      2. Retrieve a data.frame Table (Last Evaluated Object or return() Object), or retrieve any error / warnings and if the execution was complete.

      An example R Script to execute in the RScript.exe, which makes use of an ODBC Connection, would be:

      library(tidyverse)
      library(DBI)
      library(RMariaDB)
       
      con <- dbConnect(RMariaDB::MariaDB(), group = "my-db")
       
      dbWriteTable(con, "mtcars", mtcars)
      dbReadTable(con, "mtcars")
      dbDisconnect(con)
      

      2.3. Security Issues

      This new feature could imply security issues, so:

      • It shall be disabled by default.
      • Have its own USER security permission.
      • MariaDB to include its own trusted distributions of R and Python.

      Also another solution would be to have to force the users to store the Python and R .exe directly in the MariaDB installation folders, so that greater care of such executable files can be taken in the system.

      3. OPTION B: Through a Stored Procedure

      This new feature could imply security issues, so:

      • It shall be disabled by default.
      • Have its own USER security permission.
      • MariaDB to include its own trusted distributions of R and Python.

      Also another solution would be to have to force the users to store the Python and R .exe directly in the MariaDB installation folders, so that greater care of such executable files can be taken in the system.

      4. Collaboration

      I could ask the maintainer of the R "RMariaDB" package (Developed in C++ and R) in case he would be interested in collaborate in this project.

      Attachments

        Issue Links

          Activity

            Juan Juan Telleria created issue -
            elenst Elena Stepanova made changes -
            Field Original Value New Value
            Assignee Olivier Bertrand [ bertrandop ]

            To: Juan
            Can you elaborate by giving examples. For instance what it the script name for as its text is given? Could it be also a script file whose path would be given. SQL server requires the language to be specified, how about CONNECT?

            Actually, I am not sure I understand what you're doing. When creating a table, in all DBMSs, the column specifications describe the returned result. This is what SQL Server does. So would all specifications of the script to execute be contained in options, not in columns?

            bertrandop Olivier Bertrand added a comment - To: Juan Can you elaborate by giving examples. For instance what it the script name for as its text is given? Could it be also a script file whose path would be given. SQL server requires the language to be specified, how about CONNECT? Actually, I am not sure I understand what you're doing. When creating a table, in all DBMSs, the column specifications describe the returned result. This is what SQL Server does. So would all specifications of the script to execute be contained in options, not in columns?
            Juan Juan Telleria made changes -
            Description To Olivier Bertrand (CONNECT Engine Maintainer):

            SQL Server, from 2016 Edition onwards, allows to call the execution of external scripts directly from the Sever:
            https://docs.microsoft.com/es-es/sql/relational-databases/system-stored-procedures/sp-execute-external-script-transact-sql?view=sql-server-2017

            It would be useful to have a similar functionality in MariaDB, as it would allow, for example, to trigger a remote Python/R Code for updating a predictive model in keras when new data is introduced into the database.

            CONNECT Engine would only need for that duty a 4 column table:
            * One which contains the script to execute as a TEXT column.
            * Other with a PATH which points to the Python / RScript .exe in the Server.
            * Eventually, a COMMENT columns, for including some information about the script.
            * And at last, a column with the name of the script to CALL.

            CREATE TABLE db.t_Remote_Scripts
            (
                CALL VARCHAR(255),
                SCRIPT TEXT,
                PATH VARCHAR(255),
                COMMENTS VARCHAR(255)
            ) ENGINE = CONNECT
              TABLE_TYPE = REMOTE_SCRIPT;

            So when calling:

            SELECT
               *
            FROM
                db.t_Remote_Scripts
            WHERE
                CALL = "01 - Hello, World!"

            Connect would send the SCRIPT text column to the .exe on the PATH (e.g.: RScript exe) and retrieve the select table any warnings that occurred during the execution, that could eventually even be stored in another table as a Data Quality check, to see if the script has been executed correctly.

            In the remote R/Python script, the script will have to make use of a ODBC Connection for importing the data from MariaDB, analyze it, and send it back away.

            This engine feature could imply security issues, so it shall be disabled by default, or even have its own USER security permission.

            Thank you.

            Best,
            Juan Telleria
            h1. 1. Issue's Objective
            SQL Server, from 2016 Edition onwards, allows to call the execution of external scripts directly from the Sever:
            https://docs.microsoft.com/es-es/sql/relational-databases/system-stored-procedures/sp-execute-external-script-transact-sql?view=sql-server-2017

            It would be useful to have a similar functionality in MariaDB, as it would allow, for example, to trigger a remote Python/R Code for updating a predictive model in keras when new data is introduced into the database.

            CONNECT Engine would only need for that duty a 4 column table:
            * One which contains the script to execute as a TEXT column.
            * Other with a PATH which points to the Python / RScript .exe in the Server.
            * Eventually, a COMMENT columns, for including some information about the script.
            * And at last, a column with the name of the script to CALL.

            CREATE TABLE db.t_Remote_Scripts
            (
                CALL VARCHAR(255),
                SCRIPT TEXT,
                PATH VARCHAR(255),
                COMMENTS VARCHAR(255)
            ) ENGINE = CONNECT
              TABLE_TYPE = REMOTE_SCRIPT;

            So when calling:

            SELECT
               *
            FROM
                db.t_Remote_Scripts
            WHERE
                CALL = "01 - Hello, World!"

            Connect would send the SCRIPT text column to the .exe on the PATH (e.g.: RScript exe) and retrieve the select table any warnings that occurred during the execution, that could eventually even be stored in another table as a Data Quality check, to see if the script has been executed correctly.

            In the remote R/Python script, the script will have to make use of a ODBC Connection for importing the data from MariaDB, analyze it, and send it back away.

            This engine feature could imply security issues, so it shall be disabled by default, or even have its own USER security permission.

            Thank you.

            Best,
            Juan Telleria
            Juan Juan Telleria made changes -
            Description h1. 1. Issue's Objective
            SQL Server, from 2016 Edition onwards, allows to call the execution of external scripts directly from the Sever:
            https://docs.microsoft.com/es-es/sql/relational-databases/system-stored-procedures/sp-execute-external-script-transact-sql?view=sql-server-2017

            It would be useful to have a similar functionality in MariaDB, as it would allow, for example, to trigger a remote Python/R Code for updating a predictive model in keras when new data is introduced into the database.

            CONNECT Engine would only need for that duty a 4 column table:
            * One which contains the script to execute as a TEXT column.
            * Other with a PATH which points to the Python / RScript .exe in the Server.
            * Eventually, a COMMENT columns, for including some information about the script.
            * And at last, a column with the name of the script to CALL.

            CREATE TABLE db.t_Remote_Scripts
            (
                CALL VARCHAR(255),
                SCRIPT TEXT,
                PATH VARCHAR(255),
                COMMENTS VARCHAR(255)
            ) ENGINE = CONNECT
              TABLE_TYPE = REMOTE_SCRIPT;

            So when calling:

            SELECT
               *
            FROM
                db.t_Remote_Scripts
            WHERE
                CALL = "01 - Hello, World!"

            Connect would send the SCRIPT text column to the .exe on the PATH (e.g.: RScript exe) and retrieve the select table any warnings that occurred during the execution, that could eventually even be stored in another table as a Data Quality check, to see if the script has been executed correctly.

            In the remote R/Python script, the script will have to make use of a ODBC Connection for importing the data from MariaDB, analyze it, and send it back away.

            This engine feature could imply security issues, so it shall be disabled by default, or even have its own USER security permission.

            Thank you.

            Best,
            Juan Telleria
            h1. 1. Objective
            SQL Server, from 2016 Edition onwards, allows to call the execution of external scripts directly from the Sever:
            https://docs.microsoft.com/es-es/sql/relational-databases/system-stored-procedures/sp-execute-external-script-transact-sql?view=sql-server-2017

            It would be useful to have a similar functionality in MariaDB, as it would allow, for example, to trigger a remote Python/R Code for updating a predictive model in keras when new data is introduced into the database.

            CONNECT Engine would only need for that duty a 4 column table:
            * One which contains the script to execute as a TEXT column.
            * Other with a PATH which points to the Python / RScript .exe in the Server.
            * Eventually, a COMMENT columns, for including some information about the script.
            * And at last, a column with the name of the script to CALL.

            CREATE TABLE db.t_Remote_Scripts
            (
                CALL VARCHAR(255),
                SCRIPT TEXT,
                PATH VARCHAR(255),
                COMMENTS VARCHAR(255)
            ) ENGINE = CONNECT
              TABLE_TYPE = REMOTE_SCRIPT;

            So when calling:

            SELECT
               *
            FROM
                db.t_Remote_Scripts
            WHERE
                CALL = "01 - Hello, World!"

            Connect would send the SCRIPT text column to the .exe on the PATH (e.g.: RScript exe) and retrieve the select table any warnings that occurred during the execution, that could eventually even be stored in another table as a Data Quality check, to see if the script has been executed correctly.

            In the remote R/Python script, the script will have to make use of a ODBC Connection for importing the data from MariaDB, analyze it, and send it back away.

            This engine feature could imply security issues, so it shall be disabled by default, or even have its own USER security permission.

            Thank you.

            Best,
            Juan Telleria
            Juan Juan Telleria made changes -
            Description h1. 1. Objective
            SQL Server, from 2016 Edition onwards, allows to call the execution of external scripts directly from the Sever:
            https://docs.microsoft.com/es-es/sql/relational-databases/system-stored-procedures/sp-execute-external-script-transact-sql?view=sql-server-2017

            It would be useful to have a similar functionality in MariaDB, as it would allow, for example, to trigger a remote Python/R Code for updating a predictive model in keras when new data is introduced into the database.

            CONNECT Engine would only need for that duty a 4 column table:
            * One which contains the script to execute as a TEXT column.
            * Other with a PATH which points to the Python / RScript .exe in the Server.
            * Eventually, a COMMENT columns, for including some information about the script.
            * And at last, a column with the name of the script to CALL.

            CREATE TABLE db.t_Remote_Scripts
            (
                CALL VARCHAR(255),
                SCRIPT TEXT,
                PATH VARCHAR(255),
                COMMENTS VARCHAR(255)
            ) ENGINE = CONNECT
              TABLE_TYPE = REMOTE_SCRIPT;

            So when calling:

            SELECT
               *
            FROM
                db.t_Remote_Scripts
            WHERE
                CALL = "01 - Hello, World!"

            Connect would send the SCRIPT text column to the .exe on the PATH (e.g.: RScript exe) and retrieve the select table any warnings that occurred during the execution, that could eventually even be stored in another table as a Data Quality check, to see if the script has been executed correctly.

            In the remote R/Python script, the script will have to make use of a ODBC Connection for importing the data from MariaDB, analyze it, and send it back away.

            This engine feature could imply security issues, so it shall be disabled by default, or even have its own USER security permission.

            Thank you.

            Best,
            Juan Telleria
            h1. 1. Objective
            To give the possibility to call the execution of external:
            * [Python|https://www.python.org/].
            * Or [R Statistical Programming Language|https://mran.microsoft.com/].
            Scripts directly from MariaDB, just as SQL Server, from 2016 Edition onward, allows:
            * [sp_execute_external_script (Transact-SQL)|https://docs.microsoft.com/es-es/sql/relational-databases/system-stored-procedures/sp-execute-external-script-transact-sql?view=sql-server-2017]
            * [Run Python using T-SQL|https://docs.microsoft.com/en-us/sql/advanced-analytics/tutorials/run-python-using-t-sql?view=sql-server-2017]

            It would be useful to have a similar functionality in MariaDB, as it would allow, for example, to trigger a remote Python/R Code for updating a predictive model in keras when new data is introduced into the database.

            CONNECT Engine would only need for that duty a 4 column table:
            * One which contains the script to execute as a TEXT column.
            * Other with a PATH which points to the Python / RScript .exe in the Server.
            * Eventually, a COMMENT columns, for including some information about the script.
            * And at last, a column with the name of the script to CALL.

            CREATE TABLE db.t_Remote_Scripts
            (
                CALL VARCHAR(255),
                SCRIPT TEXT,
                PATH VARCHAR(255),
                COMMENTS VARCHAR(255)
            ) ENGINE = CONNECT
              TABLE_TYPE = REMOTE_SCRIPT;

            So when calling:

            SELECT
               *
            FROM
                db.t_Remote_Scripts
            WHERE
                CALL = "01 - Hello, World!"

            Connect would send the SCRIPT text column to the .exe on the PATH (e.g.: RScript exe) and retrieve the select table any warnings that occurred during the execution, that could eventually even be stored in another table as a Data Quality check, to see if the script has been executed correctly.

            In the remote R/Python script, the script will have to make use of a ODBC Connection for importing the data from MariaDB, analyze it, and send it back away.

            This engine feature could imply security issues, so it shall be disabled by default, or even have its own USER security permission.

            Thank you.

            Best,
            Juan Telleria
            Juan Juan Telleria made changes -
            Description h1. 1. Objective
            To give the possibility to call the execution of external:
            * [Python|https://www.python.org/].
            * Or [R Statistical Programming Language|https://mran.microsoft.com/].
            Scripts directly from MariaDB, just as SQL Server, from 2016 Edition onward, allows:
            * [sp_execute_external_script (Transact-SQL)|https://docs.microsoft.com/es-es/sql/relational-databases/system-stored-procedures/sp-execute-external-script-transact-sql?view=sql-server-2017]
            * [Run Python using T-SQL|https://docs.microsoft.com/en-us/sql/advanced-analytics/tutorials/run-python-using-t-sql?view=sql-server-2017]

            It would be useful to have a similar functionality in MariaDB, as it would allow, for example, to trigger a remote Python/R Code for updating a predictive model in keras when new data is introduced into the database.

            CONNECT Engine would only need for that duty a 4 column table:
            * One which contains the script to execute as a TEXT column.
            * Other with a PATH which points to the Python / RScript .exe in the Server.
            * Eventually, a COMMENT columns, for including some information about the script.
            * And at last, a column with the name of the script to CALL.

            CREATE TABLE db.t_Remote_Scripts
            (
                CALL VARCHAR(255),
                SCRIPT TEXT,
                PATH VARCHAR(255),
                COMMENTS VARCHAR(255)
            ) ENGINE = CONNECT
              TABLE_TYPE = REMOTE_SCRIPT;

            So when calling:

            SELECT
               *
            FROM
                db.t_Remote_Scripts
            WHERE
                CALL = "01 - Hello, World!"

            Connect would send the SCRIPT text column to the .exe on the PATH (e.g.: RScript exe) and retrieve the select table any warnings that occurred during the execution, that could eventually even be stored in another table as a Data Quality check, to see if the script has been executed correctly.

            In the remote R/Python script, the script will have to make use of a ODBC Connection for importing the data from MariaDB, analyze it, and send it back away.

            This engine feature could imply security issues, so it shall be disabled by default, or even have its own USER security permission.

            Thank you.

            Best,
            Juan Telleria
            h1. 1. Objective
            To give the possibility to call the execution of external:
            * [Python|https://www.python.org/].
            * Or [R Statistical Programming Language|https://mran.microsoft.com/].

            Scripts directly from MariaDB, just as SQL Server, from 2016 Edition onward, allows:
            * [sp_execute_external_script (Transact-SQL)|https://docs.microsoft.com/es-es/sql/relational-databases/system-stored-procedures/sp-execute-external-script-transact-sql?view=sql-server-2017]
            * [Run Python using T-SQL|https://docs.microsoft.com/en-us/sql/advanced-analytics/tutorials/run-python-using-t-sql?view=sql-server-2017]

            It would be useful to have a similar functionality in MariaDB, as it would allow, for example, to trigger a remote Python/R Code for updating a predictive model in keras when new data is introduced into the database.

            CONNECT Engine would only need for that duty a 4 column table:
            * One which contains the script to execute as a TEXT column.
            * Other with a PATH which points to the Python / RScript .exe in the Server.
            * Eventually, a COMMENT columns, for including some information about the script.
            * And at last, a column with the name of the script to CALL.

            CREATE TABLE db.t_Remote_Scripts
            (
                CALL VARCHAR(255),
                SCRIPT TEXT,
                PATH VARCHAR(255),
                COMMENTS VARCHAR(255)
            ) ENGINE = CONNECT
              TABLE_TYPE = REMOTE_SCRIPT;

            So when calling:

            SELECT
               *
            FROM
                db.t_Remote_Scripts
            WHERE
                CALL = "01 - Hello, World!"

            Connect would send the SCRIPT text column to the .exe on the PATH (e.g.: RScript exe) and retrieve the select table any warnings that occurred during the execution, that could eventually even be stored in another table as a Data Quality check, to see if the script has been executed correctly.

            In the remote R/Python script, the script will have to make use of a ODBC Connection for importing the data from MariaDB, analyze it, and send it back away.

            This engine feature could imply security issues, so it shall be disabled by default, or even have its own USER security permission.

            Thank you.

            Best,
            Juan Telleria
            Juan Juan Telleria made changes -
            Description h1. 1. Objective
            To give the possibility to call the execution of external:
            * [Python|https://www.python.org/].
            * Or [R Statistical Programming Language|https://mran.microsoft.com/].

            Scripts directly from MariaDB, just as SQL Server, from 2016 Edition onward, allows:
            * [sp_execute_external_script (Transact-SQL)|https://docs.microsoft.com/es-es/sql/relational-databases/system-stored-procedures/sp-execute-external-script-transact-sql?view=sql-server-2017]
            * [Run Python using T-SQL|https://docs.microsoft.com/en-us/sql/advanced-analytics/tutorials/run-python-using-t-sql?view=sql-server-2017]

            It would be useful to have a similar functionality in MariaDB, as it would allow, for example, to trigger a remote Python/R Code for updating a predictive model in keras when new data is introduced into the database.

            CONNECT Engine would only need for that duty a 4 column table:
            * One which contains the script to execute as a TEXT column.
            * Other with a PATH which points to the Python / RScript .exe in the Server.
            * Eventually, a COMMENT columns, for including some information about the script.
            * And at last, a column with the name of the script to CALL.

            CREATE TABLE db.t_Remote_Scripts
            (
                CALL VARCHAR(255),
                SCRIPT TEXT,
                PATH VARCHAR(255),
                COMMENTS VARCHAR(255)
            ) ENGINE = CONNECT
              TABLE_TYPE = REMOTE_SCRIPT;

            So when calling:

            SELECT
               *
            FROM
                db.t_Remote_Scripts
            WHERE
                CALL = "01 - Hello, World!"

            Connect would send the SCRIPT text column to the .exe on the PATH (e.g.: RScript exe) and retrieve the select table any warnings that occurred during the execution, that could eventually even be stored in another table as a Data Quality check, to see if the script has been executed correctly.

            In the remote R/Python script, the script will have to make use of a ODBC Connection for importing the data from MariaDB, analyze it, and send it back away.

            This engine feature could imply security issues, so it shall be disabled by default, or even have its own USER security permission.

            Thank you.

            Best,
            Juan Telleria
            h1. 1. Objective
            To give the possibility to call the execution of external:
            * [Python|https://www.python.org/].
            * Or [R Statistical Programming Language|https://mran.microsoft.com/].

            Scripts directly from MariaDB, just as SQL Server, from 2016 Edition onward, allows to do so:
            * [sp_execute_external_script (Transact-SQL)|https://docs.microsoft.com/es-es/sql/relational-databases/system-stored-procedures/sp-execute-external-script-transact-sql?view=sql-server-2017]
            * [Run Python using T-SQL|https://docs.microsoft.com/en-us/sql/advanced-analytics/tutorials/run-python-using-t-sql?view=sql-server-2017]

            It would be useful to have a similar functionality in MariaDB, as it would allow, for example, to trigger a remote Python/R Code for updating a predictive model in keras when new data is introduced into the database.

            CONNECT Engine would only need for that duty a 4 column table:
            * One which contains the script to execute as a TEXT column.
            * Other with a PATH which points to the Python / RScript .exe in the Server.
            * Eventually, a COMMENT columns, for including some information about the script.
            * And at last, a column with the name of the script to CALL.

            CREATE TABLE db.t_Remote_Scripts
            (
                CALL VARCHAR(255),
                SCRIPT TEXT,
                PATH VARCHAR(255),
                COMMENTS VARCHAR(255)
            ) ENGINE = CONNECT
              TABLE_TYPE = REMOTE_SCRIPT;

            So when calling:

            SELECT
               *
            FROM
                db.t_Remote_Scripts
            WHERE
                CALL = "01 - Hello, World!"

            Connect would send the SCRIPT text column to the .exe on the PATH (e.g.: RScript exe) and retrieve the select table any warnings that occurred during the execution, that could eventually even be stored in another table as a Data Quality check, to see if the script has been executed correctly.

            In the remote R/Python script, the script will have to make use of a ODBC Connection for importing the data from MariaDB, analyze it, and send it back away.

            This engine feature could imply security issues, so it shall be disabled by default, or even have its own USER security permission.

            Thank you.

            Best,
            Juan Telleria
            Juan Juan Telleria made changes -
            Description h1. 1. Objective
            To give the possibility to call the execution of external:
            * [Python|https://www.python.org/].
            * Or [R Statistical Programming Language|https://mran.microsoft.com/].

            Scripts directly from MariaDB, just as SQL Server, from 2016 Edition onward, allows to do so:
            * [sp_execute_external_script (Transact-SQL)|https://docs.microsoft.com/es-es/sql/relational-databases/system-stored-procedures/sp-execute-external-script-transact-sql?view=sql-server-2017]
            * [Run Python using T-SQL|https://docs.microsoft.com/en-us/sql/advanced-analytics/tutorials/run-python-using-t-sql?view=sql-server-2017]

            It would be useful to have a similar functionality in MariaDB, as it would allow, for example, to trigger a remote Python/R Code for updating a predictive model in keras when new data is introduced into the database.

            CONNECT Engine would only need for that duty a 4 column table:
            * One which contains the script to execute as a TEXT column.
            * Other with a PATH which points to the Python / RScript .exe in the Server.
            * Eventually, a COMMENT columns, for including some information about the script.
            * And at last, a column with the name of the script to CALL.

            CREATE TABLE db.t_Remote_Scripts
            (
                CALL VARCHAR(255),
                SCRIPT TEXT,
                PATH VARCHAR(255),
                COMMENTS VARCHAR(255)
            ) ENGINE = CONNECT
              TABLE_TYPE = REMOTE_SCRIPT;

            So when calling:

            SELECT
               *
            FROM
                db.t_Remote_Scripts
            WHERE
                CALL = "01 - Hello, World!"

            Connect would send the SCRIPT text column to the .exe on the PATH (e.g.: RScript exe) and retrieve the select table any warnings that occurred during the execution, that could eventually even be stored in another table as a Data Quality check, to see if the script has been executed correctly.

            In the remote R/Python script, the script will have to make use of a ODBC Connection for importing the data from MariaDB, analyze it, and send it back away.

            This engine feature could imply security issues, so it shall be disabled by default, or even have its own USER security permission.

            Thank you.

            Best,
            Juan Telleria
            h1. 1. Objective
            To give the possibility to call the execution of external:
            * [Python|https://www.python.org/].
            * Or [R Statistical Programming Language|https://mran.microsoft.com/].

            Scripts directly from MariaDB, just as SQL Server, from 2017 Edition onward, allows to do so:
            * [sp_execute_external_script (Transact-SQL)|https://docs.microsoft.com/es-es/sql/relational-databases/system-stored-procedures/sp-execute-external-script-transact-sql?view=sql-server-2017]
            * [Run Python using T-SQL|https://docs.microsoft.com/en-us/sql/advanced-analytics/tutorials/run-python-using-t-sql?view=sql-server-2017]

            It would be useful to have a similar functionality in MariaDB, as it would allow, for example, to trigger a remote Python/R Code for updating a predictive model in keras when new data is introduced into the database.

            CONNECT Engine would only need for that duty a 4 column table:
            * One which contains the script to execute as a TEXT column.
            * Other with a PATH which points to the Python / RScript .exe in the Server.
            * Eventually, a COMMENT columns, for including some information about the script.
            * And at last, a column with the name of the script to CALL.

            CREATE TABLE db.t_Remote_Scripts
            (
                CALL VARCHAR(255),
                SCRIPT TEXT,
                PATH VARCHAR(255),
                COMMENTS VARCHAR(255)
            ) ENGINE = CONNECT
              TABLE_TYPE = REMOTE_SCRIPT;

            So when calling:

            SELECT
               *
            FROM
                db.t_Remote_Scripts
            WHERE
                CALL = "01 - Hello, World!"

            Connect would send the SCRIPT text column to the .exe on the PATH (e.g.: RScript exe) and retrieve the select table any warnings that occurred during the execution, that could eventually even be stored in another table as a Data Quality check, to see if the script has been executed correctly.

            In the remote R/Python script, the script will have to make use of a ODBC Connection for importing the data from MariaDB, analyze it, and send it back away.

            This engine feature could imply security issues, so it shall be disabled by default, or even have its own USER security permission.

            Thank you.

            Best,
            Juan Telleria
            Juan Juan Telleria made changes -
            Description h1. 1. Objective
            To give the possibility to call the execution of external:
            * [Python|https://www.python.org/].
            * Or [R Statistical Programming Language|https://mran.microsoft.com/].

            Scripts directly from MariaDB, just as SQL Server, from 2017 Edition onward, allows to do so:
            * [sp_execute_external_script (Transact-SQL)|https://docs.microsoft.com/es-es/sql/relational-databases/system-stored-procedures/sp-execute-external-script-transact-sql?view=sql-server-2017]
            * [Run Python using T-SQL|https://docs.microsoft.com/en-us/sql/advanced-analytics/tutorials/run-python-using-t-sql?view=sql-server-2017]

            It would be useful to have a similar functionality in MariaDB, as it would allow, for example, to trigger a remote Python/R Code for updating a predictive model in keras when new data is introduced into the database.

            CONNECT Engine would only need for that duty a 4 column table:
            * One which contains the script to execute as a TEXT column.
            * Other with a PATH which points to the Python / RScript .exe in the Server.
            * Eventually, a COMMENT columns, for including some information about the script.
            * And at last, a column with the name of the script to CALL.

            CREATE TABLE db.t_Remote_Scripts
            (
                CALL VARCHAR(255),
                SCRIPT TEXT,
                PATH VARCHAR(255),
                COMMENTS VARCHAR(255)
            ) ENGINE = CONNECT
              TABLE_TYPE = REMOTE_SCRIPT;

            So when calling:

            SELECT
               *
            FROM
                db.t_Remote_Scripts
            WHERE
                CALL = "01 - Hello, World!"

            Connect would send the SCRIPT text column to the .exe on the PATH (e.g.: RScript exe) and retrieve the select table any warnings that occurred during the execution, that could eventually even be stored in another table as a Data Quality check, to see if the script has been executed correctly.

            In the remote R/Python script, the script will have to make use of a ODBC Connection for importing the data from MariaDB, analyze it, and send it back away.

            This engine feature could imply security issues, so it shall be disabled by default, or even have its own USER security permission.

            Thank you.

            Best,
            Juan Telleria
            h1. 1. Objective
            To give the possibility to call the execution of external:
            * [Python|https://www.python.org/].
            * Or [R Statistical Programming Language|https://mran.microsoft.com/].

            Scripts directly from MariaDB, just as SQL Server, from 2017 Edition onward, allows to do so:
            * [sp_execute_external_script (Transact-SQL)|https://docs.microsoft.com/es-es/sql/relational-databases/system-stored-procedures/sp-execute-external-script-transact-sql?view=sql-server-2017]
            * [Run Python using T-SQL|https://docs.microsoft.com/en-us/sql/advanced-analytics/tutorials/run-python-using-t-sql?view=sql-server-2017]
            * [Using R functions with SQL Server data (R in SQL quickstart)|https://docs.microsoft.com/en-us/sql/advanced-analytics/tutorials/rtsql-using-r-functions-with-sql-server-data?view=sql-server-2017]

            It would be useful to have a similar functionality in MariaDB, as it would allow, for example, to trigger a remote Python/R Code for updating a predictive model in keras when new data is introduced into the database.

            CONNECT Engine would only need for that duty a 4 column table:
            * One which contains the script to execute as a TEXT column.
            * Other with a PATH which points to the Python / RScript .exe in the Server.
            * Eventually, a COMMENT columns, for including some information about the script.
            * And at last, a column with the name of the script to CALL.

            CREATE TABLE db.t_Remote_Scripts
            (
                CALL VARCHAR(255),
                SCRIPT TEXT,
                PATH VARCHAR(255),
                COMMENTS VARCHAR(255)
            ) ENGINE = CONNECT
              TABLE_TYPE = REMOTE_SCRIPT;

            So when calling:

            SELECT
               *
            FROM
                db.t_Remote_Scripts
            WHERE
                CALL = "01 - Hello, World!"

            Connect would send the SCRIPT text column to the .exe on the PATH (e.g.: RScript exe) and retrieve the select table any warnings that occurred during the execution, that could eventually even be stored in another table as a Data Quality check, to see if the script has been executed correctly.

            In the remote R/Python script, the script will have to make use of a ODBC Connection for importing the data from MariaDB, analyze it, and send it back away.

            This engine feature could imply security issues, so it shall be disabled by default, or even have its own USER security permission.

            Thank you.

            Best,
            Juan Telleria
            Juan Juan Telleria made changes -
            Description h1. 1. Objective
            To give the possibility to call the execution of external:
            * [Python|https://www.python.org/].
            * Or [R Statistical Programming Language|https://mran.microsoft.com/].

            Scripts directly from MariaDB, just as SQL Server, from 2017 Edition onward, allows to do so:
            * [sp_execute_external_script (Transact-SQL)|https://docs.microsoft.com/es-es/sql/relational-databases/system-stored-procedures/sp-execute-external-script-transact-sql?view=sql-server-2017]
            * [Run Python using T-SQL|https://docs.microsoft.com/en-us/sql/advanced-analytics/tutorials/run-python-using-t-sql?view=sql-server-2017]
            * [Using R functions with SQL Server data (R in SQL quickstart)|https://docs.microsoft.com/en-us/sql/advanced-analytics/tutorials/rtsql-using-r-functions-with-sql-server-data?view=sql-server-2017]

            It would be useful to have a similar functionality in MariaDB, as it would allow, for example, to trigger a remote Python/R Code for updating a predictive model in keras when new data is introduced into the database.

            CONNECT Engine would only need for that duty a 4 column table:
            * One which contains the script to execute as a TEXT column.
            * Other with a PATH which points to the Python / RScript .exe in the Server.
            * Eventually, a COMMENT columns, for including some information about the script.
            * And at last, a column with the name of the script to CALL.

            CREATE TABLE db.t_Remote_Scripts
            (
                CALL VARCHAR(255),
                SCRIPT TEXT,
                PATH VARCHAR(255),
                COMMENTS VARCHAR(255)
            ) ENGINE = CONNECT
              TABLE_TYPE = REMOTE_SCRIPT;

            So when calling:

            SELECT
               *
            FROM
                db.t_Remote_Scripts
            WHERE
                CALL = "01 - Hello, World!"

            Connect would send the SCRIPT text column to the .exe on the PATH (e.g.: RScript exe) and retrieve the select table any warnings that occurred during the execution, that could eventually even be stored in another table as a Data Quality check, to see if the script has been executed correctly.

            In the remote R/Python script, the script will have to make use of a ODBC Connection for importing the data from MariaDB, analyze it, and send it back away.

            This engine feature could imply security issues, so it shall be disabled by default, or even have its own USER security permission.

            Thank you.

            Best,
            Juan Telleria
            h1. 1. Objective
            To give the possibility to call the execution of external:
            * [Python|https://www.python.org/].
            * Or [R Statistical Programming Language|https://mran.microsoft.com/].

            Scripts directly from MariaDB, just as SQL Server, from 2017 Edition onward, allows to do so:
            * [sp_execute_external_script (Transact-SQL)|https://docs.microsoft.com/es-es/sql/relational-databases/system-stored-procedures/sp-execute-external-script-transact-sql?view=sql-server-2017]
            * [Run Python using T-SQL|https://docs.microsoft.com/en-us/sql/advanced-analytics/tutorials/run-python-using-t-sql?view=sql-server-2017]
            * [Using R functions with SQL Server data (R in SQL quickstart)|https://docs.microsoft.com/en-us/sql/advanced-analytics/tutorials/rtsql-using-r-functions-with-sql-server-data?view=sql-server-2017]

            The ultimate objetive is, for example, to trigger the execution of a remote Python/R Code for updating a predictive model in keras/h2o/tensorflow/... when new data is introduced into the database, or as part of a SQL procedure.

            h1. MariaDB's CONNECT Implementation
            CONNECT Engine would only need for that duty a 4 column table:
            * One which contains the script to execute as a TEXT column.
            * Other with a PATH which points to the Python / RScript .exe in the Server.
            * Eventually, a COMMENT columns, for including some information about the script.
            * And at last, a column with the name of the script to CALL.

            CREATE TABLE db.t_Remote_Scripts
            (
                CALL VARCHAR(255),
                SCRIPT TEXT,
                PATH VARCHAR(255),
                COMMENTS VARCHAR(255)
            ) ENGINE = CONNECT
              TABLE_TYPE = REMOTE_SCRIPT;

            So when calling:

            SELECT
               *
            FROM
                db.t_Remote_Scripts
            WHERE
                CALL = "01 - Hello, World!"

            Connect would send the SCRIPT text column to the .exe on the PATH (e.g.: RScript exe) and retrieve the select table any warnings that occurred during the execution, that could eventually even be stored in another table as a Data Quality check, to see if the script has been executed correctly.

            In the remote R/Python script, the script will have to make use of a ODBC Connection for importing the data from MariaDB, analyze it, and send it back away.

            This engine feature could imply security issues, so it shall be disabled by default, or even have its own USER security permission.

            Thank you.

            Best,
            Juan Telleria
            Juan Juan Telleria made changes -
            Description h1. 1. Objective
            To give the possibility to call the execution of external:
            * [Python|https://www.python.org/].
            * Or [R Statistical Programming Language|https://mran.microsoft.com/].

            Scripts directly from MariaDB, just as SQL Server, from 2017 Edition onward, allows to do so:
            * [sp_execute_external_script (Transact-SQL)|https://docs.microsoft.com/es-es/sql/relational-databases/system-stored-procedures/sp-execute-external-script-transact-sql?view=sql-server-2017]
            * [Run Python using T-SQL|https://docs.microsoft.com/en-us/sql/advanced-analytics/tutorials/run-python-using-t-sql?view=sql-server-2017]
            * [Using R functions with SQL Server data (R in SQL quickstart)|https://docs.microsoft.com/en-us/sql/advanced-analytics/tutorials/rtsql-using-r-functions-with-sql-server-data?view=sql-server-2017]

            The ultimate objetive is, for example, to trigger the execution of a remote Python/R Code for updating a predictive model in keras/h2o/tensorflow/... when new data is introduced into the database, or as part of a SQL procedure.

            h1. MariaDB's CONNECT Implementation
            CONNECT Engine would only need for that duty a 4 column table:
            * One which contains the script to execute as a TEXT column.
            * Other with a PATH which points to the Python / RScript .exe in the Server.
            * Eventually, a COMMENT columns, for including some information about the script.
            * And at last, a column with the name of the script to CALL.

            CREATE TABLE db.t_Remote_Scripts
            (
                CALL VARCHAR(255),
                SCRIPT TEXT,
                PATH VARCHAR(255),
                COMMENTS VARCHAR(255)
            ) ENGINE = CONNECT
              TABLE_TYPE = REMOTE_SCRIPT;

            So when calling:

            SELECT
               *
            FROM
                db.t_Remote_Scripts
            WHERE
                CALL = "01 - Hello, World!"

            Connect would send the SCRIPT text column to the .exe on the PATH (e.g.: RScript exe) and retrieve the select table any warnings that occurred during the execution, that could eventually even be stored in another table as a Data Quality check, to see if the script has been executed correctly.

            In the remote R/Python script, the script will have to make use of a ODBC Connection for importing the data from MariaDB, analyze it, and send it back away.

            This engine feature could imply security issues, so it shall be disabled by default, or even have its own USER security permission.

            Thank you.

            Best,
            Juan Telleria
            h1. 1. Objective
            To give the possibility to call the execution of external:
            * [Python|https://www.python.org/].
            * Or [R Statistical Programming Language|https://mran.microsoft.com/].

            Scripts directly from MariaDB, just as SQL Server, from 2017 Edition onward, allows to do so:
            * [sp_execute_external_script (Transact-SQL)|https://docs.microsoft.com/es-es/sql/relational-databases/system-stored-procedures/sp-execute-external-script-transact-sql?view=sql-server-2017]
            * [Run Python using T-SQL|https://docs.microsoft.com/en-us/sql/advanced-analytics/tutorials/run-python-using-t-sql?view=sql-server-2017]
            * [Using R functions with SQL Server data (R in SQL quickstart)|https://docs.microsoft.com/en-us/sql/advanced-analytics/tutorials/rtsql-using-r-functions-with-sql-server-data?view=sql-server-2017]

            The ultimate objetive is, for example, to trigger the execution of a remote Python/R Code for updating a predictive model in keras/h2o/tensorflow/... when new data is introduced into the database, or as part of a SQL procedure.

            h1. 2. MariaDB's CONNECT Implementation
            CONNECT Engine would only need for that duty a 4 column table:
            * One which contains the script to execute as a TEXT column.
            * Other with a PATH which points to the Python / RScript .exe in the Server.
            * Eventually, a COMMENT columns, for including some information about the script.
            * And at last, a column with the name of the script to CALL.

            CREATE TABLE db.t_Remote_Scripts
            (
                CALL VARCHAR(255),
                SCRIPT TEXT,
                PATH VARCHAR(255),
                COMMENTS VARCHAR(255)
            ) ENGINE = CONNECT
              TABLE_TYPE = REMOTE_SCRIPT;

            So when calling:

            SELECT
               *
            FROM
                db.t_Remote_Scripts
            WHERE
                CALL = "01 - Hello, World!"

            Connect would send the SCRIPT text column to the .exe on the PATH (e.g.: RScript exe) and retrieve the select table any warnings that occurred during the execution, that could eventually even be stored in another table as a Data Quality check, to see if the script has been executed correctly.

            In the remote R/Python script, the script will have to make use of a ODBC Connection for importing the data from MariaDB, analyze it, and send it back away.

            This engine feature could imply security issues, so it shall be disabled by default, or even have its own USER security permission.

            Thank you.

            Best,
            Juan Telleria
            Juan Juan Telleria made changes -
            Description h1. 1. Objective
            To give the possibility to call the execution of external:
            * [Python|https://www.python.org/].
            * Or [R Statistical Programming Language|https://mran.microsoft.com/].

            Scripts directly from MariaDB, just as SQL Server, from 2017 Edition onward, allows to do so:
            * [sp_execute_external_script (Transact-SQL)|https://docs.microsoft.com/es-es/sql/relational-databases/system-stored-procedures/sp-execute-external-script-transact-sql?view=sql-server-2017]
            * [Run Python using T-SQL|https://docs.microsoft.com/en-us/sql/advanced-analytics/tutorials/run-python-using-t-sql?view=sql-server-2017]
            * [Using R functions with SQL Server data (R in SQL quickstart)|https://docs.microsoft.com/en-us/sql/advanced-analytics/tutorials/rtsql-using-r-functions-with-sql-server-data?view=sql-server-2017]

            The ultimate objetive is, for example, to trigger the execution of a remote Python/R Code for updating a predictive model in keras/h2o/tensorflow/... when new data is introduced into the database, or as part of a SQL procedure.

            h1. 2. MariaDB's CONNECT Implementation
            CONNECT Engine would only need for that duty a 4 column table:
            * One which contains the script to execute as a TEXT column.
            * Other with a PATH which points to the Python / RScript .exe in the Server.
            * Eventually, a COMMENT columns, for including some information about the script.
            * And at last, a column with the name of the script to CALL.

            CREATE TABLE db.t_Remote_Scripts
            (
                CALL VARCHAR(255),
                SCRIPT TEXT,
                PATH VARCHAR(255),
                COMMENTS VARCHAR(255)
            ) ENGINE = CONNECT
              TABLE_TYPE = REMOTE_SCRIPT;

            So when calling:

            SELECT
               *
            FROM
                db.t_Remote_Scripts
            WHERE
                CALL = "01 - Hello, World!"

            Connect would send the SCRIPT text column to the .exe on the PATH (e.g.: RScript exe) and retrieve the select table any warnings that occurred during the execution, that could eventually even be stored in another table as a Data Quality check, to see if the script has been executed correctly.

            In the remote R/Python script, the script will have to make use of a ODBC Connection for importing the data from MariaDB, analyze it, and send it back away.

            This engine feature could imply security issues, so it shall be disabled by default, or even have its own USER security permission.

            Thank you.

            Best,
            Juan Telleria
            h1. 1. Objective
            To give the possibility to call the execution of external:
            * [Python|https://www.python.org/].
            * Or [R Statistical Programming Language|https://mran.microsoft.com/].

            Scripts directly from MariaDB, just as SQL Server, from 2017 Edition onward, allows to do so:
            * [sp_execute_external_script (Transact-SQL)|https://docs.microsoft.com/es-es/sql/relational-databases/system-stored-procedures/sp-execute-external-script-transact-sql?view=sql-server-2017]
            * [Run Python using T-SQL|https://docs.microsoft.com/en-us/sql/advanced-analytics/tutorials/run-python-using-t-sql?view=sql-server-2017]
            * [Using R functions with SQL Server data (R in SQL quickstart)|https://docs.microsoft.com/en-us/sql/advanced-analytics/tutorials/rtsql-using-r-functions-with-sql-server-data?view=sql-server-2017]

            The ultimate objetive is, for example, to trigger the execution of a remote Python/R Code for updating a predictive model in keras/h2o/tensorflow/... when new data is introduced into the database, or as part of a SQL procedure.

            h1. 2. MariaDB's CONNECT Implementation
            One possible implementation could be as follows:
            h2. my.ini
            CONNECT Engine would only need for that duty a 4 column table:
            * One which contains the script to execute as a TEXT column.
            * Other with a PATH which points to the Python / RScript .exe in the Server.
            * Eventually, a COMMENT columns, for including some information about the script.
            * And at last, a column with the name of the script to CALL.

            CREATE TABLE db.t_Remote_Scripts
            (
                CALL VARCHAR(255),
                SCRIPT TEXT,
                PATH VARCHAR(255),
                COMMENTS VARCHAR(255)
            ) ENGINE = CONNECT
              TABLE_TYPE = REMOTE_SCRIPT;

            So when calling:

            SELECT
               *
            FROM
                db.t_Remote_Scripts
            WHERE
                CALL = "01 - Hello, World!"

            Connect would send the SCRIPT text column to the .exe on the PATH (e.g.: RScript exe) and retrieve the select table any warnings that occurred during the execution, that could eventually even be stored in another table as a Data Quality check, to see if the script has been executed correctly.

            In the remote R/Python script, the script will have to make use of a ODBC Connection for importing the data from MariaDB, analyze it, and send it back away.

            This engine feature could imply security issues, so it shall be disabled by default, or even have its own USER security permission.

            Thank you.

            Best,
            Juan Telleria
            Juan Juan Telleria made changes -
            Description h1. 1. Objective
            To give the possibility to call the execution of external:
            * [Python|https://www.python.org/].
            * Or [R Statistical Programming Language|https://mran.microsoft.com/].

            Scripts directly from MariaDB, just as SQL Server, from 2017 Edition onward, allows to do so:
            * [sp_execute_external_script (Transact-SQL)|https://docs.microsoft.com/es-es/sql/relational-databases/system-stored-procedures/sp-execute-external-script-transact-sql?view=sql-server-2017]
            * [Run Python using T-SQL|https://docs.microsoft.com/en-us/sql/advanced-analytics/tutorials/run-python-using-t-sql?view=sql-server-2017]
            * [Using R functions with SQL Server data (R in SQL quickstart)|https://docs.microsoft.com/en-us/sql/advanced-analytics/tutorials/rtsql-using-r-functions-with-sql-server-data?view=sql-server-2017]

            The ultimate objetive is, for example, to trigger the execution of a remote Python/R Code for updating a predictive model in keras/h2o/tensorflow/... when new data is introduced into the database, or as part of a SQL procedure.

            h1. 2. MariaDB's CONNECT Implementation
            One possible implementation could be as follows:
            h2. my.ini
            CONNECT Engine would only need for that duty a 4 column table:
            * One which contains the script to execute as a TEXT column.
            * Other with a PATH which points to the Python / RScript .exe in the Server.
            * Eventually, a COMMENT columns, for including some information about the script.
            * And at last, a column with the name of the script to CALL.

            CREATE TABLE db.t_Remote_Scripts
            (
                CALL VARCHAR(255),
                SCRIPT TEXT,
                PATH VARCHAR(255),
                COMMENTS VARCHAR(255)
            ) ENGINE = CONNECT
              TABLE_TYPE = REMOTE_SCRIPT;

            So when calling:

            SELECT
               *
            FROM
                db.t_Remote_Scripts
            WHERE
                CALL = "01 - Hello, World!"

            Connect would send the SCRIPT text column to the .exe on the PATH (e.g.: RScript exe) and retrieve the select table any warnings that occurred during the execution, that could eventually even be stored in another table as a Data Quality check, to see if the script has been executed correctly.

            In the remote R/Python script, the script will have to make use of a ODBC Connection for importing the data from MariaDB, analyze it, and send it back away.

            This engine feature could imply security issues, so it shall be disabled by default, or even have its own USER security permission.

            Thank you.

            Best,
            Juan Telleria
            h1. 1. Objective
            To give the possibility to call the execution of external:
            * [Python|https://www.python.org/].
            * Or [R Statistical Programming Language|https://mran.microsoft.com/].

            Scripts directly from MariaDB, just as SQL Server, from 2017 Edition onward, allows to do so:
            * [sp_execute_external_script (Transact-SQL)|https://docs.microsoft.com/es-es/sql/relational-databases/system-stored-procedures/sp-execute-external-script-transact-sql?view=sql-server-2017]
            * [Run Python using T-SQL|https://docs.microsoft.com/en-us/sql/advanced-analytics/tutorials/run-python-using-t-sql?view=sql-server-2017]
            * [Using R functions with SQL Server data (R in SQL quickstart)|https://docs.microsoft.com/en-us/sql/advanced-analytics/tutorials/rtsql-using-r-functions-with-sql-server-data?view=sql-server-2017]

            The ultimate objetive is, for example, to trigger the execution of a remote Python/R Code for updating a predictive model in keras/h2o/tensorflow/... when new data is introduced into the database, or as part of a SQL procedure.

            h1. 2. MariaDB's CONNECT Implementation
            One possible implementation could be as follows:
            h2. 2.1. my.ini
            CONNECT Engine would only need for that duty a 4 column table:
            * One which contains the script to execute as a TEXT column.
            * Other with a PATH which points to the Python / RScript .exe in the Server.
            * Eventually, a COMMENT columns, for including some information about the script.
            * And at last, a column with the name of the script to CALL.

            CREATE TABLE db.t_Remote_Scripts
            (
                CALL VARCHAR(255),
                SCRIPT TEXT,
                PATH VARCHAR(255),
                COMMENTS VARCHAR(255)
            ) ENGINE = CONNECT
              TABLE_TYPE = REMOTE_SCRIPT;

            So when calling:

            SELECT
               *
            FROM
                db.t_Remote_Scripts
            WHERE
                CALL = "01 - Hello, World!"

            Connect would send the SCRIPT text column to the .exe on the PATH (e.g.: RScript exe) and retrieve the select table any warnings that occurred during the execution, that could eventually even be stored in another table as a Data Quality check, to see if the script has been executed correctly.

            In the remote R/Python script, the script will have to make use of a ODBC Connection for importing the data from MariaDB, analyze it, and send it back away.

            This engine feature could imply security issues, so it shall be disabled by default, or even have its own USER security permission.

            Thank you.

            Best,
            Juan Telleria
            Juan Juan Telleria made changes -
            Description h1. 1. Objective
            To give the possibility to call the execution of external:
            * [Python|https://www.python.org/].
            * Or [R Statistical Programming Language|https://mran.microsoft.com/].

            Scripts directly from MariaDB, just as SQL Server, from 2017 Edition onward, allows to do so:
            * [sp_execute_external_script (Transact-SQL)|https://docs.microsoft.com/es-es/sql/relational-databases/system-stored-procedures/sp-execute-external-script-transact-sql?view=sql-server-2017]
            * [Run Python using T-SQL|https://docs.microsoft.com/en-us/sql/advanced-analytics/tutorials/run-python-using-t-sql?view=sql-server-2017]
            * [Using R functions with SQL Server data (R in SQL quickstart)|https://docs.microsoft.com/en-us/sql/advanced-analytics/tutorials/rtsql-using-r-functions-with-sql-server-data?view=sql-server-2017]

            The ultimate objetive is, for example, to trigger the execution of a remote Python/R Code for updating a predictive model in keras/h2o/tensorflow/... when new data is introduced into the database, or as part of a SQL procedure.

            h1. 2. MariaDB's CONNECT Implementation
            One possible implementation could be as follows:
            h2. 2.1. my.ini
            CONNECT Engine would only need for that duty a 4 column table:
            * One which contains the script to execute as a TEXT column.
            * Other with a PATH which points to the Python / RScript .exe in the Server.
            * Eventually, a COMMENT columns, for including some information about the script.
            * And at last, a column with the name of the script to CALL.

            CREATE TABLE db.t_Remote_Scripts
            (
                CALL VARCHAR(255),
                SCRIPT TEXT,
                PATH VARCHAR(255),
                COMMENTS VARCHAR(255)
            ) ENGINE = CONNECT
              TABLE_TYPE = REMOTE_SCRIPT;

            So when calling:

            SELECT
               *
            FROM
                db.t_Remote_Scripts
            WHERE
                CALL = "01 - Hello, World!"

            Connect would send the SCRIPT text column to the .exe on the PATH (e.g.: RScript exe) and retrieve the select table any warnings that occurred during the execution, that could eventually even be stored in another table as a Data Quality check, to see if the script has been executed correctly.

            In the remote R/Python script, the script will have to make use of a ODBC Connection for importing the data from MariaDB, analyze it, and send it back away.

            This engine feature could imply security issues, so it shall be disabled by default, or even have its own USER security permission.

            Thank you.

            Best,
            Juan Telleria
            h1. 1. Objective
            To give the possibility to call the execution of external:
            * [Python|https://www.python.org/].
            * Or [R Statistical Programming Language|https://mran.microsoft.com/].

            Scripts directly from MariaDB, just as SQL Server, from 2017 Edition onward, allows to do so:
            * [sp_execute_external_script (Transact-SQL)|https://docs.microsoft.com/es-es/sql/relational-databases/system-stored-procedures/sp-execute-external-script-transact-sql?view=sql-server-2017]
            * [Run Python using T-SQL|https://docs.microsoft.com/en-us/sql/advanced-analytics/tutorials/run-python-using-t-sql?view=sql-server-2017]
            * [Using R functions with SQL Server data (R in SQL quickstart)|https://docs.microsoft.com/en-us/sql/advanced-analytics/tutorials/rtsql-using-r-functions-with-sql-server-data?view=sql-server-2017]

            The ultimate objetive is, for example, to trigger the execution of a remote Python/R Code for updating a predictive model in keras/h2o/tensorflow/... when new data is introduced into the database, or as part of a SQL procedure.

            h1. 2. MariaDB's CONNECT Implementation
            One possible implementation could be as follows:
            h2. 2.1. my.ini
            [mysqld]
            * connect_enable_execute_external_script = {0|1}
            *

            CONNECT Engine would only need for that duty a 4 column table:
            * One which contains the script to execute as a TEXT column.
            * Other with a PATH which points to the Python / RScript .exe in the Server.
            * Eventually, a COMMENT columns, for including some information about the script.
            * And at last, a column with the name of the script to CALL.

            CREATE TABLE db.t_Remote_Scripts
            (
                CALL VARCHAR(255),
                SCRIPT TEXT,
                PATH VARCHAR(255),
                COMMENTS VARCHAR(255)
            ) ENGINE = CONNECT
              TABLE_TYPE = REMOTE_SCRIPT;

            So when calling:

            SELECT
               *
            FROM
                db.t_Remote_Scripts
            WHERE
                CALL = "01 - Hello, World!"

            Connect would send the SCRIPT text column to the .exe on the PATH (e.g.: RScript exe) and retrieve the select table any warnings that occurred during the execution, that could eventually even be stored in another table as a Data Quality check, to see if the script has been executed correctly.

            In the remote R/Python script, the script will have to make use of a ODBC Connection for importing the data from MariaDB, analyze it, and send it back away.

            This engine feature could imply security issues, so it shall be disabled by default, or even have its own USER security permission.

            Thank you.

            Best,
            Juan Telleria
            Juan Juan Telleria made changes -
            Description h1. 1. Objective
            To give the possibility to call the execution of external:
            * [Python|https://www.python.org/].
            * Or [R Statistical Programming Language|https://mran.microsoft.com/].

            Scripts directly from MariaDB, just as SQL Server, from 2017 Edition onward, allows to do so:
            * [sp_execute_external_script (Transact-SQL)|https://docs.microsoft.com/es-es/sql/relational-databases/system-stored-procedures/sp-execute-external-script-transact-sql?view=sql-server-2017]
            * [Run Python using T-SQL|https://docs.microsoft.com/en-us/sql/advanced-analytics/tutorials/run-python-using-t-sql?view=sql-server-2017]
            * [Using R functions with SQL Server data (R in SQL quickstart)|https://docs.microsoft.com/en-us/sql/advanced-analytics/tutorials/rtsql-using-r-functions-with-sql-server-data?view=sql-server-2017]

            The ultimate objetive is, for example, to trigger the execution of a remote Python/R Code for updating a predictive model in keras/h2o/tensorflow/... when new data is introduced into the database, or as part of a SQL procedure.

            h1. 2. MariaDB's CONNECT Implementation
            One possible implementation could be as follows:
            h2. 2.1. my.ini
            [mysqld]
            * connect_enable_execute_external_script = {0|1}
            *

            CONNECT Engine would only need for that duty a 4 column table:
            * One which contains the script to execute as a TEXT column.
            * Other with a PATH which points to the Python / RScript .exe in the Server.
            * Eventually, a COMMENT columns, for including some information about the script.
            * And at last, a column with the name of the script to CALL.

            CREATE TABLE db.t_Remote_Scripts
            (
                CALL VARCHAR(255),
                SCRIPT TEXT,
                PATH VARCHAR(255),
                COMMENTS VARCHAR(255)
            ) ENGINE = CONNECT
              TABLE_TYPE = REMOTE_SCRIPT;

            So when calling:

            SELECT
               *
            FROM
                db.t_Remote_Scripts
            WHERE
                CALL = "01 - Hello, World!"

            Connect would send the SCRIPT text column to the .exe on the PATH (e.g.: RScript exe) and retrieve the select table any warnings that occurred during the execution, that could eventually even be stored in another table as a Data Quality check, to see if the script has been executed correctly.

            In the remote R/Python script, the script will have to make use of a ODBC Connection for importing the data from MariaDB, analyze it, and send it back away.

            This engine feature could imply security issues, so it shall be disabled by default, or even have its own USER security permission.

            Thank you.

            Best,
            Juan Telleria
            h1. 1. Objective
            To give the possibility to call the execution of external:
            * [Python|https://www.python.org/].
            * Or [R Statistical Programming Language|https://mran.microsoft.com/].

            Scripts directly from MariaDB, just as SQL Server, from 2017 Edition onward, allows to do so:
            * [sp_execute_external_script (Transact-SQL)|https://docs.microsoft.com/es-es/sql/relational-databases/system-stored-procedures/sp-execute-external-script-transact-sql?view=sql-server-2017]
            * [Run Python using T-SQL|https://docs.microsoft.com/en-us/sql/advanced-analytics/tutorials/run-python-using-t-sql?view=sql-server-2017]
            * [Using R functions with SQL Server data (R in SQL quickstart)|https://docs.microsoft.com/en-us/sql/advanced-analytics/tutorials/rtsql-using-r-functions-with-sql-server-data?view=sql-server-2017]

            The ultimate objetive is, for example, to trigger the execution of a remote Python/R Code for updating a predictive model in keras/h2o/tensorflow/... when new data is introduced into the database, or as part of a SQL procedure.

            h1. 2. MariaDB's CONNECT Implementation
            One possible implementation could be as follows:
            h2. 2.1. my.ini
            [mysqld]
            * connect_enable_execute_external_script = {0|1}
            * connect_python_exe_dir = "C:/MySQLData/"
            * connect_R_exe_dir = "C:/MySQLData/"

            CONNECT Engine would only need for that duty a 4 column table:
            * One which contains the script to execute as a TEXT column.
            * Other with a PATH which points to the Python / RScript .exe in the Server.
            * Eventually, a COMMENT columns, for including some information about the script.
            * And at last, a column with the name of the script to CALL.

            CREATE TABLE db.t_Remote_Scripts
            (
                CALL VARCHAR(255),
                SCRIPT TEXT,
                PATH VARCHAR(255),
                COMMENTS VARCHAR(255)
            ) ENGINE = CONNECT
              TABLE_TYPE = REMOTE_SCRIPT;

            So when calling:

            SELECT
               *
            FROM
                db.t_Remote_Scripts
            WHERE
                CALL = "01 - Hello, World!"

            Connect would send the SCRIPT text column to the .exe on the PATH (e.g.: RScript exe) and retrieve the select table any warnings that occurred during the execution, that could eventually even be stored in another table as a Data Quality check, to see if the script has been executed correctly.

            In the remote R/Python script, the script will have to make use of a ODBC Connection for importing the data from MariaDB, analyze it, and send it back away.

            This engine feature could imply security issues, so it shall be disabled by default, or even have its own USER security permission.

            Thank you.

            Best,
            Juan Telleria
            Juan Juan Telleria made changes -
            Description h1. 1. Objective
            To give the possibility to call the execution of external:
            * [Python|https://www.python.org/].
            * Or [R Statistical Programming Language|https://mran.microsoft.com/].

            Scripts directly from MariaDB, just as SQL Server, from 2017 Edition onward, allows to do so:
            * [sp_execute_external_script (Transact-SQL)|https://docs.microsoft.com/es-es/sql/relational-databases/system-stored-procedures/sp-execute-external-script-transact-sql?view=sql-server-2017]
            * [Run Python using T-SQL|https://docs.microsoft.com/en-us/sql/advanced-analytics/tutorials/run-python-using-t-sql?view=sql-server-2017]
            * [Using R functions with SQL Server data (R in SQL quickstart)|https://docs.microsoft.com/en-us/sql/advanced-analytics/tutorials/rtsql-using-r-functions-with-sql-server-data?view=sql-server-2017]

            The ultimate objetive is, for example, to trigger the execution of a remote Python/R Code for updating a predictive model in keras/h2o/tensorflow/... when new data is introduced into the database, or as part of a SQL procedure.

            h1. 2. MariaDB's CONNECT Implementation
            One possible implementation could be as follows:
            h2. 2.1. my.ini
            [mysqld]
            * connect_enable_execute_external_script = {0|1}
            * connect_python_exe_dir = "C:/MySQLData/"
            * connect_R_exe_dir = "C:/MySQLData/"

            CONNECT Engine would only need for that duty a 4 column table:
            * One which contains the script to execute as a TEXT column.
            * Other with a PATH which points to the Python / RScript .exe in the Server.
            * Eventually, a COMMENT columns, for including some information about the script.
            * And at last, a column with the name of the script to CALL.

            CREATE TABLE db.t_Remote_Scripts
            (
                CALL VARCHAR(255),
                SCRIPT TEXT,
                PATH VARCHAR(255),
                COMMENTS VARCHAR(255)
            ) ENGINE = CONNECT
              TABLE_TYPE = REMOTE_SCRIPT;

            So when calling:

            SELECT
               *
            FROM
                db.t_Remote_Scripts
            WHERE
                CALL = "01 - Hello, World!"

            Connect would send the SCRIPT text column to the .exe on the PATH (e.g.: RScript exe) and retrieve the select table any warnings that occurred during the execution, that could eventually even be stored in another table as a Data Quality check, to see if the script has been executed correctly.

            In the remote R/Python script, the script will have to make use of a ODBC Connection for importing the data from MariaDB, analyze it, and send it back away.

            This engine feature could imply security issues, so it shall be disabled by default, or even have its own USER security permission.

            Thank you.

            Best,
            Juan Telleria
            h1. 1. Objective
            To give the possibility to call the execution of external:
            * [Python|https://www.python.org/].
            * Or [R Statistical Programming Language|https://mran.microsoft.com/].

            Scripts directly from MariaDB, just as SQL Server, from 2017 Edition onward, allows to do so:
            * [sp_execute_external_script (Transact-SQL)|https://docs.microsoft.com/es-es/sql/relational-databases/system-stored-procedures/sp-execute-external-script-transact-sql?view=sql-server-2017]
            * [Run Python using T-SQL|https://docs.microsoft.com/en-us/sql/advanced-analytics/tutorials/run-python-using-t-sql?view=sql-server-2017]
            * [Using R functions with SQL Server data (R in SQL quickstart)|https://docs.microsoft.com/en-us/sql/advanced-analytics/tutorials/rtsql-using-r-functions-with-sql-server-data?view=sql-server-2017]

            The ultimate objetive is, for example, to trigger the execution of a remote Python/R Code for updating a predictive model in keras/h2o/tensorflow/... when new data is introduced into the database, or as part of a SQL procedure.

            h1. 2. MariaDB's CONNECT Implementation
            One possible implementation could be as follows:
            h2. 2.1. my.ini
            [mysqld]
            * connect_enable_execute_external_script = {0|1}
            * connect_python_exe_dir = "C:/MySQLData/"
            * connect_R_exe_dir = "C:/Program Files/Microsoft/R Open/R-3.4.3/bin/Rscript.exe"

            CONNECT Engine would only need for that duty a 4 column table:
            * One which contains the script to execute as a TEXT column.
            * Other with a PATH which points to the Python / RScript .exe in the Server.
            * Eventually, a COMMENT columns, for including some information about the script.
            * And at last, a column with the name of the script to CALL.

            CREATE TABLE db.t_Remote_Scripts
            (
                CALL VARCHAR(255),
                SCRIPT TEXT,
                PATH VARCHAR(255),
                COMMENTS VARCHAR(255)
            ) ENGINE = CONNECT
              TABLE_TYPE = REMOTE_SCRIPT;

            So when calling:

            SELECT
               *
            FROM
                db.t_Remote_Scripts
            WHERE
                CALL = "01 - Hello, World!"

            Connect would send the SCRIPT text column to the .exe on the PATH (e.g.: RScript exe) and retrieve the select table any warnings that occurred during the execution, that could eventually even be stored in another table as a Data Quality check, to see if the script has been executed correctly.

            In the remote R/Python script, the script will have to make use of a ODBC Connection for importing the data from MariaDB, analyze it, and send it back away.

            This engine feature could imply security issues, so it shall be disabled by default, or even have its own USER security permission.

            Thank you.

            Best,
            Juan Telleria

            As I previously said, in a create table, columns definition is meant to describe the returned result and cannot be used for other purpose.
            Another problem is that all this is based on CONNECT executing an exe program. I don't know if it is possible and, even it is, it probably cannot be permitted for security reasons.
            Perhaps doing this can be achieve using a procedure, as SQL server does, but I don't see how CONNECT could do it, for instance how to retrieve data from the script?

            bertrandop Olivier Bertrand added a comment - As I previously said, in a create table, columns definition is meant to describe the returned result and cannot be used for other purpose. Another problem is that all this is based on CONNECT executing an exe program. I don't know if it is possible and, even it is, it probably cannot be permitted for security reasons. Perhaps doing this can be achieve using a procedure, as SQL server does, but I don't see how CONNECT could do it, for instance how to retrieve data from the script?
            Juan Juan Telleria made changes -
            Description h1. 1. Objective
            To give the possibility to call the execution of external:
            * [Python|https://www.python.org/].
            * Or [R Statistical Programming Language|https://mran.microsoft.com/].

            Scripts directly from MariaDB, just as SQL Server, from 2017 Edition onward, allows to do so:
            * [sp_execute_external_script (Transact-SQL)|https://docs.microsoft.com/es-es/sql/relational-databases/system-stored-procedures/sp-execute-external-script-transact-sql?view=sql-server-2017]
            * [Run Python using T-SQL|https://docs.microsoft.com/en-us/sql/advanced-analytics/tutorials/run-python-using-t-sql?view=sql-server-2017]
            * [Using R functions with SQL Server data (R in SQL quickstart)|https://docs.microsoft.com/en-us/sql/advanced-analytics/tutorials/rtsql-using-r-functions-with-sql-server-data?view=sql-server-2017]

            The ultimate objetive is, for example, to trigger the execution of a remote Python/R Code for updating a predictive model in keras/h2o/tensorflow/... when new data is introduced into the database, or as part of a SQL procedure.

            h1. 2. MariaDB's CONNECT Implementation
            One possible implementation could be as follows:
            h2. 2.1. my.ini
            [mysqld]
            * connect_enable_execute_external_script = {0|1}
            * connect_python_exe_dir = "C:/MySQLData/"
            * connect_R_exe_dir = "C:/Program Files/Microsoft/R Open/R-3.4.3/bin/Rscript.exe"

            CONNECT Engine would only need for that duty a 4 column table:
            * One which contains the script to execute as a TEXT column.
            * Other with a PATH which points to the Python / RScript .exe in the Server.
            * Eventually, a COMMENT columns, for including some information about the script.
            * And at last, a column with the name of the script to CALL.

            CREATE TABLE db.t_Remote_Scripts
            (
                CALL VARCHAR(255),
                SCRIPT TEXT,
                PATH VARCHAR(255),
                COMMENTS VARCHAR(255)
            ) ENGINE = CONNECT
              TABLE_TYPE = REMOTE_SCRIPT;

            So when calling:

            SELECT
               *
            FROM
                db.t_Remote_Scripts
            WHERE
                CALL = "01 - Hello, World!"

            Connect would send the SCRIPT text column to the .exe on the PATH (e.g.: RScript exe) and retrieve the select table any warnings that occurred during the execution, that could eventually even be stored in another table as a Data Quality check, to see if the script has been executed correctly.

            In the remote R/Python script, the script will have to make use of a ODBC Connection for importing the data from MariaDB, analyze it, and send it back away.

            This engine feature could imply security issues, so it shall be disabled by default, or even have its own USER security permission.

            Thank you.

            Best,
            Juan Telleria
            h1. 1. Objective
            To give the possibility to call the execution of external:
            * [Python|https://www.python.org/].
            * Or [R Statistical Programming Language|https://mran.microsoft.com/].

            Scripts directly from MariaDB, just as SQL Server, from 2017 Edition onward, allows to do so:
            * [sp_execute_external_script (Transact-SQL)|https://docs.microsoft.com/es-es/sql/relational-databases/system-stored-procedures/sp-execute-external-script-transact-sql?view=sql-server-2017]
            * [Run Python using T-SQL|https://docs.microsoft.com/en-us/sql/advanced-analytics/tutorials/run-python-using-t-sql?view=sql-server-2017]
            * [Using R functions with SQL Server data (R in SQL quickstart)|https://docs.microsoft.com/en-us/sql/advanced-analytics/tutorials/rtsql-using-r-functions-with-sql-server-data?view=sql-server-2017]

            The ultimate objetive is, for example, to trigger the execution of a remote Python/R Code for updating a predictive model in keras/h2o/tensorflow/... when new data is introduced into the database, or as part of a SQL procedure.

            h1. 2. MariaDB's CONNECT Implementation
            One possible implementation could be as follows:
            h2. 2.1. my.ini
            [mysqld]
            * connect_enable_execute_external_script = {0|1}
            * connect_python_exe_dir = "C:/Users/J-tel/AppData/Local/Programs/Python/Python36-32"
            * connect_R_exe_dir = "C:/Program Files/Microsoft/R Open/R-3.4.3/bin/Rscript.exe"

            CONNECT Engine would only need for that duty a 4 column table:
            * One which contains the script to execute as a TEXT column.
            * Other with a PATH which points to the Python / RScript .exe in the Server.
            * Eventually, a COMMENT columns, for including some information about the script.
            * And at last, a column with the name of the script to CALL.

            CREATE TABLE db.t_Remote_Scripts
            (
                CALL VARCHAR(255),
                SCRIPT TEXT,
                PATH VARCHAR(255),
                COMMENTS VARCHAR(255)
            ) ENGINE = CONNECT
              TABLE_TYPE = REMOTE_SCRIPT;

            So when calling:

            SELECT
               *
            FROM
                db.t_Remote_Scripts
            WHERE
                CALL = "01 - Hello, World!"

            Connect would send the SCRIPT text column to the .exe on the PATH (e.g.: RScript exe) and retrieve the select table any warnings that occurred during the execution, that could eventually even be stored in another table as a Data Quality check, to see if the script has been executed correctly.

            In the remote R/Python script, the script will have to make use of a ODBC Connection for importing the data from MariaDB, analyze it, and send it back away.

            This engine feature could imply security issues, so it shall be disabled by default, or even have its own USER security permission.

            Thank you.

            Best,
            Juan Telleria
            Juan Juan Telleria made changes -
            Description h1. 1. Objective
            To give the possibility to call the execution of external:
            * [Python|https://www.python.org/].
            * Or [R Statistical Programming Language|https://mran.microsoft.com/].

            Scripts directly from MariaDB, just as SQL Server, from 2017 Edition onward, allows to do so:
            * [sp_execute_external_script (Transact-SQL)|https://docs.microsoft.com/es-es/sql/relational-databases/system-stored-procedures/sp-execute-external-script-transact-sql?view=sql-server-2017]
            * [Run Python using T-SQL|https://docs.microsoft.com/en-us/sql/advanced-analytics/tutorials/run-python-using-t-sql?view=sql-server-2017]
            * [Using R functions with SQL Server data (R in SQL quickstart)|https://docs.microsoft.com/en-us/sql/advanced-analytics/tutorials/rtsql-using-r-functions-with-sql-server-data?view=sql-server-2017]

            The ultimate objetive is, for example, to trigger the execution of a remote Python/R Code for updating a predictive model in keras/h2o/tensorflow/... when new data is introduced into the database, or as part of a SQL procedure.

            h1. 2. MariaDB's CONNECT Implementation
            One possible implementation could be as follows:
            h2. 2.1. my.ini
            [mysqld]
            * connect_enable_execute_external_script = {0|1}
            * connect_python_exe_dir = "C:/Users/J-tel/AppData/Local/Programs/Python/Python36-32"
            * connect_R_exe_dir = "C:/Program Files/Microsoft/R Open/R-3.4.3/bin/Rscript.exe"

            CONNECT Engine would only need for that duty a 4 column table:
            * One which contains the script to execute as a TEXT column.
            * Other with a PATH which points to the Python / RScript .exe in the Server.
            * Eventually, a COMMENT columns, for including some information about the script.
            * And at last, a column with the name of the script to CALL.

            CREATE TABLE db.t_Remote_Scripts
            (
                CALL VARCHAR(255),
                SCRIPT TEXT,
                PATH VARCHAR(255),
                COMMENTS VARCHAR(255)
            ) ENGINE = CONNECT
              TABLE_TYPE = REMOTE_SCRIPT;

            So when calling:

            SELECT
               *
            FROM
                db.t_Remote_Scripts
            WHERE
                CALL = "01 - Hello, World!"

            Connect would send the SCRIPT text column to the .exe on the PATH (e.g.: RScript exe) and retrieve the select table any warnings that occurred during the execution, that could eventually even be stored in another table as a Data Quality check, to see if the script has been executed correctly.

            In the remote R/Python script, the script will have to make use of a ODBC Connection for importing the data from MariaDB, analyze it, and send it back away.

            This engine feature could imply security issues, so it shall be disabled by default, or even have its own USER security permission.

            Thank you.

            Best,
            Juan Telleria
            h1. 1. Objective
            To give the possibility to call the execution of external:
            * [Python|https://www.python.org/].
            * Or [R Statistical Programming Language|https://mran.microsoft.com/].

            Scripts directly from MariaDB, just as SQL Server, from 2017 Edition onward, allows to do so:
            * [sp_execute_external_script (Transact-SQL)|https://docs.microsoft.com/es-es/sql/relational-databases/system-stored-procedures/sp-execute-external-script-transact-sql?view=sql-server-2017]
            * [Run Python using T-SQL|https://docs.microsoft.com/en-us/sql/advanced-analytics/tutorials/run-python-using-t-sql?view=sql-server-2017]
            * [Using R functions with SQL Server data (R in SQL quickstart)|https://docs.microsoft.com/en-us/sql/advanced-analytics/tutorials/rtsql-using-r-functions-with-sql-server-data?view=sql-server-2017]

            The ultimate objetive is, for example, to trigger the execution of a remote Python/R Code for updating a predictive model in keras/h2o/tensorflow/... when new data is introduced into the database, or as part of a SQL procedure.

            h1. 2. MariaDB's CONNECT Implementation
            One possible implementation could be as follows:
            h2. 2.1. my.ini
            [mysqld]
            * connect_enable_execute_external_script = {0|1}
            * connect_python_exe_dir = "C:/Users/J-tel/AppData/Local/Programs/Python/Python36-32/python.exe"
            * connect_R_exe_dir = "C:/Program Files/Microsoft/R Open/R-3.4.3/bin/Rscript.exe"

            CONNECT Engine would only need for that duty a 4 column table:
            * One which contains the script to execute as a TEXT column.
            * Other with a PATH which points to the Python / RScript .exe in the Server.
            * Eventually, a COMMENT columns, for including some information about the script.
            * And at last, a column with the name of the script to CALL.

            CREATE TABLE db.t_Remote_Scripts
            (
                CALL VARCHAR(255),
                SCRIPT TEXT,
                PATH VARCHAR(255),
                COMMENTS VARCHAR(255)
            ) ENGINE = CONNECT
              TABLE_TYPE = REMOTE_SCRIPT;

            So when calling:

            SELECT
               *
            FROM
                db.t_Remote_Scripts
            WHERE
                CALL = "01 - Hello, World!"

            Connect would send the SCRIPT text column to the .exe on the PATH (e.g.: RScript exe) and retrieve the select table any warnings that occurred during the execution, that could eventually even be stored in another table as a Data Quality check, to see if the script has been executed correctly.

            In the remote R/Python script, the script will have to make use of a ODBC Connection for importing the data from MariaDB, analyze it, and send it back away.

            This engine feature could imply security issues, so it shall be disabled by default, or even have its own USER security permission.

            Thank you.

            Best,
            Juan Telleria
            Juan Juan Telleria made changes -
            Description h1. 1. Objective
            To give the possibility to call the execution of external:
            * [Python|https://www.python.org/].
            * Or [R Statistical Programming Language|https://mran.microsoft.com/].

            Scripts directly from MariaDB, just as SQL Server, from 2017 Edition onward, allows to do so:
            * [sp_execute_external_script (Transact-SQL)|https://docs.microsoft.com/es-es/sql/relational-databases/system-stored-procedures/sp-execute-external-script-transact-sql?view=sql-server-2017]
            * [Run Python using T-SQL|https://docs.microsoft.com/en-us/sql/advanced-analytics/tutorials/run-python-using-t-sql?view=sql-server-2017]
            * [Using R functions with SQL Server data (R in SQL quickstart)|https://docs.microsoft.com/en-us/sql/advanced-analytics/tutorials/rtsql-using-r-functions-with-sql-server-data?view=sql-server-2017]

            The ultimate objetive is, for example, to trigger the execution of a remote Python/R Code for updating a predictive model in keras/h2o/tensorflow/... when new data is introduced into the database, or as part of a SQL procedure.

            h1. 2. MariaDB's CONNECT Implementation
            One possible implementation could be as follows:
            h2. 2.1. my.ini
            [mysqld]
            * connect_enable_execute_external_script = {0|1}
            * connect_python_exe_dir = "C:/Users/J-tel/AppData/Local/Programs/Python/Python36-32/python.exe"
            * connect_R_exe_dir = "C:/Program Files/Microsoft/R Open/R-3.4.3/bin/Rscript.exe"

            CONNECT Engine would only need for that duty a 4 column table:
            * One which contains the script to execute as a TEXT column.
            * Other with a PATH which points to the Python / RScript .exe in the Server.
            * Eventually, a COMMENT columns, for including some information about the script.
            * And at last, a column with the name of the script to CALL.

            CREATE TABLE db.t_Remote_Scripts
            (
                CALL VARCHAR(255),
                SCRIPT TEXT,
                PATH VARCHAR(255),
                COMMENTS VARCHAR(255)
            ) ENGINE = CONNECT
              TABLE_TYPE = REMOTE_SCRIPT;

            So when calling:

            SELECT
               *
            FROM
                db.t_Remote_Scripts
            WHERE
                CALL = "01 - Hello, World!"

            Connect would send the SCRIPT text column to the .exe on the PATH (e.g.: RScript exe) and retrieve the select table any warnings that occurred during the execution, that could eventually even be stored in another table as a Data Quality check, to see if the script has been executed correctly.

            In the remote R/Python script, the script will have to make use of a ODBC Connection for importing the data from MariaDB, analyze it, and send it back away.

            This engine feature could imply security issues, so it shall be disabled by default, or even have its own USER security permission.

            Thank you.

            Best,
            Juan Telleria
            h1. 1. Objective
            To give the possibility to call the execution of external:
            * [Python|https://www.python.org/].
            * Or [R Statistical Programming Language|https://mran.microsoft.com/].

            Scripts directly from MariaDB, just as SQL Server, from 2017 Edition onward, allows to do so:
            * [sp_execute_external_script (Transact-SQL)|https://docs.microsoft.com/es-es/sql/relational-databases/system-stored-procedures/sp-execute-external-script-transact-sql?view=sql-server-2017]
            * [Run Python using T-SQL|https://docs.microsoft.com/en-us/sql/advanced-analytics/tutorials/run-python-using-t-sql?view=sql-server-2017]
            * [Using R functions with SQL Server data (R in SQL quickstart)|https://docs.microsoft.com/en-us/sql/advanced-analytics/tutorials/rtsql-using-r-functions-with-sql-server-data?view=sql-server-2017]

            The ultimate objetive is, for example, to trigger the execution of a remote Python/R Code for updating a predictive model in keras/h2o/tensorflow/... when new data is introduced into the database, or as part of a SQL procedure.

            h1. 2. MariaDB's CONNECT Implementation
            One possible implementation could be as follows:
            h2. 2.1. my.ini
            [mysqld]
            * connect_enable_execute_external_script = {0|1}
            * connect_python_exe_dir = "C:/Users/J-tel/AppData/Local/Programs/Python/Python36-32/python.exe"
            * connect_R_exe_dir = "C:/Program Files/Microsoft/R Open/R-3.4.3/bin/Rscript.exe"

            h2. 2.2 CONNECT Table
            For using the engine, the user will have to create

            CONNECT Engine would only need for that duty a 4 column table:
            * One which contains the script to execute as a TEXT column.
            * Other with a PATH which points to the Python / RScript .exe in the Server.
            * Eventually, a COMMENT columns, for including some information about the script.
            * And at last, a column with the name of the script to CALL.

            CREATE TABLE db.t_Remote_Scripts
            (
                CALL VARCHAR(255),
                SCRIPT TEXT,
                PATH VARCHAR(255),
                COMMENTS VARCHAR(255)
            ) ENGINE = CONNECT
              TABLE_TYPE = REMOTE_SCRIPT;

            So when calling:

            SELECT
               *
            FROM
                db.t_Remote_Scripts
            WHERE
                CALL = "01 - Hello, World!"

            Connect would send the SCRIPT text column to the .exe on the PATH (e.g.: RScript exe) and retrieve the select table any warnings that occurred during the execution, that could eventually even be stored in another table as a Data Quality check, to see if the script has been executed correctly.

            In the remote R/Python script, the script will have to make use of a ODBC Connection for importing the data from MariaDB, analyze it, and send it back away.

            This engine feature could imply security issues, so it shall be disabled by default, or even have its own USER security permission.

            Thank you.

            Best,
            Juan Telleria
            Juan Juan Telleria made changes -
            Description h1. 1. Objective
            To give the possibility to call the execution of external:
            * [Python|https://www.python.org/].
            * Or [R Statistical Programming Language|https://mran.microsoft.com/].

            Scripts directly from MariaDB, just as SQL Server, from 2017 Edition onward, allows to do so:
            * [sp_execute_external_script (Transact-SQL)|https://docs.microsoft.com/es-es/sql/relational-databases/system-stored-procedures/sp-execute-external-script-transact-sql?view=sql-server-2017]
            * [Run Python using T-SQL|https://docs.microsoft.com/en-us/sql/advanced-analytics/tutorials/run-python-using-t-sql?view=sql-server-2017]
            * [Using R functions with SQL Server data (R in SQL quickstart)|https://docs.microsoft.com/en-us/sql/advanced-analytics/tutorials/rtsql-using-r-functions-with-sql-server-data?view=sql-server-2017]

            The ultimate objetive is, for example, to trigger the execution of a remote Python/R Code for updating a predictive model in keras/h2o/tensorflow/... when new data is introduced into the database, or as part of a SQL procedure.

            h1. 2. MariaDB's CONNECT Implementation
            One possible implementation could be as follows:
            h2. 2.1. my.ini
            [mysqld]
            * connect_enable_execute_external_script = {0|1}
            * connect_python_exe_dir = "C:/Users/J-tel/AppData/Local/Programs/Python/Python36-32/python.exe"
            * connect_R_exe_dir = "C:/Program Files/Microsoft/R Open/R-3.4.3/bin/Rscript.exe"

            h2. 2.2 CONNECT Table
            For using the engine, the user will have to create

            CONNECT Engine would only need for that duty a 4 column table:
            * One which contains the script to execute as a TEXT column.
            * Other with a PATH which points to the Python / RScript .exe in the Server.
            * Eventually, a COMMENT columns, for including some information about the script.
            * And at last, a column with the name of the script to CALL.

            CREATE TABLE db.t_Remote_Scripts
            (
                CALL VARCHAR(255),
                SCRIPT TEXT,
                PATH VARCHAR(255),
                COMMENTS VARCHAR(255)
            ) ENGINE = CONNECT
              TABLE_TYPE = REMOTE_SCRIPT;

            So when calling:

            SELECT
               *
            FROM
                db.t_Remote_Scripts
            WHERE
                CALL = "01 - Hello, World!"

            Connect would send the SCRIPT text column to the .exe on the PATH (e.g.: RScript exe) and retrieve the select table any warnings that occurred during the execution, that could eventually even be stored in another table as a Data Quality check, to see if the script has been executed correctly.

            In the remote R/Python script, the script will have to make use of a ODBC Connection for importing the data from MariaDB, analyze it, and send it back away.

            This engine feature could imply security issues, so it shall be disabled by default, or even have its own USER security permission.

            Thank you.

            Best,
            Juan Telleria
            h1. 1. Objective
            To give the possibility to call the execution of external:
            * [Python|https://www.python.org/].
            * Or [R Statistical Programming Language|https://mran.microsoft.com/].

            Scripts directly from MariaDB, just as SQL Server, from 2017 Edition onward, allows to do so:
            * [sp_execute_external_script (Transact-SQL)|https://docs.microsoft.com/es-es/sql/relational-databases/system-stored-procedures/sp-execute-external-script-transact-sql?view=sql-server-2017]
            * [Run Python using T-SQL|https://docs.microsoft.com/en-us/sql/advanced-analytics/tutorials/run-python-using-t-sql?view=sql-server-2017]
            * [Using R functions with SQL Server data (R in SQL quickstart)|https://docs.microsoft.com/en-us/sql/advanced-analytics/tutorials/rtsql-using-r-functions-with-sql-server-data?view=sql-server-2017]

            The ultimate objetive is, for example, to trigger the execution of a remote Python/R Code for updating a predictive model in keras/h2o/tensorflow/... when new data is introduced into the database, or as part of a SQL procedure.

            h1. 2. MariaDB's CONNECT Implementation
            One possible implementation could be as follows:
            h2. 2.1. my.ini
            [mysqld]
            * connect_enable_execute_external_script = {0|1}
            * connect_max_exe_parallel = 1 (Default)
            * connect_python_exe_dir = "C:/Users/J-tel/AppData/Local/Programs/Python/Python36-32/python.exe"
            * connect_r_exe_dir = "C:/Program Files/Microsoft/R Open/R-3.4.3/bin/Rscript.exe"

            h2. 2.2 CONNECT Table
            For using the CONNECT REMOTE_TABLE Table Type Engine, the user will have to create a table as follows:

            {code:SQL}
            CREATE [OR REPLACE] [IF NOT EXISTS] TABLE tbl_name
                 ENGINE = CONNECT
                 TABLE_TYPE = REMOTE_TABLE
                 LANGUAGE = {R|Python}
                 [PARALLEL={0|1}
               
                [ , @parallel = 0 | 1 ]

            {code}


            CONNECT Engine would only need for that duty a 4 column table:
            * One which contains the script to execute as a TEXT column.
            * Other with a PATH which points to the Python / RScript .exe in the Server.
            * Eventually, a COMMENT columns, for including some information about the script.
            * And at last, a column with the name of the script to CALL.

            CREATE TABLE db.t_Remote_Scripts
            (
                CALL VARCHAR(255),
                SCRIPT TEXT,
                PATH VARCHAR(255),
                COMMENTS VARCHAR(255)
            ) ENGINE = CONNECT
              TABLE_TYPE = REMOTE_SCRIPT;

            So when calling:

            SELECT
               *
            FROM
                db.t_Remote_Scripts
            WHERE
                CALL = "01 - Hello, World!"

            Connect would send the SCRIPT text column to the .exe on the PATH (e.g.: RScript exe) and retrieve the select table any warnings that occurred during the execution, that could eventually even be stored in another table as a Data Quality check, to see if the script has been executed correctly.

            In the remote R/Python script, the script will have to make use of a ODBC Connection for importing the data from MariaDB, analyze it, and send it back away.

            This engine feature could imply security issues, so it shall be disabled by default, or even have its own USER security permission.

            Thank you.

            Best,
            Juan Telleria
            Juan Juan Telleria made changes -
            Description h1. 1. Objective
            To give the possibility to call the execution of external:
            * [Python|https://www.python.org/].
            * Or [R Statistical Programming Language|https://mran.microsoft.com/].

            Scripts directly from MariaDB, just as SQL Server, from 2017 Edition onward, allows to do so:
            * [sp_execute_external_script (Transact-SQL)|https://docs.microsoft.com/es-es/sql/relational-databases/system-stored-procedures/sp-execute-external-script-transact-sql?view=sql-server-2017]
            * [Run Python using T-SQL|https://docs.microsoft.com/en-us/sql/advanced-analytics/tutorials/run-python-using-t-sql?view=sql-server-2017]
            * [Using R functions with SQL Server data (R in SQL quickstart)|https://docs.microsoft.com/en-us/sql/advanced-analytics/tutorials/rtsql-using-r-functions-with-sql-server-data?view=sql-server-2017]

            The ultimate objetive is, for example, to trigger the execution of a remote Python/R Code for updating a predictive model in keras/h2o/tensorflow/... when new data is introduced into the database, or as part of a SQL procedure.

            h1. 2. MariaDB's CONNECT Implementation
            One possible implementation could be as follows:
            h2. 2.1. my.ini
            [mysqld]
            * connect_enable_execute_external_script = {0|1}
            * connect_max_exe_parallel = 1 (Default)
            * connect_python_exe_dir = "C:/Users/J-tel/AppData/Local/Programs/Python/Python36-32/python.exe"
            * connect_r_exe_dir = "C:/Program Files/Microsoft/R Open/R-3.4.3/bin/Rscript.exe"

            h2. 2.2 CONNECT Table
            For using the CONNECT REMOTE_TABLE Table Type Engine, the user will have to create a table as follows:

            {code:SQL}
            CREATE [OR REPLACE] [IF NOT EXISTS] TABLE tbl_name
                 ENGINE = CONNECT
                 TABLE_TYPE = REMOTE_TABLE
                 LANGUAGE = {R|Python}
                 [PARALLEL={0|1}
               
                [ , @parallel = 0 | 1 ]

            {code}


            CONNECT Engine would only need for that duty a 4 column table:
            * One which contains the script to execute as a TEXT column.
            * Other with a PATH which points to the Python / RScript .exe in the Server.
            * Eventually, a COMMENT columns, for including some information about the script.
            * And at last, a column with the name of the script to CALL.

            CREATE TABLE db.t_Remote_Scripts
            (
                CALL VARCHAR(255),
                SCRIPT TEXT,
                PATH VARCHAR(255),
                COMMENTS VARCHAR(255)
            ) ENGINE = CONNECT
              TABLE_TYPE = REMOTE_SCRIPT;

            So when calling:

            SELECT
               *
            FROM
                db.t_Remote_Scripts
            WHERE
                CALL = "01 - Hello, World!"

            Connect would send the SCRIPT text column to the .exe on the PATH (e.g.: RScript exe) and retrieve the select table any warnings that occurred during the execution, that could eventually even be stored in another table as a Data Quality check, to see if the script has been executed correctly.

            In the remote R/Python script, the script will have to make use of a ODBC Connection for importing the data from MariaDB, analyze it, and send it back away.

            This engine feature could imply security issues, so it shall be disabled by default, or even have its own USER security permission.

            Thank you.

            Best,
            Juan Telleria
            h1. 1. Objective
            To give the possibility to call the execution of external:
            * [Python|https://www.python.org/].
            * Or [R Statistical Programming Language|https://mran.microsoft.com/].

            Scripts directly from MariaDB, just as SQL Server, from 2017 Edition onward, allows to do so:
            * [sp_execute_external_script (Transact-SQL)|https://docs.microsoft.com/es-es/sql/relational-databases/system-stored-procedures/sp-execute-external-script-transact-sql?view=sql-server-2017]
            * [Run Python using T-SQL|https://docs.microsoft.com/en-us/sql/advanced-analytics/tutorials/run-python-using-t-sql?view=sql-server-2017]
            * [Using R functions with SQL Server data (R in SQL quickstart)|https://docs.microsoft.com/en-us/sql/advanced-analytics/tutorials/rtsql-using-r-functions-with-sql-server-data?view=sql-server-2017]

            The ultimate objetive is, for example, to trigger the execution of a remote Python/R Code for updating a predictive model in keras/h2o/tensorflow/... when new data is introduced into the database, or as part of a SQL procedure.

            h1. 2. MariaDB's CONNECT Implementation
            One possible implementation could be as follows:
            h2. 2.1. my.ini
            [mysqld]
            * connect_enable_execute_external_script = {0|1}

            * connect_max_exe_parallel = 1 (Default)
            * connect_python_exe_dir = "C:/Users/J-tel/AppData/Local/Programs/Python/Python36-32/python.exe"
            * connect_r_exe_dir = "C:/Program Files/Microsoft/R Open/R-3.4.3/bin/Rscript.exe"

            h2. 2.2 CONNECT Table
            For using the CONNECT REMOTE_TABLE Table Type Engine, the user will have to create a table as follows:

            {code:SQL}
            CREATE [OR REPLACE] [IF NOT EXISTS] TABLE tbl_name
                 ENGINE = CONNECT
                 TABLE_TYPE = REMOTE_TABLE
                 LANGUAGE = {R|Python}
                 [PARALLEL={0|1}
               
                [ , @parallel = 0 | 1 ]

            {code}


            CONNECT Engine would only need for that duty a 4 column table:
            * One which contains the script to execute as a TEXT column.
            * Other with a PATH which points to the Python / RScript .exe in the Server.
            * Eventually, a COMMENT columns, for including some information about the script.
            * And at last, a column with the name of the script to CALL.

            CREATE TABLE db.t_Remote_Scripts
            (
                CALL VARCHAR(255),
                SCRIPT TEXT,
                PATH VARCHAR(255),
                COMMENTS VARCHAR(255)
            ) ENGINE = CONNECT
              TABLE_TYPE = REMOTE_SCRIPT;

            So when calling:

            SELECT
               *
            FROM
                db.t_Remote_Scripts
            WHERE
                CALL = "01 - Hello, World!"

            Connect would send the SCRIPT text column to the .exe on the PATH (e.g.: RScript exe) and retrieve the select table any warnings that occurred during the execution, that could eventually even be stored in another table as a Data Quality check, to see if the script has been executed correctly.

            In the remote R/Python script, the script will have to make use of a ODBC Connection for importing the data from MariaDB, analyze it, and send it back away.

            This engine feature could imply security issues, so it shall be disabled by default, or even have its own USER security permission.

            Thank you.

            Best,
            Juan Telleria
            Juan Juan Telleria made changes -
            Description h1. 1. Objective
            To give the possibility to call the execution of external:
            * [Python|https://www.python.org/].
            * Or [R Statistical Programming Language|https://mran.microsoft.com/].

            Scripts directly from MariaDB, just as SQL Server, from 2017 Edition onward, allows to do so:
            * [sp_execute_external_script (Transact-SQL)|https://docs.microsoft.com/es-es/sql/relational-databases/system-stored-procedures/sp-execute-external-script-transact-sql?view=sql-server-2017]
            * [Run Python using T-SQL|https://docs.microsoft.com/en-us/sql/advanced-analytics/tutorials/run-python-using-t-sql?view=sql-server-2017]
            * [Using R functions with SQL Server data (R in SQL quickstart)|https://docs.microsoft.com/en-us/sql/advanced-analytics/tutorials/rtsql-using-r-functions-with-sql-server-data?view=sql-server-2017]

            The ultimate objetive is, for example, to trigger the execution of a remote Python/R Code for updating a predictive model in keras/h2o/tensorflow/... when new data is introduced into the database, or as part of a SQL procedure.

            h1. 2. MariaDB's CONNECT Implementation
            One possible implementation could be as follows:
            h2. 2.1. my.ini
            [mysqld]
            * connect_enable_execute_external_script = {0|1}

            * connect_max_exe_parallel = 1 (Default)
            * connect_python_exe_dir = "C:/Users/J-tel/AppData/Local/Programs/Python/Python36-32/python.exe"
            * connect_r_exe_dir = "C:/Program Files/Microsoft/R Open/R-3.4.3/bin/Rscript.exe"

            h2. 2.2 CONNECT Table
            For using the CONNECT REMOTE_TABLE Table Type Engine, the user will have to create a table as follows:

            {code:SQL}
            CREATE [OR REPLACE] [IF NOT EXISTS] TABLE tbl_name
                 ENGINE = CONNECT
                 TABLE_TYPE = REMOTE_TABLE
                 LANGUAGE = {R|Python}
                 [PARALLEL={0|1}
               
                [ , @parallel = 0 | 1 ]

            {code}


            CONNECT Engine would only need for that duty a 4 column table:
            * One which contains the script to execute as a TEXT column.
            * Other with a PATH which points to the Python / RScript .exe in the Server.
            * Eventually, a COMMENT columns, for including some information about the script.
            * And at last, a column with the name of the script to CALL.

            CREATE TABLE db.t_Remote_Scripts
            (
                CALL VARCHAR(255),
                SCRIPT TEXT,
                PATH VARCHAR(255),
                COMMENTS VARCHAR(255)
            ) ENGINE = CONNECT
              TABLE_TYPE = REMOTE_SCRIPT;

            So when calling:

            SELECT
               *
            FROM
                db.t_Remote_Scripts
            WHERE
                CALL = "01 - Hello, World!"

            Connect would send the SCRIPT text column to the .exe on the PATH (e.g.: RScript exe) and retrieve the select table any warnings that occurred during the execution, that could eventually even be stored in another table as a Data Quality check, to see if the script has been executed correctly.

            In the remote R/Python script, the script will have to make use of a ODBC Connection for importing the data from MariaDB, analyze it, and send it back away.

            This engine feature could imply security issues, so it shall be disabled by default, or even have its own USER security permission.

            Thank you.

            Best,
            Juan Telleria
            h1. 1. Objective
            To give the possibility to call the execution of external:
            * [Python|https://www.python.org/].
            * Or [R Statistical Programming Language|https://mran.microsoft.com/].

            Scripts directly from MariaDB, just as SQL Server, from 2017 Edition onward, allows to do so:
            * [sp_execute_external_script (Transact-SQL)|https://docs.microsoft.com/es-es/sql/relational-databases/system-stored-procedures/sp-execute-external-script-transact-sql?view=sql-server-2017]
            * [Run Python using T-SQL|https://docs.microsoft.com/en-us/sql/advanced-analytics/tutorials/run-python-using-t-sql?view=sql-server-2017]
            * [Using R functions with SQL Server data (R in SQL quickstart)|https://docs.microsoft.com/en-us/sql/advanced-analytics/tutorials/rtsql-using-r-functions-with-sql-server-data?view=sql-server-2017]

            The ultimate objetive is, for example, to trigger the execution of a remote Python/R Code for updating a predictive model in keras/h2o/tensorflow/... when new data is introduced into the database, or as part of a SQL procedure.

            h1. 2. MariaDB's CONNECT Implementation
            One possible implementation could be as follows:
            h2. 2.1. my.ini
            [mysqld]
            * connect_enable_execute_external_script = {0|1}
            * connect_max_exe_parallel = 1 (Default)
            * connect_python_exe_dir = "C:/Users/J-tel/AppData/Local/Programs/Python/Python36-32/python.exe"
            * connect_r_exe_dir = "C:/Program Files/Microsoft/R Open/R-3.4.3/bin/Rscript.exe"

            h2. 2.2 CONNECT Table
            For using the CONNECT REMOTE_TABLE Table Type Engine, the user will have to create a table as follows:

            {code:SQL}
            CREATE [OR REPLACE] [IF NOT EXISTS] TABLE tbl_name
                 ENGINE = CONNECT
                 TABLE_TYPE = REMOTE_TABLE
                 LANGUAGE = {R|Python}
                 [PARALLEL={0|1}
               
                [ , @parallel = 0 | 1 ]

            {code}


            CONNECT Engine would only need for that duty a 4 column table:
            * One which contains the script to execute as a TEXT column.
            * Other with a PATH which points to the Python / RScript .exe in the Server.
            * Eventually, a COMMENT columns, for including some information about the script.
            * And at last, a column with the name of the script to CALL.

            CREATE TABLE db.t_Remote_Scripts
            (
                CALL VARCHAR(255),
                SCRIPT TEXT,
                PATH VARCHAR(255),
                COMMENTS VARCHAR(255)
            ) ENGINE = CONNECT
              TABLE_TYPE = REMOTE_SCRIPT;

            So when calling:

            SELECT
               *
            FROM
                db.t_Remote_Scripts
            WHERE
                CALL = "01 - Hello, World!"

            Connect would send the SCRIPT text column to the .exe on the PATH (e.g.: RScript exe) and retrieve the select table any warnings that occurred during the execution, that could eventually even be stored in another table as a Data Quality check, to see if the script has been executed correctly.

            In the remote R/Python script, the script will have to make use of a ODBC Connection for importing the data from MariaDB, analyze it, and send it back away.

            This engine feature could imply security issues, so it shall be disabled by default, or even have its own USER security permission.

            Thank you.

            Best,
            Juan Telleria
            Juan Juan Telleria made changes -
            Description h1. 1. Objective
            To give the possibility to call the execution of external:
            * [Python|https://www.python.org/].
            * Or [R Statistical Programming Language|https://mran.microsoft.com/].

            Scripts directly from MariaDB, just as SQL Server, from 2017 Edition onward, allows to do so:
            * [sp_execute_external_script (Transact-SQL)|https://docs.microsoft.com/es-es/sql/relational-databases/system-stored-procedures/sp-execute-external-script-transact-sql?view=sql-server-2017]
            * [Run Python using T-SQL|https://docs.microsoft.com/en-us/sql/advanced-analytics/tutorials/run-python-using-t-sql?view=sql-server-2017]
            * [Using R functions with SQL Server data (R in SQL quickstart)|https://docs.microsoft.com/en-us/sql/advanced-analytics/tutorials/rtsql-using-r-functions-with-sql-server-data?view=sql-server-2017]

            The ultimate objetive is, for example, to trigger the execution of a remote Python/R Code for updating a predictive model in keras/h2o/tensorflow/... when new data is introduced into the database, or as part of a SQL procedure.

            h1. 2. MariaDB's CONNECT Implementation
            One possible implementation could be as follows:
            h2. 2.1. my.ini
            [mysqld]
            * connect_enable_execute_external_script = {0|1}
            * connect_max_exe_parallel = 1 (Default)
            * connect_python_exe_dir = "C:/Users/J-tel/AppData/Local/Programs/Python/Python36-32/python.exe"
            * connect_r_exe_dir = "C:/Program Files/Microsoft/R Open/R-3.4.3/bin/Rscript.exe"

            h2. 2.2 CONNECT Table
            For using the CONNECT REMOTE_TABLE Table Type Engine, the user will have to create a table as follows:

            {code:SQL}
            CREATE [OR REPLACE] [IF NOT EXISTS] TABLE tbl_name
                 ENGINE = CONNECT
                 TABLE_TYPE = REMOTE_TABLE
                 LANGUAGE = {R|Python}
                 [PARALLEL={0|1}
               
                [ , @parallel = 0 | 1 ]

            {code}


            CONNECT Engine would only need for that duty a 4 column table:
            * One which contains the script to execute as a TEXT column.
            * Other with a PATH which points to the Python / RScript .exe in the Server.
            * Eventually, a COMMENT columns, for including some information about the script.
            * And at last, a column with the name of the script to CALL.

            CREATE TABLE db.t_Remote_Scripts
            (
                CALL VARCHAR(255),
                SCRIPT TEXT,
                PATH VARCHAR(255),
                COMMENTS VARCHAR(255)
            ) ENGINE = CONNECT
              TABLE_TYPE = REMOTE_SCRIPT;

            So when calling:

            SELECT
               *
            FROM
                db.t_Remote_Scripts
            WHERE
                CALL = "01 - Hello, World!"

            Connect would send the SCRIPT text column to the .exe on the PATH (e.g.: RScript exe) and retrieve the select table any warnings that occurred during the execution, that could eventually even be stored in another table as a Data Quality check, to see if the script has been executed correctly.

            In the remote R/Python script, the script will have to make use of a ODBC Connection for importing the data from MariaDB, analyze it, and send it back away.

            This engine feature could imply security issues, so it shall be disabled by default, or even have its own USER security permission.

            Thank you.

            Best,
            Juan Telleria
            h1. 1. Objective
            To give the possibility to call the execution of external:
            * [Python|https://www.python.org/].
            * Or [R Statistical Programming Language|https://mran.microsoft.com/].

            Scripts directly from MariaDB, just as SQL Server, from 2017 Edition onward, allows to do so:
            * [sp_execute_external_script (Transact-SQL)|https://docs.microsoft.com/es-es/sql/relational-databases/system-stored-procedures/sp-execute-external-script-transact-sql?view=sql-server-2017]
            * [Run Python using T-SQL|https://docs.microsoft.com/en-us/sql/advanced-analytics/tutorials/run-python-using-t-sql?view=sql-server-2017]
            * [Using R functions with SQL Server data (R in SQL quickstart)|https://docs.microsoft.com/en-us/sql/advanced-analytics/tutorials/rtsql-using-r-functions-with-sql-server-data?view=sql-server-2017]

            The ultimate objetive is, for example, to trigger the execution of a remote Python/R Code for updating a predictive model in keras/h2o/tensorflow/... when new data is introduced into the database, or as part of a SQL procedure.

            h1. 2. MariaDB's CONNECT Implementation
            One possible implementation could be as follows:
            h2. 2.1. my.ini
            [mysqld]
            * connect_enable_execute_external_script = {0|1}
            * connect_python_exe_dir = "C:/Users/J-tel/AppData/Local/Programs/Python/Python36-32/python.exe"
            * connect_r_exe_dir = "C:/Program Files/Microsoft/R Open/R-3.4.3/bin/Rscript.exe"

            * connect_max_exe_parallel = 1 (Default)

            h2. 2.2 CONNECT Table
            For using the CONNECT REMOTE_TABLE Table Type Engine, the user will have to create a table as follows:

            {code:SQL}
            CREATE [OR REPLACE] [IF NOT EXISTS] TABLE tbl_name
                 ENGINE = CONNECT
                 TABLE_TYPE = REMOTE_TABLE
                 LANGUAGE = {R|Python}
                 [PARALLEL={0|1}
               
                [ , @parallel = 0 | 1 ]

            {code}


            CONNECT Engine would only need for that duty a 4 column table:
            * One which contains the script to execute as a TEXT column.
            * Other with a PATH which points to the Python / RScript .exe in the Server.
            * Eventually, a COMMENT columns, for including some information about the script.
            * And at last, a column with the name of the script to CALL.

            CREATE TABLE db.t_Remote_Scripts
            (
                CALL VARCHAR(255),
                SCRIPT TEXT,
                PATH VARCHAR(255),
                COMMENTS VARCHAR(255)
            ) ENGINE = CONNECT
              TABLE_TYPE = REMOTE_SCRIPT;

            So when calling:

            SELECT
               *
            FROM
                db.t_Remote_Scripts
            WHERE
                CALL = "01 - Hello, World!"

            Connect would send the SCRIPT text column to the .exe on the PATH (e.g.: RScript exe) and retrieve the select table any warnings that occurred during the execution, that could eventually even be stored in another table as a Data Quality check, to see if the script has been executed correctly.

            In the remote R/Python script, the script will have to make use of a ODBC Connection for importing the data from MariaDB, analyze it, and send it back away.

            This engine feature could imply security issues, so it shall be disabled by default, or even have its own USER security permission.

            Thank you.

            Best,
            Juan Telleria
            Juan Juan Telleria made changes -
            Description h1. 1. Objective
            To give the possibility to call the execution of external:
            * [Python|https://www.python.org/].
            * Or [R Statistical Programming Language|https://mran.microsoft.com/].

            Scripts directly from MariaDB, just as SQL Server, from 2017 Edition onward, allows to do so:
            * [sp_execute_external_script (Transact-SQL)|https://docs.microsoft.com/es-es/sql/relational-databases/system-stored-procedures/sp-execute-external-script-transact-sql?view=sql-server-2017]
            * [Run Python using T-SQL|https://docs.microsoft.com/en-us/sql/advanced-analytics/tutorials/run-python-using-t-sql?view=sql-server-2017]
            * [Using R functions with SQL Server data (R in SQL quickstart)|https://docs.microsoft.com/en-us/sql/advanced-analytics/tutorials/rtsql-using-r-functions-with-sql-server-data?view=sql-server-2017]

            The ultimate objetive is, for example, to trigger the execution of a remote Python/R Code for updating a predictive model in keras/h2o/tensorflow/... when new data is introduced into the database, or as part of a SQL procedure.

            h1. 2. MariaDB's CONNECT Implementation
            One possible implementation could be as follows:
            h2. 2.1. my.ini
            [mysqld]
            * connect_enable_execute_external_script = {0|1}
            * connect_python_exe_dir = "C:/Users/J-tel/AppData/Local/Programs/Python/Python36-32/python.exe"
            * connect_r_exe_dir = "C:/Program Files/Microsoft/R Open/R-3.4.3/bin/Rscript.exe"

            * connect_max_exe_parallel = 1 (Default)

            h2. 2.2 CONNECT Table
            For using the CONNECT REMOTE_TABLE Table Type Engine, the user will have to create a table as follows:

            {code:SQL}
            CREATE [OR REPLACE] [IF NOT EXISTS] TABLE tbl_name
                 ENGINE = CONNECT
                 TABLE_TYPE = REMOTE_TABLE
                 LANGUAGE = {R|Python}
                 [PARALLEL={0|1}
               
                [ , @parallel = 0 | 1 ]

            {code}


            CONNECT Engine would only need for that duty a 4 column table:
            * One which contains the script to execute as a TEXT column.
            * Other with a PATH which points to the Python / RScript .exe in the Server.
            * Eventually, a COMMENT columns, for including some information about the script.
            * And at last, a column with the name of the script to CALL.

            CREATE TABLE db.t_Remote_Scripts
            (
                CALL VARCHAR(255),
                SCRIPT TEXT,
                PATH VARCHAR(255),
                COMMENTS VARCHAR(255)
            ) ENGINE = CONNECT
              TABLE_TYPE = REMOTE_SCRIPT;

            So when calling:

            SELECT
               *
            FROM
                db.t_Remote_Scripts
            WHERE
                CALL = "01 - Hello, World!"

            Connect would send the SCRIPT text column to the .exe on the PATH (e.g.: RScript exe) and retrieve the select table any warnings that occurred during the execution, that could eventually even be stored in another table as a Data Quality check, to see if the script has been executed correctly.

            In the remote R/Python script, the script will have to make use of a ODBC Connection for importing the data from MariaDB, analyze it, and send it back away.

            This engine feature could imply security issues, so it shall be disabled by default, or even have its own USER security permission.

            Thank you.

            Best,
            Juan Telleria
            h1. 1. Objective
            To give the possibility to call the execution of external:
            * [Python|https://www.python.org/].
            * Or [R Statistical Programming Language|https://mran.microsoft.com/].

            Scripts directly from MariaDB, just as SQL Server, from 2017 Edition onward, allows to do so:
            * [sp_execute_external_script (Transact-SQL)|https://docs.microsoft.com/es-es/sql/relational-databases/system-stored-procedures/sp-execute-external-script-transact-sql?view=sql-server-2017]
            * [Run Python using T-SQL|https://docs.microsoft.com/en-us/sql/advanced-analytics/tutorials/run-python-using-t-sql?view=sql-server-2017]
            * [Using R functions with SQL Server data (R in SQL quickstart)|https://docs.microsoft.com/en-us/sql/advanced-analytics/tutorials/rtsql-using-r-functions-with-sql-server-data?view=sql-server-2017]

            The ultimate objetive is, for example, to trigger the execution of a remote Python/R Code for updating a predictive model in keras/h2o/tensorflow/... when new data is introduced into the database, or as part of a SQL procedure.

            h1. 2. MariaDB's CONNECT Implementation
            One possible implementation could be as follows:
            h2. 2.1. my.ini
            [mysqld]
            * connect_enable_execute_external_script = {0|1}

            * connect_python_exe_dir = "C:/Users/J-tel/AppData/Local/Programs/Python/Python36-32/python.exe"

            * connect_r_exe_dir = "C:/Program Files/Microsoft/R Open/R-3.4.3/bin/Rscript.exe"

            * connect_max_exe_parallel = 1 (Default)

            h2. 2.2 CONNECT Table
            For using the CONNECT REMOTE_TABLE Table Type Engine, the user will have to create a table as follows:

            {code:SQL}
            CREATE [OR REPLACE] [IF NOT EXISTS] TABLE tbl_name
                 ENGINE = CONNECT
                 TABLE_TYPE = REMOTE_TABLE
                 LANGUAGE = {R|Python}
                 [PARALLEL={0|1}
               
                [ , @parallel = 0 | 1 ]

            {code}


            CONNECT Engine would only need for that duty a 4 column table:
            * One which contains the script to execute as a TEXT column.
            * Other with a PATH which points to the Python / RScript .exe in the Server.
            * Eventually, a COMMENT columns, for including some information about the script.
            * And at last, a column with the name of the script to CALL.

            CREATE TABLE db.t_Remote_Scripts
            (
                CALL VARCHAR(255),
                SCRIPT TEXT,
                PATH VARCHAR(255),
                COMMENTS VARCHAR(255)
            ) ENGINE = CONNECT
              TABLE_TYPE = REMOTE_SCRIPT;

            So when calling:

            SELECT
               *
            FROM
                db.t_Remote_Scripts
            WHERE
                CALL = "01 - Hello, World!"

            Connect would send the SCRIPT text column to the .exe on the PATH (e.g.: RScript exe) and retrieve the select table any warnings that occurred during the execution, that could eventually even be stored in another table as a Data Quality check, to see if the script has been executed correctly.

            In the remote R/Python script, the script will have to make use of a ODBC Connection for importing the data from MariaDB, analyze it, and send it back away.

            This engine feature could imply security issues, so it shall be disabled by default, or even have its own USER security permission.

            Thank you.

            Best,
            Juan Telleria
            Juan Juan Telleria made changes -
            Description h1. 1. Objective
            To give the possibility to call the execution of external:
            * [Python|https://www.python.org/].
            * Or [R Statistical Programming Language|https://mran.microsoft.com/].

            Scripts directly from MariaDB, just as SQL Server, from 2017 Edition onward, allows to do so:
            * [sp_execute_external_script (Transact-SQL)|https://docs.microsoft.com/es-es/sql/relational-databases/system-stored-procedures/sp-execute-external-script-transact-sql?view=sql-server-2017]
            * [Run Python using T-SQL|https://docs.microsoft.com/en-us/sql/advanced-analytics/tutorials/run-python-using-t-sql?view=sql-server-2017]
            * [Using R functions with SQL Server data (R in SQL quickstart)|https://docs.microsoft.com/en-us/sql/advanced-analytics/tutorials/rtsql-using-r-functions-with-sql-server-data?view=sql-server-2017]

            The ultimate objetive is, for example, to trigger the execution of a remote Python/R Code for updating a predictive model in keras/h2o/tensorflow/... when new data is introduced into the database, or as part of a SQL procedure.

            h1. 2. MariaDB's CONNECT Implementation
            One possible implementation could be as follows:
            h2. 2.1. my.ini
            [mysqld]
            * connect_enable_execute_external_script = {0|1}

            * connect_python_exe_dir = "C:/Users/J-tel/AppData/Local/Programs/Python/Python36-32/python.exe"

            * connect_r_exe_dir = "C:/Program Files/Microsoft/R Open/R-3.4.3/bin/Rscript.exe"

            * connect_max_exe_parallel = 1 (Default)

            h2. 2.2 CONNECT Table
            For using the CONNECT REMOTE_TABLE Table Type Engine, the user will have to create a table as follows:

            {code:SQL}
            CREATE [OR REPLACE] [IF NOT EXISTS] TABLE tbl_name
                 ENGINE = CONNECT
                 TABLE_TYPE = REMOTE_TABLE
                 LANGUAGE = {R|Python}
                 [PARALLEL={0|1}
               
                [ , @parallel = 0 | 1 ]

            {code}


            CONNECT Engine would only need for that duty a 4 column table:
            * One which contains the script to execute as a TEXT column.
            * Other with a PATH which points to the Python / RScript .exe in the Server.
            * Eventually, a COMMENT columns, for including some information about the script.
            * And at last, a column with the name of the script to CALL.

            CREATE TABLE db.t_Remote_Scripts
            (
                CALL VARCHAR(255),
                SCRIPT TEXT,
                PATH VARCHAR(255),
                COMMENTS VARCHAR(255)
            ) ENGINE = CONNECT
              TABLE_TYPE = REMOTE_SCRIPT;

            So when calling:

            SELECT
               *
            FROM
                db.t_Remote_Scripts
            WHERE
                CALL = "01 - Hello, World!"

            Connect would send the SCRIPT text column to the .exe on the PATH (e.g.: RScript exe) and retrieve the select table any warnings that occurred during the execution, that could eventually even be stored in another table as a Data Quality check, to see if the script has been executed correctly.

            In the remote R/Python script, the script will have to make use of a ODBC Connection for importing the data from MariaDB, analyze it, and send it back away.

            This engine feature could imply security issues, so it shall be disabled by default, or even have its own USER security permission.

            Thank you.

            Best,
            Juan Telleria
            h1. 1. Objective
            To give the possibility to call the execution of external:
            * [Python|https://www.python.org/].
            * Or [R Statistical Programming Language|https://mran.microsoft.com/].

            Scripts directly from MariaDB, just as SQL Server, from 2017 Edition onward, allows to do so:
            * [sp_execute_external_script (Transact-SQL)|https://docs.microsoft.com/es-es/sql/relational-databases/system-stored-procedures/sp-execute-external-script-transact-sql?view=sql-server-2017]
            * [Run Python using T-SQL|https://docs.microsoft.com/en-us/sql/advanced-analytics/tutorials/run-python-using-t-sql?view=sql-server-2017]
            * [Using R functions with SQL Server data (R in SQL quickstart)|https://docs.microsoft.com/en-us/sql/advanced-analytics/tutorials/rtsql-using-r-functions-with-sql-server-data?view=sql-server-2017]

            The ultimate objetive is, for example, to trigger the execution of a remote Python/R Code for updating a predictive model in keras/h2o/tensorflow/... when new data is introduced into the database, or as part of a SQL procedure.

            h1. 2. MariaDB's CONNECT Implementation
            One possible implementation could be as follows:
            h2. 2.1. my.ini
            [mysqld]
            * connect_enable_execute_external_script = 0|1

            * connect_python_exe_dir = "C:/Users/J-tel/AppData/Local/Programs/Python/Python36-32/python.exe"

            * connect_r_exe_dir = "C:/Program Files/Microsoft/R Open/R-3.4.3/bin/Rscript.exe"

            * connect_max_exe_parallel = 1 (Default)

            h2. 2.2 CONNECT Table
            For using the CONNECT REMOTE_TABLE Table Type Engine, the user will have to create a table as follows:

            {code:SQL}
            CREATE [OR REPLACE] [IF NOT EXISTS] TABLE tbl_name
                 ENGINE = CONNECT
                 TABLE_TYPE = REMOTE_TABLE
                 LANGUAGE = {R|Python}
                 [PARALLEL={0|1}
               
                [ , @parallel = 0 | 1 ]

            {code}


            CONNECT Engine would only need for that duty a 4 column table:
            * One which contains the script to execute as a TEXT column.
            * Other with a PATH which points to the Python / RScript .exe in the Server.
            * Eventually, a COMMENT columns, for including some information about the script.
            * And at last, a column with the name of the script to CALL.

            CREATE TABLE db.t_Remote_Scripts
            (
                CALL VARCHAR(255),
                SCRIPT TEXT,
                PATH VARCHAR(255),
                COMMENTS VARCHAR(255)
            ) ENGINE = CONNECT
              TABLE_TYPE = REMOTE_SCRIPT;

            So when calling:

            SELECT
               *
            FROM
                db.t_Remote_Scripts
            WHERE
                CALL = "01 - Hello, World!"

            Connect would send the SCRIPT text column to the .exe on the PATH (e.g.: RScript exe) and retrieve the select table any warnings that occurred during the execution, that could eventually even be stored in another table as a Data Quality check, to see if the script has been executed correctly.

            In the remote R/Python script, the script will have to make use of a ODBC Connection for importing the data from MariaDB, analyze it, and send it back away.

            This engine feature could imply security issues, so it shall be disabled by default, or even have its own USER security permission.

            Thank you.

            Best,
            Juan Telleria
            Juan Juan Telleria made changes -
            Description h1. 1. Objective
            To give the possibility to call the execution of external:
            * [Python|https://www.python.org/].
            * Or [R Statistical Programming Language|https://mran.microsoft.com/].

            Scripts directly from MariaDB, just as SQL Server, from 2017 Edition onward, allows to do so:
            * [sp_execute_external_script (Transact-SQL)|https://docs.microsoft.com/es-es/sql/relational-databases/system-stored-procedures/sp-execute-external-script-transact-sql?view=sql-server-2017]
            * [Run Python using T-SQL|https://docs.microsoft.com/en-us/sql/advanced-analytics/tutorials/run-python-using-t-sql?view=sql-server-2017]
            * [Using R functions with SQL Server data (R in SQL quickstart)|https://docs.microsoft.com/en-us/sql/advanced-analytics/tutorials/rtsql-using-r-functions-with-sql-server-data?view=sql-server-2017]

            The ultimate objetive is, for example, to trigger the execution of a remote Python/R Code for updating a predictive model in keras/h2o/tensorflow/... when new data is introduced into the database, or as part of a SQL procedure.

            h1. 2. MariaDB's CONNECT Implementation
            One possible implementation could be as follows:
            h2. 2.1. my.ini
            [mysqld]
            * connect_enable_execute_external_script = 0|1

            * connect_python_exe_dir = "C:/Users/J-tel/AppData/Local/Programs/Python/Python36-32/python.exe"

            * connect_r_exe_dir = "C:/Program Files/Microsoft/R Open/R-3.4.3/bin/Rscript.exe"

            * connect_max_exe_parallel = 1 (Default)

            h2. 2.2 CONNECT Table
            For using the CONNECT REMOTE_TABLE Table Type Engine, the user will have to create a table as follows:

            {code:SQL}
            CREATE [OR REPLACE] [IF NOT EXISTS] TABLE tbl_name
                 ENGINE = CONNECT
                 TABLE_TYPE = REMOTE_TABLE
                 LANGUAGE = {R|Python}
                 [PARALLEL={0|1}
               
                [ , @parallel = 0 | 1 ]

            {code}


            CONNECT Engine would only need for that duty a 4 column table:
            * One which contains the script to execute as a TEXT column.
            * Other with a PATH which points to the Python / RScript .exe in the Server.
            * Eventually, a COMMENT columns, for including some information about the script.
            * And at last, a column with the name of the script to CALL.

            CREATE TABLE db.t_Remote_Scripts
            (
                CALL VARCHAR(255),
                SCRIPT TEXT,
                PATH VARCHAR(255),
                COMMENTS VARCHAR(255)
            ) ENGINE = CONNECT
              TABLE_TYPE = REMOTE_SCRIPT;

            So when calling:

            SELECT
               *
            FROM
                db.t_Remote_Scripts
            WHERE
                CALL = "01 - Hello, World!"

            Connect would send the SCRIPT text column to the .exe on the PATH (e.g.: RScript exe) and retrieve the select table any warnings that occurred during the execution, that could eventually even be stored in another table as a Data Quality check, to see if the script has been executed correctly.

            In the remote R/Python script, the script will have to make use of a ODBC Connection for importing the data from MariaDB, analyze it, and send it back away.

            This engine feature could imply security issues, so it shall be disabled by default, or even have its own USER security permission.

            Thank you.

            Best,
            Juan Telleria
            h1. 1. Objective
            To give the possibility to call the execution of external:
            * [Python|https://www.python.org/].
            * Or [R Statistical Programming Language|https://mran.microsoft.com/].

            Scripts directly from MariaDB, just as SQL Server, from 2017 Edition onward, allows to do so:
            * [sp_execute_external_script (Transact-SQL)|https://docs.microsoft.com/es-es/sql/relational-databases/system-stored-procedures/sp-execute-external-script-transact-sql?view=sql-server-2017]
            * [Run Python using T-SQL|https://docs.microsoft.com/en-us/sql/advanced-analytics/tutorials/run-python-using-t-sql?view=sql-server-2017]
            * [Using R functions with SQL Server data (R in SQL quickstart)|https://docs.microsoft.com/en-us/sql/advanced-analytics/tutorials/rtsql-using-r-functions-with-sql-server-data?view=sql-server-2017]

            The ultimate objetive is, for example, to trigger the execution of a remote Python/R Code for updating a predictive model in keras/h2o/tensorflow/... when new data is introduced into the database, or as part of a SQL procedure.

            h1. 2. MariaDB's CONNECT Implementation
            One possible implementation could be as follows:
            h2. 2.1. my.ini
            {code:txt}
            [mysqld]
            * connect_enable_execute_external_script = 0|1

            * connect_python_exe_dir = "C:/Users/J-tel/AppData/Local/Programs/Python/Python36-32/python.exe"

            * connect_r_exe_dir = "C:/Program Files/Microsoft/R Open/R-3.4.3/bin/Rscript.exe"

            * connect_max_exe_parallel = 1 (Default)
            {code}


            h2. 2.2 CONNECT Table
            For using the CONNECT REMOTE_TABLE Table Type Engine, the user will have to create a table as follows:

            {code:SQL}
            CREATE [OR REPLACE] [IF NOT EXISTS] TABLE tbl_name
                 ENGINE = CONNECT
                 TABLE_TYPE = REMOTE_TABLE
                 LANGUAGE = {R|Python}
                 [PARALLEL={0|1}
               
                [ , @parallel = 0 | 1 ]

            {code}


            CONNECT Engine would only need for that duty a 4 column table:
            * One which contains the script to execute as a TEXT column.
            * Other with a PATH which points to the Python / RScript .exe in the Server.
            * Eventually, a COMMENT columns, for including some information about the script.
            * And at last, a column with the name of the script to CALL.

            CREATE TABLE db.t_Remote_Scripts
            (
                CALL VARCHAR(255),
                SCRIPT TEXT,
                PATH VARCHAR(255),
                COMMENTS VARCHAR(255)
            ) ENGINE = CONNECT
              TABLE_TYPE = REMOTE_SCRIPT;

            So when calling:

            SELECT
               *
            FROM
                db.t_Remote_Scripts
            WHERE
                CALL = "01 - Hello, World!"

            Connect would send the SCRIPT text column to the .exe on the PATH (e.g.: RScript exe) and retrieve the select table any warnings that occurred during the execution, that could eventually even be stored in another table as a Data Quality check, to see if the script has been executed correctly.

            In the remote R/Python script, the script will have to make use of a ODBC Connection for importing the data from MariaDB, analyze it, and send it back away.

            This engine feature could imply security issues, so it shall be disabled by default, or even have its own USER security permission.

            Thank you.

            Best,
            Juan Telleria
            Juan Juan Telleria made changes -
            Description h1. 1. Objective
            To give the possibility to call the execution of external:
            * [Python|https://www.python.org/].
            * Or [R Statistical Programming Language|https://mran.microsoft.com/].

            Scripts directly from MariaDB, just as SQL Server, from 2017 Edition onward, allows to do so:
            * [sp_execute_external_script (Transact-SQL)|https://docs.microsoft.com/es-es/sql/relational-databases/system-stored-procedures/sp-execute-external-script-transact-sql?view=sql-server-2017]
            * [Run Python using T-SQL|https://docs.microsoft.com/en-us/sql/advanced-analytics/tutorials/run-python-using-t-sql?view=sql-server-2017]
            * [Using R functions with SQL Server data (R in SQL quickstart)|https://docs.microsoft.com/en-us/sql/advanced-analytics/tutorials/rtsql-using-r-functions-with-sql-server-data?view=sql-server-2017]

            The ultimate objetive is, for example, to trigger the execution of a remote Python/R Code for updating a predictive model in keras/h2o/tensorflow/... when new data is introduced into the database, or as part of a SQL procedure.

            h1. 2. MariaDB's CONNECT Implementation
            One possible implementation could be as follows:
            h2. 2.1. my.ini
            {code:txt}
            [mysqld]
            * connect_enable_execute_external_script = 0|1

            * connect_python_exe_dir = "C:/Users/J-tel/AppData/Local/Programs/Python/Python36-32/python.exe"

            * connect_r_exe_dir = "C:/Program Files/Microsoft/R Open/R-3.4.3/bin/Rscript.exe"

            * connect_max_exe_parallel = 1 (Default)
            {code}


            h2. 2.2 CONNECT Table
            For using the CONNECT REMOTE_TABLE Table Type Engine, the user will have to create a table as follows:

            {code:SQL}
            CREATE [OR REPLACE] [IF NOT EXISTS] TABLE tbl_name
                 ENGINE = CONNECT
                 TABLE_TYPE = REMOTE_TABLE
                 LANGUAGE = {R|Python}
                 [PARALLEL={0|1}
               
                [ , @parallel = 0 | 1 ]

            {code}


            CONNECT Engine would only need for that duty a 4 column table:
            * One which contains the script to execute as a TEXT column.
            * Other with a PATH which points to the Python / RScript .exe in the Server.
            * Eventually, a COMMENT columns, for including some information about the script.
            * And at last, a column with the name of the script to CALL.

            CREATE TABLE db.t_Remote_Scripts
            (
                CALL VARCHAR(255),
                SCRIPT TEXT,
                PATH VARCHAR(255),
                COMMENTS VARCHAR(255)
            ) ENGINE = CONNECT
              TABLE_TYPE = REMOTE_SCRIPT;

            So when calling:

            SELECT
               *
            FROM
                db.t_Remote_Scripts
            WHERE
                CALL = "01 - Hello, World!"

            Connect would send the SCRIPT text column to the .exe on the PATH (e.g.: RScript exe) and retrieve the select table any warnings that occurred during the execution, that could eventually even be stored in another table as a Data Quality check, to see if the script has been executed correctly.

            In the remote R/Python script, the script will have to make use of a ODBC Connection for importing the data from MariaDB, analyze it, and send it back away.

            This engine feature could imply security issues, so it shall be disabled by default, or even have its own USER security permission.

            Thank you.

            Best,
            Juan Telleria
            h1. 1. Objective
            To give the possibility to call the execution of external:
            * [Python|https://www.python.org/].
            * Or [R Statistical Programming Language|https://mran.microsoft.com/].

            Scripts directly from MariaDB, just as SQL Server, from 2017 Edition onward, allows to do so:
            * [sp_execute_external_script (Transact-SQL)|https://docs.microsoft.com/es-es/sql/relational-databases/system-stored-procedures/sp-execute-external-script-transact-sql?view=sql-server-2017]
            * [Run Python using T-SQL|https://docs.microsoft.com/en-us/sql/advanced-analytics/tutorials/run-python-using-t-sql?view=sql-server-2017]
            * [Using R functions with SQL Server data (R in SQL quickstart)|https://docs.microsoft.com/en-us/sql/advanced-analytics/tutorials/rtsql-using-r-functions-with-sql-server-data?view=sql-server-2017]

            The ultimate objetive is, for example, to trigger the execution of a remote Python/R Code for updating a predictive model in keras/h2o/tensorflow/... when new data is introduced into the database, or as part of a SQL procedure.

            h1. 2. MariaDB's CONNECT Implementation
            One possible implementation could be as follows:
            h2. 2.1. my.ini
            {code:txt}
            [mysqld]
            connect_enable_execute_external_script = {0|1}
            connect_python_exe_dir = "C:/Users/J-tel/AppData/Local/Programs/Python/Python36-32/python.exe"
            connect_r_exe_dir = "C:/Program Files/Microsoft/R Open/R-3.4.3/bin/Rscript.exe"
            connect_max_exe_parallel = 1 (Default)
            {code}


            h2. 2.2 CONNECT Table
            For using the CONNECT REMOTE_TABLE Table Type Engine, the user will have to create a table as follows:

            {code:SQL}
            CREATE [OR REPLACE] [IF NOT EXISTS] TABLE tbl_name
                 ENGINE = CONNECT
                 TABLE_TYPE = REMOTE_TABLE
                 LANGUAGE = {R|Python}
                 [PARALLEL={0|1}
               
                [ , @parallel = 0 | 1 ]

            {code}


            CONNECT Engine would only need for that duty a 4 column table:
            * One which contains the script to execute as a TEXT column.
            * Other with a PATH which points to the Python / RScript .exe in the Server.
            * Eventually, a COMMENT columns, for including some information about the script.
            * And at last, a column with the name of the script to CALL.

            CREATE TABLE db.t_Remote_Scripts
            (
                CALL VARCHAR(255),
                SCRIPT TEXT,
                PATH VARCHAR(255),
                COMMENTS VARCHAR(255)
            ) ENGINE = CONNECT
              TABLE_TYPE = REMOTE_SCRIPT;

            So when calling:

            SELECT
               *
            FROM
                db.t_Remote_Scripts
            WHERE
                CALL = "01 - Hello, World!"

            Connect would send the SCRIPT text column to the .exe on the PATH (e.g.: RScript exe) and retrieve the select table any warnings that occurred during the execution, that could eventually even be stored in another table as a Data Quality check, to see if the script has been executed correctly.

            In the remote R/Python script, the script will have to make use of a ODBC Connection for importing the data from MariaDB, analyze it, and send it back away.

            This engine feature could imply security issues, so it shall be disabled by default, or even have its own USER security permission.

            Thank you.

            Best,
            Juan Telleria
            Juan Juan Telleria made changes -
            Description h1. 1. Objective
            To give the possibility to call the execution of external:
            * [Python|https://www.python.org/].
            * Or [R Statistical Programming Language|https://mran.microsoft.com/].

            Scripts directly from MariaDB, just as SQL Server, from 2017 Edition onward, allows to do so:
            * [sp_execute_external_script (Transact-SQL)|https://docs.microsoft.com/es-es/sql/relational-databases/system-stored-procedures/sp-execute-external-script-transact-sql?view=sql-server-2017]
            * [Run Python using T-SQL|https://docs.microsoft.com/en-us/sql/advanced-analytics/tutorials/run-python-using-t-sql?view=sql-server-2017]
            * [Using R functions with SQL Server data (R in SQL quickstart)|https://docs.microsoft.com/en-us/sql/advanced-analytics/tutorials/rtsql-using-r-functions-with-sql-server-data?view=sql-server-2017]

            The ultimate objetive is, for example, to trigger the execution of a remote Python/R Code for updating a predictive model in keras/h2o/tensorflow/... when new data is introduced into the database, or as part of a SQL procedure.

            h1. 2. MariaDB's CONNECT Implementation
            One possible implementation could be as follows:
            h2. 2.1. my.ini
            {code:txt}
            [mysqld]
            connect_enable_execute_external_script = {0|1}
            connect_python_exe_dir = "C:/Users/J-tel/AppData/Local/Programs/Python/Python36-32/python.exe"
            connect_r_exe_dir = "C:/Program Files/Microsoft/R Open/R-3.4.3/bin/Rscript.exe"
            connect_max_exe_parallel = 1 (Default)
            {code}


            h2. 2.2 CONNECT Table
            For using the CONNECT REMOTE_TABLE Table Type Engine, the user will have to create a table as follows:

            {code:SQL}
            CREATE [OR REPLACE] [IF NOT EXISTS] TABLE tbl_name
                 ENGINE = CONNECT
                 TABLE_TYPE = REMOTE_TABLE
                 LANGUAGE = {R|Python}
                 [PARALLEL={0|1}
               
                [ , @parallel = 0 | 1 ]

            {code}


            CONNECT Engine would only need for that duty a 4 column table:
            * One which contains the script to execute as a TEXT column.
            * Other with a PATH which points to the Python / RScript .exe in the Server.
            * Eventually, a COMMENT columns, for including some information about the script.
            * And at last, a column with the name of the script to CALL.

            CREATE TABLE db.t_Remote_Scripts
            (
                CALL VARCHAR(255),
                SCRIPT TEXT,
                PATH VARCHAR(255),
                COMMENTS VARCHAR(255)
            ) ENGINE = CONNECT
              TABLE_TYPE = REMOTE_SCRIPT;

            So when calling:

            SELECT
               *
            FROM
                db.t_Remote_Scripts
            WHERE
                CALL = "01 - Hello, World!"

            Connect would send the SCRIPT text column to the .exe on the PATH (e.g.: RScript exe) and retrieve the select table any warnings that occurred during the execution, that could eventually even be stored in another table as a Data Quality check, to see if the script has been executed correctly.

            In the remote R/Python script, the script will have to make use of a ODBC Connection for importing the data from MariaDB, analyze it, and send it back away.

            This engine feature could imply security issues, so it shall be disabled by default, or even have its own USER security permission.

            Thank you.

            Best,
            Juan Telleria
            h1. 1. Objective
            To give the possibility to call the execution of external:
            * [Python|https://www.python.org/].
            * Or [R Statistical Programming Language|https://mran.microsoft.com/].

            Scripts directly from MariaDB, just as SQL Server, from 2017 Edition onward, allows to do so:
            * [sp_execute_external_script (Transact-SQL)|https://docs.microsoft.com/es-es/sql/relational-databases/system-stored-procedures/sp-execute-external-script-transact-sql?view=sql-server-2017]
            * [Run Python using T-SQL|https://docs.microsoft.com/en-us/sql/advanced-analytics/tutorials/run-python-using-t-sql?view=sql-server-2017]
            * [Using R functions with SQL Server data (R in SQL quickstart)|https://docs.microsoft.com/en-us/sql/advanced-analytics/tutorials/rtsql-using-r-functions-with-sql-server-data?view=sql-server-2017]

            The ultimate objetive is, for example, to trigger the execution of a remote Python/R Code for updating a predictive model in keras/h2o/tensorflow/... when new data is introduced into the database, or as part of a SQL procedure.

            h1. 2. MariaDB's CONNECT Implementation
            One possible implementation could be as follows:
            h2. 2.1. my.ini
            {code:txt}
            [mysqld]
            connect_enable_execute_external_script = {0|1}
            connect_python_exe_dir = "C:/Users/J-tel/AppData/Local/Programs/Python/Python36-32/python.exe"
            connect_r_exe_dir = "C:/Program Files/Microsoft/R Open/R-3.4.3/bin/Rscript.exe"
            connect_max_exe_parallel = {1 (Default) | Number}
            {code}


            h2. 2.2 CONNECT Table
            For using the CONNECT REMOTE_TABLE Table Type Engine, the user will have to create a table as follows:

            {code:SQL}
            CREATE [OR REPLACE] [IF NOT EXISTS] TABLE tbl_name
                 ENGINE = CONNECT
                 TABLE_TYPE = REMOTE_TABLE
                 LANGUAGE = {R|Python}
                 [PARALLEL={0|1}
               
                [ , @parallel = 0 | 1 ]

            {code}


            CONNECT Engine would only need for that duty a 4 column table:
            * One which contains the script to execute as a TEXT column.
            * Other with a PATH which points to the Python / RScript .exe in the Server.
            * Eventually, a COMMENT columns, for including some information about the script.
            * And at last, a column with the name of the script to CALL.

            CREATE TABLE db.t_Remote_Scripts
            (
                CALL VARCHAR(255),
                SCRIPT TEXT,
                PATH VARCHAR(255),
                COMMENTS VARCHAR(255)
            ) ENGINE = CONNECT
              TABLE_TYPE = REMOTE_SCRIPT;

            So when calling:

            SELECT
               *
            FROM
                db.t_Remote_Scripts
            WHERE
                CALL = "01 - Hello, World!"

            Connect would send the SCRIPT text column to the .exe on the PATH (e.g.: RScript exe) and retrieve the select table any warnings that occurred during the execution, that could eventually even be stored in another table as a Data Quality check, to see if the script has been executed correctly.

            In the remote R/Python script, the script will have to make use of a ODBC Connection for importing the data from MariaDB, analyze it, and send it back away.

            This engine feature could imply security issues, so it shall be disabled by default, or even have its own USER security permission.

            Thank you.

            Best,
            Juan Telleria
            Juan Juan Telleria made changes -
            Description h1. 1. Objective
            To give the possibility to call the execution of external:
            * [Python|https://www.python.org/].
            * Or [R Statistical Programming Language|https://mran.microsoft.com/].

            Scripts directly from MariaDB, just as SQL Server, from 2017 Edition onward, allows to do so:
            * [sp_execute_external_script (Transact-SQL)|https://docs.microsoft.com/es-es/sql/relational-databases/system-stored-procedures/sp-execute-external-script-transact-sql?view=sql-server-2017]
            * [Run Python using T-SQL|https://docs.microsoft.com/en-us/sql/advanced-analytics/tutorials/run-python-using-t-sql?view=sql-server-2017]
            * [Using R functions with SQL Server data (R in SQL quickstart)|https://docs.microsoft.com/en-us/sql/advanced-analytics/tutorials/rtsql-using-r-functions-with-sql-server-data?view=sql-server-2017]

            The ultimate objetive is, for example, to trigger the execution of a remote Python/R Code for updating a predictive model in keras/h2o/tensorflow/... when new data is introduced into the database, or as part of a SQL procedure.

            h1. 2. MariaDB's CONNECT Implementation
            One possible implementation could be as follows:
            h2. 2.1. my.ini
            {code:txt}
            [mysqld]
            connect_enable_execute_external_script = {0|1}
            connect_python_exe_dir = "C:/Users/J-tel/AppData/Local/Programs/Python/Python36-32/python.exe"
            connect_r_exe_dir = "C:/Program Files/Microsoft/R Open/R-3.4.3/bin/Rscript.exe"
            connect_max_exe_parallel = {1 (Default) | Number}
            {code}


            h2. 2.2 CONNECT Table
            For using the CONNECT REMOTE_TABLE Table Type Engine, the user will have to create a table as follows:

            {code:SQL}
            CREATE [OR REPLACE] [IF NOT EXISTS] TABLE tbl_name
                 ENGINE = CONNECT
                 TABLE_TYPE = REMOTE_TABLE
                 LANGUAGE = {R|Python}
                 [PARALLEL={0|1}
               
                [ , @parallel = 0 | 1 ]

            {code}


            CONNECT Engine would only need for that duty a 4 column table:
            * One which contains the script to execute as a TEXT column.
            * Other with a PATH which points to the Python / RScript .exe in the Server.
            * Eventually, a COMMENT columns, for including some information about the script.
            * And at last, a column with the name of the script to CALL.

            CREATE TABLE db.t_Remote_Scripts
            (
                CALL VARCHAR(255),
                SCRIPT TEXT,
                PATH VARCHAR(255),
                COMMENTS VARCHAR(255)
            ) ENGINE = CONNECT
              TABLE_TYPE = REMOTE_SCRIPT;

            So when calling:

            SELECT
               *
            FROM
                db.t_Remote_Scripts
            WHERE
                CALL = "01 - Hello, World!"

            Connect would send the SCRIPT text column to the .exe on the PATH (e.g.: RScript exe) and retrieve the select table any warnings that occurred during the execution, that could eventually even be stored in another table as a Data Quality check, to see if the script has been executed correctly.

            In the remote R/Python script, the script will have to make use of a ODBC Connection for importing the data from MariaDB, analyze it, and send it back away.

            This engine feature could imply security issues, so it shall be disabled by default, or even have its own USER security permission.

            Thank you.

            Best,
            Juan Telleria
            h1. 1. Objective
            To give the possibility to call the execution of external:
            * [Python|https://www.python.org/].
            * Or [R Statistical Programming Language|https://mran.microsoft.com/].

            Scripts directly from MariaDB, just as SQL Server, from 2017 Edition onward, allows to do so:
            * [sp_execute_external_script (Transact-SQL)|https://docs.microsoft.com/es-es/sql/relational-databases/system-stored-procedures/sp-execute-external-script-transact-sql?view=sql-server-2017]
            * [Run Python using T-SQL|https://docs.microsoft.com/en-us/sql/advanced-analytics/tutorials/run-python-using-t-sql?view=sql-server-2017]
            * [Using R functions with SQL Server data (R in SQL quickstart)|https://docs.microsoft.com/en-us/sql/advanced-analytics/tutorials/rtsql-using-r-functions-with-sql-server-data?view=sql-server-2017]

            The ultimate objetive is, for example, to trigger the execution of a remote Python/R Code for updating a predictive model in keras/h2o/tensorflow/... when new data is introduced into the database, or as part of a SQL procedure.

            h1. 2. MariaDB's CONNECT Implementation
            One possible implementation could be as follows:
            h2. 2.1. my.ini
            {code:txt}
            [mysqld]
            connect_enable_execute_external_script = {0|1}
            connect_python_exe_dir = "C:/Users/J-tel/AppData/Local/Programs/Python/Python36-32/python.exe"
            connect_r_exe_dir = "C:/Program Files/Microsoft/R Open/R-3.4.3/bin/Rscript.exe"
            connect_max_exe_parallel = {1 (Default)|Number}
            {code}


            h2. 2.2 CONNECT Table
            For using the CONNECT REMOTE_TABLE Table Type Engine, the user will have to create a table as follows:

            {code:SQL}
            CREATE [OR REPLACE] [IF NOT EXISTS] TABLE tbl_name
                 ENGINE = CONNECT
                 TABLE_TYPE = REMOTE_TABLE
                 LANGUAGE = {R|Python}
                 [PARALLEL={0|1}
               
                [ , @parallel = 0 | 1 ]

            {code}


            CONNECT Engine would only need for that duty a 4 column table:
            * One which contains the script to execute as a TEXT column.
            * Other with a PATH which points to the Python / RScript .exe in the Server.
            * Eventually, a COMMENT columns, for including some information about the script.
            * And at last, a column with the name of the script to CALL.

            CREATE TABLE db.t_Remote_Scripts
            (
                CALL VARCHAR(255),
                SCRIPT TEXT,
                PATH VARCHAR(255),
                COMMENTS VARCHAR(255)
            ) ENGINE = CONNECT
              TABLE_TYPE = REMOTE_SCRIPT;

            So when calling:

            SELECT
               *
            FROM
                db.t_Remote_Scripts
            WHERE
                CALL = "01 - Hello, World!"

            Connect would send the SCRIPT text column to the .exe on the PATH (e.g.: RScript exe) and retrieve the select table any warnings that occurred during the execution, that could eventually even be stored in another table as a Data Quality check, to see if the script has been executed correctly.

            In the remote R/Python script, the script will have to make use of a ODBC Connection for importing the data from MariaDB, analyze it, and send it back away.

            This engine feature could imply security issues, so it shall be disabled by default, or even have its own USER security permission.

            Thank you.

            Best,
            Juan Telleria
            Juan Juan Telleria made changes -
            Description h1. 1. Objective
            To give the possibility to call the execution of external:
            * [Python|https://www.python.org/].
            * Or [R Statistical Programming Language|https://mran.microsoft.com/].

            Scripts directly from MariaDB, just as SQL Server, from 2017 Edition onward, allows to do so:
            * [sp_execute_external_script (Transact-SQL)|https://docs.microsoft.com/es-es/sql/relational-databases/system-stored-procedures/sp-execute-external-script-transact-sql?view=sql-server-2017]
            * [Run Python using T-SQL|https://docs.microsoft.com/en-us/sql/advanced-analytics/tutorials/run-python-using-t-sql?view=sql-server-2017]
            * [Using R functions with SQL Server data (R in SQL quickstart)|https://docs.microsoft.com/en-us/sql/advanced-analytics/tutorials/rtsql-using-r-functions-with-sql-server-data?view=sql-server-2017]

            The ultimate objetive is, for example, to trigger the execution of a remote Python/R Code for updating a predictive model in keras/h2o/tensorflow/... when new data is introduced into the database, or as part of a SQL procedure.

            h1. 2. MariaDB's CONNECT Implementation
            One possible implementation could be as follows:
            h2. 2.1. my.ini
            {code:txt}
            [mysqld]
            connect_enable_execute_external_script = {0|1}
            connect_python_exe_dir = "C:/Users/J-tel/AppData/Local/Programs/Python/Python36-32/python.exe"
            connect_r_exe_dir = "C:/Program Files/Microsoft/R Open/R-3.4.3/bin/Rscript.exe"
            connect_max_exe_parallel = {1 (Default)|Number}
            {code}


            h2. 2.2 CONNECT Table
            For using the CONNECT REMOTE_TABLE Table Type Engine, the user will have to create a table as follows:

            {code:SQL}
            CREATE [OR REPLACE] [IF NOT EXISTS] TABLE tbl_name
                 ENGINE = CONNECT
                 TABLE_TYPE = REMOTE_TABLE
                 LANGUAGE = {R|Python}
                 [PARALLEL={0|1}
               
                [ , @parallel = 0 | 1 ]

            {code}


            CONNECT Engine would only need for that duty a 4 column table:
            * One which contains the script to execute as a TEXT column.
            * Other with a PATH which points to the Python / RScript .exe in the Server.
            * Eventually, a COMMENT columns, for including some information about the script.
            * And at last, a column with the name of the script to CALL.

            CREATE TABLE db.t_Remote_Scripts
            (
                CALL VARCHAR(255),
                SCRIPT TEXT,
                PATH VARCHAR(255),
                COMMENTS VARCHAR(255)
            ) ENGINE = CONNECT
              TABLE_TYPE = REMOTE_SCRIPT;

            So when calling:

            SELECT
               *
            FROM
                db.t_Remote_Scripts
            WHERE
                CALL = "01 - Hello, World!"

            Connect would send the SCRIPT text column to the .exe on the PATH (e.g.: RScript exe) and retrieve the select table any warnings that occurred during the execution, that could eventually even be stored in another table as a Data Quality check, to see if the script has been executed correctly.

            In the remote R/Python script, the script will have to make use of a ODBC Connection for importing the data from MariaDB, analyze it, and send it back away.

            This engine feature could imply security issues, so it shall be disabled by default, or even have its own USER security permission.

            Thank you.

            Best,
            Juan Telleria
            h1. 1. Objective
            To give the possibility to call the execution of external:
            * [Python|https://www.python.org/].
            * Or [R Statistical Programming Language|https://mran.microsoft.com/].

            Scripts directly from MariaDB, just as SQL Server, from 2017 Edition onward, allows to do so:
            * [sp_execute_external_script (Transact-SQL)|https://docs.microsoft.com/es-es/sql/relational-databases/system-stored-procedures/sp-execute-external-script-transact-sql?view=sql-server-2017]
            * [Run Python using T-SQL|https://docs.microsoft.com/en-us/sql/advanced-analytics/tutorials/run-python-using-t-sql?view=sql-server-2017]
            * [Using R functions with SQL Server data (R in SQL quickstart)|https://docs.microsoft.com/en-us/sql/advanced-analytics/tutorials/rtsql-using-r-functions-with-sql-server-data?view=sql-server-2017]

            The ultimate objetive is, for example, to trigger the execution of a remote Python/R Code for updating a predictive model in keras/h2o/tensorflow/... when new data is introduced into the database, or as part of a SQL procedure.

            h1. 2. MariaDB's CONNECT Implementation
            One possible implementation could be as follows:
            h2. 2.1. my.ini
            {code:txt}
            [mysqld]
            connect_enable_execute_external_script = {0|1}
            connect_python_exe_dir = "C:/Users/J-tel/AppData/Local/Programs/Python/Python36-32/python.exe"
            connect_r_exe_dir = "C:/Program Files/Microsoft/R Open/R-3.4.3/bin/Rscript.exe"
            connect_max_exe_parallel = {1(Default)|Number}
            {code}


            h2. 2.2 CONNECT Table
            For using the CONNECT REMOTE_TABLE Table Type Engine, the user will have to create a table as follows:

            {code:SQL}
            CREATE [OR REPLACE] [IF NOT EXISTS] TABLE tbl_name
                 ENGINE = CONNECT
                 TABLE_TYPE = REMOTE_TABLE
                 LANGUAGE = {R|Python}
                 [PARALLEL={0|1}
               
                [ , @parallel = 0 | 1 ]

            {code}


            CONNECT Engine would only need for that duty a 4 column table:
            * One which contains the script to execute as a TEXT column.
            * Other with a PATH which points to the Python / RScript .exe in the Server.
            * Eventually, a COMMENT columns, for including some information about the script.
            * And at last, a column with the name of the script to CALL.

            CREATE TABLE db.t_Remote_Scripts
            (
                CALL VARCHAR(255),
                SCRIPT TEXT,
                PATH VARCHAR(255),
                COMMENTS VARCHAR(255)
            ) ENGINE = CONNECT
              TABLE_TYPE = REMOTE_SCRIPT;

            So when calling:

            SELECT
               *
            FROM
                db.t_Remote_Scripts
            WHERE
                CALL = "01 - Hello, World!"

            Connect would send the SCRIPT text column to the .exe on the PATH (e.g.: RScript exe) and retrieve the select table any warnings that occurred during the execution, that could eventually even be stored in another table as a Data Quality check, to see if the script has been executed correctly.

            In the remote R/Python script, the script will have to make use of a ODBC Connection for importing the data from MariaDB, analyze it, and send it back away.

            This engine feature could imply security issues, so it shall be disabled by default, or even have its own USER security permission.

            Thank you.

            Best,
            Juan Telleria
            Juan Juan Telleria made changes -
            Description h1. 1. Objective
            To give the possibility to call the execution of external:
            * [Python|https://www.python.org/].
            * Or [R Statistical Programming Language|https://mran.microsoft.com/].

            Scripts directly from MariaDB, just as SQL Server, from 2017 Edition onward, allows to do so:
            * [sp_execute_external_script (Transact-SQL)|https://docs.microsoft.com/es-es/sql/relational-databases/system-stored-procedures/sp-execute-external-script-transact-sql?view=sql-server-2017]
            * [Run Python using T-SQL|https://docs.microsoft.com/en-us/sql/advanced-analytics/tutorials/run-python-using-t-sql?view=sql-server-2017]
            * [Using R functions with SQL Server data (R in SQL quickstart)|https://docs.microsoft.com/en-us/sql/advanced-analytics/tutorials/rtsql-using-r-functions-with-sql-server-data?view=sql-server-2017]

            The ultimate objetive is, for example, to trigger the execution of a remote Python/R Code for updating a predictive model in keras/h2o/tensorflow/... when new data is introduced into the database, or as part of a SQL procedure.

            h1. 2. MariaDB's CONNECT Implementation
            One possible implementation could be as follows:
            h2. 2.1. my.ini
            {code:txt}
            [mysqld]
            connect_enable_execute_external_script = {0|1}
            connect_python_exe_dir = "C:/Users/J-tel/AppData/Local/Programs/Python/Python36-32/python.exe"
            connect_r_exe_dir = "C:/Program Files/Microsoft/R Open/R-3.4.3/bin/Rscript.exe"
            connect_max_exe_parallel = {1(Default)|Number}
            {code}


            h2. 2.2 CONNECT Table
            For using the CONNECT REMOTE_TABLE Table Type Engine, the user will have to create a table as follows:

            {code:SQL}
            CREATE [OR REPLACE] [IF NOT EXISTS] TABLE tbl_name
                 ENGINE = CONNECT
                 TABLE_TYPE = REMOTE_TABLE
                 LANGUAGE = {R|Python}
                 [PARALLEL={0|1}
               
                [ , @parallel = 0 | 1 ]

            {code}


            CONNECT Engine would only need for that duty a 4 column table:
            * One which contains the script to execute as a TEXT column.
            * Other with a PATH which points to the Python / RScript .exe in the Server.
            * Eventually, a COMMENT columns, for including some information about the script.
            * And at last, a column with the name of the script to CALL.

            CREATE TABLE db.t_Remote_Scripts
            (
                CALL VARCHAR(255),
                SCRIPT TEXT,
                PATH VARCHAR(255),
                COMMENTS VARCHAR(255)
            ) ENGINE = CONNECT
              TABLE_TYPE = REMOTE_SCRIPT;

            So when calling:

            SELECT
               *
            FROM
                db.t_Remote_Scripts
            WHERE
                CALL = "01 - Hello, World!"

            Connect would send the SCRIPT text column to the .exe on the PATH (e.g.: RScript exe) and retrieve the select table any warnings that occurred during the execution, that could eventually even be stored in another table as a Data Quality check, to see if the script has been executed correctly.

            In the remote R/Python script, the script will have to make use of a ODBC Connection for importing the data from MariaDB, analyze it, and send it back away.

            This engine feature could imply security issues, so it shall be disabled by default, or even have its own USER security permission.

            Thank you.

            Best,
            Juan Telleria
            h1. 1. Objective
            To give the possibility to call the execution of external:
            * [Python|https://www.python.org/].
            * Or [R Statistical Programming Language|https://mran.microsoft.com/].

            Scripts directly from MariaDB, just as SQL Server, from 2017 Edition onward, allows to do so:
            * [sp_execute_external_script (Transact-SQL)|https://docs.microsoft.com/es-es/sql/relational-databases/system-stored-procedures/sp-execute-external-script-transact-sql?view=sql-server-2017]
            * [Run Python using T-SQL|https://docs.microsoft.com/en-us/sql/advanced-analytics/tutorials/run-python-using-t-sql?view=sql-server-2017]
            * [Using R functions with SQL Server data (R in SQL quickstart)|https://docs.microsoft.com/en-us/sql/advanced-analytics/tutorials/rtsql-using-r-functions-with-sql-server-data?view=sql-server-2017]

            The ultimate objetive is, for example, to trigger the execution of a remote Python/R Code for updating a predictive model in keras/h2o/tensorflow/... when new data is introduced into the database, or as part of a SQL procedure.

            h1. 2. MariaDB's CONNECT Implementation
            One possible implementation could be as follows:
            h2. 2.1. my.ini
            {code:txt}
            [mysqld]
            connect_enable_execute_external_script = {0|1}
            connect_python_exe_dir = "C:/Users/J-tel/AppData/Local/Programs/Python/Python36-32/python.exe"
            connect_r_exe_dir = "C:/Program Files/Microsoft/R Open/R-3.4.3/bin/Rscript.exe"
            connect_max_exe_parallel = {1(Default)|Number}
            {code}


            h2. 2.2 CONNECT Table
            For using the _"CONNECT REMOTE_TABLE"_ Engine, the user will have to create an empty table as follows:

            {code:SQL}
            CREATE [OR REPLACE] [IF NOT EXISTS] TABLE tbl_name
                 ENGINE = CONNECT
                 TABLE_TYPE = REMOTE_TABLE
                 LANGUAGE = {R|Python}
                 [PARALLEL={0|1}
            {code}


            CONNECT Engine would only need for that duty a 4 column table:
            * One which contains the script to execute as a TEXT column.
            * Other with a PATH which points to the Python / RScript .exe in the Server.
            * Eventually, a COMMENT columns, for including some information about the script.
            * And at last, a column with the name of the script to CALL.

            CREATE TABLE db.t_Remote_Scripts
            (
                CALL VARCHAR(255),
                SCRIPT TEXT,
                PATH VARCHAR(255),
                COMMENTS VARCHAR(255)
            ) ENGINE = CONNECT
              TABLE_TYPE = REMOTE_SCRIPT;

            So when calling:

            SELECT
               *
            FROM
                db.t_Remote_Scripts
            WHERE
                CALL = "01 - Hello, World!"

            Connect would send the SCRIPT text column to the .exe on the PATH (e.g.: RScript exe) and retrieve the select table any warnings that occurred during the execution, that could eventually even be stored in another table as a Data Quality check, to see if the script has been executed correctly.

            In the remote R/Python script, the script will have to make use of a ODBC Connection for importing the data from MariaDB, analyze it, and send it back away.

            This engine feature could imply security issues, so it shall be disabled by default, or even have its own USER security permission.

            Thank you.

            Best,
            Juan Telleria
            Juan Juan Telleria made changes -
            Description h1. 1. Objective
            To give the possibility to call the execution of external:
            * [Python|https://www.python.org/].
            * Or [R Statistical Programming Language|https://mran.microsoft.com/].

            Scripts directly from MariaDB, just as SQL Server, from 2017 Edition onward, allows to do so:
            * [sp_execute_external_script (Transact-SQL)|https://docs.microsoft.com/es-es/sql/relational-databases/system-stored-procedures/sp-execute-external-script-transact-sql?view=sql-server-2017]
            * [Run Python using T-SQL|https://docs.microsoft.com/en-us/sql/advanced-analytics/tutorials/run-python-using-t-sql?view=sql-server-2017]
            * [Using R functions with SQL Server data (R in SQL quickstart)|https://docs.microsoft.com/en-us/sql/advanced-analytics/tutorials/rtsql-using-r-functions-with-sql-server-data?view=sql-server-2017]

            The ultimate objetive is, for example, to trigger the execution of a remote Python/R Code for updating a predictive model in keras/h2o/tensorflow/... when new data is introduced into the database, or as part of a SQL procedure.

            h1. 2. MariaDB's CONNECT Implementation
            One possible implementation could be as follows:
            h2. 2.1. my.ini
            {code:txt}
            [mysqld]
            connect_enable_execute_external_script = {0|1}
            connect_python_exe_dir = "C:/Users/J-tel/AppData/Local/Programs/Python/Python36-32/python.exe"
            connect_r_exe_dir = "C:/Program Files/Microsoft/R Open/R-3.4.3/bin/Rscript.exe"
            connect_max_exe_parallel = {1(Default)|Number}
            {code}


            h2. 2.2 CONNECT Table
            For using the _"CONNECT REMOTE_TABLE"_ Engine, the user will have to create an empty table as follows:

            {code:SQL}
            CREATE [OR REPLACE] [IF NOT EXISTS] TABLE tbl_name
                 ENGINE = CONNECT
                 TABLE_TYPE = REMOTE_TABLE
                 LANGUAGE = {R|Python}
                 [PARALLEL={0|1}
            {code}


            CONNECT Engine would only need for that duty a 4 column table:
            * One which contains the script to execute as a TEXT column.
            * Other with a PATH which points to the Python / RScript .exe in the Server.
            * Eventually, a COMMENT columns, for including some information about the script.
            * And at last, a column with the name of the script to CALL.

            CREATE TABLE db.t_Remote_Scripts
            (
                CALL VARCHAR(255),
                SCRIPT TEXT,
                PATH VARCHAR(255),
                COMMENTS VARCHAR(255)
            ) ENGINE = CONNECT
              TABLE_TYPE = REMOTE_SCRIPT;

            So when calling:

            SELECT
               *
            FROM
                db.t_Remote_Scripts
            WHERE
                CALL = "01 - Hello, World!"

            Connect would send the SCRIPT text column to the .exe on the PATH (e.g.: RScript exe) and retrieve the select table any warnings that occurred during the execution, that could eventually even be stored in another table as a Data Quality check, to see if the script has been executed correctly.

            In the remote R/Python script, the script will have to make use of a ODBC Connection for importing the data from MariaDB, analyze it, and send it back away.

            This engine feature could imply security issues, so it shall be disabled by default, or even have its own USER security permission.

            Thank you.

            Best,
            Juan Telleria
            h1. 1. Objective
            To give the possibility to call the execution of external:
            * [Python|https://www.python.org/].
            * Or [R Statistical Programming Language|https://mran.microsoft.com/].

            Scripts directly from MariaDB, just as SQL Server, from 2017 Edition onward, allows to do so:
            * [sp_execute_external_script (Transact-SQL)|https://docs.microsoft.com/es-es/sql/relational-databases/system-stored-procedures/sp-execute-external-script-transact-sql?view=sql-server-2017]
            * [Run Python using T-SQL|https://docs.microsoft.com/en-us/sql/advanced-analytics/tutorials/run-python-using-t-sql?view=sql-server-2017]
            * [Using R functions with SQL Server data (R in SQL quickstart)|https://docs.microsoft.com/en-us/sql/advanced-analytics/tutorials/rtsql-using-r-functions-with-sql-server-data?view=sql-server-2017]

            The ultimate objetive is, for example, to trigger the execution of a remote Python/R Code for updating a predictive model in keras/h2o/tensorflow/... when new data is introduced into the database, or as part of a SQL procedure.

            h1. 2. MariaDB's CONNECT Implementation
            One possible implementation could be as follows:
            h2. 2.1. my.ini
            {code:txt}
            [mysqld]
            connect_enable_execute_external_script = {0|1}
            connect_python_exe_dir = "C:/Users/J-tel/AppData/Local/Programs/Python/Python36-32/python.exe"
            connect_r_exe_dir = "C:/Program Files/Microsoft/R Open/R-3.4.3/bin/Rscript.exe"
            connect_max_exe_parallel = {1(Default)|Number}
            {code}


            h2. 2.2 CONNECT Table
            For using the _"CONNECT REMOTE_TABLE"_ Engine, the user will have to create an empty table as follows:

            {code:SQL}
            CREATE [OR REPLACE] [IF NOT EXISTS] TABLE tbl_name
                 ENGINE = CONNECT
                 TABLE_TYPE = REMOTE_TABLE
                 LANGUAGE = {R|Python}
                 [PARALLEL={0|1}]
            {code}


            CONNECT Engine would only need for that duty a 4 column table:
            * One which contains the script to execute as a TEXT column.
            * Other with a PATH which points to the Python / RScript .exe in the Server.
            * Eventually, a COMMENT columns, for including some information about the script.
            * And at last, a column with the name of the script to CALL.

            CREATE TABLE db.t_Remote_Scripts
            (
                CALL VARCHAR(255),
                SCRIPT TEXT,
                PATH VARCHAR(255),
                COMMENTS VARCHAR(255)
            ) ENGINE = CONNECT
              TABLE_TYPE = REMOTE_SCRIPT;

            So when calling:

            SELECT
               *
            FROM
                db.t_Remote_Scripts
            WHERE
                CALL = "01 - Hello, World!"

            Connect would send the SCRIPT text column to the .exe on the PATH (e.g.: RScript exe) and retrieve the select table any warnings that occurred during the execution, that could eventually even be stored in another table as a Data Quality check, to see if the script has been executed correctly.

            In the remote R/Python script, the script will have to make use of a ODBC Connection for importing the data from MariaDB, analyze it, and send it back away.

            This engine feature could imply security issues, so it shall be disabled by default, or even have its own USER security permission.

            Thank you.

            Best,
            Juan Telleria
            Juan Juan Telleria made changes -
            Description h1. 1. Objective
            To give the possibility to call the execution of external:
            * [Python|https://www.python.org/].
            * Or [R Statistical Programming Language|https://mran.microsoft.com/].

            Scripts directly from MariaDB, just as SQL Server, from 2017 Edition onward, allows to do so:
            * [sp_execute_external_script (Transact-SQL)|https://docs.microsoft.com/es-es/sql/relational-databases/system-stored-procedures/sp-execute-external-script-transact-sql?view=sql-server-2017]
            * [Run Python using T-SQL|https://docs.microsoft.com/en-us/sql/advanced-analytics/tutorials/run-python-using-t-sql?view=sql-server-2017]
            * [Using R functions with SQL Server data (R in SQL quickstart)|https://docs.microsoft.com/en-us/sql/advanced-analytics/tutorials/rtsql-using-r-functions-with-sql-server-data?view=sql-server-2017]

            The ultimate objetive is, for example, to trigger the execution of a remote Python/R Code for updating a predictive model in keras/h2o/tensorflow/... when new data is introduced into the database, or as part of a SQL procedure.

            h1. 2. MariaDB's CONNECT Implementation
            One possible implementation could be as follows:
            h2. 2.1. my.ini
            {code:txt}
            [mysqld]
            connect_enable_execute_external_script = {0|1}
            connect_python_exe_dir = "C:/Users/J-tel/AppData/Local/Programs/Python/Python36-32/python.exe"
            connect_r_exe_dir = "C:/Program Files/Microsoft/R Open/R-3.4.3/bin/Rscript.exe"
            connect_max_exe_parallel = {1(Default)|Number}
            {code}


            h2. 2.2 CONNECT Table
            For using the _"CONNECT REMOTE_TABLE"_ Engine, the user will have to create an empty table as follows:

            {code:SQL}
            CREATE [OR REPLACE] [IF NOT EXISTS] TABLE tbl_name
                 ENGINE = CONNECT
                 TABLE_TYPE = REMOTE_TABLE
                 LANGUAGE = {R|Python}
                 [PARALLEL={0|1}]
            {code}


            CONNECT Engine would only need for that duty a 4 column table:
            * One which contains the script to execute as a TEXT column.
            * Other with a PATH which points to the Python / RScript .exe in the Server.
            * Eventually, a COMMENT columns, for including some information about the script.
            * And at last, a column with the name of the script to CALL.

            CREATE TABLE db.t_Remote_Scripts
            (
                CALL VARCHAR(255),
                SCRIPT TEXT,
                PATH VARCHAR(255),
                COMMENTS VARCHAR(255)
            ) ENGINE = CONNECT
              TABLE_TYPE = REMOTE_SCRIPT;

            So when calling:

            SELECT
               *
            FROM
                db.t_Remote_Scripts
            WHERE
                CALL = "01 - Hello, World!"

            Connect would send the SCRIPT text column to the .exe on the PATH (e.g.: RScript exe) and retrieve the select table any warnings that occurred during the execution, that could eventually even be stored in another table as a Data Quality check, to see if the script has been executed correctly.

            In the remote R/Python script, the script will have to make use of a ODBC Connection for importing the data from MariaDB, analyze it, and send it back away.

            This engine feature could imply security issues, so it shall be disabled by default, or even have its own USER security permission.

            Thank you.

            Best,
            Juan Telleria
            h1. 1. Objective
            To give the possibility to call the execution of external:
            * [Python|https://www.python.org/].
            * Or [R Statistical Programming Language|https://mran.microsoft.com/].

            Scripts directly from MariaDB, just as SQL Server, from 2017 Edition onward, allows to do so:
            * [sp_execute_external_script (Transact-SQL)|https://docs.microsoft.com/es-es/sql/relational-databases/system-stored-procedures/sp-execute-external-script-transact-sql?view=sql-server-2017]
            * [Run Python using T-SQL|https://docs.microsoft.com/en-us/sql/advanced-analytics/tutorials/run-python-using-t-sql?view=sql-server-2017]
            * [Using R functions with SQL Server data (R in SQL quickstart)|https://docs.microsoft.com/en-us/sql/advanced-analytics/tutorials/rtsql-using-r-functions-with-sql-server-data?view=sql-server-2017]

            The ultimate objetive is, for example, to trigger the execution of a remote Python/R Code for updating a predictive model in keras/h2o/tensorflow/... when new data is introduced into the database, or as part of a SQL procedure.

            h1. 2. MariaDB's CONNECT Implementation
            One possible implementation could be as follows:
            h2. 2.1. my.ini
            {code:txt}
            [mysqld]
            connect_enable_execute_external_script = {0|1}
            connect_python_exe_dir = "C:/Users/J-tel/AppData/Local/Programs/Python/Python36-32/python.exe"
            connect_r_exe_dir = "C:/Program Files/Microsoft/R Open/R-3.4.3/bin/Rscript.exe"
            connect_max_exe_parallel = {1(Default)|Number}
            {code}


            h2. 2.2 CONNECT Table
            For using the _"CONNECT REMOTE_TABLE"_ Engine, the user will have to create an empty table as follows:

            {code:SQL}
            CREATE [OR REPLACE] [IF NOT EXISTS] TABLE tbl_name
                 ENGINE = CONNECT
                 TABLE_TYPE = REMOTE_TABLE
                 LANGUAGE = {R|Python}
                 [PARALLEL={0|1}]
            {code}

            The CONNECT Engine will the automatically create a table with the following column definition:
            {code:SQL}
            CREATE [OR REPLACE] [IF NOT EXISTS] TABLE tbl_name
            (
                 CALL VARCHAR(128) PRIMARY KEY,
                 SCRIPT TEXT
            )
                 ENGINE = CONNECT
                 TABLE_TYPE = REMOTE_TABLE
                 LANGUAGE = {R|Python}
                 [PARALLEL={0|1}]
            {code}

            So when calling:

            SELECT
               *
            FROM
                db.t_Remote_Scripts
            WHERE
                CALL = "01 - Hello, World!"

            Connect would send the SCRIPT text column to the .exe on the PATH (e.g.: RScript exe) and retrieve the select table any warnings that occurred during the execution, that could eventually even be stored in another table as a Data Quality check, to see if the script has been executed correctly.

            In the remote R/Python script, the script will have to make use of a ODBC Connection for importing the data from MariaDB, analyze it, and send it back away.

            This engine feature could imply security issues, so it shall be disabled by default, or even have its own USER security permission.

            Thank you.

            Best,
            Juan Telleria
            Juan Juan Telleria made changes -
            Description h1. 1. Objective
            To give the possibility to call the execution of external:
            * [Python|https://www.python.org/].
            * Or [R Statistical Programming Language|https://mran.microsoft.com/].

            Scripts directly from MariaDB, just as SQL Server, from 2017 Edition onward, allows to do so:
            * [sp_execute_external_script (Transact-SQL)|https://docs.microsoft.com/es-es/sql/relational-databases/system-stored-procedures/sp-execute-external-script-transact-sql?view=sql-server-2017]
            * [Run Python using T-SQL|https://docs.microsoft.com/en-us/sql/advanced-analytics/tutorials/run-python-using-t-sql?view=sql-server-2017]
            * [Using R functions with SQL Server data (R in SQL quickstart)|https://docs.microsoft.com/en-us/sql/advanced-analytics/tutorials/rtsql-using-r-functions-with-sql-server-data?view=sql-server-2017]

            The ultimate objetive is, for example, to trigger the execution of a remote Python/R Code for updating a predictive model in keras/h2o/tensorflow/... when new data is introduced into the database, or as part of a SQL procedure.

            h1. 2. MariaDB's CONNECT Implementation
            One possible implementation could be as follows:
            h2. 2.1. my.ini
            {code:txt}
            [mysqld]
            connect_enable_execute_external_script = {0|1}
            connect_python_exe_dir = "C:/Users/J-tel/AppData/Local/Programs/Python/Python36-32/python.exe"
            connect_r_exe_dir = "C:/Program Files/Microsoft/R Open/R-3.4.3/bin/Rscript.exe"
            connect_max_exe_parallel = {1(Default)|Number}
            {code}


            h2. 2.2 CONNECT Table
            For using the _"CONNECT REMOTE_TABLE"_ Engine, the user will have to create an empty table as follows:

            {code:SQL}
            CREATE [OR REPLACE] [IF NOT EXISTS] TABLE tbl_name
                 ENGINE = CONNECT
                 TABLE_TYPE = REMOTE_TABLE
                 LANGUAGE = {R|Python}
                 [PARALLEL={0|1}]
            {code}

            The CONNECT Engine will the automatically create a table with the following column definition:
            {code:SQL}
            CREATE [OR REPLACE] [IF NOT EXISTS] TABLE tbl_name
            (
                 CALL VARCHAR(128) PRIMARY KEY,
                 SCRIPT TEXT
            )
                 ENGINE = CONNECT
                 TABLE_TYPE = REMOTE_TABLE
                 LANGUAGE = {R|Python}
                 [PARALLEL={0|1}]
            {code}

            So when calling:

            SELECT
               *
            FROM
                db.t_Remote_Scripts
            WHERE
                CALL = "01 - Hello, World!"

            Connect would send the SCRIPT text column to the .exe on the PATH (e.g.: RScript exe) and retrieve the select table any warnings that occurred during the execution, that could eventually even be stored in another table as a Data Quality check, to see if the script has been executed correctly.

            In the remote R/Python script, the script will have to make use of a ODBC Connection for importing the data from MariaDB, analyze it, and send it back away.

            This engine feature could imply security issues, so it shall be disabled by default, or even have its own USER security permission.

            Thank you.

            Best,
            Juan Telleria
            h1. 1. Objective
            To give the possibility to call the execution of external:
            * [Python|https://www.python.org/].
            * Or [R Statistical Programming Language|https://mran.microsoft.com/].

            Scripts directly from MariaDB, just as SQL Server, from 2017 Edition onward, allows to do so:
            * [sp_execute_external_script (Transact-SQL)|https://docs.microsoft.com/es-es/sql/relational-databases/system-stored-procedures/sp-execute-external-script-transact-sql?view=sql-server-2017]
            * [Run Python using T-SQL|https://docs.microsoft.com/en-us/sql/advanced-analytics/tutorials/run-python-using-t-sql?view=sql-server-2017]
            * [Using R functions with SQL Server data (R in SQL quickstart)|https://docs.microsoft.com/en-us/sql/advanced-analytics/tutorials/rtsql-using-r-functions-with-sql-server-data?view=sql-server-2017]

            The ultimate objetive is, for example, to trigger the execution of a remote Python/R Code for updating a predictive model in keras/h2o/tensorflow/... when new data is introduced into the database, or as part of a SQL procedure.

            h1. 2. MariaDB's CONNECT Implementation
            One possible implementation could be as follows:
            h2. 2.1. my.ini
            {code:txt}
            [mysqld]
            connect_enable_execute_external_script = {0|1}
            connect_python_exe_dir = "C:/Users/J-tel/AppData/Local/Programs/Python/Python36-32/python.exe"
            connect_r_exe_dir = "C:/Program Files/Microsoft/R Open/R-3.4.3/bin/Rscript.exe"
            connect_max_exe_parallel = {1(Default)|Number}
            {code}


            h2. 2.2 CREATE TABLE: CONNECT
            For using the _"CONNECT REMOTE_TABLE"_ Engine, the user will have to create an empty table as follows:

            {code:SQL}
            CREATE [OR REPLACE] [IF NOT EXISTS] TABLE tbl_name
                 ENGINE = CONNECT
                 TABLE_TYPE = REMOTE_TABLE
                 LANGUAGE = {R|Python}
                 [PARALLEL={0|1}]
            {code}

            The CONNECT Engine will the automatically create a table with the following column definition:
            {code:SQL}
            CREATE [OR REPLACE] [IF NOT EXISTS] TABLE tbl_name
            (
                 CALL VARCHAR(128) PRIMARY KEY,
                 SCRIPT TEXT
            )
                 ENGINE = CONNECT
                 TABLE_TYPE = REMOTE_TABLE
                 LANGUAGE = {R|Python}
                 [PARALLEL={0|1}]
            {code}

            So when calling:

            SELECT
               *
            FROM
                db.t_Remote_Scripts
            WHERE
                CALL = "01 - Hello, World!"

            Connect would send the SCRIPT text column to the .exe on the PATH (e.g.: RScript exe) and retrieve the select table any warnings that occurred during the execution, that could eventually even be stored in another table as a Data Quality check, to see if the script has been executed correctly.

            In the remote R/Python script, the script will have to make use of a ODBC Connection for importing the data from MariaDB, analyze it, and send it back away.

            This engine feature could imply security issues, so it shall be disabled by default, or even have its own USER security permission.

            Thank you.

            Best,
            Juan Telleria
            Juan Juan Telleria made changes -
            Description h1. 1. Objective
            To give the possibility to call the execution of external:
            * [Python|https://www.python.org/].
            * Or [R Statistical Programming Language|https://mran.microsoft.com/].

            Scripts directly from MariaDB, just as SQL Server, from 2017 Edition onward, allows to do so:
            * [sp_execute_external_script (Transact-SQL)|https://docs.microsoft.com/es-es/sql/relational-databases/system-stored-procedures/sp-execute-external-script-transact-sql?view=sql-server-2017]
            * [Run Python using T-SQL|https://docs.microsoft.com/en-us/sql/advanced-analytics/tutorials/run-python-using-t-sql?view=sql-server-2017]
            * [Using R functions with SQL Server data (R in SQL quickstart)|https://docs.microsoft.com/en-us/sql/advanced-analytics/tutorials/rtsql-using-r-functions-with-sql-server-data?view=sql-server-2017]

            The ultimate objetive is, for example, to trigger the execution of a remote Python/R Code for updating a predictive model in keras/h2o/tensorflow/... when new data is introduced into the database, or as part of a SQL procedure.

            h1. 2. MariaDB's CONNECT Implementation
            One possible implementation could be as follows:
            h2. 2.1. my.ini
            {code:txt}
            [mysqld]
            connect_enable_execute_external_script = {0|1}
            connect_python_exe_dir = "C:/Users/J-tel/AppData/Local/Programs/Python/Python36-32/python.exe"
            connect_r_exe_dir = "C:/Program Files/Microsoft/R Open/R-3.4.3/bin/Rscript.exe"
            connect_max_exe_parallel = {1(Default)|Number}
            {code}


            h2. 2.2 CREATE TABLE: CONNECT
            For using the _"CONNECT REMOTE_TABLE"_ Engine, the user will have to create an empty table as follows:

            {code:SQL}
            CREATE [OR REPLACE] [IF NOT EXISTS] TABLE tbl_name
                 ENGINE = CONNECT
                 TABLE_TYPE = REMOTE_TABLE
                 LANGUAGE = {R|Python}
                 [PARALLEL={0|1}]
            {code}

            The CONNECT Engine will the automatically create a table with the following column definition:
            {code:SQL}
            CREATE [OR REPLACE] [IF NOT EXISTS] TABLE tbl_name
            (
                 CALL VARCHAR(128) PRIMARY KEY,
                 SCRIPT TEXT
            )
                 ENGINE = CONNECT
                 TABLE_TYPE = REMOTE_TABLE
                 LANGUAGE = {R|Python}
                 [PARALLEL={0|1}]
            {code}

            So when calling:

            SELECT
               *
            FROM
                db.t_Remote_Scripts
            WHERE
                CALL = "01 - Hello, World!"

            Connect would send the SCRIPT text column to the .exe on the PATH (e.g.: RScript exe) and retrieve the select table any warnings that occurred during the execution, that could eventually even be stored in another table as a Data Quality check, to see if the script has been executed correctly.

            In the remote R/Python script, the script will have to make use of a ODBC Connection for importing the data from MariaDB, analyze it, and send it back away.

            This engine feature could imply security issues, so it shall be disabled by default, or even have its own USER security permission.

            Thank you.

            Best,
            Juan Telleria
            h1. 1. Objective
            To give the possibility to call the execution of external:
            * [Python|https://www.python.org/].
            * Or [R Statistical Programming Language|https://mran.microsoft.com/].

            Scripts directly from MariaDB, just as SQL Server, from 2017 Edition onward, allows to do so:
            * [sp_execute_external_script (Transact-SQL)|https://docs.microsoft.com/es-es/sql/relational-databases/system-stored-procedures/sp-execute-external-script-transact-sql?view=sql-server-2017]
            * [Run Python using T-SQL|https://docs.microsoft.com/en-us/sql/advanced-analytics/tutorials/run-python-using-t-sql?view=sql-server-2017]
            * [Using R functions with SQL Server data (R in SQL quickstart)|https://docs.microsoft.com/en-us/sql/advanced-analytics/tutorials/rtsql-using-r-functions-with-sql-server-data?view=sql-server-2017]

            The ultimate objetive is, for example, to trigger the execution of a remote Python/R Code for updating a predictive model in keras/h2o/tensorflow/... when new data is introduced into the database, or as part of a SQL procedure.

            h1. 2. MariaDB's CONNECT Implementation
            One possible implementation could be as follows:
            h2. 2.1. my.ini
            {code:txt}
            [mysqld]
            connect_enable_execute_external_script = {0|1}
            connect_python_exe_dir = "C:/Users/J-tel/AppData/Local/Programs/Python/Python36-32/python.exe"
            connect_r_exe_dir = "C:/Program Files/Microsoft/R Open/R-3.4.3/bin/Rscript.exe"
            connect_max_exe_parallel = {1(Default)|Number}
            {code}

            h2. 2.2 CREATE TABLE: CONNECT
            For using the _"CONNECT REMOTE_TABLE"_ Engine, the user will have to create an empty table as follows:

            {code:SQL}
            CREATE [OR REPLACE] [IF NOT EXISTS] TABLE tbl_name
                 ENGINE = CONNECT
                 TABLE_TYPE = REMOTE_TABLE
                 LANGUAGE = {R|Python}
                 [PARALLEL={0|1}]
            {code}

            The CONNECT Engine will the automatically create a table with the following column definition:
            {code:SQL}
            CREATE [OR REPLACE] [IF NOT EXISTS] TABLE tbl_name
            (
                 CALL VARCHAR(128) PRIMARY KEY,
                 SCRIPT TEXT
            )
                 ENGINE = CONNECT
                 TABLE_TYPE = REMOTE_TABLE
                 LANGUAGE = {R|Python}
                 [PARALLEL={0|1}]
            {code}

            h2. 2.3 INSERT INTO: CONNECT

            LOAD_FILE(file_name)

            SAVE A QUERY INT
            So when calling:

            SELECT
               *
            FROM
                db.t_Remote_Scripts
            WHERE
                CALL = "01 - Hello, World!"

            Connect would send the SCRIPT text column to the .exe on the PATH (e.g.: RScript exe) and retrieve the select table any warnings that occurred during the execution, that could eventually even be stored in another table as a Data Quality check, to see if the script has been executed correctly.

            In the remote R/Python script, the script will have to make use of a ODBC Connection for importing the data from MariaDB, analyze it, and send it back away.

            This engine feature could imply security issues, so it shall be disabled by default, or even have its own USER security permission.

            Thank you.

            Best,
            Juan Telleria
            Juan Juan Telleria made changes -
            Description h1. 1. Objective
            To give the possibility to call the execution of external:
            * [Python|https://www.python.org/].
            * Or [R Statistical Programming Language|https://mran.microsoft.com/].

            Scripts directly from MariaDB, just as SQL Server, from 2017 Edition onward, allows to do so:
            * [sp_execute_external_script (Transact-SQL)|https://docs.microsoft.com/es-es/sql/relational-databases/system-stored-procedures/sp-execute-external-script-transact-sql?view=sql-server-2017]
            * [Run Python using T-SQL|https://docs.microsoft.com/en-us/sql/advanced-analytics/tutorials/run-python-using-t-sql?view=sql-server-2017]
            * [Using R functions with SQL Server data (R in SQL quickstart)|https://docs.microsoft.com/en-us/sql/advanced-analytics/tutorials/rtsql-using-r-functions-with-sql-server-data?view=sql-server-2017]

            The ultimate objetive is, for example, to trigger the execution of a remote Python/R Code for updating a predictive model in keras/h2o/tensorflow/... when new data is introduced into the database, or as part of a SQL procedure.

            h1. 2. MariaDB's CONNECT Implementation
            One possible implementation could be as follows:
            h2. 2.1. my.ini
            {code:txt}
            [mysqld]
            connect_enable_execute_external_script = {0|1}
            connect_python_exe_dir = "C:/Users/J-tel/AppData/Local/Programs/Python/Python36-32/python.exe"
            connect_r_exe_dir = "C:/Program Files/Microsoft/R Open/R-3.4.3/bin/Rscript.exe"
            connect_max_exe_parallel = {1(Default)|Number}
            {code}

            h2. 2.2 CREATE TABLE: CONNECT
            For using the _"CONNECT REMOTE_TABLE"_ Engine, the user will have to create an empty table as follows:

            {code:SQL}
            CREATE [OR REPLACE] [IF NOT EXISTS] TABLE tbl_name
                 ENGINE = CONNECT
                 TABLE_TYPE = REMOTE_TABLE
                 LANGUAGE = {R|Python}
                 [PARALLEL={0|1}]
            {code}

            The CONNECT Engine will the automatically create a table with the following column definition:
            {code:SQL}
            CREATE [OR REPLACE] [IF NOT EXISTS] TABLE tbl_name
            (
                 CALL VARCHAR(128) PRIMARY KEY,
                 SCRIPT TEXT
            )
                 ENGINE = CONNECT
                 TABLE_TYPE = REMOTE_TABLE
                 LANGUAGE = {R|Python}
                 [PARALLEL={0|1}]
            {code}

            h2. 2.3 INSERT INTO: CONNECT

            LOAD_FILE(file_name)

            SAVE A QUERY INT
            So when calling:

            SELECT
               *
            FROM
                db.t_Remote_Scripts
            WHERE
                CALL = "01 - Hello, World!"

            Connect would send the SCRIPT text column to the .exe on the PATH (e.g.: RScript exe) and retrieve the select table any warnings that occurred during the execution, that could eventually even be stored in another table as a Data Quality check, to see if the script has been executed correctly.

            In the remote R/Python script, the script will have to make use of a ODBC Connection for importing the data from MariaDB, analyze it, and send it back away.

            This engine feature could imply security issues, so it shall be disabled by default, or even have its own USER security permission.

            Thank you.

            Best,
            Juan Telleria
            h1. 1. Objective
            To give the possibility to call the execution of external:
            * [Python|https://www.python.org/].
            * Or [R Statistical Programming Language|https://mran.microsoft.com/].

            Scripts directly from MariaDB, just as SQL Server, from 2017 Edition onward, allows to do so:
            * [sp_execute_external_script (Transact-SQL)|https://docs.microsoft.com/es-es/sql/relational-databases/system-stored-procedures/sp-execute-external-script-transact-sql?view=sql-server-2017]
            * [Run Python using T-SQL|https://docs.microsoft.com/en-us/sql/advanced-analytics/tutorials/run-python-using-t-sql?view=sql-server-2017]
            * [Using R functions with SQL Server data (R in SQL quickstart)|https://docs.microsoft.com/en-us/sql/advanced-analytics/tutorials/rtsql-using-r-functions-with-sql-server-data?view=sql-server-2017]

            The ultimate objetive is, for example, to trigger the execution of a remote Python/R Code for updating a predictive model in keras/h2o/tensorflow/... when new data is introduced into the database, or as part of a SQL procedure.

            h1. 2. MariaDB's CONNECT Implementation
            One possible implementation could be as follows:
            h2. 2.1. my.ini
            {code:txt}
            [mysqld]
            connect_enable_execute_external_script = {0|1}
            connect_python_exe_dir = "C:/Users/J-tel/AppData/Local/Programs/Python/Python36-32/python.exe"
            connect_r_exe_dir = "C:/Program Files/Microsoft/R Open/R-3.4.3/bin/Rscript.exe"
            connect_max_exe_parallel = {1(Default)|Number}
            {code}

            h2. 2.2 CREATE TABLE: CONNECT
            For using the _"CONNECT REMOTE_TABLE"_ Engine, the user will have to create an empty table as follows:

            {code:SQL}
            CREATE [OR REPLACE] [IF NOT EXISTS] TABLE tbl_name
                 ENGINE = CONNECT
                 TABLE_TYPE = REMOTE_TABLE
                 LANGUAGE = {R|Python}
                 [PARALLEL={0|1}];
            {code}

            The CONNECT Engine will the automatically create a table with the following column definition:
            {code:SQL}
            CREATE [OR REPLACE] [IF NOT EXISTS] TABLE tbl_name
            (
                 CALL VARCHAR(128) PRIMARY KEY,
                 SCRIPT TEXT
            )
                 ENGINE = CONNECT
                 TABLE_TYPE = REMOTE_TABLE
                 LANGUAGE = {R|Python}
                 [PARALLEL={0|1}];
            {code}

            h2. 2.3 INSERT INTO: CONNECT

            LOAD_FILE(file_name)

            SAVE A QUERY INT
            So when calling:

            SELECT
               *
            FROM
                db.t_Remote_Scripts
            WHERE
                CALL = "01 - Hello, World!"

            Connect would send the SCRIPT text column to the .exe on the PATH (e.g.: RScript exe) and retrieve the select table any warnings that occurred during the execution, that could eventually even be stored in another table as a Data Quality check, to see if the script has been executed correctly.

            In the remote R/Python script, the script will have to make use of a ODBC Connection for importing the data from MariaDB, analyze it, and send it back away.

            This engine feature could imply security issues, so it shall be disabled by default, or even have its own USER security permission.

            Thank you.

            Best,
            Juan Telleria
            Juan Juan Telleria made changes -
            Description h1. 1. Objective
            To give the possibility to call the execution of external:
            * [Python|https://www.python.org/].
            * Or [R Statistical Programming Language|https://mran.microsoft.com/].

            Scripts directly from MariaDB, just as SQL Server, from 2017 Edition onward, allows to do so:
            * [sp_execute_external_script (Transact-SQL)|https://docs.microsoft.com/es-es/sql/relational-databases/system-stored-procedures/sp-execute-external-script-transact-sql?view=sql-server-2017]
            * [Run Python using T-SQL|https://docs.microsoft.com/en-us/sql/advanced-analytics/tutorials/run-python-using-t-sql?view=sql-server-2017]
            * [Using R functions with SQL Server data (R in SQL quickstart)|https://docs.microsoft.com/en-us/sql/advanced-analytics/tutorials/rtsql-using-r-functions-with-sql-server-data?view=sql-server-2017]

            The ultimate objetive is, for example, to trigger the execution of a remote Python/R Code for updating a predictive model in keras/h2o/tensorflow/... when new data is introduced into the database, or as part of a SQL procedure.

            h1. 2. MariaDB's CONNECT Implementation
            One possible implementation could be as follows:
            h2. 2.1. my.ini
            {code:txt}
            [mysqld]
            connect_enable_execute_external_script = {0|1}
            connect_python_exe_dir = "C:/Users/J-tel/AppData/Local/Programs/Python/Python36-32/python.exe"
            connect_r_exe_dir = "C:/Program Files/Microsoft/R Open/R-3.4.3/bin/Rscript.exe"
            connect_max_exe_parallel = {1(Default)|Number}
            {code}

            h2. 2.2 CREATE TABLE: CONNECT
            For using the _"CONNECT REMOTE_TABLE"_ Engine, the user will have to create an empty table as follows:

            {code:SQL}
            CREATE [OR REPLACE] [IF NOT EXISTS] TABLE tbl_name
                 ENGINE = CONNECT
                 TABLE_TYPE = REMOTE_TABLE
                 LANGUAGE = {R|Python}
                 [PARALLEL={0|1}];
            {code}

            The CONNECT Engine will the automatically create a table with the following column definition:
            {code:SQL}
            CREATE [OR REPLACE] [IF NOT EXISTS] TABLE tbl_name
            (
                 CALL VARCHAR(128) PRIMARY KEY,
                 SCRIPT TEXT
            )
                 ENGINE = CONNECT
                 TABLE_TYPE = REMOTE_TABLE
                 LANGUAGE = {R|Python}
                 [PARALLEL={0|1}];
            {code}

            h2. 2.3 INSERT INTO: CONNECT

            LOAD_FILE(file_name)

            SAVE A QUERY INT
            So when calling:

            SELECT
               *
            FROM
                db.t_Remote_Scripts
            WHERE
                CALL = "01 - Hello, World!"

            Connect would send the SCRIPT text column to the .exe on the PATH (e.g.: RScript exe) and retrieve the select table any warnings that occurred during the execution, that could eventually even be stored in another table as a Data Quality check, to see if the script has been executed correctly.

            In the remote R/Python script, the script will have to make use of a ODBC Connection for importing the data from MariaDB, analyze it, and send it back away.

            This engine feature could imply security issues, so it shall be disabled by default, or even have its own USER security permission.

            Thank you.

            Best,
            Juan Telleria
            h1. 1. Objective
            To give the possibility to call the execution of external:
            * [Python|https://www.python.org/].
            * Or [R Statistical Programming Language|https://mran.microsoft.com/].

            Scripts directly from MariaDB, just as SQL Server, from 2017 Edition onward, allows to do so:
            * [sp_execute_external_script (Transact-SQL)|https://docs.microsoft.com/es-es/sql/relational-databases/system-stored-procedures/sp-execute-external-script-transact-sql?view=sql-server-2017]
            * [Run Python using T-SQL|https://docs.microsoft.com/en-us/sql/advanced-analytics/tutorials/run-python-using-t-sql?view=sql-server-2017]
            * [Using R functions with SQL Server data (R in SQL quickstart)|https://docs.microsoft.com/en-us/sql/advanced-analytics/tutorials/rtsql-using-r-functions-with-sql-server-data?view=sql-server-2017]

            The ultimate objetive is, for example, to trigger the execution of a remote Python/R Code for updating a predictive model in keras/h2o/tensorflow/... when new data is introduced into the database, or as part of a SQL procedure.

            h1. 2. MariaDB's CONNECT Implementation
            One possible implementation could be as follows:
            h2. 2.1. my.ini
            {code:txt}
            [mysqld]
            connect_enable_execute_external_script = {0|1}
            connect_python_exe_dir = "C:/Users/J-tel/AppData/Local/Programs/Python/Python36-32/python.exe"
            connect_r_exe_dir = "C:/Program Files/Microsoft/R Open/R-3.4.3/bin/Rscript.exe"
            connect_max_exe_parallel = {1(Default)|Number}
            {code}

            h2. 2.2 CREATE TABLE: CONNECT
            For using the _"CONNECT REMOTE_TABLE"_ Engine, the user will have to create an empty table as follows:

            {code:SQL}
            CREATE [OR REPLACE] [IF NOT EXISTS] TABLE tbl_name
                 ENGINE = CONNECT
                 TABLE_TYPE = REMOTE_TABLE
                 LANGUAGE = {R|Python}
                 [PARALLEL={0|1}]
                 [WITH VERSION CONTROL];
            {code}

            The CONNECT Engine will the automatically create a table with the following column definition:
            {code:SQL}
            CREATE [OR REPLACE] [IF NOT EXISTS] TABLE tbl_name
            (
                 CALL VARCHAR(128) PRIMARY KEY,
                 SCRIPT TEXT
            )
                 ENGINE = CONNECT
                 TABLE_TYPE = REMOTE_TABLE
                 LANGUAGE = {R|Python}
                 [PARALLEL={0|1}]
                 [WITH VERSION CONTROL];
            {code}

            h2. 2.3 INSERT INTO: CONNECT
            In order to save the R or Python Script to be called periodically from the MariaDB Server, the user will have 2 options:
            * To Load Directly the .TXT File Into the Server:
            {code:SQL}
            INSERT INTO tbl_name
            (
                 CALL,
                 SCRIPT
            )
            VALUES
            (
                 "1 - call_name",
                 LOAD_FILE('/path/.../file_name.txt')
            );
            {code}

            *
            LOAD_FILE('/path/.../file_name.txt')

            SAVE A QUERY INT
            So when calling:

            SELECT
               *
            FROM
                db.t_Remote_Scripts
            WHERE
                CALL = "01 - Hello, World!"

            Connect would send the SCRIPT text column to the .exe on the PATH (e.g.: RScript exe) and retrieve the select table any warnings that occurred during the execution, that could eventually even be stored in another table as a Data Quality check, to see if the script has been executed correctly.

            In the remote R/Python script, the script will have to make use of a ODBC Connection for importing the data from MariaDB, analyze it, and send it back away.

            This engine feature could imply security issues, so it shall be disabled by default, or even have its own USER security permission.

            Thank you.

            Best,
            Juan Telleria
            Juan Juan Telleria made changes -
            Description h1. 1. Objective
            To give the possibility to call the execution of external:
            * [Python|https://www.python.org/].
            * Or [R Statistical Programming Language|https://mran.microsoft.com/].

            Scripts directly from MariaDB, just as SQL Server, from 2017 Edition onward, allows to do so:
            * [sp_execute_external_script (Transact-SQL)|https://docs.microsoft.com/es-es/sql/relational-databases/system-stored-procedures/sp-execute-external-script-transact-sql?view=sql-server-2017]
            * [Run Python using T-SQL|https://docs.microsoft.com/en-us/sql/advanced-analytics/tutorials/run-python-using-t-sql?view=sql-server-2017]
            * [Using R functions with SQL Server data (R in SQL quickstart)|https://docs.microsoft.com/en-us/sql/advanced-analytics/tutorials/rtsql-using-r-functions-with-sql-server-data?view=sql-server-2017]

            The ultimate objetive is, for example, to trigger the execution of a remote Python/R Code for updating a predictive model in keras/h2o/tensorflow/... when new data is introduced into the database, or as part of a SQL procedure.

            h1. 2. MariaDB's CONNECT Implementation
            One possible implementation could be as follows:
            h2. 2.1. my.ini
            {code:txt}
            [mysqld]
            connect_enable_execute_external_script = {0|1}
            connect_python_exe_dir = "C:/Users/J-tel/AppData/Local/Programs/Python/Python36-32/python.exe"
            connect_r_exe_dir = "C:/Program Files/Microsoft/R Open/R-3.4.3/bin/Rscript.exe"
            connect_max_exe_parallel = {1(Default)|Number}
            {code}

            h2. 2.2 CREATE TABLE: CONNECT
            For using the _"CONNECT REMOTE_TABLE"_ Engine, the user will have to create an empty table as follows:

            {code:SQL}
            CREATE [OR REPLACE] [IF NOT EXISTS] TABLE tbl_name
                 ENGINE = CONNECT
                 TABLE_TYPE = REMOTE_TABLE
                 LANGUAGE = {R|Python}
                 [PARALLEL={0|1}]
                 [WITH VERSION CONTROL];
            {code}

            The CONNECT Engine will the automatically create a table with the following column definition:
            {code:SQL}
            CREATE [OR REPLACE] [IF NOT EXISTS] TABLE tbl_name
            (
                 CALL VARCHAR(128) PRIMARY KEY,
                 SCRIPT TEXT
            )
                 ENGINE = CONNECT
                 TABLE_TYPE = REMOTE_TABLE
                 LANGUAGE = {R|Python}
                 [PARALLEL={0|1}]
                 [WITH VERSION CONTROL];
            {code}

            h2. 2.3 INSERT INTO: CONNECT
            In order to save the R or Python Script to be called periodically from the MariaDB Server, the user will have 2 options:
            * To Load Directly the .TXT File Into the Server:
            {code:SQL}
            INSERT INTO tbl_name
            (
                 CALL,
                 SCRIPT
            )
            VALUES
            (
                 "1 - call_name",
                 LOAD_FILE('/path/.../file_name.txt')
            );
            {code}

            *
            LOAD_FILE('/path/.../file_name.txt')

            SAVE A QUERY INT
            So when calling:

            SELECT
               *
            FROM
                db.t_Remote_Scripts
            WHERE
                CALL = "01 - Hello, World!"

            Connect would send the SCRIPT text column to the .exe on the PATH (e.g.: RScript exe) and retrieve the select table any warnings that occurred during the execution, that could eventually even be stored in another table as a Data Quality check, to see if the script has been executed correctly.

            In the remote R/Python script, the script will have to make use of a ODBC Connection for importing the data from MariaDB, analyze it, and send it back away.

            This engine feature could imply security issues, so it shall be disabled by default, or even have its own USER security permission.

            Thank you.

            Best,
            Juan Telleria
            h1. 1. Objective
            To give the possibility to call the execution of external:
            * [Python|https://www.python.org/].
            * Or [R Statistical Programming Language|https://mran.microsoft.com/].

            Scripts directly from MariaDB, just as SQL Server, from 2017 Edition onward, allows to do so:
            * [sp_execute_external_script (Transact-SQL)|https://docs.microsoft.com/es-es/sql/relational-databases/system-stored-procedures/sp-execute-external-script-transact-sql?view=sql-server-2017]
            * [Run Python using T-SQL|https://docs.microsoft.com/en-us/sql/advanced-analytics/tutorials/run-python-using-t-sql?view=sql-server-2017]
            * [Using R functions with SQL Server data (R in SQL quickstart)|https://docs.microsoft.com/en-us/sql/advanced-analytics/tutorials/rtsql-using-r-functions-with-sql-server-data?view=sql-server-2017]

            The ultimate objetive is, for example, to trigger the execution of a remote Python/R Code for updating a predictive model in keras/h2o/tensorflow/... when new data is introduced into the database, or as part of a SQL procedure.

            h1. 2. MariaDB's CONNECT Implementation
            One possible implementation could be as follows:
            h2. 2.1. my.ini
            {code:txt}
            [mysqld]
            connect_enable_execute_external_script = {0|1}
            connect_python_exe_dir = "C:/Users/J-tel/AppData/Local/Programs/Python/Python36-32/python.exe"
            connect_r_exe_dir = "C:/Program Files/Microsoft/R Open/R-3.4.3/bin/Rscript.exe"
            connect_max_exe_parallel = {1(Default)|Number}
            {code}

            h2. 2.2 CREATE TABLE: CONNECT
            For using the _"CONNECT REMOTE_TABLE"_ Engine, the user will have to create an empty table as follows:

            {code:SQL}
            CREATE [OR REPLACE] [IF NOT EXISTS] TABLE tbl_name
              ENGINE = CONNECT
              TABLE_TYPE = REMOTE_TABLE
              LANGUAGE = {R|Python}
              [PARALLEL={0|1}]
              [WITH VERSION CONTROL];
            {code}

            The CONNECT Engine will the automatically create a table with the following column definition:
            {code:SQL}
            CREATE [OR REPLACE] [IF NOT EXISTS] TABLE tbl_name
            (
              CALL VARCHAR(128) PRIMARY KEY,
              SCRIPT TEXT
            )
              ENGINE = CONNECT
              TABLE_TYPE = REMOTE_TABLE
              LANGUAGE = {R|Python}
              [PARALLEL={0|1}]
              [WITH VERSION CONTROL];
            {code}

            h2. 2.3 INSERT INTO: CONNECT
            In order to save the R or Python Script to be called periodically from the MariaDB Server, the user will have 2 options:
            * To Load Directly the .TXT File Into the Server:
            {code:SQL}
            INSERT INTO tbl_name
            (
              CALL,
              SCRIPT
            )
            VALUES
            (
              "1 - call_name",
              LOAD_FILE('/path/.../file_name.txt')
            );
            {code}

            *
            LOAD_FILE('/path/.../file_name.txt')

            SAVE A QUERY INT
            So when calling:

            SELECT
               *
            FROM
                db.t_Remote_Scripts
            WHERE
                CALL = "01 - Hello, World!"

            Connect would send the SCRIPT text column to the .exe on the PATH (e.g.: RScript exe) and retrieve the select table any warnings that occurred during the execution, that could eventually even be stored in another table as a Data Quality check, to see if the script has been executed correctly.

            In the remote R/Python script, the script will have to make use of a ODBC Connection for importing the data from MariaDB, analyze it, and send it back away.

            This engine feature could imply security issues, so it shall be disabled by default, or even have its own USER security permission.

            Thank you.

            Best,
            Juan Telleria
            Juan Juan Telleria made changes -
            Description h1. 1. Objective
            To give the possibility to call the execution of external:
            * [Python|https://www.python.org/].
            * Or [R Statistical Programming Language|https://mran.microsoft.com/].

            Scripts directly from MariaDB, just as SQL Server, from 2017 Edition onward, allows to do so:
            * [sp_execute_external_script (Transact-SQL)|https://docs.microsoft.com/es-es/sql/relational-databases/system-stored-procedures/sp-execute-external-script-transact-sql?view=sql-server-2017]
            * [Run Python using T-SQL|https://docs.microsoft.com/en-us/sql/advanced-analytics/tutorials/run-python-using-t-sql?view=sql-server-2017]
            * [Using R functions with SQL Server data (R in SQL quickstart)|https://docs.microsoft.com/en-us/sql/advanced-analytics/tutorials/rtsql-using-r-functions-with-sql-server-data?view=sql-server-2017]

            The ultimate objetive is, for example, to trigger the execution of a remote Python/R Code for updating a predictive model in keras/h2o/tensorflow/... when new data is introduced into the database, or as part of a SQL procedure.

            h1. 2. MariaDB's CONNECT Implementation
            One possible implementation could be as follows:
            h2. 2.1. my.ini
            {code:txt}
            [mysqld]
            connect_enable_execute_external_script = {0|1}
            connect_python_exe_dir = "C:/Users/J-tel/AppData/Local/Programs/Python/Python36-32/python.exe"
            connect_r_exe_dir = "C:/Program Files/Microsoft/R Open/R-3.4.3/bin/Rscript.exe"
            connect_max_exe_parallel = {1(Default)|Number}
            {code}

            h2. 2.2 CREATE TABLE: CONNECT
            For using the _"CONNECT REMOTE_TABLE"_ Engine, the user will have to create an empty table as follows:

            {code:SQL}
            CREATE [OR REPLACE] [IF NOT EXISTS] TABLE tbl_name
              ENGINE = CONNECT
              TABLE_TYPE = REMOTE_TABLE
              LANGUAGE = {R|Python}
              [PARALLEL={0|1}]
              [WITH VERSION CONTROL];
            {code}

            The CONNECT Engine will the automatically create a table with the following column definition:
            {code:SQL}
            CREATE [OR REPLACE] [IF NOT EXISTS] TABLE tbl_name
            (
              CALL VARCHAR(128) PRIMARY KEY,
              SCRIPT TEXT
            )
              ENGINE = CONNECT
              TABLE_TYPE = REMOTE_TABLE
              LANGUAGE = {R|Python}
              [PARALLEL={0|1}]
              [WITH VERSION CONTROL];
            {code}

            h2. 2.3 INSERT INTO: CONNECT
            In order to save the R or Python Script to be called periodically from the MariaDB Server, the user will have 2 options:
            * To Load Directly the .TXT File Into the Server:
            {code:SQL}
            INSERT INTO tbl_name
            (
              CALL,
              SCRIPT
            )
            VALUES
            (
              "1 - call_name",
              LOAD_FILE('/path/.../file_name.txt')
            );
            {code}

            *
            LOAD_FILE('/path/.../file_name.txt')

            SAVE A QUERY INT
            So when calling:

            SELECT
               *
            FROM
                db.t_Remote_Scripts
            WHERE
                CALL = "01 - Hello, World!"

            Connect would send the SCRIPT text column to the .exe on the PATH (e.g.: RScript exe) and retrieve the select table any warnings that occurred during the execution, that could eventually even be stored in another table as a Data Quality check, to see if the script has been executed correctly.

            In the remote R/Python script, the script will have to make use of a ODBC Connection for importing the data from MariaDB, analyze it, and send it back away.

            This engine feature could imply security issues, so it shall be disabled by default, or even have its own USER security permission.

            Thank you.

            Best,
            Juan Telleria
            h1. 1. Objective
            To give the possibility to call the execution of external:
            * [Python|https://www.python.org/].
            * Or [R Statistical Programming Language|https://mran.microsoft.com/].

            Scripts directly from MariaDB, just as SQL Server, from 2017 Edition onward, allows to do so:
            * [sp_execute_external_script (Transact-SQL)|https://docs.microsoft.com/es-es/sql/relational-databases/system-stored-procedures/sp-execute-external-script-transact-sql?view=sql-server-2017]
            * [Run Python using T-SQL|https://docs.microsoft.com/en-us/sql/advanced-analytics/tutorials/run-python-using-t-sql?view=sql-server-2017]
            * [Using R functions with SQL Server data (R in SQL quickstart)|https://docs.microsoft.com/en-us/sql/advanced-analytics/tutorials/rtsql-using-r-functions-with-sql-server-data?view=sql-server-2017]

            The ultimate objetive is, for example, to trigger the execution of a remote Python/R Code for updating a predictive model in keras/h2o/tensorflow/... when new data is introduced into the database, or as part of a SQL procedure.

            h1. 2. MariaDB's CONNECT Implementation
            One possible implementation could be as follows:
            h2. 2.1. my.ini
            {code:txt}
            [mysqld]
            connect_enable_execute_external_script = {0|1}
            connect_python_exe_dir = "C:/Users/J-tel/AppData/Local/Programs/Python/Python36-32/python.exe"
            connect_r_exe_dir = "C:/Program Files/Microsoft/R Open/R-3.4.3/bin/Rscript.exe"
            connect_max_exe_parallel = {1(Default)|Number}
            {code}

            h2. 2.2 CREATE TABLE: CONNECT
            For using the _"CONNECT REMOTE_TABLE"_ Engine, the user will have to create an empty table as follows:

            {code:SQL}
            CREATE [OR REPLACE] [IF NOT EXISTS] TABLE tbl_name
              ENGINE = CONNECT
              TABLE_TYPE = REMOTE_TABLE
              LANGUAGE = {R|Python}
              [PARALLEL={0|1}]
              [WITH VERSION CONTROL];
            {code}

            The CONNECT Engine will the automatically create a table with the following column definition:
            {code:SQL}
            CREATE [OR REPLACE] [IF NOT EXISTS] TABLE tbl_name
            (
              CALL VARCHAR(128) PRIMARY KEY,
              SCRIPT TEXT
            )
              ENGINE = CONNECT
              TABLE_TYPE = REMOTE_TABLE
              LANGUAGE = {R|Python}
              [PARALLEL={0|1}]
              [WITH VERSION CONTROL];
            {code}

            h2. 2.3 INSERT INTO: CONNECT
            In order to save the R or Python Script to be called periodically from the MariaDB Server, the user will have 2 options:
            * To Load Directly the .TXT File Into the Server:

            {code:SQL}
            INSERT INTO tbl_name
            (
              CALL,
              SCRIPT
            )
            VALUES
            (
              "1 - call_name",
              LOAD_FILE('/path/.../file_name.txt')
            );
            {code}

            *
            LOAD_FILE('/path/.../file_name.txt')

            SAVE A QUERY INT
            So when calling:

            SELECT
               *
            FROM
                db.t_Remote_Scripts
            WHERE
                CALL = "01 - Hello, World!"

            Connect would send the SCRIPT text column to the .exe on the PATH (e.g.: RScript exe) and retrieve the select table any warnings that occurred during the execution, that could eventually even be stored in another table as a Data Quality check, to see if the script has been executed correctly.

            In the remote R/Python script, the script will have to make use of a ODBC Connection for importing the data from MariaDB, analyze it, and send it back away.

            This engine feature could imply security issues, so it shall be disabled by default, or even have its own USER security permission.

            Thank you.

            Best,
            Juan Telleria
            Juan Juan Telleria made changes -
            Description h1. 1. Objective
            To give the possibility to call the execution of external:
            * [Python|https://www.python.org/].
            * Or [R Statistical Programming Language|https://mran.microsoft.com/].

            Scripts directly from MariaDB, just as SQL Server, from 2017 Edition onward, allows to do so:
            * [sp_execute_external_script (Transact-SQL)|https://docs.microsoft.com/es-es/sql/relational-databases/system-stored-procedures/sp-execute-external-script-transact-sql?view=sql-server-2017]
            * [Run Python using T-SQL|https://docs.microsoft.com/en-us/sql/advanced-analytics/tutorials/run-python-using-t-sql?view=sql-server-2017]
            * [Using R functions with SQL Server data (R in SQL quickstart)|https://docs.microsoft.com/en-us/sql/advanced-analytics/tutorials/rtsql-using-r-functions-with-sql-server-data?view=sql-server-2017]

            The ultimate objetive is, for example, to trigger the execution of a remote Python/R Code for updating a predictive model in keras/h2o/tensorflow/... when new data is introduced into the database, or as part of a SQL procedure.

            h1. 2. MariaDB's CONNECT Implementation
            One possible implementation could be as follows:
            h2. 2.1. my.ini
            {code:txt}
            [mysqld]
            connect_enable_execute_external_script = {0|1}
            connect_python_exe_dir = "C:/Users/J-tel/AppData/Local/Programs/Python/Python36-32/python.exe"
            connect_r_exe_dir = "C:/Program Files/Microsoft/R Open/R-3.4.3/bin/Rscript.exe"
            connect_max_exe_parallel = {1(Default)|Number}
            {code}

            h2. 2.2 CREATE TABLE: CONNECT
            For using the _"CONNECT REMOTE_TABLE"_ Engine, the user will have to create an empty table as follows:

            {code:SQL}
            CREATE [OR REPLACE] [IF NOT EXISTS] TABLE tbl_name
              ENGINE = CONNECT
              TABLE_TYPE = REMOTE_TABLE
              LANGUAGE = {R|Python}
              [PARALLEL={0|1}]
              [WITH VERSION CONTROL];
            {code}

            The CONNECT Engine will the automatically create a table with the following column definition:
            {code:SQL}
            CREATE [OR REPLACE] [IF NOT EXISTS] TABLE tbl_name
            (
              CALL VARCHAR(128) PRIMARY KEY,
              SCRIPT TEXT
            )
              ENGINE = CONNECT
              TABLE_TYPE = REMOTE_TABLE
              LANGUAGE = {R|Python}
              [PARALLEL={0|1}]
              [WITH VERSION CONTROL];
            {code}

            h2. 2.3 INSERT INTO: CONNECT
            In order to save the R or Python Script to be called periodically from the MariaDB Server, the user will have 2 options:
            * To Load Directly the .TXT File Into the Server:

            {code:SQL}
            INSERT INTO tbl_name
            (
              CALL,
              SCRIPT
            )
            VALUES
            (
              "1 - call_name",
              LOAD_FILE('/path/.../file_name.txt')
            );
            {code}

            *
            LOAD_FILE('/path/.../file_name.txt')

            SAVE A QUERY INT
            So when calling:

            SELECT
               *
            FROM
                db.t_Remote_Scripts
            WHERE
                CALL = "01 - Hello, World!"

            Connect would send the SCRIPT text column to the .exe on the PATH (e.g.: RScript exe) and retrieve the select table any warnings that occurred during the execution, that could eventually even be stored in another table as a Data Quality check, to see if the script has been executed correctly.

            In the remote R/Python script, the script will have to make use of a ODBC Connection for importing the data from MariaDB, analyze it, and send it back away.

            This engine feature could imply security issues, so it shall be disabled by default, or even have its own USER security permission.

            Thank you.

            Best,
            Juan Telleria
            h1. 1. Objective
            To give the possibility to call the execution of external:
            * [Python|https://www.python.org/].
            * Or [R Statistical Programming Language|https://mran.microsoft.com/].

            Scripts directly from MariaDB, just as SQL Server, from 2017 Edition onward, allows to do so:
            * [sp_execute_external_script (Transact-SQL)|https://docs.microsoft.com/es-es/sql/relational-databases/system-stored-procedures/sp-execute-external-script-transact-sql?view=sql-server-2017]
            * [Run Python using T-SQL|https://docs.microsoft.com/en-us/sql/advanced-analytics/tutorials/run-python-using-t-sql?view=sql-server-2017]
            * [Using R functions with SQL Server data (R in SQL quickstart)|https://docs.microsoft.com/en-us/sql/advanced-analytics/tutorials/rtsql-using-r-functions-with-sql-server-data?view=sql-server-2017]

            The ultimate objetive is, for example, to trigger the execution of a remote Python/R Code for updating a predictive model in keras/h2o/tensorflow/... when new data is introduced into the database, or as part of a SQL procedure.

            h1. 2. MariaDB's CONNECT Implementation
            One possible implementation could be as follows:
            h2. 2.1. my.ini
            {code:txt}
            [mysqld]
            connect_enable_execute_external_script = {0|1}
            connect_python_exe_dir = "C:/Users/J-tel/AppData/Local/Programs/Python/Python36-32/python.exe"
            connect_r_exe_dir = "C:/Program Files/Microsoft/R Open/R-3.4.3/bin/Rscript.exe"
            connect_max_exe_parallel = {1(Default)|Number}
            {code}

            h2. 2.2 CREATE TABLE: CONNECT
            For using the _"CONNECT REMOTE_TABLE"_ Engine, the user will have to create an empty table as follows:

            {code:SQL}
            CREATE [OR REPLACE] [IF NOT EXISTS] TABLE tbl_name
              ENGINE = CONNECT
              TABLE_TYPE = REMOTE_TABLE
              LANGUAGE = {R|Python}
              [PARALLEL={0|1}]
              [WITH VERSION CONTROL];
            {code}

            The CONNECT Engine will the automatically create a table with the following column definition:
            {code:SQL}
            CREATE [OR REPLACE] [IF NOT EXISTS] TABLE tbl_name
            (
              CALL VARCHAR(128) PRIMARY KEY,
              SCRIPT TEXT
            )
              ENGINE = CONNECT
              TABLE_TYPE = REMOTE_TABLE
              LANGUAGE = {R|Python}
              [PARALLEL={0|1}]
              [WITH VERSION CONTROL];
            {code}

            h2. 2.3 INSERT INTO: CONNECT
            In order to save the R or Python Script to be called periodically from the MariaDB Server, the user will have 2 options:

            A. To Load Directly the .TXT File Into the Server:
            {code:SQL}
            INSERT INTO tbl_name
            (
              CALL,
              SCRIPT
            )
            VALUES
            (
              "1 - call_name",
              LOAD_FILE('/path/.../file_name.txt')
            );
            {code}

            *
            LOAD_FILE('/path/.../file_name.txt')

            SAVE A QUERY INT
            So when calling:

            SELECT
               *
            FROM
                db.t_Remote_Scripts
            WHERE
                CALL = "01 - Hello, World!"

            Connect would send the SCRIPT text column to the .exe on the PATH (e.g.: RScript exe) and retrieve the select table any warnings that occurred during the execution, that could eventually even be stored in another table as a Data Quality check, to see if the script has been executed correctly.

            In the remote R/Python script, the script will have to make use of a ODBC Connection for importing the data from MariaDB, analyze it, and send it back away.

            This engine feature could imply security issues, so it shall be disabled by default, or even have its own USER security permission.

            Thank you.

            Best,
            Juan Telleria
            Juan Juan Telleria made changes -
            Description h1. 1. Objective
            To give the possibility to call the execution of external:
            * [Python|https://www.python.org/].
            * Or [R Statistical Programming Language|https://mran.microsoft.com/].

            Scripts directly from MariaDB, just as SQL Server, from 2017 Edition onward, allows to do so:
            * [sp_execute_external_script (Transact-SQL)|https://docs.microsoft.com/es-es/sql/relational-databases/system-stored-procedures/sp-execute-external-script-transact-sql?view=sql-server-2017]
            * [Run Python using T-SQL|https://docs.microsoft.com/en-us/sql/advanced-analytics/tutorials/run-python-using-t-sql?view=sql-server-2017]
            * [Using R functions with SQL Server data (R in SQL quickstart)|https://docs.microsoft.com/en-us/sql/advanced-analytics/tutorials/rtsql-using-r-functions-with-sql-server-data?view=sql-server-2017]

            The ultimate objetive is, for example, to trigger the execution of a remote Python/R Code for updating a predictive model in keras/h2o/tensorflow/... when new data is introduced into the database, or as part of a SQL procedure.

            h1. 2. MariaDB's CONNECT Implementation
            One possible implementation could be as follows:
            h2. 2.1. my.ini
            {code:txt}
            [mysqld]
            connect_enable_execute_external_script = {0|1}
            connect_python_exe_dir = "C:/Users/J-tel/AppData/Local/Programs/Python/Python36-32/python.exe"
            connect_r_exe_dir = "C:/Program Files/Microsoft/R Open/R-3.4.3/bin/Rscript.exe"
            connect_max_exe_parallel = {1(Default)|Number}
            {code}

            h2. 2.2 CREATE TABLE: CONNECT
            For using the _"CONNECT REMOTE_TABLE"_ Engine, the user will have to create an empty table as follows:

            {code:SQL}
            CREATE [OR REPLACE] [IF NOT EXISTS] TABLE tbl_name
              ENGINE = CONNECT
              TABLE_TYPE = REMOTE_TABLE
              LANGUAGE = {R|Python}
              [PARALLEL={0|1}]
              [WITH VERSION CONTROL];
            {code}

            The CONNECT Engine will the automatically create a table with the following column definition:
            {code:SQL}
            CREATE [OR REPLACE] [IF NOT EXISTS] TABLE tbl_name
            (
              CALL VARCHAR(128) PRIMARY KEY,
              SCRIPT TEXT
            )
              ENGINE = CONNECT
              TABLE_TYPE = REMOTE_TABLE
              LANGUAGE = {R|Python}
              [PARALLEL={0|1}]
              [WITH VERSION CONTROL];
            {code}

            h2. 2.3 INSERT INTO: CONNECT
            In order to save the R or Python Script to be called periodically from the MariaDB Server, the user will have 2 options:

            A. To Load Directly the .TXT File Into the Server:
            {code:SQL}
            INSERT INTO tbl_name
            (
              CALL,
              SCRIPT
            )
            VALUES
            (
              "1 - call_name",
              LOAD_FILE('/path/.../file_name.txt')
            );
            {code}

            *
            LOAD_FILE('/path/.../file_name.txt')

            SAVE A QUERY INT
            So when calling:

            SELECT
               *
            FROM
                db.t_Remote_Scripts
            WHERE
                CALL = "01 - Hello, World!"

            Connect would send the SCRIPT text column to the .exe on the PATH (e.g.: RScript exe) and retrieve the select table any warnings that occurred during the execution, that could eventually even be stored in another table as a Data Quality check, to see if the script has been executed correctly.

            In the remote R/Python script, the script will have to make use of a ODBC Connection for importing the data from MariaDB, analyze it, and send it back away.

            This engine feature could imply security issues, so it shall be disabled by default, or even have its own USER security permission.

            Thank you.

            Best,
            Juan Telleria
            h1. 1. Objective
            To give the possibility to call the execution of external:
            * [Python|https://www.python.org/].
            * Or [R Statistical Programming Language|https://mran.microsoft.com/].

            Scripts directly from MariaDB, just as SQL Server, from 2017 Edition onward, allows to do so:
            * [sp_execute_external_script (Transact-SQL)|https://docs.microsoft.com/es-es/sql/relational-databases/system-stored-procedures/sp-execute-external-script-transact-sql?view=sql-server-2017]
            * [Run Python using T-SQL|https://docs.microsoft.com/en-us/sql/advanced-analytics/tutorials/run-python-using-t-sql?view=sql-server-2017]
            * [Using R functions with SQL Server data (R in SQL quickstart)|https://docs.microsoft.com/en-us/sql/advanced-analytics/tutorials/rtsql-using-r-functions-with-sql-server-data?view=sql-server-2017]

            The ultimate objetive is, for example, to trigger the execution of a remote Python/R Code for updating a predictive model in keras/h2o/tensorflow/... when new data is introduced into the database, or as part of a SQL procedure.

            h1. 2. MariaDB's CONNECT Implementation
            One possible implementation could be as follows:
            h2. 2.1. my.ini
            {code:txt}
            [mysqld]
            connect_enable_execute_external_script = {0|1}
            connect_python_exe_dir = "C:/Users/J-tel/AppData/Local/Programs/Python/Python36-32/python.exe"
            connect_r_exe_dir = "C:/Program Files/Microsoft/R Open/R-3.4.3/bin/Rscript.exe"
            connect_max_exe_parallel = {1(Default)|Number}
            {code}

            h2. 2.2 CREATE TABLE: CONNECT
            For using the _"CONNECT REMOTE_TABLE"_ Engine, the user will have to create an empty table as follows:

            {code:SQL}
            CREATE [OR REPLACE] [IF NOT EXISTS] TABLE tbl_name
              ENGINE = CONNECT
              TABLE_TYPE = REMOTE_TABLE
              LANGUAGE = {R|Python}
              [PARALLEL={0|1}]
              [WITH VERSION CONTROL];
            {code}

            The CONNECT Engine will the automatically create a table with the following column definition:
            {code:SQL}
            CREATE [OR REPLACE] [IF NOT EXISTS] TABLE tbl_name
            (
              CALL VARCHAR(128) PRIMARY KEY,
              SCRIPT TEXT
            )
              ENGINE = CONNECT
              TABLE_TYPE = REMOTE_TABLE
              LANGUAGE = {R|Python}
              [PARALLEL={0|1}]
              [WITH VERSION CONTROL];
            {code}

            h2. 2.3 INSERT INTO: CONNECT
            In order to save the R or Python Script to be called periodically from the MariaDB Server, the user will have 2 options:

            A. To Load Directly the .TXT File Into the Server:
            {code:SQL}
            INSERT INTO tbl_name (CALL, SCRIPT)
            VALUES
            (
              "1 - call_name",
              LOAD_FILE('/path/.../file_name.txt')
            );
            {code}

            *
            LOAD_FILE('/path/.../file_name.txt')

            SAVE A QUERY INT
            So when calling:

            SELECT
               *
            FROM
                db.t_Remote_Scripts
            WHERE
                CALL = "01 - Hello, World!"

            Connect would send the SCRIPT text column to the .exe on the PATH (e.g.: RScript exe) and retrieve the select table any warnings that occurred during the execution, that could eventually even be stored in another table as a Data Quality check, to see if the script has been executed correctly.

            In the remote R/Python script, the script will have to make use of a ODBC Connection for importing the data from MariaDB, analyze it, and send it back away.

            This engine feature could imply security issues, so it shall be disabled by default, or even have its own USER security permission.

            Thank you.

            Best,
            Juan Telleria
            Juan Juan Telleria made changes -
            Description h1. 1. Objective
            To give the possibility to call the execution of external:
            * [Python|https://www.python.org/].
            * Or [R Statistical Programming Language|https://mran.microsoft.com/].

            Scripts directly from MariaDB, just as SQL Server, from 2017 Edition onward, allows to do so:
            * [sp_execute_external_script (Transact-SQL)|https://docs.microsoft.com/es-es/sql/relational-databases/system-stored-procedures/sp-execute-external-script-transact-sql?view=sql-server-2017]
            * [Run Python using T-SQL|https://docs.microsoft.com/en-us/sql/advanced-analytics/tutorials/run-python-using-t-sql?view=sql-server-2017]
            * [Using R functions with SQL Server data (R in SQL quickstart)|https://docs.microsoft.com/en-us/sql/advanced-analytics/tutorials/rtsql-using-r-functions-with-sql-server-data?view=sql-server-2017]

            The ultimate objetive is, for example, to trigger the execution of a remote Python/R Code for updating a predictive model in keras/h2o/tensorflow/... when new data is introduced into the database, or as part of a SQL procedure.

            h1. 2. MariaDB's CONNECT Implementation
            One possible implementation could be as follows:
            h2. 2.1. my.ini
            {code:txt}
            [mysqld]
            connect_enable_execute_external_script = {0|1}
            connect_python_exe_dir = "C:/Users/J-tel/AppData/Local/Programs/Python/Python36-32/python.exe"
            connect_r_exe_dir = "C:/Program Files/Microsoft/R Open/R-3.4.3/bin/Rscript.exe"
            connect_max_exe_parallel = {1(Default)|Number}
            {code}

            h2. 2.2 CREATE TABLE: CONNECT
            For using the _"CONNECT REMOTE_TABLE"_ Engine, the user will have to create an empty table as follows:

            {code:SQL}
            CREATE [OR REPLACE] [IF NOT EXISTS] TABLE tbl_name
              ENGINE = CONNECT
              TABLE_TYPE = REMOTE_TABLE
              LANGUAGE = {R|Python}
              [PARALLEL={0|1}]
              [WITH VERSION CONTROL];
            {code}

            The CONNECT Engine will the automatically create a table with the following column definition:
            {code:SQL}
            CREATE [OR REPLACE] [IF NOT EXISTS] TABLE tbl_name
            (
              CALL VARCHAR(128) PRIMARY KEY,
              SCRIPT TEXT
            )
              ENGINE = CONNECT
              TABLE_TYPE = REMOTE_TABLE
              LANGUAGE = {R|Python}
              [PARALLEL={0|1}]
              [WITH VERSION CONTROL];
            {code}

            h2. 2.3 INSERT INTO: CONNECT
            In order to save the R or Python Script to be called periodically from the MariaDB Server, the user will have 2 options:

            A. To Load Directly the .TXT File Into the Server:
            {code:SQL}
            INSERT INTO tbl_name (CALL, SCRIPT)
            VALUES
            (
              "1 - call_name",
              LOAD_FILE('/path/.../file_name.txt')
            );
            {code}

            *
            LOAD_FILE('/path/.../file_name.txt')

            SAVE A QUERY INT
            So when calling:

            SELECT
               *
            FROM
                db.t_Remote_Scripts
            WHERE
                CALL = "01 - Hello, World!"

            Connect would send the SCRIPT text column to the .exe on the PATH (e.g.: RScript exe) and retrieve the select table any warnings that occurred during the execution, that could eventually even be stored in another table as a Data Quality check, to see if the script has been executed correctly.

            In the remote R/Python script, the script will have to make use of a ODBC Connection for importing the data from MariaDB, analyze it, and send it back away.

            This engine feature could imply security issues, so it shall be disabled by default, or even have its own USER security permission.

            Thank you.

            Best,
            Juan Telleria
            h1. 1. Objective
            To give the possibility to call the execution of external:
            * [Python|https://www.python.org/].
            * Or [R Statistical Programming Language|https://mran.microsoft.com/].

            Scripts directly from MariaDB, just as SQL Server, from 2017 Edition onward, allows to do so:
            * [sp_execute_external_script (Transact-SQL)|https://docs.microsoft.com/es-es/sql/relational-databases/system-stored-procedures/sp-execute-external-script-transact-sql?view=sql-server-2017]
            * [Run Python using T-SQL|https://docs.microsoft.com/en-us/sql/advanced-analytics/tutorials/run-python-using-t-sql?view=sql-server-2017]
            * [Using R functions with SQL Server data (R in SQL quickstart)|https://docs.microsoft.com/en-us/sql/advanced-analytics/tutorials/rtsql-using-r-functions-with-sql-server-data?view=sql-server-2017]

            The ultimate objetive is, for example, to trigger the execution of a remote Python/R Code for updating a predictive model in keras/h2o/tensorflow/... when new data is introduced into the database, or as part of a SQL procedure.

            h1. 2. MariaDB's CONNECT Implementation
            One possible implementation could be as follows:
            h2. 2.1. my.ini
            {code:txt}
            [mysqld]
            connect_enable_execute_external_script = {0|1}
            connect_python_exe_dir = "C:/Users/J-tel/AppData/Local/Programs/Python/Python36-32/python.exe"
            connect_r_exe_dir = "C:/Program Files/Microsoft/R Open/R-3.4.3/bin/Rscript.exe"
            connect_max_exe_parallel = {1(Default)|Number}
            {code}

            h2. 2.2 CREATE TABLE: CONNECT
            For using the _"CONNECT REMOTE_TABLE"_ Engine, the user will have to create an empty table as follows:

            {code:SQL}
            CREATE [OR REPLACE] [IF NOT EXISTS] TABLE tbl_name
              ENGINE = CONNECT
              TABLE_TYPE = REMOTE_TABLE
              LANGUAGE = {R|Python}
              [PARALLEL={0|1}]
              [WITH VERSION CONTROL];
            {code}

            The CONNECT Engine will the automatically create a table with the following column definition:
            {code:SQL}
            CREATE [OR REPLACE] [IF NOT EXISTS] TABLE tbl_name
            (
              CALL VARCHAR(128) PRIMARY KEY,
              SCRIPT TEXT
            )
              ENGINE = CONNECT
              TABLE_TYPE = REMOTE_TABLE
              LANGUAGE = {R|Python}
              [PARALLEL={0|1}]
              [WITH VERSION CONTROL];
            {code}

            h2. 2.3 INSERT INTO: CONNECT
            In order to save the R or Python Script to be called periodically from the MariaDB Server, the user will have 2 options:

            A. To Load Directly the .TXT File Into the Server:
            {code:SQL}
            INSERT INTO tbl_name (CALL, SCRIPT)
            VALUES("1 - call_name", LOAD_FILE('/path/.../file_name.txt'));
            {code}

            *
            LOAD_FILE('/path/.../file_name.txt')

            SAVE A QUERY INT
            So when calling:

            SELECT
               *
            FROM
                db.t_Remote_Scripts
            WHERE
                CALL = "01 - Hello, World!"

            Connect would send the SCRIPT text column to the .exe on the PATH (e.g.: RScript exe) and retrieve the select table any warnings that occurred during the execution, that could eventually even be stored in another table as a Data Quality check, to see if the script has been executed correctly.

            In the remote R/Python script, the script will have to make use of a ODBC Connection for importing the data from MariaDB, analyze it, and send it back away.

            This engine feature could imply security issues, so it shall be disabled by default, or even have its own USER security permission.

            Thank you.

            Best,
            Juan Telleria
            Juan Juan Telleria made changes -
            Description h1. 1. Objective
            To give the possibility to call the execution of external:
            * [Python|https://www.python.org/].
            * Or [R Statistical Programming Language|https://mran.microsoft.com/].

            Scripts directly from MariaDB, just as SQL Server, from 2017 Edition onward, allows to do so:
            * [sp_execute_external_script (Transact-SQL)|https://docs.microsoft.com/es-es/sql/relational-databases/system-stored-procedures/sp-execute-external-script-transact-sql?view=sql-server-2017]
            * [Run Python using T-SQL|https://docs.microsoft.com/en-us/sql/advanced-analytics/tutorials/run-python-using-t-sql?view=sql-server-2017]
            * [Using R functions with SQL Server data (R in SQL quickstart)|https://docs.microsoft.com/en-us/sql/advanced-analytics/tutorials/rtsql-using-r-functions-with-sql-server-data?view=sql-server-2017]

            The ultimate objetive is, for example, to trigger the execution of a remote Python/R Code for updating a predictive model in keras/h2o/tensorflow/... when new data is introduced into the database, or as part of a SQL procedure.

            h1. 2. MariaDB's CONNECT Implementation
            One possible implementation could be as follows:
            h2. 2.1. my.ini
            {code:txt}
            [mysqld]
            connect_enable_execute_external_script = {0|1}
            connect_python_exe_dir = "C:/Users/J-tel/AppData/Local/Programs/Python/Python36-32/python.exe"
            connect_r_exe_dir = "C:/Program Files/Microsoft/R Open/R-3.4.3/bin/Rscript.exe"
            connect_max_exe_parallel = {1(Default)|Number}
            {code}

            h2. 2.2 CREATE TABLE: CONNECT
            For using the _"CONNECT REMOTE_TABLE"_ Engine, the user will have to create an empty table as follows:

            {code:SQL}
            CREATE [OR REPLACE] [IF NOT EXISTS] TABLE tbl_name
              ENGINE = CONNECT
              TABLE_TYPE = REMOTE_TABLE
              LANGUAGE = {R|Python}
              [PARALLEL={0|1}]
              [WITH VERSION CONTROL];
            {code}

            The CONNECT Engine will the automatically create a table with the following column definition:
            {code:SQL}
            CREATE [OR REPLACE] [IF NOT EXISTS] TABLE tbl_name
            (
              CALL VARCHAR(128) PRIMARY KEY,
              SCRIPT TEXT
            )
              ENGINE = CONNECT
              TABLE_TYPE = REMOTE_TABLE
              LANGUAGE = {R|Python}
              [PARALLEL={0|1}]
              [WITH VERSION CONTROL];
            {code}

            h2. 2.3 INSERT INTO: CONNECT
            In order to save the R or Python Script to be called periodically from the MariaDB Server, the user will have 2 options:

            A. To Load Directly the .TXT File Into the Server:
            {code:SQL}
            INSERT INTO tbl_name (CALL, SCRIPT)
            VALUES("1 - call_name", LOAD_FILE('/path/.../file_name.txt'));
            {code}

            *
            LOAD_FILE('/path/.../file_name.txt')

            SAVE A QUERY INT
            So when calling:

            SELECT
               *
            FROM
                db.t_Remote_Scripts
            WHERE
                CALL = "01 - Hello, World!"

            Connect would send the SCRIPT text column to the .exe on the PATH (e.g.: RScript exe) and retrieve the select table any warnings that occurred during the execution, that could eventually even be stored in another table as a Data Quality check, to see if the script has been executed correctly.

            In the remote R/Python script, the script will have to make use of a ODBC Connection for importing the data from MariaDB, analyze it, and send it back away.

            This engine feature could imply security issues, so it shall be disabled by default, or even have its own USER security permission.

            Thank you.

            Best,
            Juan Telleria
            h1. 1. Objective
            To give the possibility to call the execution of external:
            * [Python|https://www.python.org/].
            * Or [R Statistical Programming Language|https://mran.microsoft.com/].

            Scripts directly from MariaDB, just as SQL Server, from 2017 Edition onward, allows to do so:
            * [sp_execute_external_script (Transact-SQL)|https://docs.microsoft.com/es-es/sql/relational-databases/system-stored-procedures/sp-execute-external-script-transact-sql?view=sql-server-2017]
            * [Run Python using T-SQL|https://docs.microsoft.com/en-us/sql/advanced-analytics/tutorials/run-python-using-t-sql?view=sql-server-2017]
            * [Using R functions with SQL Server data (R in SQL quickstart)|https://docs.microsoft.com/en-us/sql/advanced-analytics/tutorials/rtsql-using-r-functions-with-sql-server-data?view=sql-server-2017]

            The ultimate objetive is, for example, to trigger the execution of a remote Python/R Code for updating a predictive model in keras/h2o/tensorflow/... when new data is introduced into the database, or as part of a SQL procedure.

            h1. 2. MariaDB's CONNECT Implementation
            One possible implementation could be as follows:
            h2. 2.1. my.ini
            {code:txt}
            [mysqld]
            connect_enable_execute_external_script = {0|1}
            connect_python_exe_dir = "C:/Users/J-tel/AppData/Local/Programs/Python/Python36-32/python.exe"
            connect_r_exe_dir = "C:/Program Files/Microsoft/R Open/R-3.4.3/bin/Rscript.exe"
            connect_max_exe_parallel = {1(Default)|Number}
            {code}

            h2. 2.2 CREATE TABLE: CONNECT
            For using the _"CONNECT REMOTE_TABLE"_ Engine, the user will have to create an empty table as follows:

            {code:SQL}
            CREATE [OR REPLACE] [IF NOT EXISTS] TABLE tbl_name
              ENGINE = CONNECT
              TABLE_TYPE = REMOTE_TABLE
              LANGUAGE = {R|Python}
              [PARALLEL={0|1}]
              [WITH VERSION CONTROL];
            {code}

            The CONNECT Engine will the automatically create a table with the following column definition:
            {code:SQL}
            CREATE [OR REPLACE] [IF NOT EXISTS] TABLE tbl_name
            (
              CALL VARCHAR(128) PRIMARY KEY,
              SCRIPT TEXT
            )
              ENGINE = CONNECT
              TABLE_TYPE = REMOTE_TABLE
              LANGUAGE = {R|Python}
              [PARALLEL={0|1}]
              [WITH VERSION CONTROL];
            {code}

            h2. 2.3 INSERT INTO: CONNECT
            In order to save the R or Python Script to be called periodically from the MariaDB Server, the user will have 2 options:

            A. To Load Directly the .TXT File Into the Server:
            {code:SQL}
            INSERT INTO tbl_name (CALL, SCRIPT)
            VALUES("1-call_name", LOAD_FILE('/path/.../file_name.txt'));
            {code}

            *
            LOAD_FILE('/path/.../file_name.txt')

            SAVE A QUERY INT
            So when calling:

            SELECT
               *
            FROM
                db.t_Remote_Scripts
            WHERE
                CALL = "01 - Hello, World!"

            Connect would send the SCRIPT text column to the .exe on the PATH (e.g.: RScript exe) and retrieve the select table any warnings that occurred during the execution, that could eventually even be stored in another table as a Data Quality check, to see if the script has been executed correctly.

            In the remote R/Python script, the script will have to make use of a ODBC Connection for importing the data from MariaDB, analyze it, and send it back away.

            This engine feature could imply security issues, so it shall be disabled by default, or even have its own USER security permission.

            Thank you.

            Best,
            Juan Telleria
            Juan Juan Telleria made changes -
            Description h1. 1. Objective
            To give the possibility to call the execution of external:
            * [Python|https://www.python.org/].
            * Or [R Statistical Programming Language|https://mran.microsoft.com/].

            Scripts directly from MariaDB, just as SQL Server, from 2017 Edition onward, allows to do so:
            * [sp_execute_external_script (Transact-SQL)|https://docs.microsoft.com/es-es/sql/relational-databases/system-stored-procedures/sp-execute-external-script-transact-sql?view=sql-server-2017]
            * [Run Python using T-SQL|https://docs.microsoft.com/en-us/sql/advanced-analytics/tutorials/run-python-using-t-sql?view=sql-server-2017]
            * [Using R functions with SQL Server data (R in SQL quickstart)|https://docs.microsoft.com/en-us/sql/advanced-analytics/tutorials/rtsql-using-r-functions-with-sql-server-data?view=sql-server-2017]

            The ultimate objetive is, for example, to trigger the execution of a remote Python/R Code for updating a predictive model in keras/h2o/tensorflow/... when new data is introduced into the database, or as part of a SQL procedure.

            h1. 2. MariaDB's CONNECT Implementation
            One possible implementation could be as follows:
            h2. 2.1. my.ini
            {code:txt}
            [mysqld]
            connect_enable_execute_external_script = {0|1}
            connect_python_exe_dir = "C:/Users/J-tel/AppData/Local/Programs/Python/Python36-32/python.exe"
            connect_r_exe_dir = "C:/Program Files/Microsoft/R Open/R-3.4.3/bin/Rscript.exe"
            connect_max_exe_parallel = {1(Default)|Number}
            {code}

            h2. 2.2 CREATE TABLE: CONNECT
            For using the _"CONNECT REMOTE_TABLE"_ Engine, the user will have to create an empty table as follows:

            {code:SQL}
            CREATE [OR REPLACE] [IF NOT EXISTS] TABLE tbl_name
              ENGINE = CONNECT
              TABLE_TYPE = REMOTE_TABLE
              LANGUAGE = {R|Python}
              [PARALLEL={0|1}]
              [WITH VERSION CONTROL];
            {code}

            The CONNECT Engine will the automatically create a table with the following column definition:
            {code:SQL}
            CREATE [OR REPLACE] [IF NOT EXISTS] TABLE tbl_name
            (
              CALL VARCHAR(128) PRIMARY KEY,
              SCRIPT TEXT
            )
              ENGINE = CONNECT
              TABLE_TYPE = REMOTE_TABLE
              LANGUAGE = {R|Python}
              [PARALLEL={0|1}]
              [WITH VERSION CONTROL];
            {code}

            h2. 2.3 INSERT INTO: CONNECT
            In order to save the R or Python Script to be called periodically from the MariaDB Server, the user will have 2 options:

            A. To Load Directly the .TXT File Into the Server:
            {code:SQL}
            INSERT INTO tbl_name (CALL, SCRIPT)
            VALUES("1-call_name", LOAD_FILE('/path/.../file_name.txt'));
            {code}

            *
            LOAD_FILE('/path/.../file_name.txt')

            SAVE A QUERY INT
            So when calling:

            SELECT
               *
            FROM
                db.t_Remote_Scripts
            WHERE
                CALL = "01 - Hello, World!"

            Connect would send the SCRIPT text column to the .exe on the PATH (e.g.: RScript exe) and retrieve the select table any warnings that occurred during the execution, that could eventually even be stored in another table as a Data Quality check, to see if the script has been executed correctly.

            In the remote R/Python script, the script will have to make use of a ODBC Connection for importing the data from MariaDB, analyze it, and send it back away.

            This engine feature could imply security issues, so it shall be disabled by default, or even have its own USER security permission.

            Thank you.

            Best,
            Juan Telleria
            h1. 1. Objective
            To give the possibility to call the execution of external:
            * [Python|https://www.python.org/].
            * Or [R Statistical Programming Language|https://mran.microsoft.com/].

            Scripts directly from MariaDB, just as SQL Server, from 2017 Edition onward, allows to do so:
            * [sp_execute_external_script (Transact-SQL)|https://docs.microsoft.com/es-es/sql/relational-databases/system-stored-procedures/sp-execute-external-script-transact-sql?view=sql-server-2017]
            * [Run Python using T-SQL|https://docs.microsoft.com/en-us/sql/advanced-analytics/tutorials/run-python-using-t-sql?view=sql-server-2017]
            * [Using R functions with SQL Server data (R in SQL quickstart)|https://docs.microsoft.com/en-us/sql/advanced-analytics/tutorials/rtsql-using-r-functions-with-sql-server-data?view=sql-server-2017]

            The ultimate objetive is, for example, to trigger the execution of a remote Python/R Code for updating a predictive model in keras/h2o/tensorflow/... when new data is introduced into the database, or as part of a SQL procedure.

            h1. 2. MariaDB's CONNECT Implementation
            One possible implementation could be as follows:
            h2. 2.1. my.ini
            {code:txt}
            [mysqld]
            connect_enable_execute_external_script = {0|1}
            connect_python_exe_dir = "C:/Users/J-tel/AppData/Local/Programs/Python/Python36-32/python.exe"
            connect_r_exe_dir = "C:/Program Files/Microsoft/R Open/R-3.4.3/bin/Rscript.exe"
            connect_max_exe_parallel = {1(Default)|Number}
            {code}

            h2. 2.2 CREATE TABLE: CONNECT
            For using the _"CONNECT REMOTE_TABLE"_ Engine, the user will have to create an empty table as follows:

            {code:SQL}
            CREATE [OR REPLACE] [IF NOT EXISTS] TABLE tbl_name
              ENGINE = CONNECT
              TABLE_TYPE = REMOTE_TABLE
              LANGUAGE = {R|Python}
              [PARALLEL={0|1}]
              [WITH VERSION CONTROL];
            {code}

            The CONNECT Engine will the automatically create a table with the following column definition:
            {code:SQL}
            CREATE [OR REPLACE] [IF NOT EXISTS] TABLE tbl_name
            (
              CALL VARCHAR(128) PRIMARY KEY,
              SCRIPT TEXT
            )
              ENGINE = CONNECT
              TABLE_TYPE = REMOTE_TABLE
              LANGUAGE = {R|Python}
              [PARALLEL={0|1}]
              [WITH VERSION CONTROL];
            {code}

            h2. 2.3 INSERT INTO: CONNECT
            In order to save the R or Python Script to be called periodically from the MariaDB Server, the user will have 2 options:

            A. To Load the Script from a .TXT File into the Server:
            {code:SQL}
            INSERT INTO tbl_name (CALL, SCRIPT)
            VALUES("1-call_name", LOAD_FILE('/path/.../file_name.txt'));
            {code}

            B. To introduce the script directly through the IDE:
            {code:SQL}
            INSERT INTO tbl_name (CALL, SCRIPT)
            VALUES("1-call_name", QUOTE("... [R / Python Script] ..."));
            {code}

            SAVE A QUERY INT
            So when calling:

            SELECT
               *
            FROM
                db.t_Remote_Scripts
            WHERE
                CALL = "01 - Hello, World!"

            Connect would send the SCRIPT text column to the .exe on the PATH (e.g.: RScript exe) and retrieve the select table any warnings that occurred during the execution, that could eventually even be stored in another table as a Data Quality check, to see if the script has been executed correctly.

            In the remote R/Python script, the script will have to make use of a ODBC Connection for importing the data from MariaDB, analyze it, and send it back away.

            This engine feature could imply security issues, so it shall be disabled by default, or even have its own USER security permission.

            Thank you.

            Best,
            Juan Telleria
            Juan Juan Telleria made changes -
            Description h1. 1. Objective
            To give the possibility to call the execution of external:
            * [Python|https://www.python.org/].
            * Or [R Statistical Programming Language|https://mran.microsoft.com/].

            Scripts directly from MariaDB, just as SQL Server, from 2017 Edition onward, allows to do so:
            * [sp_execute_external_script (Transact-SQL)|https://docs.microsoft.com/es-es/sql/relational-databases/system-stored-procedures/sp-execute-external-script-transact-sql?view=sql-server-2017]
            * [Run Python using T-SQL|https://docs.microsoft.com/en-us/sql/advanced-analytics/tutorials/run-python-using-t-sql?view=sql-server-2017]
            * [Using R functions with SQL Server data (R in SQL quickstart)|https://docs.microsoft.com/en-us/sql/advanced-analytics/tutorials/rtsql-using-r-functions-with-sql-server-data?view=sql-server-2017]

            The ultimate objetive is, for example, to trigger the execution of a remote Python/R Code for updating a predictive model in keras/h2o/tensorflow/... when new data is introduced into the database, or as part of a SQL procedure.

            h1. 2. MariaDB's CONNECT Implementation
            One possible implementation could be as follows:
            h2. 2.1. my.ini
            {code:txt}
            [mysqld]
            connect_enable_execute_external_script = {0|1}
            connect_python_exe_dir = "C:/Users/J-tel/AppData/Local/Programs/Python/Python36-32/python.exe"
            connect_r_exe_dir = "C:/Program Files/Microsoft/R Open/R-3.4.3/bin/Rscript.exe"
            connect_max_exe_parallel = {1(Default)|Number}
            {code}

            h2. 2.2 CREATE TABLE: CONNECT
            For using the _"CONNECT REMOTE_TABLE"_ Engine, the user will have to create an empty table as follows:

            {code:SQL}
            CREATE [OR REPLACE] [IF NOT EXISTS] TABLE tbl_name
              ENGINE = CONNECT
              TABLE_TYPE = REMOTE_TABLE
              LANGUAGE = {R|Python}
              [PARALLEL={0|1}]
              [WITH VERSION CONTROL];
            {code}

            The CONNECT Engine will the automatically create a table with the following column definition:
            {code:SQL}
            CREATE [OR REPLACE] [IF NOT EXISTS] TABLE tbl_name
            (
              CALL VARCHAR(128) PRIMARY KEY,
              SCRIPT TEXT
            )
              ENGINE = CONNECT
              TABLE_TYPE = REMOTE_TABLE
              LANGUAGE = {R|Python}
              [PARALLEL={0|1}]
              [WITH VERSION CONTROL];
            {code}

            h2. 2.3 INSERT INTO: CONNECT
            In order to save the R or Python Script to be called periodically from the MariaDB Server, the user will have 2 options:

            A. To Load the Script from a .TXT File into the Server:
            {code:SQL}
            INSERT INTO tbl_name (CALL, SCRIPT)
            VALUES("1-call_name", LOAD_FILE('/path/.../file_name.txt'));
            {code}

            B. To introduce the script directly through the IDE:
            {code:SQL}
            INSERT INTO tbl_name (CALL, SCRIPT)
            VALUES("1-call_name", QUOTE("... [R / Python Script] ..."));
            {code}

            SAVE A QUERY INT
            So when calling:

            SELECT
               *
            FROM
                db.t_Remote_Scripts
            WHERE
                CALL = "01 - Hello, World!"

            Connect would send the SCRIPT text column to the .exe on the PATH (e.g.: RScript exe) and retrieve the select table any warnings that occurred during the execution, that could eventually even be stored in another table as a Data Quality check, to see if the script has been executed correctly.

            In the remote R/Python script, the script will have to make use of a ODBC Connection for importing the data from MariaDB, analyze it, and send it back away.

            This engine feature could imply security issues, so it shall be disabled by default, or even have its own USER security permission.

            Thank you.

            Best,
            Juan Telleria
            h1. 1. Objective
            To give the possibility to call the execution of external:
            * [Python|https://www.python.org/].
            * Or [R Statistical Programming Language|https://mran.microsoft.com/].

            Scripts directly from MariaDB, just as SQL Server, from 2017 Edition onward, allows to do so:
            * [sp_execute_external_script (Transact-SQL)|https://docs.microsoft.com/es-es/sql/relational-databases/system-stored-procedures/sp-execute-external-script-transact-sql?view=sql-server-2017]
            * [Run Python using T-SQL|https://docs.microsoft.com/en-us/sql/advanced-analytics/tutorials/run-python-using-t-sql?view=sql-server-2017]
            * [Using R functions with SQL Server data (R in SQL quickstart)|https://docs.microsoft.com/en-us/sql/advanced-analytics/tutorials/rtsql-using-r-functions-with-sql-server-data?view=sql-server-2017]

            The ultimate objetive is, for example, to trigger the execution of a remote Python/R Code for updating a predictive model in keras/h2o/tensorflow/... when new data is introduced into the database, or as part of a SQL procedure.

            h1. 2. MariaDB's CONNECT Implementation
            One possible implementation could be as follows:
            h2. 2.1. my.ini
            {code:txt}
            [mysqld]
            connect_enable_execute_external_script = {0|1}
            connect_python_exe_dir = "C:/Users/J-tel/AppData/Local/Programs/Python/Python36-32/python.exe"
            connect_r_exe_dir = "C:/Program Files/Microsoft/R Open/R-3.4.3/bin/Rscript.exe"
            connect_max_exe_parallel = {1(Default)|Number}
            {code}

            h2. 2.2 CREATE TABLE: CONNECT
            For using the _"CONNECT REMOTE_TABLE"_ Engine, the user will have to create an empty table as follows:

            {code:SQL}
            CREATE [OR REPLACE] [IF NOT EXISTS] TABLE tbl_name
              ENGINE = CONNECT
              TABLE_TYPE = REMOTE_TABLE
              LANGUAGE = {R|Python}
              [PARALLEL={0|1}]
              [WITH VERSION CONTROL];
            {code}

            The CONNECT Engine will the automatically create a table with the following column definition:
            {code:SQL}
            CREATE [OR REPLACE] [IF NOT EXISTS] TABLE tbl_name
            (
              CALL VARCHAR(128) PRIMARY KEY,
              SCRIPT TEXT
            )
              ENGINE = CONNECT
              TABLE_TYPE = REMOTE_TABLE
              LANGUAGE = {R|Python}
              [PARALLEL={0|1}]
              [WITH VERSION CONTROL];
            {code}

            h2. 2.3 INSERT INTO: CONNECT
            In order to save the R or Python Script to be called periodically from the MariaDB Server, the user will have 2 options:

            A. To Load the Script from a .TXT File into the Server:
            {code:SQL}
            INSERT INTO tbl_name (CALL, SCRIPT)
            VALUES("1-call_name", LOAD_FILE('/path/.../script_file_name.txt'));
            {code}

            B. To introduce the script directly through the IDE:
            {code:SQL}
            INSERT INTO tbl_name (CALL, SCRIPT)
            VALUES("1-call_name", QUOTE("... [R or Python Script] ..."));
            {code}

            SAVE A QUERY INT
            So when calling:

            SELECT
               *
            FROM
                db.t_Remote_Scripts
            WHERE
                CALL = "01 - Hello, World!"

            Connect would send the SCRIPT text column to the .exe on the PATH (e.g.: RScript exe) and retrieve the select table any warnings that occurred during the execution, that could eventually even be stored in another table as a Data Quality check, to see if the script has been executed correctly.

            In the remote R/Python script, the script will have to make use of a ODBC Connection for importing the data from MariaDB, analyze it, and send it back away.

            This engine feature could imply security issues, so it shall be disabled by default, or even have its own USER security permission.

            Thank you.

            Best,
            Juan Telleria
            Juan Juan Telleria made changes -
            Description h1. 1. Objective
            To give the possibility to call the execution of external:
            * [Python|https://www.python.org/].
            * Or [R Statistical Programming Language|https://mran.microsoft.com/].

            Scripts directly from MariaDB, just as SQL Server, from 2017 Edition onward, allows to do so:
            * [sp_execute_external_script (Transact-SQL)|https://docs.microsoft.com/es-es/sql/relational-databases/system-stored-procedures/sp-execute-external-script-transact-sql?view=sql-server-2017]
            * [Run Python using T-SQL|https://docs.microsoft.com/en-us/sql/advanced-analytics/tutorials/run-python-using-t-sql?view=sql-server-2017]
            * [Using R functions with SQL Server data (R in SQL quickstart)|https://docs.microsoft.com/en-us/sql/advanced-analytics/tutorials/rtsql-using-r-functions-with-sql-server-data?view=sql-server-2017]

            The ultimate objetive is, for example, to trigger the execution of a remote Python/R Code for updating a predictive model in keras/h2o/tensorflow/... when new data is introduced into the database, or as part of a SQL procedure.

            h1. 2. MariaDB's CONNECT Implementation
            One possible implementation could be as follows:
            h2. 2.1. my.ini
            {code:txt}
            [mysqld]
            connect_enable_execute_external_script = {0|1}
            connect_python_exe_dir = "C:/Users/J-tel/AppData/Local/Programs/Python/Python36-32/python.exe"
            connect_r_exe_dir = "C:/Program Files/Microsoft/R Open/R-3.4.3/bin/Rscript.exe"
            connect_max_exe_parallel = {1(Default)|Number}
            {code}

            h2. 2.2 CREATE TABLE: CONNECT
            For using the _"CONNECT REMOTE_TABLE"_ Engine, the user will have to create an empty table as follows:

            {code:SQL}
            CREATE [OR REPLACE] [IF NOT EXISTS] TABLE tbl_name
              ENGINE = CONNECT
              TABLE_TYPE = REMOTE_TABLE
              LANGUAGE = {R|Python}
              [PARALLEL={0|1}]
              [WITH VERSION CONTROL];
            {code}

            The CONNECT Engine will the automatically create a table with the following column definition:
            {code:SQL}
            CREATE [OR REPLACE] [IF NOT EXISTS] TABLE tbl_name
            (
              CALL VARCHAR(128) PRIMARY KEY,
              SCRIPT TEXT
            )
              ENGINE = CONNECT
              TABLE_TYPE = REMOTE_TABLE
              LANGUAGE = {R|Python}
              [PARALLEL={0|1}]
              [WITH VERSION CONTROL];
            {code}

            h2. 2.3 INSERT INTO: CONNECT
            In order to save the R or Python Script to be called periodically from the MariaDB Server, the user will have 2 options:

            A. To Load the Script from a .TXT File into the Server:
            {code:SQL}
            INSERT INTO tbl_name (CALL, SCRIPT)
            VALUES("1-call_name", LOAD_FILE('/path/.../script_file_name.txt'));
            {code}

            B. To introduce the script directly through the IDE:
            {code:SQL}
            INSERT INTO tbl_name (CALL, SCRIPT)
            VALUES("1-call_name", QUOTE("... [R or Python Script] ..."));
            {code}

            SAVE A QUERY INT
            So when calling:

            SELECT
               *
            FROM
                db.t_Remote_Scripts
            WHERE
                CALL = "01 - Hello, World!"

            Connect would send the SCRIPT text column to the .exe on the PATH (e.g.: RScript exe) and retrieve the select table any warnings that occurred during the execution, that could eventually even be stored in another table as a Data Quality check, to see if the script has been executed correctly.

            In the remote R/Python script, the script will have to make use of a ODBC Connection for importing the data from MariaDB, analyze it, and send it back away.

            This engine feature could imply security issues, so it shall be disabled by default, or even have its own USER security permission.

            Thank you.

            Best,
            Juan Telleria
            h1. 1. Objective
            To give the possibility to call the execution of external:
            * [Python|https://www.python.org/].
            * Or [R Statistical Programming Language|https://mran.microsoft.com/].

            Scripts directly from MariaDB, just as SQL Server, from 2017 Edition onward, allows to do so:
            * [sp_execute_external_script (Transact-SQL)|https://docs.microsoft.com/es-es/sql/relational-databases/system-stored-procedures/sp-execute-external-script-transact-sql?view=sql-server-2017]
            * [Run Python using T-SQL|https://docs.microsoft.com/en-us/sql/advanced-analytics/tutorials/run-python-using-t-sql?view=sql-server-2017]
            * [Using R functions with SQL Server data (R in SQL quickstart)|https://docs.microsoft.com/en-us/sql/advanced-analytics/tutorials/rtsql-using-r-functions-with-sql-server-data?view=sql-server-2017]

            The ultimate objetive is, for example, to trigger the execution of a remote Python/R Code for updating a predictive model in keras/h2o/tensorflow/... when new data is introduced into the database, or as part of a SQL procedure.

            h1. 2. MariaDB's CONNECT Implementation
            One possible implementation could be as follows:
            h2. 2.1. my.ini
            {code:txt}
            [mysqld]
            connect_enable_execute_external_script = {0|1}
            connect_python_exe_dir = "C:/Users/J-tel/AppData/Local/Programs/Python/Python36-32/python.exe"
            connect_r_exe_dir = "C:/Program Files/Microsoft/R Open/R-3.4.3/bin/Rscript.exe"
            connect_max_exe_parallel = {1(Default)|Number}
            {code}

            h2. 2.2 Enable External Script Execution: CREATE TABLE
            For using the _"CONNECT REMOTE_TABLE"_ Engine, the user will have to create an empty table as follows:

            {code:SQL}
            CREATE [OR REPLACE] [IF NOT EXISTS] TABLE tbl_name
              ENGINE = CONNECT
              TABLE_TYPE = REMOTE_TABLE
              LANGUAGE = {R|Python}
              [PARALLEL={0|1}]
              [WITH VERSION CONTROL];
            {code}

            The CONNECT Engine will the automatically create a table with the following column definition:
            {code:SQL}
            CREATE [OR REPLACE] [IF NOT EXISTS] TABLE tbl_name
            (
              CALL VARCHAR(128) PRIMARY KEY,
              SCRIPT TEXT
            )
              ENGINE = CONNECT
              TABLE_TYPE = REMOTE_TABLE
              LANGUAGE = {R|Python}
              [PARALLEL={0|1}]
              [WITH VERSION CONTROL];
            {code}

            h2. 2.3 Saving Scripts into the Server: INSERT INTO
            In order to save the R or Python Script to be called periodically from the MariaDB Server, the user will have 2 options:

            A. To Load the Script from a .TXT File into the Server:
            {code:SQL}
            INSERT INTO tbl_name (CALL, SCRIPT)
            VALUES("1-call_name", LOAD_FILE('/path/.../script_file_name.txt'));
            {code}

            B. To introduce the script directly through the IDE:
            {code:SQL}
            INSERT INTO tbl_name (CALL, SCRIPT)
            VALUES("1-call_name", QUOTE("... [R or Python Script] ..."));
            {code}

            SAVE A QUERY INT
            So when calling:

            SELECT
               *
            FROM
                db.t_Remote_Scripts
            WHERE
                CALL = "01 - Hello, World!"

            Connect would send the SCRIPT text column to the .exe on the PATH (e.g.: RScript exe) and retrieve the select table any warnings that occurred during the execution, that could eventually even be stored in another table as a Data Quality check, to see if the script has been executed correctly.

            In the remote R/Python script, the script will have to make use of a ODBC Connection for importing the data from MariaDB, analyze it, and send it back away.

            This engine feature could imply security issues, so it shall be disabled by default, or even have its own USER security permission.

            Thank you.

            Best,
            Juan Telleria
            Juan Juan Telleria made changes -
            Description h1. 1. Objective
            To give the possibility to call the execution of external:
            * [Python|https://www.python.org/].
            * Or [R Statistical Programming Language|https://mran.microsoft.com/].

            Scripts directly from MariaDB, just as SQL Server, from 2017 Edition onward, allows to do so:
            * [sp_execute_external_script (Transact-SQL)|https://docs.microsoft.com/es-es/sql/relational-databases/system-stored-procedures/sp-execute-external-script-transact-sql?view=sql-server-2017]
            * [Run Python using T-SQL|https://docs.microsoft.com/en-us/sql/advanced-analytics/tutorials/run-python-using-t-sql?view=sql-server-2017]
            * [Using R functions with SQL Server data (R in SQL quickstart)|https://docs.microsoft.com/en-us/sql/advanced-analytics/tutorials/rtsql-using-r-functions-with-sql-server-data?view=sql-server-2017]

            The ultimate objetive is, for example, to trigger the execution of a remote Python/R Code for updating a predictive model in keras/h2o/tensorflow/... when new data is introduced into the database, or as part of a SQL procedure.

            h1. 2. MariaDB's CONNECT Implementation
            One possible implementation could be as follows:
            h2. 2.1. my.ini
            {code:txt}
            [mysqld]
            connect_enable_execute_external_script = {0|1}
            connect_python_exe_dir = "C:/Users/J-tel/AppData/Local/Programs/Python/Python36-32/python.exe"
            connect_r_exe_dir = "C:/Program Files/Microsoft/R Open/R-3.4.3/bin/Rscript.exe"
            connect_max_exe_parallel = {1(Default)|Number}
            {code}

            h2. 2.2 Enable External Script Execution: CREATE TABLE
            For using the _"CONNECT REMOTE_TABLE"_ Engine, the user will have to create an empty table as follows:

            {code:SQL}
            CREATE [OR REPLACE] [IF NOT EXISTS] TABLE tbl_name
              ENGINE = CONNECT
              TABLE_TYPE = REMOTE_TABLE
              LANGUAGE = {R|Python}
              [PARALLEL={0|1}]
              [WITH VERSION CONTROL];
            {code}

            The CONNECT Engine will the automatically create a table with the following column definition:
            {code:SQL}
            CREATE [OR REPLACE] [IF NOT EXISTS] TABLE tbl_name
            (
              CALL VARCHAR(128) PRIMARY KEY,
              SCRIPT TEXT
            )
              ENGINE = CONNECT
              TABLE_TYPE = REMOTE_TABLE
              LANGUAGE = {R|Python}
              [PARALLEL={0|1}]
              [WITH VERSION CONTROL];
            {code}

            h2. 2.3 Saving Scripts into the Server: INSERT INTO
            In order to save the R or Python Script to be called periodically from the MariaDB Server, the user will have 2 options:

            A. To Load the Script from a .TXT File into the Server:
            {code:SQL}
            INSERT INTO tbl_name (CALL, SCRIPT)
            VALUES("1-call_name", LOAD_FILE('/path/.../script_file_name.txt'));
            {code}

            B. To introduce the script directly through the IDE:
            {code:SQL}
            INSERT INTO tbl_name (CALL, SCRIPT)
            VALUES("1-call_name", QUOTE("... [R or Python Script] ..."));
            {code}

            SAVE A QUERY INT
            So when calling:

            SELECT
               *
            FROM
                db.t_Remote_Scripts
            WHERE
                CALL = "01 - Hello, World!"

            Connect would send the SCRIPT text column to the .exe on the PATH (e.g.: RScript exe) and retrieve the select table any warnings that occurred during the execution, that could eventually even be stored in another table as a Data Quality check, to see if the script has been executed correctly.

            In the remote R/Python script, the script will have to make use of a ODBC Connection for importing the data from MariaDB, analyze it, and send it back away.

            This engine feature could imply security issues, so it shall be disabled by default, or even have its own USER security permission.

            Thank you.

            Best,
            Juan Telleria
            h1. 1. Objective
            To give the possibility to call the execution of external:
            * [Python|https://www.python.org/].
            * Or [R Statistical Programming Language|https://mran.microsoft.com/].

            Scripts directly from MariaDB, just as SQL Server, from 2017 Edition onward, allows to do so:
            * [sp_execute_external_script (Transact-SQL)|https://docs.microsoft.com/es-es/sql/relational-databases/system-stored-procedures/sp-execute-external-script-transact-sql?view=sql-server-2017]
            * [Run Python using T-SQL|https://docs.microsoft.com/en-us/sql/advanced-analytics/tutorials/run-python-using-t-sql?view=sql-server-2017]
            * [Using R functions with SQL Server data (R in SQL quickstart)|https://docs.microsoft.com/en-us/sql/advanced-analytics/tutorials/rtsql-using-r-functions-with-sql-server-data?view=sql-server-2017]

            The ultimate objetive is, for example, to trigger the execution of a remote Python/R Code for updating a predictive model in keras/h2o/tensorflow/... when new data is introduced into the database, or as part of a SQL procedure.

            h1. 2. MariaDB's CONNECT Implementation
            One possible implementation could be as follows:
            h2. 2.1. my.ini
            {code:txt}
            [mysqld]
            connect_enable_execute_external_script = {0|1}
            connect_python_exe_dir = "C:/Users/J-tel/AppData/Local/Programs/Python/Python36-32/python.exe"
            connect_r_exe_dir = "C:/Program Files/Microsoft/R Open/R-3.4.3/bin/Rscript.exe"
            connect_max_exe_parallel = {1(Default)|Number}
            {code}

            h2. 2.2 Enable External Script Execution: CREATE TABLE
            For using the _"CONNECT REMOTE_TABLE"_ Engine, the user will have to create an empty table as follows:

            {code:SQL}
            CREATE [OR REPLACE] [IF NOT EXISTS] TABLE tbl_name
              ENGINE = CONNECT
              TABLE_TYPE = REMOTE_TABLE
              LANGUAGE = {R|Python}
              [PARALLEL={0|1}]
              [WITH VERSION CONTROL];
            {code}

            The CONNECT Engine will the automatically create a table with the following column definition:
            {code:SQL}
            CREATE [OR REPLACE] [IF NOT EXISTS] TABLE tbl_name
            (
              CALL VARCHAR(128) PRIMARY KEY,
              SCRIPT TEXT
            )
              ENGINE = CONNECT
              TABLE_TYPE = REMOTE_TABLE
              LANGUAGE = {R|Python}
              [PARALLEL={0|1}]
              [WITH VERSION CONTROL];
            {code}

            h2. 2.3 Save Scripts into the Server: INSERT INTO
            In order to save the R or Python Script to be called periodically from the MariaDB Server, the user will have 2 options:

            A. To Load the Script from a .TXT File into the Server:
            {code:SQL}
            INSERT INTO tbl_name (CALL, SCRIPT)
            VALUES("1-call_name", LOAD_FILE('/path/.../script_file_name.txt'));
            {code}

            B. To introduce the script directly through the IDE:
            {code:SQL}
            INSERT INTO tbl_name (CALL, SCRIPT)
            VALUES("1-call_name", QUOTE("... [R or Python Script] ..."));
            {code}

            SAVE A QUERY INT
            So when calling:

            SELECT
               *
            FROM
                db.t_Remote_Scripts
            WHERE
                CALL = "01 - Hello, World!"

            Connect would send the SCRIPT text column to the .exe on the PATH (e.g.: RScript exe) and retrieve the select table any warnings that occurred during the execution, that could eventually even be stored in another table as a Data Quality check, to see if the script has been executed correctly.

            In the remote R/Python script, the script will have to make use of a ODBC Connection for importing the data from MariaDB, analyze it, and send it back away.

            This engine feature could imply security issues, so it shall be disabled by default, or even have its own USER security permission.

            Thank you.

            Best,
            Juan Telleria
            Juan Juan Telleria made changes -
            Description h1. 1. Objective
            To give the possibility to call the execution of external:
            * [Python|https://www.python.org/].
            * Or [R Statistical Programming Language|https://mran.microsoft.com/].

            Scripts directly from MariaDB, just as SQL Server, from 2017 Edition onward, allows to do so:
            * [sp_execute_external_script (Transact-SQL)|https://docs.microsoft.com/es-es/sql/relational-databases/system-stored-procedures/sp-execute-external-script-transact-sql?view=sql-server-2017]
            * [Run Python using T-SQL|https://docs.microsoft.com/en-us/sql/advanced-analytics/tutorials/run-python-using-t-sql?view=sql-server-2017]
            * [Using R functions with SQL Server data (R in SQL quickstart)|https://docs.microsoft.com/en-us/sql/advanced-analytics/tutorials/rtsql-using-r-functions-with-sql-server-data?view=sql-server-2017]

            The ultimate objetive is, for example, to trigger the execution of a remote Python/R Code for updating a predictive model in keras/h2o/tensorflow/... when new data is introduced into the database, or as part of a SQL procedure.

            h1. 2. MariaDB's CONNECT Implementation
            One possible implementation could be as follows:
            h2. 2.1. my.ini
            {code:txt}
            [mysqld]
            connect_enable_execute_external_script = {0|1}
            connect_python_exe_dir = "C:/Users/J-tel/AppData/Local/Programs/Python/Python36-32/python.exe"
            connect_r_exe_dir = "C:/Program Files/Microsoft/R Open/R-3.4.3/bin/Rscript.exe"
            connect_max_exe_parallel = {1(Default)|Number}
            {code}

            h2. 2.2 Enable External Script Execution: CREATE TABLE
            For using the _"CONNECT REMOTE_TABLE"_ Engine, the user will have to create an empty table as follows:

            {code:SQL}
            CREATE [OR REPLACE] [IF NOT EXISTS] TABLE tbl_name
              ENGINE = CONNECT
              TABLE_TYPE = REMOTE_TABLE
              LANGUAGE = {R|Python}
              [PARALLEL={0|1}]
              [WITH VERSION CONTROL];
            {code}

            The CONNECT Engine will the automatically create a table with the following column definition:
            {code:SQL}
            CREATE [OR REPLACE] [IF NOT EXISTS] TABLE tbl_name
            (
              CALL VARCHAR(128) PRIMARY KEY,
              SCRIPT TEXT
            )
              ENGINE = CONNECT
              TABLE_TYPE = REMOTE_TABLE
              LANGUAGE = {R|Python}
              [PARALLEL={0|1}]
              [WITH VERSION CONTROL];
            {code}

            h2. 2.3 Save Scripts into the Server: INSERT INTO
            In order to save the R or Python Script to be called periodically from the MariaDB Server, the user will have 2 options:

            A. To Load the Script from a .TXT File into the Server:
            {code:SQL}
            INSERT INTO tbl_name (CALL, SCRIPT)
            VALUES("1-call_name", LOAD_FILE('/path/.../script_file_name.txt'));
            {code}

            B. To introduce the script directly through the IDE:
            {code:SQL}
            INSERT INTO tbl_name (CALL, SCRIPT)
            VALUES("1-call_name", QUOTE("... [R or Python Script] ..."));
            {code}

            SAVE A QUERY INT
            So when calling:

            SELECT
               *
            FROM
                db.t_Remote_Scripts
            WHERE
                CALL = "01 - Hello, World!"

            Connect would send the SCRIPT text column to the .exe on the PATH (e.g.: RScript exe) and retrieve the select table any warnings that occurred during the execution, that could eventually even be stored in another table as a Data Quality check, to see if the script has been executed correctly.

            In the remote R/Python script, the script will have to make use of a ODBC Connection for importing the data from MariaDB, analyze it, and send it back away.

            This engine feature could imply security issues, so it shall be disabled by default, or even have its own USER security permission.

            Thank you.

            Best,
            Juan Telleria
            h1. 1. Objective
            To give the possibility to call the execution of external:
            * [Python|https://www.python.org/].
            * Or [R Statistical Programming Language|https://mran.microsoft.com/].

            Scripts directly from MariaDB, just as SQL Server, from 2017 Edition onward, allows to do so:
            * [sp_execute_external_script (Transact-SQL)|https://docs.microsoft.com/es-es/sql/relational-databases/system-stored-procedures/sp-execute-external-script-transact-sql?view=sql-server-2017]
            * [Run Python using T-SQL|https://docs.microsoft.com/en-us/sql/advanced-analytics/tutorials/run-python-using-t-sql?view=sql-server-2017]
            * [Using R functions with SQL Server data (R in SQL quickstart)|https://docs.microsoft.com/en-us/sql/advanced-analytics/tutorials/rtsql-using-r-functions-with-sql-server-data?view=sql-server-2017]

            The ultimate objetive is, for example, to trigger the execution of a remote Python/R Code for updating a predictive model in keras/h2o/tensorflow/... when new data is introduced into the database, or as part of a SQL procedure.

            h1. 2. MariaDB's CONNECT Implementation
            One possible implementation could be as follows:
            h2. 2.1. Enable External Script Execution: my.ini
            {code:txt}
            [mysqld]
            connect_enable_execute_external_script = {0|1}
            connect_python_exe_dir = "C:/Users/J-tel/AppData/Local/Programs/Python/Python36-32/python.exe"
            connect_r_exe_dir = "C:/Program Files/Microsoft/R Open/R-3.4.3/bin/Rscript.exe"
            connect_max_exe_parallel = {1(Default)|Number}
            {code}

            h2. 2.2 CREATE TABLE
            For using the _"CONNECT REMOTE_TABLE"_ Engine, the user will have to create an empty table as follows:

            {code:SQL}
            CREATE [OR REPLACE] [IF NOT EXISTS] TABLE tbl_name
              ENGINE = CONNECT
              TABLE_TYPE = REMOTE_TABLE
              LANGUAGE = {R|Python}
              [PARALLEL={0|1}]
              [WITH VERSION CONTROL];
            {code}

            The CONNECT Engine will the automatically create a table with the following column definition:
            {code:SQL}
            CREATE [OR REPLACE] [IF NOT EXISTS] TABLE tbl_name
            (
              CALL VARCHAR(128) PRIMARY KEY,
              SCRIPT TEXT
            )
              ENGINE = CONNECT
              TABLE_TYPE = REMOTE_TABLE
              LANGUAGE = {R|Python}
              [PARALLEL={0|1}]
              [WITH VERSION CONTROL];
            {code}

            h2. 2.3 Save Scripts into the Server: INSERT INTO
            In order to save the R or Python Script to be called periodically from the MariaDB Server, the user will have 2 options:

            A. To Load the Script from a .TXT File into the Server:
            {code:SQL}
            INSERT INTO tbl_name (CALL, SCRIPT)
            VALUES("1-call_name", LOAD_FILE('/path/.../script_file_name.txt'));
            {code}

            B. To introduce the script directly through the IDE:
            {code:SQL}
            INSERT INTO tbl_name (CALL, SCRIPT)
            VALUES("1-call_name", QUOTE("... [R or Python Script] ..."));
            {code}

            SAVE A QUERY INT
            So when calling:

            SELECT
               *
            FROM
                db.t_Remote_Scripts
            WHERE
                CALL = "01 - Hello, World!"

            Connect would send the SCRIPT text column to the .exe on the PATH (e.g.: RScript exe) and retrieve the select table any warnings that occurred during the execution, that could eventually even be stored in another table as a Data Quality check, to see if the script has been executed correctly.

            In the remote R/Python script, the script will have to make use of a ODBC Connection for importing the data from MariaDB, analyze it, and send it back away.

            This engine feature could imply security issues, so it shall be disabled by default, or even have its own USER security permission.

            Thank you.

            Best,
            Juan Telleria
            Juan Juan Telleria made changes -
            Description h1. 1. Objective
            To give the possibility to call the execution of external:
            * [Python|https://www.python.org/].
            * Or [R Statistical Programming Language|https://mran.microsoft.com/].

            Scripts directly from MariaDB, just as SQL Server, from 2017 Edition onward, allows to do so:
            * [sp_execute_external_script (Transact-SQL)|https://docs.microsoft.com/es-es/sql/relational-databases/system-stored-procedures/sp-execute-external-script-transact-sql?view=sql-server-2017]
            * [Run Python using T-SQL|https://docs.microsoft.com/en-us/sql/advanced-analytics/tutorials/run-python-using-t-sql?view=sql-server-2017]
            * [Using R functions with SQL Server data (R in SQL quickstart)|https://docs.microsoft.com/en-us/sql/advanced-analytics/tutorials/rtsql-using-r-functions-with-sql-server-data?view=sql-server-2017]

            The ultimate objetive is, for example, to trigger the execution of a remote Python/R Code for updating a predictive model in keras/h2o/tensorflow/... when new data is introduced into the database, or as part of a SQL procedure.

            h1. 2. MariaDB's CONNECT Implementation
            One possible implementation could be as follows:
            h2. 2.1. Enable External Script Execution: my.ini
            {code:txt}
            [mysqld]
            connect_enable_execute_external_script = {0|1}
            connect_python_exe_dir = "C:/Users/J-tel/AppData/Local/Programs/Python/Python36-32/python.exe"
            connect_r_exe_dir = "C:/Program Files/Microsoft/R Open/R-3.4.3/bin/Rscript.exe"
            connect_max_exe_parallel = {1(Default)|Number}
            {code}

            h2. 2.2 CREATE TABLE
            For using the _"CONNECT REMOTE_TABLE"_ Engine, the user will have to create an empty table as follows:

            {code:SQL}
            CREATE [OR REPLACE] [IF NOT EXISTS] TABLE tbl_name
              ENGINE = CONNECT
              TABLE_TYPE = REMOTE_TABLE
              LANGUAGE = {R|Python}
              [PARALLEL={0|1}]
              [WITH VERSION CONTROL];
            {code}

            The CONNECT Engine will the automatically create a table with the following column definition:
            {code:SQL}
            CREATE [OR REPLACE] [IF NOT EXISTS] TABLE tbl_name
            (
              CALL VARCHAR(128) PRIMARY KEY,
              SCRIPT TEXT
            )
              ENGINE = CONNECT
              TABLE_TYPE = REMOTE_TABLE
              LANGUAGE = {R|Python}
              [PARALLEL={0|1}]
              [WITH VERSION CONTROL];
            {code}

            h2. 2.3 Save Scripts into the Server: INSERT INTO
            In order to save the R or Python Script to be called periodically from the MariaDB Server, the user will have 2 options:

            A. To Load the Script from a .TXT File into the Server:
            {code:SQL}
            INSERT INTO tbl_name (CALL, SCRIPT)
            VALUES("1-call_name", LOAD_FILE('/path/.../script_file_name.txt'));
            {code}

            B. To introduce the script directly through the IDE:
            {code:SQL}
            INSERT INTO tbl_name (CALL, SCRIPT)
            VALUES("1-call_name", QUOTE("... [R or Python Script] ..."));
            {code}

            SAVE A QUERY INT
            So when calling:

            SELECT
               *
            FROM
                db.t_Remote_Scripts
            WHERE
                CALL = "01 - Hello, World!"

            Connect would send the SCRIPT text column to the .exe on the PATH (e.g.: RScript exe) and retrieve the select table any warnings that occurred during the execution, that could eventually even be stored in another table as a Data Quality check, to see if the script has been executed correctly.

            In the remote R/Python script, the script will have to make use of a ODBC Connection for importing the data from MariaDB, analyze it, and send it back away.

            This engine feature could imply security issues, so it shall be disabled by default, or even have its own USER security permission.

            Thank you.

            Best,
            Juan Telleria
            h1. 1. Objective
            To give the possibility to call the execution of external:
            * [Python|https://www.python.org/].
            * Or [R Statistical Programming Language|https://mran.microsoft.com/].

            Scripts directly from MariaDB, just as SQL Server, from 2017 Edition onward, allows to do so:
            * [sp_execute_external_script (Transact-SQL)|https://docs.microsoft.com/es-es/sql/relational-databases/system-stored-procedures/sp-execute-external-script-transact-sql?view=sql-server-2017]
            * [Run Python using T-SQL|https://docs.microsoft.com/en-us/sql/advanced-analytics/tutorials/run-python-using-t-sql?view=sql-server-2017]
            * [Using R functions with SQL Server data (R in SQL quickstart)|https://docs.microsoft.com/en-us/sql/advanced-analytics/tutorials/rtsql-using-r-functions-with-sql-server-data?view=sql-server-2017]

            The ultimate objetive is, for example, to trigger the execution of a remote Python/R Code for updating a predictive model in keras/h2o/tensorflow/... when new data is introduced into the database, or as part of a SQL procedure.

            h1. 2. MariaDB's CONNECT Implementation
            One possible implementation could be as follows:
            h2. 2.1. Enable External Script Execution: my.ini
            {code:txt}
            [mysqld]
            connect_enable_execute_external_script = {0|1}
            connect_python_exe_dir = "C:/Users/J-tel/AppData/Local/Programs/Python/Python36-32/python.exe"
            connect_r_exe_dir = "C:/Program Files/Microsoft/R Open/R-3.4.3/bin/Rscript.exe"
            connect_max_exe_parallel = {1(Default)|Number}
            {code}

            h2. 2.2 Script Repository Creation: CREATE TABLE
            For using the _"CONNECT REMOTE_TABLE"_ Engine, the user will have to create an empty table as follows:

            {code:SQL}
            CREATE [OR REPLACE] [IF NOT EXISTS] TABLE tbl_name
              ENGINE = CONNECT
              TABLE_TYPE = REMOTE_TABLE
              LANGUAGE = {R|Python}
              [PARALLEL={0|1}]
              [WITH VERSION CONTROL];
            {code}

            The CONNECT Engine will the automatically create a table with the following column definition:
            {code:SQL}
            CREATE [OR REPLACE] [IF NOT EXISTS] TABLE tbl_name
            (
              CALL VARCHAR(128) PRIMARY KEY,
              SCRIPT TEXT
            )
              ENGINE = CONNECT
              TABLE_TYPE = REMOTE_TABLE
              LANGUAGE = {R|Python}
              [PARALLEL={0|1}]
              [WITH VERSION CONTROL];
            {code}

            h2. 2.3 Save Scripts into the Server: INSERT INTO
            In order to save the R or Python Script to be called periodically from the MariaDB Server, the user will have 2 options:

            A. To Load the Script from a .TXT File into the Server:
            {code:SQL}
            INSERT INTO tbl_name (CALL, SCRIPT)
            VALUES("1-call_name", LOAD_FILE('/path/.../script_file_name.txt'));
            {code}

            B. To introduce the script directly through the IDE:
            {code:SQL}
            INSERT INTO tbl_name (CALL, SCRIPT)
            VALUES("1-call_name", QUOTE("... [R or Python Script] ..."));
            {code}

            SAVE A QUERY INT
            So when calling:

            SELECT
               *
            FROM
                db.t_Remote_Scripts
            WHERE
                CALL = "01 - Hello, World!"

            Connect would send the SCRIPT text column to the .exe on the PATH (e.g.: RScript exe) and retrieve the select table any warnings that occurred during the execution, that could eventually even be stored in another table as a Data Quality check, to see if the script has been executed correctly.

            In the remote R/Python script, the script will have to make use of a ODBC Connection for importing the data from MariaDB, analyze it, and send it back away.

            This engine feature could imply security issues, so it shall be disabled by default, or even have its own USER security permission.

            Thank you.

            Best,
            Juan Telleria
            Juan Juan Telleria made changes -
            Description h1. 1. Objective
            To give the possibility to call the execution of external:
            * [Python|https://www.python.org/].
            * Or [R Statistical Programming Language|https://mran.microsoft.com/].

            Scripts directly from MariaDB, just as SQL Server, from 2017 Edition onward, allows to do so:
            * [sp_execute_external_script (Transact-SQL)|https://docs.microsoft.com/es-es/sql/relational-databases/system-stored-procedures/sp-execute-external-script-transact-sql?view=sql-server-2017]
            * [Run Python using T-SQL|https://docs.microsoft.com/en-us/sql/advanced-analytics/tutorials/run-python-using-t-sql?view=sql-server-2017]
            * [Using R functions with SQL Server data (R in SQL quickstart)|https://docs.microsoft.com/en-us/sql/advanced-analytics/tutorials/rtsql-using-r-functions-with-sql-server-data?view=sql-server-2017]

            The ultimate objetive is, for example, to trigger the execution of a remote Python/R Code for updating a predictive model in keras/h2o/tensorflow/... when new data is introduced into the database, or as part of a SQL procedure.

            h1. 2. MariaDB's CONNECT Implementation
            One possible implementation could be as follows:
            h2. 2.1. Enable External Script Execution: my.ini
            {code:txt}
            [mysqld]
            connect_enable_execute_external_script = {0|1}
            connect_python_exe_dir = "C:/Users/J-tel/AppData/Local/Programs/Python/Python36-32/python.exe"
            connect_r_exe_dir = "C:/Program Files/Microsoft/R Open/R-3.4.3/bin/Rscript.exe"
            connect_max_exe_parallel = {1(Default)|Number}
            {code}

            h2. 2.2 Script Repository Creation: CREATE TABLE
            For using the _"CONNECT REMOTE_TABLE"_ Engine, the user will have to create an empty table as follows:

            {code:SQL}
            CREATE [OR REPLACE] [IF NOT EXISTS] TABLE tbl_name
              ENGINE = CONNECT
              TABLE_TYPE = REMOTE_TABLE
              LANGUAGE = {R|Python}
              [PARALLEL={0|1}]
              [WITH VERSION CONTROL];
            {code}

            The CONNECT Engine will the automatically create a table with the following column definition:
            {code:SQL}
            CREATE [OR REPLACE] [IF NOT EXISTS] TABLE tbl_name
            (
              CALL VARCHAR(128) PRIMARY KEY,
              SCRIPT TEXT
            )
              ENGINE = CONNECT
              TABLE_TYPE = REMOTE_TABLE
              LANGUAGE = {R|Python}
              [PARALLEL={0|1}]
              [WITH VERSION CONTROL];
            {code}

            h2. 2.3 Save Scripts into the Server: INSERT INTO
            In order to save the R or Python Script to be called periodically from the MariaDB Server, the user will have 2 options:

            A. To Load the Script from a .TXT File into the Server:
            {code:SQL}
            INSERT INTO tbl_name (CALL, SCRIPT)
            VALUES("1-call_name", LOAD_FILE('/path/.../script_file_name.txt'));
            {code}

            B. To introduce the script directly through the IDE:
            {code:SQL}
            INSERT INTO tbl_name (CALL, SCRIPT)
            VALUES("1-call_name", QUOTE("... [R or Python Script] ..."));
            {code}

            SAVE A QUERY INT
            So when calling:

            SELECT
               *
            FROM
                db.t_Remote_Scripts
            WHERE
                CALL = "01 - Hello, World!"

            Connect would send the SCRIPT text column to the .exe on the PATH (e.g.: RScript exe) and retrieve the select table any warnings that occurred during the execution, that could eventually even be stored in another table as a Data Quality check, to see if the script has been executed correctly.

            In the remote R/Python script, the script will have to make use of a ODBC Connection for importing the data from MariaDB, analyze it, and send it back away.

            This engine feature could imply security issues, so it shall be disabled by default, or even have its own USER security permission.

            Thank you.

            Best,
            Juan Telleria
            h1. 1. *Objective*
            To give the possibility to call the execution of external:
            * [Python|https://www.python.org/].
            * Or [R Statistical Programming Language|https://mran.microsoft.com/].

            Scripts directly from MariaDB, just as SQL Server, from 2017 Edition onward, allows to do so:
            * [sp_execute_external_script (Transact-SQL)|https://docs.microsoft.com/es-es/sql/relational-databases/system-stored-procedures/sp-execute-external-script-transact-sql?view=sql-server-2017]
            * [Run Python using T-SQL|https://docs.microsoft.com/en-us/sql/advanced-analytics/tutorials/run-python-using-t-sql?view=sql-server-2017]
            * [Using R functions with SQL Server data (R in SQL quickstart)|https://docs.microsoft.com/en-us/sql/advanced-analytics/tutorials/rtsql-using-r-functions-with-sql-server-data?view=sql-server-2017]

            The ultimate objetive is, for example, to trigger the execution of a remote Python/R Code for updating a predictive model in keras/h2o/tensorflow/... when new data is introduced into the database, or as part of a SQL procedure.

            h1. 2. *MariaDB's CONNECT Implementation*
            One possible implementation could be as follows:
            h2. 2.1. *Enable External Script Execution:* my.ini
            {code:txt}
            [mysqld]
            connect_enable_execute_external_script = {0|1}
            connect_python_exe_dir = "C:/Users/J-tel/AppData/Local/Programs/Python/Python36-32/python.exe"
            connect_r_exe_dir = "C:/Program Files/Microsoft/R Open/R-3.4.3/bin/Rscript.exe"
            connect_max_exe_parallel = {1(Default)|Number}
            {code}

            h2. 2.2 *Script Repository Creation:* CREATE TABLE
            For using the _"CONNECT REMOTE_TABLE"_ Engine, the user will have to create an empty table as follows:

            {code:SQL}
            CREATE [OR REPLACE] [IF NOT EXISTS] TABLE tbl_name
              ENGINE = CONNECT
              TABLE_TYPE = REMOTE_TABLE
              LANGUAGE = {R|Python}
              [PARALLEL={0|1}]
              [WITH VERSION CONTROL];
            {code}

            The CONNECT Engine will the automatically create a table with the following column definition:
            {code:SQL}
            CREATE [OR REPLACE] [IF NOT EXISTS] TABLE tbl_name
            (
              CALL VARCHAR(128) PRIMARY KEY,
              SCRIPT TEXT
            )
              ENGINE = CONNECT
              TABLE_TYPE = REMOTE_TABLE
              LANGUAGE = {R|Python}
              [PARALLEL={0|1}]
              [WITH VERSION CONTROL];
            {code}

            h2. 2.3 *Save Scripts into the Server:* INSERT INTO
            In order to save the R or Python Script to be called periodically from the MariaDB Server, the user will have 2 options:

            A. To Load the Script from a .TXT File into the Server:
            {code:SQL}
            INSERT INTO tbl_name (CALL, SCRIPT)
            VALUES("1-call_name", LOAD_FILE('/path/.../script_file_name.txt'));
            {code}

            B. To introduce the script directly through the IDE:
            {code:SQL}
            INSERT INTO tbl_name (CALL, SCRIPT)
            VALUES("1-call_name", QUOTE("... [R or Python Script] ..."));
            {code}

            SAVE A QUERY INT
            So when calling:

            SELECT
               *
            FROM
                db.t_Remote_Scripts
            WHERE
                CALL = "01 - Hello, World!"

            Connect would send the SCRIPT text column to the .exe on the PATH (e.g.: RScript exe) and retrieve the select table any warnings that occurred during the execution, that could eventually even be stored in another table as a Data Quality check, to see if the script has been executed correctly.

            In the remote R/Python script, the script will have to make use of a ODBC Connection for importing the data from MariaDB, analyze it, and send it back away.

            This engine feature could imply security issues, so it shall be disabled by default, or even have its own USER security permission.

            Thank you.

            Best,
            Juan Telleria
            Juan Juan Telleria made changes -
            Description h1. 1. *Objective*
            To give the possibility to call the execution of external:
            * [Python|https://www.python.org/].
            * Or [R Statistical Programming Language|https://mran.microsoft.com/].

            Scripts directly from MariaDB, just as SQL Server, from 2017 Edition onward, allows to do so:
            * [sp_execute_external_script (Transact-SQL)|https://docs.microsoft.com/es-es/sql/relational-databases/system-stored-procedures/sp-execute-external-script-transact-sql?view=sql-server-2017]
            * [Run Python using T-SQL|https://docs.microsoft.com/en-us/sql/advanced-analytics/tutorials/run-python-using-t-sql?view=sql-server-2017]
            * [Using R functions with SQL Server data (R in SQL quickstart)|https://docs.microsoft.com/en-us/sql/advanced-analytics/tutorials/rtsql-using-r-functions-with-sql-server-data?view=sql-server-2017]

            The ultimate objetive is, for example, to trigger the execution of a remote Python/R Code for updating a predictive model in keras/h2o/tensorflow/... when new data is introduced into the database, or as part of a SQL procedure.

            h1. 2. *MariaDB's CONNECT Implementation*
            One possible implementation could be as follows:
            h2. 2.1. *Enable External Script Execution:* my.ini
            {code:txt}
            [mysqld]
            connect_enable_execute_external_script = {0|1}
            connect_python_exe_dir = "C:/Users/J-tel/AppData/Local/Programs/Python/Python36-32/python.exe"
            connect_r_exe_dir = "C:/Program Files/Microsoft/R Open/R-3.4.3/bin/Rscript.exe"
            connect_max_exe_parallel = {1(Default)|Number}
            {code}

            h2. 2.2 *Script Repository Creation:* CREATE TABLE
            For using the _"CONNECT REMOTE_TABLE"_ Engine, the user will have to create an empty table as follows:

            {code:SQL}
            CREATE [OR REPLACE] [IF NOT EXISTS] TABLE tbl_name
              ENGINE = CONNECT
              TABLE_TYPE = REMOTE_TABLE
              LANGUAGE = {R|Python}
              [PARALLEL={0|1}]
              [WITH VERSION CONTROL];
            {code}

            The CONNECT Engine will the automatically create a table with the following column definition:
            {code:SQL}
            CREATE [OR REPLACE] [IF NOT EXISTS] TABLE tbl_name
            (
              CALL VARCHAR(128) PRIMARY KEY,
              SCRIPT TEXT
            )
              ENGINE = CONNECT
              TABLE_TYPE = REMOTE_TABLE
              LANGUAGE = {R|Python}
              [PARALLEL={0|1}]
              [WITH VERSION CONTROL];
            {code}

            h2. 2.3 *Save Scripts into the Server:* INSERT INTO
            In order to save the R or Python Script to be called periodically from the MariaDB Server, the user will have 2 options:

            A. To Load the Script from a .TXT File into the Server:
            {code:SQL}
            INSERT INTO tbl_name (CALL, SCRIPT)
            VALUES("1-call_name", LOAD_FILE('/path/.../script_file_name.txt'));
            {code}

            B. To introduce the script directly through the IDE:
            {code:SQL}
            INSERT INTO tbl_name (CALL, SCRIPT)
            VALUES("1-call_name", QUOTE("... [R or Python Script] ..."));
            {code}

            SAVE A QUERY INT
            So when calling:

            SELECT
               *
            FROM
                db.t_Remote_Scripts
            WHERE
                CALL = "01 - Hello, World!"

            Connect would send the SCRIPT text column to the .exe on the PATH (e.g.: RScript exe) and retrieve the select table any warnings that occurred during the execution, that could eventually even be stored in another table as a Data Quality check, to see if the script has been executed correctly.

            In the remote R/Python script, the script will have to make use of a ODBC Connection for importing the data from MariaDB, analyze it, and send it back away.

            This engine feature could imply security issues, so it shall be disabled by default, or even have its own USER security permission.

            Thank you.

            Best,
            Juan Telleria
            h1. *1. Objective*
            To give the possibility to call the execution of external:
            * [Python|https://www.python.org/].
            * Or [R Statistical Programming Language|https://mran.microsoft.com/].

            Scripts directly from MariaDB, just as SQL Server, from 2017 Edition onward, allows to do so:
            * [sp_execute_external_script (Transact-SQL)|https://docs.microsoft.com/es-es/sql/relational-databases/system-stored-procedures/sp-execute-external-script-transact-sql?view=sql-server-2017]
            * [Run Python using T-SQL|https://docs.microsoft.com/en-us/sql/advanced-analytics/tutorials/run-python-using-t-sql?view=sql-server-2017]
            * [Using R functions with SQL Server data (R in SQL quickstart)|https://docs.microsoft.com/en-us/sql/advanced-analytics/tutorials/rtsql-using-r-functions-with-sql-server-data?view=sql-server-2017]

            The ultimate objetive is, for example, to trigger the execution of a remote Python/R Code for updating a predictive model in keras/h2o/tensorflow/... when new data is introduced into the database, or as part of a SQL procedure.

            h1. 2. MariaDB's CONNECT Implementation*
            One possible implementation could be as follows:
            h2. *2.1. Enable External Script Execution:* my.ini
            {code:txt}
            [mysqld]
            connect_enable_execute_external_script = {0|1}
            connect_python_exe_dir = "C:/Users/J-tel/AppData/Local/Programs/Python/Python36-32/python.exe"
            connect_r_exe_dir = "C:/Program Files/Microsoft/R Open/R-3.4.3/bin/Rscript.exe"
            connect_max_exe_parallel = {1(Default)|Number}
            {code}

            h2. *2.2 Script Repository Creation:* CREATE TABLE
            For using the _"CONNECT REMOTE_TABLE"_ Engine, the user will have to create an empty table as follows:

            {code:SQL}
            CREATE [OR REPLACE] [IF NOT EXISTS] TABLE tbl_name
              ENGINE = CONNECT
              TABLE_TYPE = REMOTE_TABLE
              LANGUAGE = {R|Python}
              [PARALLEL={0|1}]
              [WITH VERSION CONTROL];
            {code}

            The CONNECT Engine will the automatically create a table with the following column definition:
            {code:SQL}
            CREATE [OR REPLACE] [IF NOT EXISTS] TABLE tbl_name
            (
              CALL VARCHAR(128) PRIMARY KEY,
              SCRIPT TEXT
            )
              ENGINE = CONNECT
              TABLE_TYPE = REMOTE_TABLE
              LANGUAGE = {R|Python}
              [PARALLEL={0|1}]
              [WITH VERSION CONTROL];
            {code}

            h2. *2.3 Save Scripts into the Server:* INSERT INTO
            In order to save the R or Python Script to be called periodically from the MariaDB Server, the user will have 2 options:

            A. To Load the Script from a .TXT File into the Server:
            {code:SQL}
            INSERT INTO tbl_name (CALL, SCRIPT)
            VALUES("1-call_name", LOAD_FILE('/path/.../script_file_name.txt'));
            {code}

            B. To introduce the script directly through the IDE:
            {code:SQL}
            INSERT INTO tbl_name (CALL, SCRIPT)
            VALUES("1-call_name", QUOTE("... [R or Python Script] ..."));
            {code}

            SAVE A QUERY INT
            So when calling:

            SELECT
               *
            FROM
                db.t_Remote_Scripts
            WHERE
                CALL = "01 - Hello, World!"

            Connect would send the SCRIPT text column to the .exe on the PATH (e.g.: RScript exe) and retrieve the select table any warnings that occurred during the execution, that could eventually even be stored in another table as a Data Quality check, to see if the script has been executed correctly.

            In the remote R/Python script, the script will have to make use of a ODBC Connection for importing the data from MariaDB, analyze it, and send it back away.

            This engine feature could imply security issues, so it shall be disabled by default, or even have its own USER security permission.

            Thank you.

            Best,
            Juan Telleria
            Juan Juan Telleria made changes -
            Description h1. *1. Objective*
            To give the possibility to call the execution of external:
            * [Python|https://www.python.org/].
            * Or [R Statistical Programming Language|https://mran.microsoft.com/].

            Scripts directly from MariaDB, just as SQL Server, from 2017 Edition onward, allows to do so:
            * [sp_execute_external_script (Transact-SQL)|https://docs.microsoft.com/es-es/sql/relational-databases/system-stored-procedures/sp-execute-external-script-transact-sql?view=sql-server-2017]
            * [Run Python using T-SQL|https://docs.microsoft.com/en-us/sql/advanced-analytics/tutorials/run-python-using-t-sql?view=sql-server-2017]
            * [Using R functions with SQL Server data (R in SQL quickstart)|https://docs.microsoft.com/en-us/sql/advanced-analytics/tutorials/rtsql-using-r-functions-with-sql-server-data?view=sql-server-2017]

            The ultimate objetive is, for example, to trigger the execution of a remote Python/R Code for updating a predictive model in keras/h2o/tensorflow/... when new data is introduced into the database, or as part of a SQL procedure.

            h1. 2. MariaDB's CONNECT Implementation*
            One possible implementation could be as follows:
            h2. *2.1. Enable External Script Execution:* my.ini
            {code:txt}
            [mysqld]
            connect_enable_execute_external_script = {0|1}
            connect_python_exe_dir = "C:/Users/J-tel/AppData/Local/Programs/Python/Python36-32/python.exe"
            connect_r_exe_dir = "C:/Program Files/Microsoft/R Open/R-3.4.3/bin/Rscript.exe"
            connect_max_exe_parallel = {1(Default)|Number}
            {code}

            h2. *2.2 Script Repository Creation:* CREATE TABLE
            For using the _"CONNECT REMOTE_TABLE"_ Engine, the user will have to create an empty table as follows:

            {code:SQL}
            CREATE [OR REPLACE] [IF NOT EXISTS] TABLE tbl_name
              ENGINE = CONNECT
              TABLE_TYPE = REMOTE_TABLE
              LANGUAGE = {R|Python}
              [PARALLEL={0|1}]
              [WITH VERSION CONTROL];
            {code}

            The CONNECT Engine will the automatically create a table with the following column definition:
            {code:SQL}
            CREATE [OR REPLACE] [IF NOT EXISTS] TABLE tbl_name
            (
              CALL VARCHAR(128) PRIMARY KEY,
              SCRIPT TEXT
            )
              ENGINE = CONNECT
              TABLE_TYPE = REMOTE_TABLE
              LANGUAGE = {R|Python}
              [PARALLEL={0|1}]
              [WITH VERSION CONTROL];
            {code}

            h2. *2.3 Save Scripts into the Server:* INSERT INTO
            In order to save the R or Python Script to be called periodically from the MariaDB Server, the user will have 2 options:

            A. To Load the Script from a .TXT File into the Server:
            {code:SQL}
            INSERT INTO tbl_name (CALL, SCRIPT)
            VALUES("1-call_name", LOAD_FILE('/path/.../script_file_name.txt'));
            {code}

            B. To introduce the script directly through the IDE:
            {code:SQL}
            INSERT INTO tbl_name (CALL, SCRIPT)
            VALUES("1-call_name", QUOTE("... [R or Python Script] ..."));
            {code}

            SAVE A QUERY INT
            So when calling:

            SELECT
               *
            FROM
                db.t_Remote_Scripts
            WHERE
                CALL = "01 - Hello, World!"

            Connect would send the SCRIPT text column to the .exe on the PATH (e.g.: RScript exe) and retrieve the select table any warnings that occurred during the execution, that could eventually even be stored in another table as a Data Quality check, to see if the script has been executed correctly.

            In the remote R/Python script, the script will have to make use of a ODBC Connection for importing the data from MariaDB, analyze it, and send it back away.

            This engine feature could imply security issues, so it shall be disabled by default, or even have its own USER security permission.

            Thank you.

            Best,
            Juan Telleria
            h1. *1. Objective*
            To give the possibility to call the execution of external:
            * [Python|https://www.python.org/].
            * Or [R Statistical Programming Language|https://mran.microsoft.com/].

            Scripts directly from MariaDB, just as SQL Server, from 2017 Edition onward, allows to do so:
            * [sp_execute_external_script (Transact-SQL)|https://docs.microsoft.com/es-es/sql/relational-databases/system-stored-procedures/sp-execute-external-script-transact-sql?view=sql-server-2017]
            * [Run Python using T-SQL|https://docs.microsoft.com/en-us/sql/advanced-analytics/tutorials/run-python-using-t-sql?view=sql-server-2017]
            * [Using R functions with SQL Server data (R in SQL quickstart)|https://docs.microsoft.com/en-us/sql/advanced-analytics/tutorials/rtsql-using-r-functions-with-sql-server-data?view=sql-server-2017]

            The ultimate objetive is, for example, to trigger the execution of a remote Python/R Code for updating a predictive model in keras/h2o/tensorflow/... when new data is introduced into the database, or as part of a SQL procedure.

            h1. *2. MariaDB's CONNECT Implementation*
            One possible implementation could be as follows:
            h2. *2.1. Enable External Script Execution:* my.ini
            {code:txt}
            [mysqld]
            connect_enable_execute_external_script = {0|1}
            connect_python_exe_dir = "C:/Users/J-tel/AppData/Local/Programs/Python/Python36-32/python.exe"
            connect_r_exe_dir = "C:/Program Files/Microsoft/R Open/R-3.4.3/bin/Rscript.exe"
            connect_max_exe_parallel = {1(Default)|Number}
            {code}

            h2. *2.2 Script Repository Creation:* CREATE TABLE
            For using the _"CONNECT REMOTE_TABLE"_ Engine, the user will have to create an empty table as follows:

            {code:SQL}
            CREATE [OR REPLACE] [IF NOT EXISTS] TABLE tbl_name
              ENGINE = CONNECT
              TABLE_TYPE = REMOTE_TABLE
              LANGUAGE = {R|Python}
              [PARALLEL={0|1}]
              [WITH VERSION CONTROL];
            {code}

            The CONNECT Engine will the automatically create a table with the following column definition:
            {code:SQL}
            CREATE [OR REPLACE] [IF NOT EXISTS] TABLE tbl_name
            (
              CALL VARCHAR(128) PRIMARY KEY,
              SCRIPT TEXT
            )
              ENGINE = CONNECT
              TABLE_TYPE = REMOTE_TABLE
              LANGUAGE = {R|Python}
              [PARALLEL={0|1}]
              [WITH VERSION CONTROL];
            {code}

            h2. *2.3 Save Scripts into the Server:* INSERT INTO
            In order to save the R or Python Script to be called periodically from the MariaDB Server, the user will have 2 options:

            A. To Load the Script from a .TXT File into the Server:
            {code:SQL}
            INSERT INTO tbl_name (CALL, SCRIPT)
            VALUES("1-call_name", LOAD_FILE('/path/.../script_file_name.txt'));
            {code}

            B. To introduce the script directly through the IDE:
            {code:SQL}
            INSERT INTO tbl_name (CALL, SCRIPT)
            VALUES("1-call_name", QUOTE("... [R or Python Script] ..."));
            {code}

            SAVE A QUERY INT
            So when calling:

            SELECT
               *
            FROM
                db.t_Remote_Scripts
            WHERE
                CALL = "01 - Hello, World!"

            Connect would send the SCRIPT text column to the .exe on the PATH (e.g.: RScript exe) and retrieve the select table any warnings that occurred during the execution, that could eventually even be stored in another table as a Data Quality check, to see if the script has been executed correctly.

            In the remote R/Python script, the script will have to make use of a ODBC Connection for importing the data from MariaDB, analyze it, and send it back away.

            This engine feature could imply security issues, so it shall be disabled by default, or even have its own USER security permission.

            Thank you.

            Best,
            Juan Telleria
            Juan Juan Telleria made changes -
            Description h1. *1. Objective*
            To give the possibility to call the execution of external:
            * [Python|https://www.python.org/].
            * Or [R Statistical Programming Language|https://mran.microsoft.com/].

            Scripts directly from MariaDB, just as SQL Server, from 2017 Edition onward, allows to do so:
            * [sp_execute_external_script (Transact-SQL)|https://docs.microsoft.com/es-es/sql/relational-databases/system-stored-procedures/sp-execute-external-script-transact-sql?view=sql-server-2017]
            * [Run Python using T-SQL|https://docs.microsoft.com/en-us/sql/advanced-analytics/tutorials/run-python-using-t-sql?view=sql-server-2017]
            * [Using R functions with SQL Server data (R in SQL quickstart)|https://docs.microsoft.com/en-us/sql/advanced-analytics/tutorials/rtsql-using-r-functions-with-sql-server-data?view=sql-server-2017]

            The ultimate objetive is, for example, to trigger the execution of a remote Python/R Code for updating a predictive model in keras/h2o/tensorflow/... when new data is introduced into the database, or as part of a SQL procedure.

            h1. *2. MariaDB's CONNECT Implementation*
            One possible implementation could be as follows:
            h2. *2.1. Enable External Script Execution:* my.ini
            {code:txt}
            [mysqld]
            connect_enable_execute_external_script = {0|1}
            connect_python_exe_dir = "C:/Users/J-tel/AppData/Local/Programs/Python/Python36-32/python.exe"
            connect_r_exe_dir = "C:/Program Files/Microsoft/R Open/R-3.4.3/bin/Rscript.exe"
            connect_max_exe_parallel = {1(Default)|Number}
            {code}

            h2. *2.2 Script Repository Creation:* CREATE TABLE
            For using the _"CONNECT REMOTE_TABLE"_ Engine, the user will have to create an empty table as follows:

            {code:SQL}
            CREATE [OR REPLACE] [IF NOT EXISTS] TABLE tbl_name
              ENGINE = CONNECT
              TABLE_TYPE = REMOTE_TABLE
              LANGUAGE = {R|Python}
              [PARALLEL={0|1}]
              [WITH VERSION CONTROL];
            {code}

            The CONNECT Engine will the automatically create a table with the following column definition:
            {code:SQL}
            CREATE [OR REPLACE] [IF NOT EXISTS] TABLE tbl_name
            (
              CALL VARCHAR(128) PRIMARY KEY,
              SCRIPT TEXT
            )
              ENGINE = CONNECT
              TABLE_TYPE = REMOTE_TABLE
              LANGUAGE = {R|Python}
              [PARALLEL={0|1}]
              [WITH VERSION CONTROL];
            {code}

            h2. *2.3 Save Scripts into the Server:* INSERT INTO
            In order to save the R or Python Script to be called periodically from the MariaDB Server, the user will have 2 options:

            A. To Load the Script from a .TXT File into the Server:
            {code:SQL}
            INSERT INTO tbl_name (CALL, SCRIPT)
            VALUES("1-call_name", LOAD_FILE('/path/.../script_file_name.txt'));
            {code}

            B. To introduce the script directly through the IDE:
            {code:SQL}
            INSERT INTO tbl_name (CALL, SCRIPT)
            VALUES("1-call_name", QUOTE("... [R or Python Script] ..."));
            {code}

            SAVE A QUERY INT
            So when calling:

            SELECT
               *
            FROM
                db.t_Remote_Scripts
            WHERE
                CALL = "01 - Hello, World!"

            Connect would send the SCRIPT text column to the .exe on the PATH (e.g.: RScript exe) and retrieve the select table any warnings that occurred during the execution, that could eventually even be stored in another table as a Data Quality check, to see if the script has been executed correctly.

            In the remote R/Python script, the script will have to make use of a ODBC Connection for importing the data from MariaDB, analyze it, and send it back away.

            This engine feature could imply security issues, so it shall be disabled by default, or even have its own USER security permission.

            Thank you.

            Best,
            Juan Telleria
            h1. *1. Objective*
            To give the possibility to call the execution of external:
            * [Python|https://www.python.org/].
            * Or [R Statistical Programming Language|https://mran.microsoft.com/].

            Scripts directly from MariaDB, just as SQL Server, from 2017 Edition onward, allows to do so:
            * [sp_execute_external_script (Transact-SQL)|https://docs.microsoft.com/es-es/sql/relational-databases/system-stored-procedures/sp-execute-external-script-transact-sql?view=sql-server-2017]
            * [Run Python using T-SQL|https://docs.microsoft.com/en-us/sql/advanced-analytics/tutorials/run-python-using-t-sql?view=sql-server-2017]
            * [Using R functions with SQL Server data (R in SQL quickstart)|https://docs.microsoft.com/en-us/sql/advanced-analytics/tutorials/rtsql-using-r-functions-with-sql-server-data?view=sql-server-2017]

            The ultimate objetive is, for example, to trigger the execution of a remote Python/R Code for updating a predictive model in keras/h2o/tensorflow/... when new data is introduced into the database, or as part of a SQL procedure.

            h1. *2. MariaDB's CONNECT Implementation*
            One possible implementation could be as follows:
            h2. *2.1. Enable External Script Execution:* my.ini
            {code:txt}
            [mysqld]
            connect_enable_execute_external_script = {0|1}
            connect_python_exe_dir = "C:/Users/J-tel/AppData/Local/Programs/Python/Python36-32/python.exe"
            connect_r_exe_dir = "C:/Program Files/Microsoft/R Open/R-3.4.3/bin/Rscript.exe"
            connect_max_exe_parallel = {1(Default)|Number}
            {code}

            h2. *2.2 Script Repository Creation:* CREATE TABLE
            For using the _"CONNECT REMOTE_TABLE"_ Engine, the user will have to create an empty table as follows:

            {code:SQL}
            CREATE [OR REPLACE] [IF NOT EXISTS] TABLE tbl_name
              ENGINE = CONNECT
              TABLE_TYPE = REMOTE_TABLE
              LANGUAGE = {R|Python}
              [PARALLEL={0|1}]
              [WITH VERSION CONTROL];
            {code}

            The CONNECT Engine will the automatically create a table with the following column definition:
            {code:SQL}
            CREATE [OR REPLACE] [IF NOT EXISTS] TABLE tbl_name
            (
              CALL VARCHAR(128) PRIMARY KEY,
              SCRIPT TEXT
            )
              ENGINE = CONNECT
              TABLE_TYPE = REMOTE_TABLE
              LANGUAGE = {R|Python}
              [PARALLEL={0|1}]
              [WITH VERSION CONTROL];
            {code}

            h2. *2.3 Save Scripts into the Repository:* INSERT INTO
            In order to save the R or Python Script to be called periodically from the MariaDB Server, the user will have 2 options:

            A. To Load the Script from a .TXT File into the Server:
            {code:SQL}
            INSERT INTO tbl_name (CALL, SCRIPT)
            VALUES("1-call_name", LOAD_FILE('/path/.../script_file_name.txt'));
            {code}

            B. To introduce the script directly through the IDE:
            {code:SQL}
            INSERT INTO tbl_name (CALL, SCRIPT)
            VALUES("1-call_name", QUOTE("... [R or Python Script] ..."));
            {code}

            SAVE A QUERY INT
            So when calling:

            SELECT
               *
            FROM
                db.t_Remote_Scripts
            WHERE
                CALL = "01 - Hello, World!"

            Connect would send the SCRIPT text column to the .exe on the PATH (e.g.: RScript exe) and retrieve the select table any warnings that occurred during the execution, that could eventually even be stored in another table as a Data Quality check, to see if the script has been executed correctly.

            In the remote R/Python script, the script will have to make use of a ODBC Connection for importing the data from MariaDB, analyze it, and send it back away.

            This engine feature could imply security issues, so it shall be disabled by default, or even have its own USER security permission.

            Thank you.

            Best,
            Juan Telleria
            Juan Juan Telleria made changes -
            Description h1. *1. Objective*
            To give the possibility to call the execution of external:
            * [Python|https://www.python.org/].
            * Or [R Statistical Programming Language|https://mran.microsoft.com/].

            Scripts directly from MariaDB, just as SQL Server, from 2017 Edition onward, allows to do so:
            * [sp_execute_external_script (Transact-SQL)|https://docs.microsoft.com/es-es/sql/relational-databases/system-stored-procedures/sp-execute-external-script-transact-sql?view=sql-server-2017]
            * [Run Python using T-SQL|https://docs.microsoft.com/en-us/sql/advanced-analytics/tutorials/run-python-using-t-sql?view=sql-server-2017]
            * [Using R functions with SQL Server data (R in SQL quickstart)|https://docs.microsoft.com/en-us/sql/advanced-analytics/tutorials/rtsql-using-r-functions-with-sql-server-data?view=sql-server-2017]

            The ultimate objetive is, for example, to trigger the execution of a remote Python/R Code for updating a predictive model in keras/h2o/tensorflow/... when new data is introduced into the database, or as part of a SQL procedure.

            h1. *2. MariaDB's CONNECT Implementation*
            One possible implementation could be as follows:
            h2. *2.1. Enable External Script Execution:* my.ini
            {code:txt}
            [mysqld]
            connect_enable_execute_external_script = {0|1}
            connect_python_exe_dir = "C:/Users/J-tel/AppData/Local/Programs/Python/Python36-32/python.exe"
            connect_r_exe_dir = "C:/Program Files/Microsoft/R Open/R-3.4.3/bin/Rscript.exe"
            connect_max_exe_parallel = {1(Default)|Number}
            {code}

            h2. *2.2 Script Repository Creation:* CREATE TABLE
            For using the _"CONNECT REMOTE_TABLE"_ Engine, the user will have to create an empty table as follows:

            {code:SQL}
            CREATE [OR REPLACE] [IF NOT EXISTS] TABLE tbl_name
              ENGINE = CONNECT
              TABLE_TYPE = REMOTE_TABLE
              LANGUAGE = {R|Python}
              [PARALLEL={0|1}]
              [WITH VERSION CONTROL];
            {code}

            The CONNECT Engine will the automatically create a table with the following column definition:
            {code:SQL}
            CREATE [OR REPLACE] [IF NOT EXISTS] TABLE tbl_name
            (
              CALL VARCHAR(128) PRIMARY KEY,
              SCRIPT TEXT
            )
              ENGINE = CONNECT
              TABLE_TYPE = REMOTE_TABLE
              LANGUAGE = {R|Python}
              [PARALLEL={0|1}]
              [WITH VERSION CONTROL];
            {code}

            h2. *2.3 Save Scripts into the Repository:* INSERT INTO
            In order to save the R or Python Script to be called periodically from the MariaDB Server, the user will have 2 options:

            A. To Load the Script from a .TXT File into the Server:
            {code:SQL}
            INSERT INTO tbl_name (CALL, SCRIPT)
            VALUES("1-call_name", LOAD_FILE('/path/.../script_file_name.txt'));
            {code}

            B. To introduce the script directly through the IDE:
            {code:SQL}
            INSERT INTO tbl_name (CALL, SCRIPT)
            VALUES("1-call_name", QUOTE("... [R or Python Script] ..."));
            {code}

            SAVE A QUERY INT
            So when calling:

            SELECT
               *
            FROM
                db.t_Remote_Scripts
            WHERE
                CALL = "01 - Hello, World!"

            Connect would send the SCRIPT text column to the .exe on the PATH (e.g.: RScript exe) and retrieve the select table any warnings that occurred during the execution, that could eventually even be stored in another table as a Data Quality check, to see if the script has been executed correctly.

            In the remote R/Python script, the script will have to make use of a ODBC Connection for importing the data from MariaDB, analyze it, and send it back away.

            This engine feature could imply security issues, so it shall be disabled by default, or even have its own USER security permission.

            Thank you.

            Best,
            Juan Telleria
            h1. *1. Objective*
            To give the possibility to call the execution of external:
            * [Python|https://www.python.org/].
            * Or [R Statistical Programming Language|https://mran.microsoft.com/].

            Scripts directly from MariaDB, just as SQL Server, from 2017 Edition onward, allows to do so:
            * [sp_execute_external_script (Transact-SQL)|https://docs.microsoft.com/es-es/sql/relational-databases/system-stored-procedures/sp-execute-external-script-transact-sql?view=sql-server-2017]
            * [Run Python using T-SQL|https://docs.microsoft.com/en-us/sql/advanced-analytics/tutorials/run-python-using-t-sql?view=sql-server-2017]
            * [Using R functions with SQL Server data (R in SQL quickstart)|https://docs.microsoft.com/en-us/sql/advanced-analytics/tutorials/rtsql-using-r-functions-with-sql-server-data?view=sql-server-2017]

            The ultimate objetive is, for example, to trigger the execution of a remote Python/R Code for updating a predictive model in keras/h2o/tensorflow/... when new data is introduced into the database, or as part of a SQL procedure.

            h1. *2. MariaDB's CONNECT Implementation*
            One possible implementation could be as follows:
            h2. *2.1. Enable External Script Execution:* my.ini
            {code:txt}
            [mysqld]
            connect_enable_execute_external_script = {0|1}
            connect_python_exe_dir = "C:/Users/J-tel/AppData/Local/Programs/Python/Python36-32/python.exe"
            connect_r_exe_dir = "C:/Program Files/Microsoft/R Open/R-3.4.3/bin/Rscript.exe"
            connect_max_exe_parallel = {1(Default)|Number}
            {code}

            h2. *2.2 Script Repository Creation:* CREATE TABLE
            For using the _"CONNECT REMOTE_TABLE"_ Engine, the user will have to create an empty table as follows:

            {code:SQL}
            CREATE [OR REPLACE] [IF NOT EXISTS] TABLE tbl_name
              ENGINE = CONNECT
              TABLE_TYPE = REMOTE_TABLE
              LANGUAGE = {R|Python}
              [PARALLEL={0|1}]
              [WITH VERSION CONTROL];
            {code}

            The CONNECT Engine will the automatically create a table with the following column definition:
            {code:SQL}
            CREATE [OR REPLACE] [IF NOT EXISTS] TABLE tbl_name
            (
              CALL VARCHAR(128) PRIMARY KEY,
              SCRIPT TEXT
            )
              ENGINE = CONNECT
              TABLE_TYPE = REMOTE_TABLE
              LANGUAGE = {R|Python}
              [PARALLEL={0|1}]
              [WITH VERSION CONTROL];
            {code}

            h2. *2.3 Save Scripts into the Repository:* INSERT INTO
            In order to save the R or Python Script to be called periodically from the MariaDB Server, the user will have 2 options:

            A. To Load the Script from a .TXT File into the Server:
            {code:SQL}
            INSERT INTO tbl_name (CALL, SCRIPT)
            VALUES("1-call_name", LOAD_FILE('/path/.../script_file_name.txt'));
            {code}

            B. To introduce the script directly through the IDE:
            {code:SQL}
            INSERT INTO tbl_name (CALL, SCRIPT)
            VALUES("1-call_name", QUOTE("... [R or Python Script] ..."));
            {code}

            h2. *3. Call a Script:* SELECT

            SAVE A QUERY INT
            So when calling:

            SELECT
               *
            FROM
                db.t_Remote_Scripts
            WHERE
                CALL = "01 - Hello, World!"

            Connect would send the SCRIPT text column to the .exe on the PATH (e.g.: RScript exe) and retrieve the select table any warnings that occurred during the execution, that could eventually even be stored in another table as a Data Quality check, to see if the script has been executed correctly.

            In the remote R/Python script, the script will have to make use of a ODBC Connection for importing the data from MariaDB, analyze it, and send it back away.

            This engine feature could imply security issues, so it shall be disabled by default, or even have its own USER security permission.

            Thank you.

            Best,
            Juan Telleria
            Juan Juan Telleria made changes -
            Description h1. *1. Objective*
            To give the possibility to call the execution of external:
            * [Python|https://www.python.org/].
            * Or [R Statistical Programming Language|https://mran.microsoft.com/].

            Scripts directly from MariaDB, just as SQL Server, from 2017 Edition onward, allows to do so:
            * [sp_execute_external_script (Transact-SQL)|https://docs.microsoft.com/es-es/sql/relational-databases/system-stored-procedures/sp-execute-external-script-transact-sql?view=sql-server-2017]
            * [Run Python using T-SQL|https://docs.microsoft.com/en-us/sql/advanced-analytics/tutorials/run-python-using-t-sql?view=sql-server-2017]
            * [Using R functions with SQL Server data (R in SQL quickstart)|https://docs.microsoft.com/en-us/sql/advanced-analytics/tutorials/rtsql-using-r-functions-with-sql-server-data?view=sql-server-2017]

            The ultimate objetive is, for example, to trigger the execution of a remote Python/R Code for updating a predictive model in keras/h2o/tensorflow/... when new data is introduced into the database, or as part of a SQL procedure.

            h1. *2. MariaDB's CONNECT Implementation*
            One possible implementation could be as follows:
            h2. *2.1. Enable External Script Execution:* my.ini
            {code:txt}
            [mysqld]
            connect_enable_execute_external_script = {0|1}
            connect_python_exe_dir = "C:/Users/J-tel/AppData/Local/Programs/Python/Python36-32/python.exe"
            connect_r_exe_dir = "C:/Program Files/Microsoft/R Open/R-3.4.3/bin/Rscript.exe"
            connect_max_exe_parallel = {1(Default)|Number}
            {code}

            h2. *2.2 Script Repository Creation:* CREATE TABLE
            For using the _"CONNECT REMOTE_TABLE"_ Engine, the user will have to create an empty table as follows:

            {code:SQL}
            CREATE [OR REPLACE] [IF NOT EXISTS] TABLE tbl_name
              ENGINE = CONNECT
              TABLE_TYPE = REMOTE_TABLE
              LANGUAGE = {R|Python}
              [PARALLEL={0|1}]
              [WITH VERSION CONTROL];
            {code}

            The CONNECT Engine will the automatically create a table with the following column definition:
            {code:SQL}
            CREATE [OR REPLACE] [IF NOT EXISTS] TABLE tbl_name
            (
              CALL VARCHAR(128) PRIMARY KEY,
              SCRIPT TEXT
            )
              ENGINE = CONNECT
              TABLE_TYPE = REMOTE_TABLE
              LANGUAGE = {R|Python}
              [PARALLEL={0|1}]
              [WITH VERSION CONTROL];
            {code}

            h2. *2.3 Save Scripts into the Repository:* INSERT INTO
            In order to save the R or Python Script to be called periodically from the MariaDB Server, the user will have 2 options:

            A. To Load the Script from a .TXT File into the Server:
            {code:SQL}
            INSERT INTO tbl_name (CALL, SCRIPT)
            VALUES("1-call_name", LOAD_FILE('/path/.../script_file_name.txt'));
            {code}

            B. To introduce the script directly through the IDE:
            {code:SQL}
            INSERT INTO tbl_name (CALL, SCRIPT)
            VALUES("1-call_name", QUOTE("... [R or Python Script] ..."));
            {code}

            h2. *3. Call a Script:* SELECT

            SAVE A QUERY INT
            So when calling:

            SELECT
               *
            FROM
                db.t_Remote_Scripts
            WHERE
                CALL = "01 - Hello, World!"

            Connect would send the SCRIPT text column to the .exe on the PATH (e.g.: RScript exe) and retrieve the select table any warnings that occurred during the execution, that could eventually even be stored in another table as a Data Quality check, to see if the script has been executed correctly.

            In the remote R/Python script, the script will have to make use of a ODBC Connection for importing the data from MariaDB, analyze it, and send it back away.

            This engine feature could imply security issues, so it shall be disabled by default, or even have its own USER security permission.

            Thank you.

            Best,
            Juan Telleria
            h1. *1. Objective*
            To give the possibility to call the execution of external:
            * [Python|https://www.python.org/].
            * Or [R Statistical Programming Language|https://mran.microsoft.com/].

            Scripts directly from MariaDB, just as SQL Server, from 2017 Edition onward, allows to do so:
            * [sp_execute_external_script (Transact-SQL)|https://docs.microsoft.com/es-es/sql/relational-databases/system-stored-procedures/sp-execute-external-script-transact-sql?view=sql-server-2017]
            * [Run Python using T-SQL|https://docs.microsoft.com/en-us/sql/advanced-analytics/tutorials/run-python-using-t-sql?view=sql-server-2017]
            * [Using R functions with SQL Server data (R in SQL quickstart)|https://docs.microsoft.com/en-us/sql/advanced-analytics/tutorials/rtsql-using-r-functions-with-sql-server-data?view=sql-server-2017]

            The ultimate objetive is, for example, to trigger the execution of a remote Python/R Code for updating a predictive model in keras/h2o/tensorflow/... when new data is introduced into the database, or as part of a SQL procedure.

            h1. *2. MariaDB's CONNECT Implementation*
            One possible implementation could be as follows:
            h2. *2.1. Enable External Script Execution:* my.ini
            {code:txt}
            [mysqld]
            connect_enable_execute_external_script = {0|1}
            connect_python_exe_dir = "C:/Users/J-tel/AppData/Local/Programs/Python/Python36-32/python.exe"
            connect_r_exe_dir = "C:/Program Files/Microsoft/R Open/R-3.4.3/bin/Rscript.exe"
            connect_max_exe_parallel = {1(Default)|Number}
            {code}

            h2. *2.2 Script Repository Creation:* CREATE TABLE
            For using the _"CONNECT REMOTE_TABLE"_ Engine, the user will have to create an empty table as follows:

            {code:SQL}
            CREATE [OR REPLACE] [IF NOT EXISTS] TABLE tbl_name
              ENGINE = CONNECT
              TABLE_TYPE = REMOTE_TABLE
              LANGUAGE = {R|Python}
              [PARALLEL={0|1}]
              [WITH VERSION CONTROL];
            {code}

            The CONNECT Engine will the automatically create a table with the following column definition:
            {code:SQL}
            CREATE [OR REPLACE] [IF NOT EXISTS] TABLE tbl_name
            (
              CALL VARCHAR(128) PRIMARY KEY,
              SCRIPT TEXT
            )
              ENGINE = CONNECT
              TABLE_TYPE = REMOTE_TABLE
              LANGUAGE = {R|Python}
              [PARALLEL={0|1}]
              [WITH VERSION CONTROL];
            {code}

            h2. *2.3 Save Scripts into the Repository:* INSERT INTO
            In order to save the R or Python Script to be called periodically from the MariaDB Server, the user will have 2 options:

            A. To Load the Script from a .TXT File into the Server:
            {code:SQL}
            INSERT INTO tbl_name (CALL, SCRIPT)
            VALUES("1-call_name", LOAD_FILE('/path/.../script_file_name.txt'));
            {code}

            B. To introduce the script directly through the IDE:
            {code:SQL}
            INSERT INTO tbl_name (CALL, SCRIPT)
            VALUES("1-call_name", QUOTE("... [R or Python Script] ..."));
            {code}

            h2. *3. Call a Script:* SELECT
            There will be 3 main ways of calling a R / Python Script from MariaDB:

            A. To Import an R / Python Script on the fly an execute it directly on the Server:
            {code:SQL}
            SELECT
              LOAD_FILE('/path/.../script_file_name.txt'))
            FROM
              tbl_name;
            {code}


            SAVE A QUERY INT
            So when calling:

            SELECT
               *
            FROM
                db.t_Remote_Scripts
            WHERE
                CALL = "01 - Hello, World!"

            Connect would send the SCRIPT text column to the .exe on the PATH (e.g.: RScript exe) and retrieve the select table any warnings that occurred during the execution, that could eventually even be stored in another table as a Data Quality check, to see if the script has been executed correctly.

            In the remote R/Python script, the script will have to make use of a ODBC Connection for importing the data from MariaDB, analyze it, and send it back away.

            This engine feature could imply security issues, so it shall be disabled by default, or even have its own USER security permission.

            Thank you.

            Best,
            Juan Telleria
            Juan Juan Telleria made changes -
            Description h1. *1. Objective*
            To give the possibility to call the execution of external:
            * [Python|https://www.python.org/].
            * Or [R Statistical Programming Language|https://mran.microsoft.com/].

            Scripts directly from MariaDB, just as SQL Server, from 2017 Edition onward, allows to do so:
            * [sp_execute_external_script (Transact-SQL)|https://docs.microsoft.com/es-es/sql/relational-databases/system-stored-procedures/sp-execute-external-script-transact-sql?view=sql-server-2017]
            * [Run Python using T-SQL|https://docs.microsoft.com/en-us/sql/advanced-analytics/tutorials/run-python-using-t-sql?view=sql-server-2017]
            * [Using R functions with SQL Server data (R in SQL quickstart)|https://docs.microsoft.com/en-us/sql/advanced-analytics/tutorials/rtsql-using-r-functions-with-sql-server-data?view=sql-server-2017]

            The ultimate objetive is, for example, to trigger the execution of a remote Python/R Code for updating a predictive model in keras/h2o/tensorflow/... when new data is introduced into the database, or as part of a SQL procedure.

            h1. *2. MariaDB's CONNECT Implementation*
            One possible implementation could be as follows:
            h2. *2.1. Enable External Script Execution:* my.ini
            {code:txt}
            [mysqld]
            connect_enable_execute_external_script = {0|1}
            connect_python_exe_dir = "C:/Users/J-tel/AppData/Local/Programs/Python/Python36-32/python.exe"
            connect_r_exe_dir = "C:/Program Files/Microsoft/R Open/R-3.4.3/bin/Rscript.exe"
            connect_max_exe_parallel = {1(Default)|Number}
            {code}

            h2. *2.2 Script Repository Creation:* CREATE TABLE
            For using the _"CONNECT REMOTE_TABLE"_ Engine, the user will have to create an empty table as follows:

            {code:SQL}
            CREATE [OR REPLACE] [IF NOT EXISTS] TABLE tbl_name
              ENGINE = CONNECT
              TABLE_TYPE = REMOTE_TABLE
              LANGUAGE = {R|Python}
              [PARALLEL={0|1}]
              [WITH VERSION CONTROL];
            {code}

            The CONNECT Engine will the automatically create a table with the following column definition:
            {code:SQL}
            CREATE [OR REPLACE] [IF NOT EXISTS] TABLE tbl_name
            (
              CALL VARCHAR(128) PRIMARY KEY,
              SCRIPT TEXT
            )
              ENGINE = CONNECT
              TABLE_TYPE = REMOTE_TABLE
              LANGUAGE = {R|Python}
              [PARALLEL={0|1}]
              [WITH VERSION CONTROL];
            {code}

            h2. *2.3 Save Scripts into the Repository:* INSERT INTO
            In order to save the R or Python Script to be called periodically from the MariaDB Server, the user will have 2 options:

            A. To Load the Script from a .TXT File into the Server:
            {code:SQL}
            INSERT INTO tbl_name (CALL, SCRIPT)
            VALUES("1-call_name", LOAD_FILE('/path/.../script_file_name.txt'));
            {code}

            B. To introduce the script directly through the IDE:
            {code:SQL}
            INSERT INTO tbl_name (CALL, SCRIPT)
            VALUES("1-call_name", QUOTE("... [R or Python Script] ..."));
            {code}

            h2. *3. Call a Script:* SELECT
            There will be 3 main ways of calling a R / Python Script from MariaDB:

            A. To Import an R / Python Script on the fly an execute it directly on the Server:
            {code:SQL}
            SELECT
              LOAD_FILE('/path/.../script_file_name.txt'))
            FROM
              tbl_name;
            {code}


            SAVE A QUERY INT
            So when calling:

            SELECT
               *
            FROM
                db.t_Remote_Scripts
            WHERE
                CALL = "01 - Hello, World!"

            Connect would send the SCRIPT text column to the .exe on the PATH (e.g.: RScript exe) and retrieve the select table any warnings that occurred during the execution, that could eventually even be stored in another table as a Data Quality check, to see if the script has been executed correctly.

            In the remote R/Python script, the script will have to make use of a ODBC Connection for importing the data from MariaDB, analyze it, and send it back away.

            This engine feature could imply security issues, so it shall be disabled by default, or even have its own USER security permission.

            Thank you.

            Best,
            Juan Telleria
            h1. *1. Objective*
            To give the possibility to call the execution of external:
            * [Python|https://www.python.org/].
            * Or [R Statistical Programming Language|https://mran.microsoft.com/].

            Scripts directly from MariaDB, just as SQL Server, from 2017 Edition onward, allows to do so:
            * [sp_execute_external_script (Transact-SQL)|https://docs.microsoft.com/es-es/sql/relational-databases/system-stored-procedures/sp-execute-external-script-transact-sql?view=sql-server-2017]
            * [Run Python using T-SQL|https://docs.microsoft.com/en-us/sql/advanced-analytics/tutorials/run-python-using-t-sql?view=sql-server-2017]
            * [Using R functions with SQL Server data (R in SQL quickstart)|https://docs.microsoft.com/en-us/sql/advanced-analytics/tutorials/rtsql-using-r-functions-with-sql-server-data?view=sql-server-2017]

            The ultimate objetive is, for example, to trigger the execution of a remote Python/R Code for updating a predictive model in keras/h2o/tensorflow/... when new data is introduced into the database, or as part of a SQL procedure.

            h1. *2. MariaDB's CONNECT Implementation*
            One possible implementation could be as follows:
            h2. *2.1. Enable External Script Execution:* my.ini
            {code:txt}
            [mysqld]
            connect_enable_execute_external_script = {0|1}
            connect_python_exe_dir = "C:/Users/J-tel/AppData/Local/Programs/Python/Python36-32/python.exe"
            connect_r_exe_dir = "C:/Program Files/Microsoft/R Open/R-3.4.3/bin/Rscript.exe"
            connect_max_exe_parallel = {1(Default)|Number}
            {code}

            h2. *2.2 Script Repository Creation:* CREATE TABLE
            For using the _"CONNECT REMOTE_TABLE"_ Engine, the user will have to create an empty table as follows:

            {code:SQL}
            CREATE [OR REPLACE] [IF NOT EXISTS] TABLE tbl_name
              ENGINE = CONNECT
              TABLE_TYPE = REMOTE_TABLE
              LANGUAGE = {R|Python}
              [PARALLEL={0|1}]
              [WITH VERSION CONTROL];
            {code}

            The CONNECT Engine will the automatically create a table with the following column definition:
            {code:SQL}
            CREATE [OR REPLACE] [IF NOT EXISTS] TABLE tbl_name
            (
              CALL VARCHAR(128) PRIMARY KEY,
              SCRIPT TEXT
            )
              ENGINE = CONNECT
              TABLE_TYPE = REMOTE_TABLE
              LANGUAGE = {R|Python}
              [PARALLEL={0|1}]
              [WITH VERSION CONTROL];
            {code}

            h2. *2.3 Save Scripts into the Repository:* INSERT INTO
            In order to save the R or Python Script to be called periodically from the MariaDB Server, the user will have 2 options:

            A. To Load the Script from a .TXT File into the Server:
            {code:SQL}
            INSERT INTO tbl_name (CALL, SCRIPT)
            VALUES("1-call_name", LOAD_FILE('/path/.../script_file_name.txt'));
            {code}

            B. To introduce the script directly through the IDE:
            {code:SQL}
            INSERT INTO tbl_name (CALL, SCRIPT)
            VALUES("1-call_name", QUOTE("... [R or Python Script] ..."));
            {code}

            h2. *3. Call a Script:* SELECT
            There will be 3 main ways of calling a R / Python Script from MariaDB:

            A. To Import an R / Python Script on the fly an call it from MariaDB Server:
            {code:SQL}
            SELECT
              LOAD_FILE('/path/.../script_file_name.txt'))
            FROM
              tbl_name;
            {code}

            B. To write a Script directly in the IDE and call it from MariaDB Server:
            {code:SQL}
            SELECT
              QUOTE("... [R or Python Script] ...")
            FROM
              tbl_name;
            {code}

            C. To call a previously saved script:
            {code:SQL}
            SELECT
              *
            FROM
              tbl_name
            WHERE
              CALL = "1-call_name";
            {code}


            Connect would send the SCRIPT text column to the .exe on the PATH (e.g.: RScript exe) and retrieve the select table any warnings that occurred during the execution, that could eventually even be stored in another table as a Data Quality check, to see if the script has been executed correctly.

            In the remote R/Python script, the script will have to make use of a ODBC Connection for importing the data from MariaDB, analyze it, and send it back away.

            This engine feature could imply security issues, so it shall be disabled by default, or even have its own USER security permission.

            Thank you.

            Best,
            Juan Telleria
            Juan Juan Telleria made changes -
            Description h1. *1. Objective*
            To give the possibility to call the execution of external:
            * [Python|https://www.python.org/].
            * Or [R Statistical Programming Language|https://mran.microsoft.com/].

            Scripts directly from MariaDB, just as SQL Server, from 2017 Edition onward, allows to do so:
            * [sp_execute_external_script (Transact-SQL)|https://docs.microsoft.com/es-es/sql/relational-databases/system-stored-procedures/sp-execute-external-script-transact-sql?view=sql-server-2017]
            * [Run Python using T-SQL|https://docs.microsoft.com/en-us/sql/advanced-analytics/tutorials/run-python-using-t-sql?view=sql-server-2017]
            * [Using R functions with SQL Server data (R in SQL quickstart)|https://docs.microsoft.com/en-us/sql/advanced-analytics/tutorials/rtsql-using-r-functions-with-sql-server-data?view=sql-server-2017]

            The ultimate objetive is, for example, to trigger the execution of a remote Python/R Code for updating a predictive model in keras/h2o/tensorflow/... when new data is introduced into the database, or as part of a SQL procedure.

            h1. *2. MariaDB's CONNECT Implementation*
            One possible implementation could be as follows:
            h2. *2.1. Enable External Script Execution:* my.ini
            {code:txt}
            [mysqld]
            connect_enable_execute_external_script = {0|1}
            connect_python_exe_dir = "C:/Users/J-tel/AppData/Local/Programs/Python/Python36-32/python.exe"
            connect_r_exe_dir = "C:/Program Files/Microsoft/R Open/R-3.4.3/bin/Rscript.exe"
            connect_max_exe_parallel = {1(Default)|Number}
            {code}

            h2. *2.2 Script Repository Creation:* CREATE TABLE
            For using the _"CONNECT REMOTE_TABLE"_ Engine, the user will have to create an empty table as follows:

            {code:SQL}
            CREATE [OR REPLACE] [IF NOT EXISTS] TABLE tbl_name
              ENGINE = CONNECT
              TABLE_TYPE = REMOTE_TABLE
              LANGUAGE = {R|Python}
              [PARALLEL={0|1}]
              [WITH VERSION CONTROL];
            {code}

            The CONNECT Engine will the automatically create a table with the following column definition:
            {code:SQL}
            CREATE [OR REPLACE] [IF NOT EXISTS] TABLE tbl_name
            (
              CALL VARCHAR(128) PRIMARY KEY,
              SCRIPT TEXT
            )
              ENGINE = CONNECT
              TABLE_TYPE = REMOTE_TABLE
              LANGUAGE = {R|Python}
              [PARALLEL={0|1}]
              [WITH VERSION CONTROL];
            {code}

            h2. *2.3 Save Scripts into the Repository:* INSERT INTO
            In order to save the R or Python Script to be called periodically from the MariaDB Server, the user will have 2 options:

            A. To Load the Script from a .TXT File into the Server:
            {code:SQL}
            INSERT INTO tbl_name (CALL, SCRIPT)
            VALUES("1-call_name", LOAD_FILE('/path/.../script_file_name.txt'));
            {code}

            B. To introduce the script directly through the IDE:
            {code:SQL}
            INSERT INTO tbl_name (CALL, SCRIPT)
            VALUES("1-call_name", QUOTE("... [R or Python Script] ..."));
            {code}

            h2. *3. Call a Script:* SELECT
            There will be 3 main ways of calling a R / Python Script from MariaDB:

            A. To Import an R / Python Script on the fly an call it from MariaDB Server:
            {code:SQL}
            SELECT
              LOAD_FILE('/path/.../script_file_name.txt'))
            FROM
              tbl_name;
            {code}

            B. To write a Script directly in the IDE and call it from MariaDB Server:
            {code:SQL}
            SELECT
              QUOTE("... [R or Python Script] ...")
            FROM
              tbl_name;
            {code}

            C. To call a previously saved script:
            {code:SQL}
            SELECT
              *
            FROM
              tbl_name
            WHERE
              CALL = "1-call_name";
            {code}


            Connect would send the SCRIPT text column to the .exe on the PATH (e.g.: RScript exe) and retrieve the select table any warnings that occurred during the execution, that could eventually even be stored in another table as a Data Quality check, to see if the script has been executed correctly.

            In the remote R/Python script, the script will have to make use of a ODBC Connection for importing the data from MariaDB, analyze it, and send it back away.

            This engine feature could imply security issues, so it shall be disabled by default, or even have its own USER security permission.

            Thank you.

            Best,
            Juan Telleria
            h1. *1. Objective*
            To give the possibility to call the execution of external:
            * [Python|https://www.python.org/].
            * Or [R Statistical Programming Language|https://mran.microsoft.com/].

            Scripts directly from MariaDB, just as SQL Server, from 2017 Edition onward, allows to do so:
            * [sp_execute_external_script (Transact-SQL)|https://docs.microsoft.com/es-es/sql/relational-databases/system-stored-procedures/sp-execute-external-script-transact-sql?view=sql-server-2017]
            * [Run Python using T-SQL|https://docs.microsoft.com/en-us/sql/advanced-analytics/tutorials/run-python-using-t-sql?view=sql-server-2017]
            * [Using R functions with SQL Server data (R in SQL quickstart)|https://docs.microsoft.com/en-us/sql/advanced-analytics/tutorials/rtsql-using-r-functions-with-sql-server-data?view=sql-server-2017]

            The ultimate objetive is, for example, to trigger the execution of a remote Python/R Code for updating a predictive model in keras/h2o/tensorflow/... when new data is introduced into the database, or as part of a SQL procedure.

            h1. *2. MariaDB's CONNECT Implementation*
            One possible implementation could be as follows:
            h2. *2.1. Enable External Script Execution:* my.ini
            {code:txt}
            [mysqld]
            connect_enable_execute_external_script = {0|1}
            connect_python_exe_dir = "C:/Users/J-tel/AppData/Local/Programs/Python/Python36-32/python.exe"
            connect_r_exe_dir = "C:/Program Files/Microsoft/R Open/R-3.4.3/bin/Rscript.exe"
            connect_max_exe_parallel = {1(Default)|Number}
            {code}

            h2. *2.2 Script Repository Creation:* CREATE TABLE
            For using the _"CONNECT REMOTE_TABLE"_ Engine, the user will have to create an empty table as follows:

            {code:SQL}
            CREATE [OR REPLACE] [IF NOT EXISTS] TABLE tbl_name
              ENGINE = CONNECT
              TABLE_TYPE = REMOTE_TABLE
              LANGUAGE = {R|Python}
              [PARALLEL={0|1}]
              [WITH VERSION CONTROL];
            {code}

            The CONNECT Engine will the automatically create a table with the following column definition:
            {code:SQL}
            CREATE [OR REPLACE] [IF NOT EXISTS] TABLE tbl_name
            (
              CALL VARCHAR(128) PRIMARY KEY,
              SCRIPT TEXT
            )
              ENGINE = CONNECT
              TABLE_TYPE = REMOTE_TABLE
              LANGUAGE = {R|Python}
              [PARALLEL={0|1}]
              [WITH VERSION CONTROL];
            {code}

            h2. *2.3 Save Scripts into the Repository:* INSERT INTO
            In order to save the R or Python Script to be called periodically from the MariaDB Server, the user will have 2 options:

            A. To Load the Script from a .TXT File into the Server:
            {code:SQL}
            INSERT INTO tbl_name (CALL, SCRIPT)
            VALUES("1-call_name", LOAD_FILE('/path/.../script_file_name.txt'));
            {code}

            B. To introduce the script directly through the IDE:
            {code:SQL}
            INSERT INTO tbl_name (CALL, SCRIPT)
            VALUES("1-call_name", QUOTE("... [R or Python Script] ..."));
            {code}

            h2. *3. Call a Script:* SELECT
            There will be 3 main ways of calling a R / Python Script from MariaDB:

            A. To Import an R / Python Script on the fly an call it from MariaDB Server:
            {code:SQL}
            SELECT
              LOAD_FILE('/path/.../script_file_name.txt'))
            FROM
              tbl_name;
            {code}

            B. To write a Script directly in the IDE and call it from MariaDB Server:
            {code:SQL}
            SELECT
              QUOTE("... [R or Python Script] ...")
            FROM
              tbl_name;
            {code}

            C. To call a previously saved R / Python Script into tbl_name:
            {code:SQL}
            SELECT
              *
            FROM
              tbl_name
            WHERE
              CALL = "1-call_name";
            {code}


            Connect would send the SCRIPT text column to the .exe on the PATH (e.g.: RScript exe) and retrieve the select table any warnings that occurred during the execution, that could eventually even be stored in another table as a Data Quality check, to see if the script has been executed correctly.

            In the remote R/Python script, the script will have to make use of a ODBC Connection for importing the data from MariaDB, analyze it, and send it back away.

            This engine feature could imply security issues, so it shall be disabled by default, or even have its own USER security permission.

            Thank you.

            Best,
            Juan Telleria
            Juan Juan Telleria made changes -
            Description h1. *1. Objective*
            To give the possibility to call the execution of external:
            * [Python|https://www.python.org/].
            * Or [R Statistical Programming Language|https://mran.microsoft.com/].

            Scripts directly from MariaDB, just as SQL Server, from 2017 Edition onward, allows to do so:
            * [sp_execute_external_script (Transact-SQL)|https://docs.microsoft.com/es-es/sql/relational-databases/system-stored-procedures/sp-execute-external-script-transact-sql?view=sql-server-2017]
            * [Run Python using T-SQL|https://docs.microsoft.com/en-us/sql/advanced-analytics/tutorials/run-python-using-t-sql?view=sql-server-2017]
            * [Using R functions with SQL Server data (R in SQL quickstart)|https://docs.microsoft.com/en-us/sql/advanced-analytics/tutorials/rtsql-using-r-functions-with-sql-server-data?view=sql-server-2017]

            The ultimate objetive is, for example, to trigger the execution of a remote Python/R Code for updating a predictive model in keras/h2o/tensorflow/... when new data is introduced into the database, or as part of a SQL procedure.

            h1. *2. MariaDB's CONNECT Implementation*
            One possible implementation could be as follows:
            h2. *2.1. Enable External Script Execution:* my.ini
            {code:txt}
            [mysqld]
            connect_enable_execute_external_script = {0|1}
            connect_python_exe_dir = "C:/Users/J-tel/AppData/Local/Programs/Python/Python36-32/python.exe"
            connect_r_exe_dir = "C:/Program Files/Microsoft/R Open/R-3.4.3/bin/Rscript.exe"
            connect_max_exe_parallel = {1(Default)|Number}
            {code}

            h2. *2.2 Script Repository Creation:* CREATE TABLE
            For using the _"CONNECT REMOTE_TABLE"_ Engine, the user will have to create an empty table as follows:

            {code:SQL}
            CREATE [OR REPLACE] [IF NOT EXISTS] TABLE tbl_name
              ENGINE = CONNECT
              TABLE_TYPE = REMOTE_TABLE
              LANGUAGE = {R|Python}
              [PARALLEL={0|1}]
              [WITH VERSION CONTROL];
            {code}

            The CONNECT Engine will the automatically create a table with the following column definition:
            {code:SQL}
            CREATE [OR REPLACE] [IF NOT EXISTS] TABLE tbl_name
            (
              CALL VARCHAR(128) PRIMARY KEY,
              SCRIPT TEXT
            )
              ENGINE = CONNECT
              TABLE_TYPE = REMOTE_TABLE
              LANGUAGE = {R|Python}
              [PARALLEL={0|1}]
              [WITH VERSION CONTROL];
            {code}

            h2. *2.3 Save Scripts into the Repository:* INSERT INTO
            In order to save the R or Python Script to be called periodically from the MariaDB Server, the user will have 2 options:

            A. To Load the Script from a .TXT File into the Server:
            {code:SQL}
            INSERT INTO tbl_name (CALL, SCRIPT)
            VALUES("1-call_name", LOAD_FILE('/path/.../script_file_name.txt'));
            {code}

            B. To introduce the script directly through the IDE:
            {code:SQL}
            INSERT INTO tbl_name (CALL, SCRIPT)
            VALUES("1-call_name", QUOTE("... [R or Python Script] ..."));
            {code}

            h2. *3. Call a Script:* SELECT
            There will be 3 main ways of calling a R / Python Script from MariaDB:

            A. To Import an R / Python Script on the fly an call it from MariaDB Server:
            {code:SQL}
            SELECT
              LOAD_FILE('/path/.../script_file_name.txt'))
            FROM
              tbl_name;
            {code}

            B. To write a Script directly in the IDE and call it from MariaDB Server:
            {code:SQL}
            SELECT
              QUOTE("... [R or Python Script] ...")
            FROM
              tbl_name;
            {code}

            C. To call a previously saved R / Python Script into tbl_name:
            {code:SQL}
            SELECT
              *
            FROM
              tbl_name
            WHERE
              CALL = "1-call_name";
            {code}


            Connect would send the SCRIPT text column to the .exe on the PATH (e.g.: RScript exe) and retrieve the select table any warnings that occurred during the execution, that could eventually even be stored in another table as a Data Quality check, to see if the script has been executed correctly.

            In the remote R/Python script, the script will have to make use of a ODBC Connection for importing the data from MariaDB, analyze it, and send it back away.

            This engine feature could imply security issues, so it shall be disabled by default, or even have its own USER security permission.

            Thank you.

            Best,
            Juan Telleria
            h1. *1. Objective*
            To give the possibility to call the execution of external:
            * [Python|https://www.python.org/].
            * Or [R Statistical Programming Language|https://mran.microsoft.com/].

            Scripts directly from MariaDB, just as SQL Server, from 2017 Edition onward, allows to do so:
            * [sp_execute_external_script (Transact-SQL)|https://docs.microsoft.com/es-es/sql/relational-databases/system-stored-procedures/sp-execute-external-script-transact-sql?view=sql-server-2017]
            * [Run Python using T-SQL|https://docs.microsoft.com/en-us/sql/advanced-analytics/tutorials/run-python-using-t-sql?view=sql-server-2017]
            * [Using R functions with SQL Server data (R in SQL quickstart)|https://docs.microsoft.com/en-us/sql/advanced-analytics/tutorials/rtsql-using-r-functions-with-sql-server-data?view=sql-server-2017]

            The ultimate objetive is, for example, to trigger the execution of a remote Python/R Code for updating a predictive model in keras/h2o/tensorflow/... when new data is introduced into the database, or as part of a SQL procedure.

            h1. *2. MariaDB's CONNECT Implementation*
            One possible implementation could be as follows:
            h2. *2.1. Enable External Script Execution:* my.ini
            {code:txt}
            [mysqld]
            connect_enable_execute_external_script = {0|1}
            connect_python_exe_dir = "C:/Users/J-tel/AppData/Local/Programs/Python/Python36-32/python.exe"
            connect_r_exe_dir = "C:/Program Files/Microsoft/R Open/R-3.4.3/bin/Rscript.exe"
            connect_max_exe_parallel = {1(Default)|Number}
            {code}

            h2. *2.2 Script Repository Creation:* CREATE TABLE
            For using the _"CONNECT REMOTE_TABLE"_ Engine, the user will have to create an empty table as follows:

            {code:SQL}
            CREATE [OR REPLACE] [IF NOT EXISTS] TABLE tbl_name
              ENGINE = CONNECT
              TABLE_TYPE = REMOTE_TABLE
              LANGUAGE = {R|Python}
              [PARALLEL={0|1}]
              [WITH VERSION CONTROL];
            {code}

            The CONNECT Engine will the automatically create a table with the following column definition:
            {code:SQL}
            CREATE [OR REPLACE] [IF NOT EXISTS] TABLE tbl_name
            (
              CALL VARCHAR(128) PRIMARY KEY,
              SCRIPT TEXT
            )
              ENGINE = CONNECT
              TABLE_TYPE = REMOTE_TABLE
              LANGUAGE = {R|Python}
              [PARALLEL={0|1}]
              [WITH VERSION CONTROL];
            {code}

            h2. *2.3 Save Scripts into the Repository:* INSERT INTO
            In order to save the R or Python Script to be called periodically from the MariaDB Server, the user will have 2 options:

            A. To Load the Script from a .TXT File into the Server:
            {code:SQL}
            INSERT INTO tbl_name (CALL, SCRIPT)
            VALUES("1-call_name", LOAD_FILE('/path/.../script_file_name.txt'));
            {code}

            B. To introduce the script directly through the IDE:
            {code:SQL}
            INSERT INTO tbl_name (CALL, SCRIPT)
            VALUES("1-call_name", QUOTE("... [R or Python Script] ..."));
            {code}

            h2. *3. Call a Script:* SELECT
            There will be 3 main ways of calling a R / Python Script from MariaDB:

            A. To Import an R / Python Script on the fly an call it from MariaDB Server:
            {code:SQL}
            SELECT
              LOAD_FILE('/path/.../script_file_name.txt'))
            FROM
              tbl_name;
            {code}

            B. To write a Script directly in the IDE and call it from MariaDB Server:
            {code:SQL}
            SELECT
              QUOTE("... [R or Python Script] ...")
            FROM
              tbl_name;
            {code}

            C. To call a previously saved R / Python Script into tbl_name:
            {code:SQL}
            SELECT
              *
            FROM
              tbl_name
            WHERE
              CALL = "1-call_name";
            {code}

            h1. Connect Engine Internals
            Connect would send the SCRIPT text column to the .exe on the PATH (e.g.: RScript exe) and retrieve the select table any warnings that occurred during the execution, that could eventually even be stored in another table as a Data Quality check, to see if the script has been executed correctly.

            In the remote R/Python script, the script will have to make use of a ODBC Connection for importing the data from MariaDB, analyze it, and send it back away.

            This engine feature could imply security issues, so it shall be disabled by default, or even have its own USER security permission.

            Thank you.

            Best,
            Juan Telleria
            Juan Juan Telleria made changes -
            Description h1. *1. Objective*
            To give the possibility to call the execution of external:
            * [Python|https://www.python.org/].
            * Or [R Statistical Programming Language|https://mran.microsoft.com/].

            Scripts directly from MariaDB, just as SQL Server, from 2017 Edition onward, allows to do so:
            * [sp_execute_external_script (Transact-SQL)|https://docs.microsoft.com/es-es/sql/relational-databases/system-stored-procedures/sp-execute-external-script-transact-sql?view=sql-server-2017]
            * [Run Python using T-SQL|https://docs.microsoft.com/en-us/sql/advanced-analytics/tutorials/run-python-using-t-sql?view=sql-server-2017]
            * [Using R functions with SQL Server data (R in SQL quickstart)|https://docs.microsoft.com/en-us/sql/advanced-analytics/tutorials/rtsql-using-r-functions-with-sql-server-data?view=sql-server-2017]

            The ultimate objetive is, for example, to trigger the execution of a remote Python/R Code for updating a predictive model in keras/h2o/tensorflow/... when new data is introduced into the database, or as part of a SQL procedure.

            h1. *2. MariaDB's CONNECT Implementation*
            One possible implementation could be as follows:
            h2. *2.1. Enable External Script Execution:* my.ini
            {code:txt}
            [mysqld]
            connect_enable_execute_external_script = {0|1}
            connect_python_exe_dir = "C:/Users/J-tel/AppData/Local/Programs/Python/Python36-32/python.exe"
            connect_r_exe_dir = "C:/Program Files/Microsoft/R Open/R-3.4.3/bin/Rscript.exe"
            connect_max_exe_parallel = {1(Default)|Number}
            {code}

            h2. *2.2 Script Repository Creation:* CREATE TABLE
            For using the _"CONNECT REMOTE_TABLE"_ Engine, the user will have to create an empty table as follows:

            {code:SQL}
            CREATE [OR REPLACE] [IF NOT EXISTS] TABLE tbl_name
              ENGINE = CONNECT
              TABLE_TYPE = REMOTE_TABLE
              LANGUAGE = {R|Python}
              [PARALLEL={0|1}]
              [WITH VERSION CONTROL];
            {code}

            The CONNECT Engine will the automatically create a table with the following column definition:
            {code:SQL}
            CREATE [OR REPLACE] [IF NOT EXISTS] TABLE tbl_name
            (
              CALL VARCHAR(128) PRIMARY KEY,
              SCRIPT TEXT
            )
              ENGINE = CONNECT
              TABLE_TYPE = REMOTE_TABLE
              LANGUAGE = {R|Python}
              [PARALLEL={0|1}]
              [WITH VERSION CONTROL];
            {code}

            h2. *2.3 Save Scripts into the Repository:* INSERT INTO
            In order to save the R or Python Script to be called periodically from the MariaDB Server, the user will have 2 options:

            A. To Load the Script from a .TXT File into the Server:
            {code:SQL}
            INSERT INTO tbl_name (CALL, SCRIPT)
            VALUES("1-call_name", LOAD_FILE('/path/.../script_file_name.txt'));
            {code}

            B. To introduce the script directly through the IDE:
            {code:SQL}
            INSERT INTO tbl_name (CALL, SCRIPT)
            VALUES("1-call_name", QUOTE("... [R or Python Script] ..."));
            {code}

            h2. *3. Call a Script:* SELECT
            There will be 3 main ways of calling a R / Python Script from MariaDB:

            A. To Import an R / Python Script on the fly an call it from MariaDB Server:
            {code:SQL}
            SELECT
              LOAD_FILE('/path/.../script_file_name.txt'))
            FROM
              tbl_name;
            {code}

            B. To write a Script directly in the IDE and call it from MariaDB Server:
            {code:SQL}
            SELECT
              QUOTE("... [R or Python Script] ...")
            FROM
              tbl_name;
            {code}

            C. To call a previously saved R / Python Script into tbl_name:
            {code:SQL}
            SELECT
              *
            FROM
              tbl_name
            WHERE
              CALL = "1-call_name";
            {code}

            h1. Connect Engine Internals
            Connect would send the SCRIPT text column to the .exe on the PATH (e.g.: RScript exe) and retrieve the select table any warnings that occurred during the execution, that could eventually even be stored in another table as a Data Quality check, to see if the script has been executed correctly.

            In the remote R/Python script, the script will have to make use of a ODBC Connection for importing the data from MariaDB, analyze it, and send it back away.

            This engine feature could imply security issues, so it shall be disabled by default, or even have its own USER security permission.

            Thank you.

            Best,
            Juan Telleria
            h1. *1. Objective*
            To give the possibility to call the execution of external:
            * [Python|https://www.python.org/].
            * Or [R Statistical Programming Language|https://mran.microsoft.com/].

            Scripts directly from MariaDB, just as SQL Server, from 2017 Edition onward, allows to do so:
            * [sp_execute_external_script (Transact-SQL)|https://docs.microsoft.com/es-es/sql/relational-databases/system-stored-procedures/sp-execute-external-script-transact-sql?view=sql-server-2017]
            * [Run Python using T-SQL|https://docs.microsoft.com/en-us/sql/advanced-analytics/tutorials/run-python-using-t-sql?view=sql-server-2017]
            * [Using R functions with SQL Server data (R in SQL quickstart)|https://docs.microsoft.com/en-us/sql/advanced-analytics/tutorials/rtsql-using-r-functions-with-sql-server-data?view=sql-server-2017]

            The ultimate objetive is, for example, to trigger the execution of a remote Python/R Code for updating a predictive model in keras/h2o/tensorflow/... when new data is introduced into the database, or as part of a SQL procedure.

            h1. *2. MariaDB's CONNECT EXTERNAL SCRIPT Implementation*
            One possible implementation could be as follows:
            h2. *2.1. Enable External Script Execution:* my.ini
            {code:txt}
            [mysqld]
            connect_enable_execute_external_script = {0|1}
            connect_python_exe_dir = "C:/Users/J-tel/AppData/Local/Programs/Python/Python36-32/python.exe"
            connect_r_exe_dir = "C:/Program Files/Microsoft/R Open/R-3.4.3/bin/Rscript.exe"
            connect_max_exe_parallel = {1(Default)|Number}
            {code}

            h2. *2.2 Script Repository Creation:* CREATE TABLE
            For using the _"CONNECT REMOTE_TABLE"_ Engine, the user will have to create an empty table as follows:

            {code:SQL}
            CREATE [OR REPLACE] [IF NOT EXISTS] TABLE tbl_name
              ENGINE = CONNECT
              TABLE_TYPE = REMOTE_TABLE
              LANGUAGE = {R|Python}
              [PARALLEL={0|1}]
              [WITH VERSION CONTROL];
            {code}

            The CONNECT Engine will the automatically create a table with the following column definition:
            {code:SQL}
            CREATE [OR REPLACE] [IF NOT EXISTS] TABLE tbl_name
            (
              CALL VARCHAR(128) PRIMARY KEY,
              SCRIPT TEXT
            )
              ENGINE = CONNECT
              TABLE_TYPE = REMOTE_TABLE
              LANGUAGE = {R|Python}
              [PARALLEL={0|1}]
              [WITH VERSION CONTROL];
            {code}

            h2. *2.3 Save Scripts into the Repository:* INSERT INTO
            In order to save the R or Python Script to be called periodically from the MariaDB Server, the user will have 2 options:

            A. To Load the Script from a .TXT File into the Server:
            {code:SQL}
            INSERT INTO tbl_name (CALL, SCRIPT)
            VALUES("1-call_name", LOAD_FILE('/path/.../script_file_name.txt'));
            {code}

            B. To introduce the script directly through the IDE:
            {code:SQL}
            INSERT INTO tbl_name (CALL, SCRIPT)
            VALUES("1-call_name", QUOTE("... [R or Python Script] ..."));
            {code}

            h2. *3. Call a Script:* SELECT
            There will be 3 main ways of calling a R / Python Script from MariaDB:

            A. To Import an R / Python Script on the fly an call it from MariaDB Server:
            {code:SQL}
            SELECT
              LOAD_FILE('/path/.../script_file_name.txt'))
            FROM
              tbl_name;
            {code}

            B. To write a Script directly in the IDE and call it from MariaDB Server:
            {code:SQL}
            SELECT
              QUOTE("... [R or Python Script] ...")
            FROM
              tbl_name;
            {code}

            C. To call a previously saved R / Python Script into tbl_name:
            {code:SQL}
            SELECT
              *
            FROM
              tbl_name
            WHERE
              CALL = "1-call_name";
            {code}

            h1. Connect Engine Internals
            Connect would send the SCRIPT text column to the .exe on the PATH (e.g.: RScript exe) and retrieve the select table any warnings that occurred during the execution, that could eventually even be stored in another table as a Data Quality check, to see if the script has been executed correctly.

            In the remote R/Python script, the script will have to make use of a ODBC Connection for importing the data from MariaDB, analyze it, and send it back away.

            This engine feature could imply security issues, so it shall be disabled by default, or even have its own USER security permission.

            Thank you.

            Best,
            Juan Telleria
            Juan Juan Telleria made changes -
            Description h1. *1. Objective*
            To give the possibility to call the execution of external:
            * [Python|https://www.python.org/].
            * Or [R Statistical Programming Language|https://mran.microsoft.com/].

            Scripts directly from MariaDB, just as SQL Server, from 2017 Edition onward, allows to do so:
            * [sp_execute_external_script (Transact-SQL)|https://docs.microsoft.com/es-es/sql/relational-databases/system-stored-procedures/sp-execute-external-script-transact-sql?view=sql-server-2017]
            * [Run Python using T-SQL|https://docs.microsoft.com/en-us/sql/advanced-analytics/tutorials/run-python-using-t-sql?view=sql-server-2017]
            * [Using R functions with SQL Server data (R in SQL quickstart)|https://docs.microsoft.com/en-us/sql/advanced-analytics/tutorials/rtsql-using-r-functions-with-sql-server-data?view=sql-server-2017]

            The ultimate objetive is, for example, to trigger the execution of a remote Python/R Code for updating a predictive model in keras/h2o/tensorflow/... when new data is introduced into the database, or as part of a SQL procedure.

            h1. *2. MariaDB's CONNECT EXTERNAL SCRIPT Implementation*
            One possible implementation could be as follows:
            h2. *2.1. Enable External Script Execution:* my.ini
            {code:txt}
            [mysqld]
            connect_enable_execute_external_script = {0|1}
            connect_python_exe_dir = "C:/Users/J-tel/AppData/Local/Programs/Python/Python36-32/python.exe"
            connect_r_exe_dir = "C:/Program Files/Microsoft/R Open/R-3.4.3/bin/Rscript.exe"
            connect_max_exe_parallel = {1(Default)|Number}
            {code}

            h2. *2.2 Script Repository Creation:* CREATE TABLE
            For using the _"CONNECT REMOTE_TABLE"_ Engine, the user will have to create an empty table as follows:

            {code:SQL}
            CREATE [OR REPLACE] [IF NOT EXISTS] TABLE tbl_name
              ENGINE = CONNECT
              TABLE_TYPE = REMOTE_TABLE
              LANGUAGE = {R|Python}
              [PARALLEL={0|1}]
              [WITH VERSION CONTROL];
            {code}

            The CONNECT Engine will the automatically create a table with the following column definition:
            {code:SQL}
            CREATE [OR REPLACE] [IF NOT EXISTS] TABLE tbl_name
            (
              CALL VARCHAR(128) PRIMARY KEY,
              SCRIPT TEXT
            )
              ENGINE = CONNECT
              TABLE_TYPE = REMOTE_TABLE
              LANGUAGE = {R|Python}
              [PARALLEL={0|1}]
              [WITH VERSION CONTROL];
            {code}

            h2. *2.3 Save Scripts into the Repository:* INSERT INTO
            In order to save the R or Python Script to be called periodically from the MariaDB Server, the user will have 2 options:

            A. To Load the Script from a .TXT File into the Server:
            {code:SQL}
            INSERT INTO tbl_name (CALL, SCRIPT)
            VALUES("1-call_name", LOAD_FILE('/path/.../script_file_name.txt'));
            {code}

            B. To introduce the script directly through the IDE:
            {code:SQL}
            INSERT INTO tbl_name (CALL, SCRIPT)
            VALUES("1-call_name", QUOTE("... [R or Python Script] ..."));
            {code}

            h2. *3. Call a Script:* SELECT
            There will be 3 main ways of calling a R / Python Script from MariaDB:

            A. To Import an R / Python Script on the fly an call it from MariaDB Server:
            {code:SQL}
            SELECT
              LOAD_FILE('/path/.../script_file_name.txt'))
            FROM
              tbl_name;
            {code}

            B. To write a Script directly in the IDE and call it from MariaDB Server:
            {code:SQL}
            SELECT
              QUOTE("... [R or Python Script] ...")
            FROM
              tbl_name;
            {code}

            C. To call a previously saved R / Python Script into tbl_name:
            {code:SQL}
            SELECT
              *
            FROM
              tbl_name
            WHERE
              CALL = "1-call_name";
            {code}

            h1. Connect Engine Internals
            Connect would send the SCRIPT text column to the .exe on the PATH (e.g.: RScript exe) and retrieve the select table any warnings that occurred during the execution, that could eventually even be stored in another table as a Data Quality check, to see if the script has been executed correctly.

            In the remote R/Python script, the script will have to make use of a ODBC Connection for importing the data from MariaDB, analyze it, and send it back away.

            This engine feature could imply security issues, so it shall be disabled by default, or even have its own USER security permission.

            Thank you.

            Best,
            Juan Telleria
            h1. *1. Objective*
            To give the possibility to call the execution of external:
            * [Python|https://www.python.org/].
            * Or [R Statistical Programming Language|https://mran.microsoft.com/].

            Scripts directly from MariaDB, just as SQL Server, from 2017 Edition onward, allows to do so:
            * [sp_execute_external_script (Transact-SQL)|https://docs.microsoft.com/es-es/sql/relational-databases/system-stored-procedures/sp-execute-external-script-transact-sql?view=sql-server-2017]
            * [Run Python using T-SQL|https://docs.microsoft.com/en-us/sql/advanced-analytics/tutorials/run-python-using-t-sql?view=sql-server-2017]
            * [Using R functions with SQL Server data (R in SQL quickstart)|https://docs.microsoft.com/en-us/sql/advanced-analytics/tutorials/rtsql-using-r-functions-with-sql-server-data?view=sql-server-2017]

            The ultimate objetive is, for example, to trigger the execution of a remote Python/R Code for updating a predictive model in keras/h2o/tensorflow/... when new data is introduced into the database, or as part of a SQL procedure.

            h1. *2. MariaDB's CONNECT EXTERNAL SCRIPT Implementation: OPTION A (NOT FEASIBLE)*
            One possible implementation could be as follows:
            h2. *2.1. Enable External Script Execution:* my.ini
            {code:txt}
            [mysqld]
            connect_enable_execute_external_script = {0|1}
            connect_python_exe_dir = "C:/Users/J-tel/AppData/Local/Programs/Python/Python36-32/python.exe"
            connect_r_exe_dir = "C:/Program Files/Microsoft/R Open/R-3.4.3/bin/Rscript.exe"
            connect_max_exe_parallel = {1(Default)|Number}
            {code}

            h2. *2.2 Script Repository Creation:* CREATE TABLE
            For using the _"CONNECT REMOTE_TABLE"_ Engine, the user will have to create an empty table as follows:

            {code:SQL}
            CREATE [OR REPLACE] [IF NOT EXISTS] TABLE tbl_name
              ENGINE = CONNECT
              TABLE_TYPE = REMOTE_TABLE
              LANGUAGE = {R|Python}
              [PARALLEL={0|1}]
              [WITH VERSION CONTROL];
            {code}

            The CONNECT Engine will the automatically create a table with the following column definition:
            {code:SQL}
            CREATE [OR REPLACE] [IF NOT EXISTS] TABLE tbl_name
            (
              CALL VARCHAR(128) PRIMARY KEY,
              SCRIPT TEXT
            )
              ENGINE = CONNECT
              TABLE_TYPE = REMOTE_TABLE
              LANGUAGE = {R|Python}
              [PARALLEL={0|1}]
              [WITH VERSION CONTROL];
            {code}

            h2. *2.3 Save Scripts into the Repository:* INSERT INTO
            In order to save the R or Python Script to be called periodically from the MariaDB Server, the user will have 2 options:

            A. To Load the Script from a .TXT File into the Server:
            {code:SQL}
            INSERT INTO tbl_name (CALL, SCRIPT)
            VALUES("1-call_name", LOAD_FILE('/path/.../script_file_name.txt'));
            {code}

            B. To introduce the script directly through the IDE:
            {code:SQL}
            INSERT INTO tbl_name (CALL, SCRIPT)
            VALUES("1-call_name", QUOTE("... [R or Python Script] ..."));
            {code}

            h2. *3. Call a Script:* SELECT
            There will be 3 main ways of calling a R / Python Script from MariaDB:

            A. To Import an R / Python Script on the fly an call it from MariaDB Server:
            {code:SQL}
            SELECT
              LOAD_FILE('/path/.../script_file_name.txt'))
            FROM
              tbl_name;
            {code}

            B. To write a Script directly in the IDE and call it from MariaDB Server:
            {code:SQL}
            SELECT
              QUOTE("... [R or Python Script] ...")
            FROM
              tbl_name;
            {code}

            C. To call a previously saved R / Python Script into tbl_name:
            {code:SQL}
            SELECT
              *
            FROM
              tbl_name
            WHERE
              CALL = "1-call_name";
            {code}

            h1. Connect Engine Internals
            Connect would send the SCRIPT text column to the .exe on the PATH (e.g.: RScript exe) and retrieve the select table any warnings that occurred during the execution, that could eventually even be stored in another table as a Data Quality check, to see if the script has been executed correctly.

            In the remote R/Python script, the script will have to make use of a ODBC Connection for importing the data from MariaDB, analyze it, and send it back away.

            This engine feature could imply security issues, so it shall be disabled by default, or even have its own USER security permission.

            Thank you.

            Best,
            Juan Telleria
            Juan Juan Telleria made changes -
            Description h1. *1. Objective*
            To give the possibility to call the execution of external:
            * [Python|https://www.python.org/].
            * Or [R Statistical Programming Language|https://mran.microsoft.com/].

            Scripts directly from MariaDB, just as SQL Server, from 2017 Edition onward, allows to do so:
            * [sp_execute_external_script (Transact-SQL)|https://docs.microsoft.com/es-es/sql/relational-databases/system-stored-procedures/sp-execute-external-script-transact-sql?view=sql-server-2017]
            * [Run Python using T-SQL|https://docs.microsoft.com/en-us/sql/advanced-analytics/tutorials/run-python-using-t-sql?view=sql-server-2017]
            * [Using R functions with SQL Server data (R in SQL quickstart)|https://docs.microsoft.com/en-us/sql/advanced-analytics/tutorials/rtsql-using-r-functions-with-sql-server-data?view=sql-server-2017]

            The ultimate objetive is, for example, to trigger the execution of a remote Python/R Code for updating a predictive model in keras/h2o/tensorflow/... when new data is introduced into the database, or as part of a SQL procedure.

            h1. *2. MariaDB's CONNECT EXTERNAL SCRIPT Implementation: OPTION A (NOT FEASIBLE)*
            One possible implementation could be as follows:
            h2. *2.1. Enable External Script Execution:* my.ini
            {code:txt}
            [mysqld]
            connect_enable_execute_external_script = {0|1}
            connect_python_exe_dir = "C:/Users/J-tel/AppData/Local/Programs/Python/Python36-32/python.exe"
            connect_r_exe_dir = "C:/Program Files/Microsoft/R Open/R-3.4.3/bin/Rscript.exe"
            connect_max_exe_parallel = {1(Default)|Number}
            {code}

            h2. *2.2 Script Repository Creation:* CREATE TABLE
            For using the _"CONNECT REMOTE_TABLE"_ Engine, the user will have to create an empty table as follows:

            {code:SQL}
            CREATE [OR REPLACE] [IF NOT EXISTS] TABLE tbl_name
              ENGINE = CONNECT
              TABLE_TYPE = REMOTE_TABLE
              LANGUAGE = {R|Python}
              [PARALLEL={0|1}]
              [WITH VERSION CONTROL];
            {code}

            The CONNECT Engine will the automatically create a table with the following column definition:
            {code:SQL}
            CREATE [OR REPLACE] [IF NOT EXISTS] TABLE tbl_name
            (
              CALL VARCHAR(128) PRIMARY KEY,
              SCRIPT TEXT
            )
              ENGINE = CONNECT
              TABLE_TYPE = REMOTE_TABLE
              LANGUAGE = {R|Python}
              [PARALLEL={0|1}]
              [WITH VERSION CONTROL];
            {code}

            h2. *2.3 Save Scripts into the Repository:* INSERT INTO
            In order to save the R or Python Script to be called periodically from the MariaDB Server, the user will have 2 options:

            A. To Load the Script from a .TXT File into the Server:
            {code:SQL}
            INSERT INTO tbl_name (CALL, SCRIPT)
            VALUES("1-call_name", LOAD_FILE('/path/.../script_file_name.txt'));
            {code}

            B. To introduce the script directly through the IDE:
            {code:SQL}
            INSERT INTO tbl_name (CALL, SCRIPT)
            VALUES("1-call_name", QUOTE("... [R or Python Script] ..."));
            {code}

            h2. *3. Call a Script:* SELECT
            There will be 3 main ways of calling a R / Python Script from MariaDB:

            A. To Import an R / Python Script on the fly an call it from MariaDB Server:
            {code:SQL}
            SELECT
              LOAD_FILE('/path/.../script_file_name.txt'))
            FROM
              tbl_name;
            {code}

            B. To write a Script directly in the IDE and call it from MariaDB Server:
            {code:SQL}
            SELECT
              QUOTE("... [R or Python Script] ...")
            FROM
              tbl_name;
            {code}

            C. To call a previously saved R / Python Script into tbl_name:
            {code:SQL}
            SELECT
              *
            FROM
              tbl_name
            WHERE
              CALL = "1-call_name";
            {code}

            h1. Connect Engine Internals
            Connect would send the SCRIPT text column to the .exe on the PATH (e.g.: RScript exe) and retrieve the select table any warnings that occurred during the execution, that could eventually even be stored in another table as a Data Quality check, to see if the script has been executed correctly.

            In the remote R/Python script, the script will have to make use of a ODBC Connection for importing the data from MariaDB, analyze it, and send it back away.

            This engine feature could imply security issues, so it shall be disabled by default, or even have its own USER security permission.

            Thank you.

            Best,
            Juan Telleria
            h1. *1. Objective*
            To give the possibility to call the execution of external:
            * [Python|https://www.python.org/].
            * Or [R Statistical Programming Language|https://mran.microsoft.com/].

            Scripts directly from MariaDB, just as SQL Server, from 2017 Edition onward, allows to do so:
            * [sp_execute_external_script (Transact-SQL)|https://docs.microsoft.com/es-es/sql/relational-databases/system-stored-procedures/sp-execute-external-script-transact-sql?view=sql-server-2017]
            * [Run Python using T-SQL|https://docs.microsoft.com/en-us/sql/advanced-analytics/tutorials/run-python-using-t-sql?view=sql-server-2017]
            * [Using R functions with SQL Server data (R in SQL quickstart)|https://docs.microsoft.com/en-us/sql/advanced-analytics/tutorials/rtsql-using-r-functions-with-sql-server-data?view=sql-server-2017]

            The ultimate objetive is, for example, to trigger the execution of a remote Python/R Code for updating a predictive model in keras/h2o/tensorflow/... when new data is introduced into the database, or as part of a SQL procedure.

            h1. *2. MariaDB's CONNECT EXTERNAL SCRIPT Implementation: OPTION A*
            One possible implementation could be as follows:
            h2. *2.1. Enable External Script Execution:* my.ini
            {code:txt}
            [mysqld]
            connect_enable_execute_external_script = {0|1}
            connect_python_exe_dir = "C:/Users/J-tel/AppData/Local/Programs/Python/Python36-32/python.exe"
            connect_r_exe_dir = "C:/Program Files/Microsoft/R Open/R-3.4.3/bin/Rscript.exe"
            connect_max_exe_parallel = {1(Default)|Number}
            {code}

            h2. *2.2 Script Repository Creation:* CREATE TABLE
            For using the _"CONNECT REMOTE_TABLE"_ Engine, the user will have to create an empty table as follows:

            {code:SQL}
            CREATE [OR REPLACE] [IF NOT EXISTS] TABLE tbl_name
              ENGINE = CONNECT
              TABLE_TYPE = REMOTE_TABLE
              LANGUAGE = {R|Python}
              [PARALLEL={0|1}]
              [WITH VERSION CONTROL];
            {code}

            The CONNECT Engine will the automatically create a table with the following column definition:
            {code:SQL}
            CREATE [OR REPLACE] [IF NOT EXISTS] TABLE tbl_name
            (
              CALL VARCHAR(128) PRIMARY KEY,
              SCRIPT TEXT
            )
              ENGINE = CONNECT
              TABLE_TYPE = REMOTE_TABLE
              LANGUAGE = {R|Python}
              [PARALLEL={0|1}]
              [WITH VERSION CONTROL];
            {code}

            h2. *2.3 Save Scripts into the Repository:* INSERT INTO
            In order to save the R or Python Script to be called periodically from the MariaDB Server, the user will have 2 options:

            A. To Load the Script from a .TXT File into the Server:
            {code:SQL}
            INSERT INTO tbl_name (CALL, SCRIPT)
            VALUES("1-call_name", LOAD_FILE('/path/.../script_file_name.txt'));
            {code}

            B. To introduce the script directly through the IDE:
            {code:SQL}
            INSERT INTO tbl_name (CALL, SCRIPT)
            VALUES("1-call_name", QUOTE("... [R or Python Script] ..."));
            {code}

            h2. *3. Call a Script:* SELECT
            There will be 3 main ways of calling a R / Python Script from MariaDB:

            A. To Import an R / Python Script on the fly an call it from MariaDB Server:
            {code:SQL}
            SELECT
              LOAD_FILE('/path/.../script_file_name.txt'))
            FROM
              tbl_name;
            {code}

            B. To write a Script directly in the IDE and call it from MariaDB Server:
            {code:SQL}
            SELECT
              QUOTE("... [R or Python Script] ...")
            FROM
              tbl_name;
            {code}

            C. To call a previously saved R / Python Script into tbl_name:
            {code:SQL}
            SELECT
              *
            FROM
              tbl_name
            WHERE
              CALL = "1-call_name";
            {code}

            h1. Connect Engine Internals
            Connect would send the SCRIPT text column to the .exe on the PATH (e.g.: RScript exe) and retrieve the select table any warnings that occurred during the execution, that could eventually even be stored in another table as a Data Quality check, to see if the script has been executed correctly.

            In the remote R/Python script, the script will have to make use of a ODBC Connection for importing the data from MariaDB, analyze it, and send it back away.

            This engine feature could imply security issues, so it shall be disabled by default, or even have its own USER security permission.

            Thank you.

            Best,
            Juan Telleria
            Juan Juan Telleria made changes -
            Description h1. *1. Objective*
            To give the possibility to call the execution of external:
            * [Python|https://www.python.org/].
            * Or [R Statistical Programming Language|https://mran.microsoft.com/].

            Scripts directly from MariaDB, just as SQL Server, from 2017 Edition onward, allows to do so:
            * [sp_execute_external_script (Transact-SQL)|https://docs.microsoft.com/es-es/sql/relational-databases/system-stored-procedures/sp-execute-external-script-transact-sql?view=sql-server-2017]
            * [Run Python using T-SQL|https://docs.microsoft.com/en-us/sql/advanced-analytics/tutorials/run-python-using-t-sql?view=sql-server-2017]
            * [Using R functions with SQL Server data (R in SQL quickstart)|https://docs.microsoft.com/en-us/sql/advanced-analytics/tutorials/rtsql-using-r-functions-with-sql-server-data?view=sql-server-2017]

            The ultimate objetive is, for example, to trigger the execution of a remote Python/R Code for updating a predictive model in keras/h2o/tensorflow/... when new data is introduced into the database, or as part of a SQL procedure.

            h1. *2. MariaDB's CONNECT EXTERNAL SCRIPT Implementation: OPTION A*
            One possible implementation could be as follows:
            h2. *2.1. Enable External Script Execution:* my.ini
            {code:txt}
            [mysqld]
            connect_enable_execute_external_script = {0|1}
            connect_python_exe_dir = "C:/Users/J-tel/AppData/Local/Programs/Python/Python36-32/python.exe"
            connect_r_exe_dir = "C:/Program Files/Microsoft/R Open/R-3.4.3/bin/Rscript.exe"
            connect_max_exe_parallel = {1(Default)|Number}
            {code}

            h2. *2.2 Script Repository Creation:* CREATE TABLE
            For using the _"CONNECT REMOTE_TABLE"_ Engine, the user will have to create an empty table as follows:

            {code:SQL}
            CREATE [OR REPLACE] [IF NOT EXISTS] TABLE tbl_name
              ENGINE = CONNECT
              TABLE_TYPE = REMOTE_TABLE
              LANGUAGE = {R|Python}
              [PARALLEL={0|1}]
              [WITH VERSION CONTROL];
            {code}

            The CONNECT Engine will the automatically create a table with the following column definition:
            {code:SQL}
            CREATE [OR REPLACE] [IF NOT EXISTS] TABLE tbl_name
            (
              CALL VARCHAR(128) PRIMARY KEY,
              SCRIPT TEXT
            )
              ENGINE = CONNECT
              TABLE_TYPE = REMOTE_TABLE
              LANGUAGE = {R|Python}
              [PARALLEL={0|1}]
              [WITH VERSION CONTROL];
            {code}

            h2. *2.3 Save Scripts into the Repository:* INSERT INTO
            In order to save the R or Python Script to be called periodically from the MariaDB Server, the user will have 2 options:

            A. To Load the Script from a .TXT File into the Server:
            {code:SQL}
            INSERT INTO tbl_name (CALL, SCRIPT)
            VALUES("1-call_name", LOAD_FILE('/path/.../script_file_name.txt'));
            {code}

            B. To introduce the script directly through the IDE:
            {code:SQL}
            INSERT INTO tbl_name (CALL, SCRIPT)
            VALUES("1-call_name", QUOTE("... [R or Python Script] ..."));
            {code}

            h2. *3. Call a Script:* SELECT
            There will be 3 main ways of calling a R / Python Script from MariaDB:

            A. To Import an R / Python Script on the fly an call it from MariaDB Server:
            {code:SQL}
            SELECT
              LOAD_FILE('/path/.../script_file_name.txt'))
            FROM
              tbl_name;
            {code}

            B. To write a Script directly in the IDE and call it from MariaDB Server:
            {code:SQL}
            SELECT
              QUOTE("... [R or Python Script] ...")
            FROM
              tbl_name;
            {code}

            C. To call a previously saved R / Python Script into tbl_name:
            {code:SQL}
            SELECT
              *
            FROM
              tbl_name
            WHERE
              CALL = "1-call_name";
            {code}

            h1. Connect Engine Internals
            Connect would send the SCRIPT text column to the .exe on the PATH (e.g.: RScript exe) and retrieve the select table any warnings that occurred during the execution, that could eventually even be stored in another table as a Data Quality check, to see if the script has been executed correctly.

            In the remote R/Python script, the script will have to make use of a ODBC Connection for importing the data from MariaDB, analyze it, and send it back away.

            This engine feature could imply security issues, so it shall be disabled by default, or even have its own USER security permission.

            Thank you.

            Best,
            Juan Telleria
            h1. *1. Objective*
            To give the possibility to call the execution of external:
            * [Python|https://www.python.org/].
            * Or [R Statistical Programming Language|https://mran.microsoft.com/].

            Scripts directly from MariaDB, just as SQL Server, from 2017 Edition onward, allows to do so:
            * [sp_execute_external_script (Transact-SQL)|https://docs.microsoft.com/es-es/sql/relational-databases/system-stored-procedures/sp-execute-external-script-transact-sql?view=sql-server-2017]
            * [Run Python using T-SQL|https://docs.microsoft.com/en-us/sql/advanced-analytics/tutorials/run-python-using-t-sql?view=sql-server-2017]
            * [Using R functions with SQL Server data (R in SQL quickstart)|https://docs.microsoft.com/en-us/sql/advanced-analytics/tutorials/rtsql-using-r-functions-with-sql-server-data?view=sql-server-2017]

            The ultimate objetive is, for example, to trigger the execution of a remote Python/R Code for updating a predictive model in keras/h2o/tensorflow/... when new data is introduced into the database, or as part of a SQL procedure.

            h1. *2. MariaDB's CONNECT EXTERNAL SCRIPT: Implementation (OPTION A)*
            One possible implementation could be as follows:
            h2. *2.1. Enable External Script Execution:* my.ini
            {code:txt}
            [mysqld]
            connect_enable_execute_external_script = {0|1}
            connect_python_exe_dir = "C:/Users/J-tel/AppData/Local/Programs/Python/Python36-32/python.exe"
            connect_r_exe_dir = "C:/Program Files/Microsoft/R Open/R-3.4.3/bin/Rscript.exe"
            connect_max_exe_parallel = {1(Default)|Number}
            {code}

            h2. *2.2 Script Repository Creation:* CREATE TABLE
            For using the _"CONNECT REMOTE_TABLE"_ Engine, the user will have to create an empty table as follows:

            {code:SQL}
            CREATE [OR REPLACE] [IF NOT EXISTS] TABLE tbl_name
              ENGINE = CONNECT
              TABLE_TYPE = REMOTE_TABLE
              LANGUAGE = {R|Python}
              [PARALLEL={0|1}]
              [WITH VERSION CONTROL];
            {code}

            The CONNECT Engine will the automatically create a table with the following column definition:
            {code:SQL}
            CREATE [OR REPLACE] [IF NOT EXISTS] TABLE tbl_name
            (
              CALL VARCHAR(128) PRIMARY KEY,
              SCRIPT TEXT
            )
              ENGINE = CONNECT
              TABLE_TYPE = REMOTE_TABLE
              LANGUAGE = {R|Python}
              [PARALLEL={0|1}]
              [WITH VERSION CONTROL];
            {code}

            h2. *2.3 Save Scripts into the Repository:* INSERT INTO
            In order to save the R or Python Script to be called periodically from the MariaDB Server, the user will have 2 options:

            A. To Load the Script from a .TXT File into the Server:
            {code:SQL}
            INSERT INTO tbl_name (CALL, SCRIPT)
            VALUES("1-call_name", LOAD_FILE('/path/.../script_file_name.txt'));
            {code}

            B. To introduce the script directly through the IDE:
            {code:SQL}
            INSERT INTO tbl_name (CALL, SCRIPT)
            VALUES("1-call_name", QUOTE("... [R or Python Script] ..."));
            {code}

            h2. *3. Call a Script:* SELECT
            There will be 3 main ways of calling a R / Python Script from MariaDB:

            A. To Import an R / Python Script on the fly an call it from MariaDB Server:
            {code:SQL}
            SELECT
              LOAD_FILE('/path/.../script_file_name.txt'))
            FROM
              tbl_name;
            {code}

            B. To write a Script directly in the IDE and call it from MariaDB Server:
            {code:SQL}
            SELECT
              QUOTE("... [R or Python Script] ...")
            FROM
              tbl_name;
            {code}

            C. To call a previously saved R / Python Script into tbl_name:
            {code:SQL}
            SELECT
              *
            FROM
              tbl_name
            WHERE
              CALL = "1-call_name";
            {code}

            h1. MariaDB's CONNECT EXTERNAL SCRIPT Implementation: OPTION A
            Connect would send the SCRIPT text column to the .exe on the PATH (e.g.: RScript exe) and retrieve the select table any warnings that occurred during the execution, that could eventually even be stored in another table as a Data Quality check, to see if the script has been executed correctly.

            In the remote R/Python script, the script will have to make use of a ODBC Connection for importing the data from MariaDB, analyze it, and send it back away.

            This engine feature could imply security issues, so it shall be disabled by default, or even have its own USER security permission.

            Thank you.

            Best,
            Juan Telleria
            Juan Juan Telleria made changes -
            Description h1. *1. Objective*
            To give the possibility to call the execution of external:
            * [Python|https://www.python.org/].
            * Or [R Statistical Programming Language|https://mran.microsoft.com/].

            Scripts directly from MariaDB, just as SQL Server, from 2017 Edition onward, allows to do so:
            * [sp_execute_external_script (Transact-SQL)|https://docs.microsoft.com/es-es/sql/relational-databases/system-stored-procedures/sp-execute-external-script-transact-sql?view=sql-server-2017]
            * [Run Python using T-SQL|https://docs.microsoft.com/en-us/sql/advanced-analytics/tutorials/run-python-using-t-sql?view=sql-server-2017]
            * [Using R functions with SQL Server data (R in SQL quickstart)|https://docs.microsoft.com/en-us/sql/advanced-analytics/tutorials/rtsql-using-r-functions-with-sql-server-data?view=sql-server-2017]

            The ultimate objetive is, for example, to trigger the execution of a remote Python/R Code for updating a predictive model in keras/h2o/tensorflow/... when new data is introduced into the database, or as part of a SQL procedure.

            h1. *2. MariaDB's CONNECT EXTERNAL SCRIPT: Implementation (OPTION A)*
            One possible implementation could be as follows:
            h2. *2.1. Enable External Script Execution:* my.ini
            {code:txt}
            [mysqld]
            connect_enable_execute_external_script = {0|1}
            connect_python_exe_dir = "C:/Users/J-tel/AppData/Local/Programs/Python/Python36-32/python.exe"
            connect_r_exe_dir = "C:/Program Files/Microsoft/R Open/R-3.4.3/bin/Rscript.exe"
            connect_max_exe_parallel = {1(Default)|Number}
            {code}

            h2. *2.2 Script Repository Creation:* CREATE TABLE
            For using the _"CONNECT REMOTE_TABLE"_ Engine, the user will have to create an empty table as follows:

            {code:SQL}
            CREATE [OR REPLACE] [IF NOT EXISTS] TABLE tbl_name
              ENGINE = CONNECT
              TABLE_TYPE = REMOTE_TABLE
              LANGUAGE = {R|Python}
              [PARALLEL={0|1}]
              [WITH VERSION CONTROL];
            {code}

            The CONNECT Engine will the automatically create a table with the following column definition:
            {code:SQL}
            CREATE [OR REPLACE] [IF NOT EXISTS] TABLE tbl_name
            (
              CALL VARCHAR(128) PRIMARY KEY,
              SCRIPT TEXT
            )
              ENGINE = CONNECT
              TABLE_TYPE = REMOTE_TABLE
              LANGUAGE = {R|Python}
              [PARALLEL={0|1}]
              [WITH VERSION CONTROL];
            {code}

            h2. *2.3 Save Scripts into the Repository:* INSERT INTO
            In order to save the R or Python Script to be called periodically from the MariaDB Server, the user will have 2 options:

            A. To Load the Script from a .TXT File into the Server:
            {code:SQL}
            INSERT INTO tbl_name (CALL, SCRIPT)
            VALUES("1-call_name", LOAD_FILE('/path/.../script_file_name.txt'));
            {code}

            B. To introduce the script directly through the IDE:
            {code:SQL}
            INSERT INTO tbl_name (CALL, SCRIPT)
            VALUES("1-call_name", QUOTE("... [R or Python Script] ..."));
            {code}

            h2. *3. Call a Script:* SELECT
            There will be 3 main ways of calling a R / Python Script from MariaDB:

            A. To Import an R / Python Script on the fly an call it from MariaDB Server:
            {code:SQL}
            SELECT
              LOAD_FILE('/path/.../script_file_name.txt'))
            FROM
              tbl_name;
            {code}

            B. To write a Script directly in the IDE and call it from MariaDB Server:
            {code:SQL}
            SELECT
              QUOTE("... [R or Python Script] ...")
            FROM
              tbl_name;
            {code}

            C. To call a previously saved R / Python Script into tbl_name:
            {code:SQL}
            SELECT
              *
            FROM
              tbl_name
            WHERE
              CALL = "1-call_name";
            {code}

            h1. MariaDB's CONNECT EXTERNAL SCRIPT Implementation: OPTION A
            Connect would send the SCRIPT text column to the .exe on the PATH (e.g.: RScript exe) and retrieve the select table any warnings that occurred during the execution, that could eventually even be stored in another table as a Data Quality check, to see if the script has been executed correctly.

            In the remote R/Python script, the script will have to make use of a ODBC Connection for importing the data from MariaDB, analyze it, and send it back away.

            This engine feature could imply security issues, so it shall be disabled by default, or even have its own USER security permission.

            Thank you.

            Best,
            Juan Telleria
            h1. *1. Objective*
            To give the possibility to call the execution of external:
            * [Python|https://www.python.org/].
            * Or [R Statistical Programming Language|https://mran.microsoft.com/].

            Scripts directly from MariaDB, just as SQL Server, from 2017 Edition onward, allows to do so:
            * [sp_execute_external_script (Transact-SQL)|https://docs.microsoft.com/es-es/sql/relational-databases/system-stored-procedures/sp-execute-external-script-transact-sql?view=sql-server-2017]
            * [Run Python using T-SQL|https://docs.microsoft.com/en-us/sql/advanced-analytics/tutorials/run-python-using-t-sql?view=sql-server-2017]
            * [Using R functions with SQL Server data (R in SQL quickstart)|https://docs.microsoft.com/en-us/sql/advanced-analytics/tutorials/rtsql-using-r-functions-with-sql-server-data?view=sql-server-2017]

            The ultimate objetive is, for example, to trigger the execution of a remote Python/R Code for updating a predictive model in keras/h2o/tensorflow/... when new data is introduced into the database, or as part of a SQL procedure.

            h1. *2. MariaDB's CONNECT EXTERNAL SCRIPT: Implementation (OPTION A)*
            One possible implementation could be as follows:
            h2. *2.1. Enable External Script Execution:* my.ini
            {code:txt}
            [mysqld]
            connect_enable_execute_external_script = {0|1}
            connect_python_exe_dir = "C:/Users/J-tel/AppData/Local/Programs/Python/Python36-32/python.exe"
            connect_r_exe_dir = "C:/Program Files/Microsoft/R Open/R-3.4.3/bin/Rscript.exe"
            connect_max_exe_parallel = {1(Default)|Number}
            {code}

            h2. *2.2 Script Repository Creation:* CREATE TABLE
            For using the _"CONNECT REMOTE_TABLE"_ Engine, the user will have to create an empty table as follows:

            {code:SQL}
            CREATE [OR REPLACE] [IF NOT EXISTS] TABLE tbl_name
              ENGINE = CONNECT
              TABLE_TYPE = REMOTE_TABLE
              LANGUAGE = {R|Python}
              [PARALLEL={0|1}]
              [WITH VERSION CONTROL];
            {code}

            h2. *3. Call a Script:* SELECT
            There will be 3 main ways of calling a R / Python Script from MariaDB:

            A. To Import an R / Python Script on the fly an call it from MariaDB Server:
            {code:SQL}
            SELECT
              LOAD_FILE('/path/.../script_file_name.txt'))
            FROM
              tbl_name;
            {code}

            B. To write a Script directly in the IDE and call it from MariaDB Server:
            {code:SQL}
            SELECT
              QUOTE("... [R or Python Script] ...")
            FROM
              tbl_name;
            {code}

            C. To call a previously saved R / Python Script into tbl_name:
            {code:SQL}
            SELECT
              *
            FROM
              tbl_name
            WHERE
              CALL = "1-call_name";
            {code}

            h1. MariaDB's CONNECT EXTERNAL SCRIPT Implementation: OPTION A
            Connect would send the SCRIPT text column to the .exe on the PATH (e.g.: RScript exe) and retrieve the select table any warnings that occurred during the execution, that could eventually even be stored in another table as a Data Quality check, to see if the script has been executed correctly.

            In the remote R/Python script, the script will have to make use of a ODBC Connection for importing the data from MariaDB, analyze it, and send it back away.

            This engine feature could imply security issues, so it shall be disabled by default, or even have its own USER security permission.

            Thank you.

            Best,
            Juan Telleria
            Juan Juan Telleria made changes -
            Description h1. *1. Objective*
            To give the possibility to call the execution of external:
            * [Python|https://www.python.org/].
            * Or [R Statistical Programming Language|https://mran.microsoft.com/].

            Scripts directly from MariaDB, just as SQL Server, from 2017 Edition onward, allows to do so:
            * [sp_execute_external_script (Transact-SQL)|https://docs.microsoft.com/es-es/sql/relational-databases/system-stored-procedures/sp-execute-external-script-transact-sql?view=sql-server-2017]
            * [Run Python using T-SQL|https://docs.microsoft.com/en-us/sql/advanced-analytics/tutorials/run-python-using-t-sql?view=sql-server-2017]
            * [Using R functions with SQL Server data (R in SQL quickstart)|https://docs.microsoft.com/en-us/sql/advanced-analytics/tutorials/rtsql-using-r-functions-with-sql-server-data?view=sql-server-2017]

            The ultimate objetive is, for example, to trigger the execution of a remote Python/R Code for updating a predictive model in keras/h2o/tensorflow/... when new data is introduced into the database, or as part of a SQL procedure.

            h1. *2. MariaDB's CONNECT EXTERNAL SCRIPT: Implementation (OPTION A)*
            One possible implementation could be as follows:
            h2. *2.1. Enable External Script Execution:* my.ini
            {code:txt}
            [mysqld]
            connect_enable_execute_external_script = {0|1}
            connect_python_exe_dir = "C:/Users/J-tel/AppData/Local/Programs/Python/Python36-32/python.exe"
            connect_r_exe_dir = "C:/Program Files/Microsoft/R Open/R-3.4.3/bin/Rscript.exe"
            connect_max_exe_parallel = {1(Default)|Number}
            {code}

            h2. *2.2 Script Repository Creation:* CREATE TABLE
            For using the _"CONNECT REMOTE_TABLE"_ Engine, the user will have to create an empty table as follows:

            {code:SQL}
            CREATE [OR REPLACE] [IF NOT EXISTS] TABLE tbl_name
              ENGINE = CONNECT
              TABLE_TYPE = REMOTE_TABLE
              LANGUAGE = {R|Python}
              [PARALLEL={0|1}]
              [WITH VERSION CONTROL];
            {code}

            h2. *3. Call a Script:* SELECT
            There will be 3 main ways of calling a R / Python Script from MariaDB:

            A. To Import an R / Python Script on the fly an call it from MariaDB Server:
            {code:SQL}
            SELECT
              LOAD_FILE('/path/.../script_file_name.txt'))
            FROM
              tbl_name;
            {code}

            B. To write a Script directly in the IDE and call it from MariaDB Server:
            {code:SQL}
            SELECT
              QUOTE("... [R or Python Script] ...")
            FROM
              tbl_name;
            {code}

            C. To call a previously saved R / Python Script into tbl_name:
            {code:SQL}
            SELECT
              *
            FROM
              tbl_name
            WHERE
              CALL = "1-call_name";
            {code}

            h1. MariaDB's CONNECT EXTERNAL SCRIPT Implementation: OPTION A
            Connect would send the SCRIPT text column to the .exe on the PATH (e.g.: RScript exe) and retrieve the select table any warnings that occurred during the execution, that could eventually even be stored in another table as a Data Quality check, to see if the script has been executed correctly.

            In the remote R/Python script, the script will have to make use of a ODBC Connection for importing the data from MariaDB, analyze it, and send it back away.

            This engine feature could imply security issues, so it shall be disabled by default, or even have its own USER security permission.

            Thank you.

            Best,
            Juan Telleria
            h1. *1. Objective*
            To give the possibility to call the execution of external:
            * [Python|https://www.python.org/].
            * Or [R Statistical Programming Language|https://mran.microsoft.com/].

            Scripts directly from MariaDB, just as SQL Server, from 2017 Edition onward, allows to do so:
            * [sp_execute_external_script (Transact-SQL)|https://docs.microsoft.com/es-es/sql/relational-databases/system-stored-procedures/sp-execute-external-script-transact-sql?view=sql-server-2017]
            * [Run Python using T-SQL|https://docs.microsoft.com/en-us/sql/advanced-analytics/tutorials/run-python-using-t-sql?view=sql-server-2017]
            * [Using R functions with SQL Server data (R in SQL quickstart)|https://docs.microsoft.com/en-us/sql/advanced-analytics/tutorials/rtsql-using-r-functions-with-sql-server-data?view=sql-server-2017]

            The ultimate objetive is, for example, to trigger the execution of a remote Python/R Code for updating a predictive model in keras/h2o/tensorflow/... when new data is introduced into the database, or as part of a SQL procedure.

            h1. *2. MariaDB's CONNECT EXTERNAL SCRIPT: Implementation*
            One possible implementation could be as follows:
            h2. *2.1. Enable External Script Execution:* my.ini
            {code:txt}
            [mysqld]
            connect_enable_execute_external_script = {0|1}
            connect_python_exe_dir = "C:/Users/J-tel/AppData/Local/Programs/Python/Python36-32/python.exe"
            connect_r_exe_dir = "C:/Program Files/Microsoft/R Open/R-3.4.3/bin/Rscript.exe"
            connect_max_exe_parallel = {1(Default)|Number}
            {code}

            h2. *2.2 Script Repository Creation:* CREATE TABLE
            For using the _"CONNECT REMOTE_TABLE"_ Engine, the user will have to create an empty table as follows:

            {code:SQL}
            CREATE [OR REPLACE] [IF NOT EXISTS] TABLE tbl_name
              ENGINE = CONNECT
              TABLE_TYPE = REMOTE_TABLE
              LANGUAGE = {R|Python}
              [PARALLEL={0|1}]
              [WITH VERSION CONTROL];
            {code}

            h2. *3. Call a Script:* SELECT
            There will be 3 main ways of calling a R / Python Script from MariaDB:

            A. To Import an R / Python Script on the fly an call it from MariaDB Server:
            {code:SQL}
            SELECT
              LOAD_FILE('/path/.../script_file_name.txt'))
            FROM
              tbl_name;
            {code}

            B. To write a Script directly in the IDE and call it from MariaDB Server:
            {code:SQL}
            SELECT
              QUOTE("... [R or Python Script] ...")
            FROM
              tbl_name;
            {code}

            C. To call a previously saved R / Python Script into tbl_name:
            {code:SQL}
            SELECT
              *
            FROM
              tbl_name
            WHERE
              CALL = "1-call_name";
            {code}

            h1. MariaDB's CONNECT EXTERNAL SCRIPT Implementation: OPTION A
            Connect would send the SCRIPT text column to the .exe on the PATH (e.g.: RScript exe) and retrieve the select table any warnings that occurred during the execution, that could eventually even be stored in another table as a Data Quality check, to see if the script has been executed correctly.

            In the remote R/Python script, the script will have to make use of a ODBC Connection for importing the data from MariaDB, analyze it, and send it back away.

            This engine feature could imply security issues, so it shall be disabled by default, or even have its own USER security permission.

            Thank you.

            Best,
            Juan Telleria
            Juan Juan Telleria made changes -
            Description h1. *1. Objective*
            To give the possibility to call the execution of external:
            * [Python|https://www.python.org/].
            * Or [R Statistical Programming Language|https://mran.microsoft.com/].

            Scripts directly from MariaDB, just as SQL Server, from 2017 Edition onward, allows to do so:
            * [sp_execute_external_script (Transact-SQL)|https://docs.microsoft.com/es-es/sql/relational-databases/system-stored-procedures/sp-execute-external-script-transact-sql?view=sql-server-2017]
            * [Run Python using T-SQL|https://docs.microsoft.com/en-us/sql/advanced-analytics/tutorials/run-python-using-t-sql?view=sql-server-2017]
            * [Using R functions with SQL Server data (R in SQL quickstart)|https://docs.microsoft.com/en-us/sql/advanced-analytics/tutorials/rtsql-using-r-functions-with-sql-server-data?view=sql-server-2017]

            The ultimate objetive is, for example, to trigger the execution of a remote Python/R Code for updating a predictive model in keras/h2o/tensorflow/... when new data is introduced into the database, or as part of a SQL procedure.

            h1. *2. MariaDB's CONNECT EXTERNAL SCRIPT: Implementation*
            One possible implementation could be as follows:
            h2. *2.1. Enable External Script Execution:* my.ini
            {code:txt}
            [mysqld]
            connect_enable_execute_external_script = {0|1}
            connect_python_exe_dir = "C:/Users/J-tel/AppData/Local/Programs/Python/Python36-32/python.exe"
            connect_r_exe_dir = "C:/Program Files/Microsoft/R Open/R-3.4.3/bin/Rscript.exe"
            connect_max_exe_parallel = {1(Default)|Number}
            {code}

            h2. *2.2 Script Repository Creation:* CREATE TABLE
            For using the _"CONNECT REMOTE_TABLE"_ Engine, the user will have to create an empty table as follows:

            {code:SQL}
            CREATE [OR REPLACE] [IF NOT EXISTS] TABLE tbl_name
              ENGINE = CONNECT
              TABLE_TYPE = REMOTE_TABLE
              LANGUAGE = {R|Python}
              [PARALLEL={0|1}]
              [WITH VERSION CONTROL];
            {code}

            h2. *3. Call a Script:* SELECT
            There will be 3 main ways of calling a R / Python Script from MariaDB:

            A. To Import an R / Python Script on the fly an call it from MariaDB Server:
            {code:SQL}
            SELECT
              LOAD_FILE('/path/.../script_file_name.txt'))
            FROM
              tbl_name;
            {code}

            B. To write a Script directly in the IDE and call it from MariaDB Server:
            {code:SQL}
            SELECT
              QUOTE("... [R or Python Script] ...")
            FROM
              tbl_name;
            {code}

            C. To call a previously saved R / Python Script into tbl_name:
            {code:SQL}
            SELECT
              *
            FROM
              tbl_name
            WHERE
              CALL = "1-call_name";
            {code}

            h1. MariaDB's CONNECT EXTERNAL SCRIPT Implementation: OPTION A
            Connect would send the SCRIPT text column to the .exe on the PATH (e.g.: RScript exe) and retrieve the select table any warnings that occurred during the execution, that could eventually even be stored in another table as a Data Quality check, to see if the script has been executed correctly.

            In the remote R/Python script, the script will have to make use of a ODBC Connection for importing the data from MariaDB, analyze it, and send it back away.

            This engine feature could imply security issues, so it shall be disabled by default, or even have its own USER security permission.

            Thank you.

            Best,
            Juan Telleria
            h1. *1. Objective*
            To give the possibility to call the execution of external:
            * [Python|https://www.python.org/].
            * Or [R Statistical Programming Language|https://mran.microsoft.com/].

            Scripts directly from MariaDB, just as SQL Server, from 2017 Edition onward, allows to do so:
            * [sp_execute_external_script (Transact-SQL)|https://docs.microsoft.com/es-es/sql/relational-databases/system-stored-procedures/sp-execute-external-script-transact-sql?view=sql-server-2017]
            * [Run Python using T-SQL|https://docs.microsoft.com/en-us/sql/advanced-analytics/tutorials/run-python-using-t-sql?view=sql-server-2017]
            * [Using R functions with SQL Server data (R in SQL quickstart)|https://docs.microsoft.com/en-us/sql/advanced-analytics/tutorials/rtsql-using-r-functions-with-sql-server-data?view=sql-server-2017]

            The ultimate objetive is, for example, to trigger the execution of a remote Python/R Code for updating a predictive model in keras/h2o/tensorflow/... when new data is introduced into the database, or as part of a SQL procedure.

            h1. *2. MariaDB's CONNECT EXTERNAL SCRIPT: Implementation*
            One possible implementation could be as follows:
            h2. *2.1. Enable External Script Execution:* my.ini
            {code:txt}
            [mysqld]
            connect_enable_execute_external_script = {0|1}
            connect_python_exe_dir = "C:/Users/J-tel/AppData/Local/Programs/Python/Python36-32/python.exe"
            connect_r_exe_dir = "C:/Program Files/Microsoft/R Open/R-3.4.3/bin/Rscript.exe"
            connect_max_exe_parallel = {1(Default)|Number}
            {code}

            h2. *2.2 Script Repository Creation:* CREATE TABLE
            For using the _"CONNECT REMOTE_TABLE"_ Engine, the user will have to create an empty table as follows:

            {code:SQL}
            CREATE [OR REPLACE] [IF NOT EXISTS] TABLE tbl_name_connect
              ENGINE = CONNECT
              TABLE_TYPE = REMOTE_TABLE
              LANGUAGE = {R|Python}
              [PARALLEL={0|1}]
              [WITH VERSION CONTROL];
            {code}

            h2. *3. Call a Script:* SELECT
            There will be 3 main ways of calling a R / Python Script from MariaDB:

            A. To Import an R / Python Script on the fly an call it from MariaDB Server:
            {code:SQL}
            SELECT
              LOAD_FILE('/path/.../script_file_name.txt'))
            FROM
              tbl_name_connect;
            {code}

            B. To write a Script directly in the IDE and call it from MariaDB Server:
            {code:SQL}
            SELECT
              QUOTE("... [R or Python Script] ...")
            FROM
              tbl_name_connect;
            {code}

            C. To call a previously saved R / Python Script into tbl_name:
            {code:SQL}
            SELECT
              (SELECT Col_Script FROM tbl_name_script_repository;)
            FROM
              tbl_name_connect;
            {code}

            h1. MariaDB's CONNECT EXTERNAL SCRIPT Implementation: OPTION A
            Connect would send the SCRIPT text column to the .exe on the PATH (e.g.: RScript exe) and retrieve the select table any warnings that occurred during the execution, that could eventually even be stored in another table as a Data Quality check, to see if the script has been executed correctly.

            In the remote R/Python script, the script will have to make use of a ODBC Connection for importing the data from MariaDB, analyze it, and send it back away.

            This engine feature could imply security issues, so it shall be disabled by default, or even have its own USER security permission.

            Thank you.

            Best,
            Juan Telleria
            Juan Juan Telleria made changes -
            Description h1. *1. Objective*
            To give the possibility to call the execution of external:
            * [Python|https://www.python.org/].
            * Or [R Statistical Programming Language|https://mran.microsoft.com/].

            Scripts directly from MariaDB, just as SQL Server, from 2017 Edition onward, allows to do so:
            * [sp_execute_external_script (Transact-SQL)|https://docs.microsoft.com/es-es/sql/relational-databases/system-stored-procedures/sp-execute-external-script-transact-sql?view=sql-server-2017]
            * [Run Python using T-SQL|https://docs.microsoft.com/en-us/sql/advanced-analytics/tutorials/run-python-using-t-sql?view=sql-server-2017]
            * [Using R functions with SQL Server data (R in SQL quickstart)|https://docs.microsoft.com/en-us/sql/advanced-analytics/tutorials/rtsql-using-r-functions-with-sql-server-data?view=sql-server-2017]

            The ultimate objetive is, for example, to trigger the execution of a remote Python/R Code for updating a predictive model in keras/h2o/tensorflow/... when new data is introduced into the database, or as part of a SQL procedure.

            h1. *2. MariaDB's CONNECT EXTERNAL SCRIPT: Implementation*
            One possible implementation could be as follows:
            h2. *2.1. Enable External Script Execution:* my.ini
            {code:txt}
            [mysqld]
            connect_enable_execute_external_script = {0|1}
            connect_python_exe_dir = "C:/Users/J-tel/AppData/Local/Programs/Python/Python36-32/python.exe"
            connect_r_exe_dir = "C:/Program Files/Microsoft/R Open/R-3.4.3/bin/Rscript.exe"
            connect_max_exe_parallel = {1(Default)|Number}
            {code}

            h2. *2.2 Script Repository Creation:* CREATE TABLE
            For using the _"CONNECT REMOTE_TABLE"_ Engine, the user will have to create an empty table as follows:

            {code:SQL}
            CREATE [OR REPLACE] [IF NOT EXISTS] TABLE tbl_name_connect
              ENGINE = CONNECT
              TABLE_TYPE = REMOTE_TABLE
              LANGUAGE = {R|Python}
              [PARALLEL={0|1}]
              [WITH VERSION CONTROL];
            {code}

            h2. *3. Call a Script:* SELECT
            There will be 3 main ways of calling a R / Python Script from MariaDB:

            A. To Import an R / Python Script on the fly an call it from MariaDB Server:
            {code:SQL}
            SELECT
              LOAD_FILE('/path/.../script_file_name.txt'))
            FROM
              tbl_name_connect;
            {code}

            B. To write a Script directly in the IDE and call it from MariaDB Server:
            {code:SQL}
            SELECT
              QUOTE("... [R or Python Script] ...")
            FROM
              tbl_name_connect;
            {code}

            C. To call a previously saved R / Python Script into tbl_name:
            {code:SQL}
            SELECT
              (SELECT Col_Script FROM tbl_name_script_repository;)
            FROM
              tbl_name_connect;
            {code}

            h1. MariaDB's CONNECT EXTERNAL SCRIPT Implementation: OPTION A
            Connect would send the SCRIPT text column to the .exe on the PATH (e.g.: RScript exe) and retrieve the select table any warnings that occurred during the execution, that could eventually even be stored in another table as a Data Quality check, to see if the script has been executed correctly.

            In the remote R/Python script, the script will have to make use of a ODBC Connection for importing the data from MariaDB, analyze it, and send it back away.

            This engine feature could imply security issues, so it shall be disabled by default, or even have its own USER security permission.

            Thank you.

            Best,
            Juan Telleria
            h1. *1. Objective*
            To give the possibility to call the execution of external:
            * [Python|https://www.python.org/].
            * Or [R Statistical Programming Language|https://mran.microsoft.com/].

            Scripts directly from MariaDB, just as SQL Server, from 2017 Edition onward, allows to do so:
            * [sp_execute_external_script (Transact-SQL)|https://docs.microsoft.com/es-es/sql/relational-databases/system-stored-procedures/sp-execute-external-script-transact-sql?view=sql-server-2017]
            * [Run Python using T-SQL|https://docs.microsoft.com/en-us/sql/advanced-analytics/tutorials/run-python-using-t-sql?view=sql-server-2017]
            * [Using R functions with SQL Server data (R in SQL quickstart)|https://docs.microsoft.com/en-us/sql/advanced-analytics/tutorials/rtsql-using-r-functions-with-sql-server-data?view=sql-server-2017]

            The ultimate objetive is, for example, to trigger the execution of a remote Python/R Code for updating a predictive model in keras/h2o/tensorflow/... when new data is introduced into the database, or as part of a SQL procedure.

            h1. OPTION 1: Through a CONNECT Table
            h2. *2. MariaDB's CONNECT EXTERNAL SCRIPT: Implementation*
            One possible implementation could be as follows:
            h3. *2.1. Enable External Script Execution:* my.ini
            {code:txt}
            [mysqld]
            connect_enable_execute_external_script = {0|1}
            connect_python_exe_dir = "C:/Users/J-tel/AppData/Local/Programs/Python/Python36-32/python.exe"
            connect_r_exe_dir = "C:/Program Files/Microsoft/R Open/R-3.4.3/bin/Rscript.exe"
            connect_max_exe_parallel = {1(Default)|Number}
            {code}

            h3. *2.2 Script Repository Creation:* CREATE TABLE
            For using the _"CONNECT REMOTE_TABLE"_ Engine, the user will have to create an empty table as follows:

            {code:SQL}
            CREATE [OR REPLACE] [IF NOT EXISTS] TABLE tbl_name_connect
              ENGINE = CONNECT
              TABLE_TYPE = REMOTE_TABLE
              LANGUAGE = {R|Python}
              [PARALLEL={0|1}]
              [WITH VERSION CONTROL];
            {code}

            h3. *3. Call a Script:* SELECT
            There will be 3 main ways of calling a R / Python Script from MariaDB:

            A. To Import an R / Python Script on the fly an call it from MariaDB Server:
            {code:SQL}
            SELECT
              LOAD_FILE('/path/.../script_file_name.txt'))
            FROM
              tbl_name_connect;
            {code}

            B. To write a Script directly in the IDE and call it from MariaDB Server:
            {code:SQL}
            SELECT
              QUOTE("... [R or Python Script] ...")
            FROM
              tbl_name_connect;
            {code}

            C. To call a previously saved R / Python Script into tbl_name:
            {code:SQL}
            SELECT
              (SELECT Col_Script FROM tbl_name_script_repository;)
            FROM
              tbl_name_connect;
            {code}

            h2. MariaDB's CONNECT EXTERNAL SCRIPT Implementation: OPTION A
            Connect would send the SCRIPT text column to the .exe on the PATH (e.g.: RScript exe) and retrieve the select table any warnings that occurred during the execution, that could eventually even be stored in another table as a Data Quality check, to see if the script has been executed correctly.

            In the remote R/Python script, the script will have to make use of a ODBC Connection for importing the data from MariaDB, analyze it, and send it back away.

            This engine feature could imply security issues, so it shall be disabled by default, or even have its own USER security permission.

            Thank you.

            Best,
            Juan Telleria
            Juan Juan Telleria made changes -
            Description h1. *1. Objective*
            To give the possibility to call the execution of external:
            * [Python|https://www.python.org/].
            * Or [R Statistical Programming Language|https://mran.microsoft.com/].

            Scripts directly from MariaDB, just as SQL Server, from 2017 Edition onward, allows to do so:
            * [sp_execute_external_script (Transact-SQL)|https://docs.microsoft.com/es-es/sql/relational-databases/system-stored-procedures/sp-execute-external-script-transact-sql?view=sql-server-2017]
            * [Run Python using T-SQL|https://docs.microsoft.com/en-us/sql/advanced-analytics/tutorials/run-python-using-t-sql?view=sql-server-2017]
            * [Using R functions with SQL Server data (R in SQL quickstart)|https://docs.microsoft.com/en-us/sql/advanced-analytics/tutorials/rtsql-using-r-functions-with-sql-server-data?view=sql-server-2017]

            The ultimate objetive is, for example, to trigger the execution of a remote Python/R Code for updating a predictive model in keras/h2o/tensorflow/... when new data is introduced into the database, or as part of a SQL procedure.

            h1. OPTION 1: Through a CONNECT Table
            h2. *2. MariaDB's CONNECT EXTERNAL SCRIPT: Implementation*
            One possible implementation could be as follows:
            h3. *2.1. Enable External Script Execution:* my.ini
            {code:txt}
            [mysqld]
            connect_enable_execute_external_script = {0|1}
            connect_python_exe_dir = "C:/Users/J-tel/AppData/Local/Programs/Python/Python36-32/python.exe"
            connect_r_exe_dir = "C:/Program Files/Microsoft/R Open/R-3.4.3/bin/Rscript.exe"
            connect_max_exe_parallel = {1(Default)|Number}
            {code}

            h3. *2.2 Script Repository Creation:* CREATE TABLE
            For using the _"CONNECT REMOTE_TABLE"_ Engine, the user will have to create an empty table as follows:

            {code:SQL}
            CREATE [OR REPLACE] [IF NOT EXISTS] TABLE tbl_name_connect
              ENGINE = CONNECT
              TABLE_TYPE = REMOTE_TABLE
              LANGUAGE = {R|Python}
              [PARALLEL={0|1}]
              [WITH VERSION CONTROL];
            {code}

            h3. *3. Call a Script:* SELECT
            There will be 3 main ways of calling a R / Python Script from MariaDB:

            A. To Import an R / Python Script on the fly an call it from MariaDB Server:
            {code:SQL}
            SELECT
              LOAD_FILE('/path/.../script_file_name.txt'))
            FROM
              tbl_name_connect;
            {code}

            B. To write a Script directly in the IDE and call it from MariaDB Server:
            {code:SQL}
            SELECT
              QUOTE("... [R or Python Script] ...")
            FROM
              tbl_name_connect;
            {code}

            C. To call a previously saved R / Python Script into tbl_name:
            {code:SQL}
            SELECT
              (SELECT Col_Script FROM tbl_name_script_repository;)
            FROM
              tbl_name_connect;
            {code}

            h2. MariaDB's CONNECT EXTERNAL SCRIPT Implementation: OPTION A
            Connect would send the SCRIPT text column to the .exe on the PATH (e.g.: RScript exe) and retrieve the select table any warnings that occurred during the execution, that could eventually even be stored in another table as a Data Quality check, to see if the script has been executed correctly.

            In the remote R/Python script, the script will have to make use of a ODBC Connection for importing the data from MariaDB, analyze it, and send it back away.

            This engine feature could imply security issues, so it shall be disabled by default, or even have its own USER security permission.

            Thank you.

            Best,
            Juan Telleria
            h1. *1. Objective*
            To give the possibility to call the execution of external:
            * [Python|https://www.python.org/].
            * Or [R Statistical Programming Language|https://mran.microsoft.com/].

            Scripts directly from MariaDB, just as SQL Server, from 2017 Edition onward, allows to do so:
            * [sp_execute_external_script (Transact-SQL)|https://docs.microsoft.com/es-es/sql/relational-databases/system-stored-procedures/sp-execute-external-script-transact-sql?view=sql-server-2017]
            * [Run Python using T-SQL|https://docs.microsoft.com/en-us/sql/advanced-analytics/tutorials/run-python-using-t-sql?view=sql-server-2017]
            * [Using R functions with SQL Server data (R in SQL quickstart)|https://docs.microsoft.com/en-us/sql/advanced-analytics/tutorials/rtsql-using-r-functions-with-sql-server-data?view=sql-server-2017]

            The ultimate objetive is, for example, to trigger the execution of a remote Python/R Code for updating a predictive model in keras/h2o/tensorflow/... when new data is introduced into the database, or as part of a SQL procedure.

            h1. *2. OPTION 1: Through a CONNECT Table*
            h2. *2. MariaDB's CONNECT EXTERNAL SCRIPT: Implementation*
            One possible implementation could be as follows:
            h3. *2.1. Enable External Script Execution:* my.ini
            {code:txt}
            [mysqld]
            connect_enable_execute_external_script = {0|1}
            connect_python_exe_dir = "C:/Users/J-tel/AppData/Local/Programs/Python/Python36-32/python.exe"
            connect_r_exe_dir = "C:/Program Files/Microsoft/R Open/R-3.4.3/bin/Rscript.exe"
            connect_max_exe_parallel = {1(Default)|Number}
            {code}

            h3. *2.2 Script Repository Creation:* CREATE TABLE
            For using the _"CONNECT REMOTE_TABLE"_ Engine, the user will have to create an empty table as follows:

            {code:SQL}
            CREATE [OR REPLACE] [IF NOT EXISTS] TABLE tbl_name_connect
              ENGINE = CONNECT
              TABLE_TYPE = REMOTE_TABLE
              LANGUAGE = {R|Python}
              [PARALLEL={0|1}]
              [WITH VERSION CONTROL];
            {code}

            h3. *3. Call a Script:* SELECT
            There will be 3 main ways of calling a R / Python Script from MariaDB:

            A. To Import an R / Python Script on the fly an call it from MariaDB Server:
            {code:SQL}
            SELECT
              LOAD_FILE('/path/.../script_file_name.txt'))
            FROM
              tbl_name_connect;
            {code}

            B. To write a Script directly in the IDE and call it from MariaDB Server:
            {code:SQL}
            SELECT
              QUOTE("... [R or Python Script] ...")
            FROM
              tbl_name_connect;
            {code}

            C. To call a previously saved R / Python Script into tbl_name:
            {code:SQL}
            SELECT
              (SELECT Col_Script FROM tbl_name_script_repository;)
            FROM
              tbl_name_connect;
            {code}

            h2. MariaDB's CONNECT EXTERNAL SCRIPT Implementation: OPTION A
            Connect would send the SCRIPT text column to the .exe on the PATH (e.g.: RScript exe) and retrieve the select table any warnings that occurred during the execution, that could eventually even be stored in another table as a Data Quality check, to see if the script has been executed correctly.

            In the remote R/Python script, the script will have to make use of a ODBC Connection for importing the data from MariaDB, analyze it, and send it back away.

            This engine feature could imply security issues, so it shall be disabled by default, or even have its own USER security permission.

            Thank you.

            Best,
            Juan Telleria
            Juan Juan Telleria made changes -
            Description h1. *1. Objective*
            To give the possibility to call the execution of external:
            * [Python|https://www.python.org/].
            * Or [R Statistical Programming Language|https://mran.microsoft.com/].

            Scripts directly from MariaDB, just as SQL Server, from 2017 Edition onward, allows to do so:
            * [sp_execute_external_script (Transact-SQL)|https://docs.microsoft.com/es-es/sql/relational-databases/system-stored-procedures/sp-execute-external-script-transact-sql?view=sql-server-2017]
            * [Run Python using T-SQL|https://docs.microsoft.com/en-us/sql/advanced-analytics/tutorials/run-python-using-t-sql?view=sql-server-2017]
            * [Using R functions with SQL Server data (R in SQL quickstart)|https://docs.microsoft.com/en-us/sql/advanced-analytics/tutorials/rtsql-using-r-functions-with-sql-server-data?view=sql-server-2017]

            The ultimate objetive is, for example, to trigger the execution of a remote Python/R Code for updating a predictive model in keras/h2o/tensorflow/... when new data is introduced into the database, or as part of a SQL procedure.

            h1. *2. OPTION 1: Through a CONNECT Table*
            h2. *2. MariaDB's CONNECT EXTERNAL SCRIPT: Implementation*
            One possible implementation could be as follows:
            h3. *2.1. Enable External Script Execution:* my.ini
            {code:txt}
            [mysqld]
            connect_enable_execute_external_script = {0|1}
            connect_python_exe_dir = "C:/Users/J-tel/AppData/Local/Programs/Python/Python36-32/python.exe"
            connect_r_exe_dir = "C:/Program Files/Microsoft/R Open/R-3.4.3/bin/Rscript.exe"
            connect_max_exe_parallel = {1(Default)|Number}
            {code}

            h3. *2.2 Script Repository Creation:* CREATE TABLE
            For using the _"CONNECT REMOTE_TABLE"_ Engine, the user will have to create an empty table as follows:

            {code:SQL}
            CREATE [OR REPLACE] [IF NOT EXISTS] TABLE tbl_name_connect
              ENGINE = CONNECT
              TABLE_TYPE = REMOTE_TABLE
              LANGUAGE = {R|Python}
              [PARALLEL={0|1}]
              [WITH VERSION CONTROL];
            {code}

            h3. *3. Call a Script:* SELECT
            There will be 3 main ways of calling a R / Python Script from MariaDB:

            A. To Import an R / Python Script on the fly an call it from MariaDB Server:
            {code:SQL}
            SELECT
              LOAD_FILE('/path/.../script_file_name.txt'))
            FROM
              tbl_name_connect;
            {code}

            B. To write a Script directly in the IDE and call it from MariaDB Server:
            {code:SQL}
            SELECT
              QUOTE("... [R or Python Script] ...")
            FROM
              tbl_name_connect;
            {code}

            C. To call a previously saved R / Python Script into tbl_name:
            {code:SQL}
            SELECT
              (SELECT Col_Script FROM tbl_name_script_repository;)
            FROM
              tbl_name_connect;
            {code}

            h2. MariaDB's CONNECT EXTERNAL SCRIPT Implementation: OPTION A
            Connect would send the SCRIPT text column to the .exe on the PATH (e.g.: RScript exe) and retrieve the select table any warnings that occurred during the execution, that could eventually even be stored in another table as a Data Quality check, to see if the script has been executed correctly.

            In the remote R/Python script, the script will have to make use of a ODBC Connection for importing the data from MariaDB, analyze it, and send it back away.

            This engine feature could imply security issues, so it shall be disabled by default, or even have its own USER security permission.

            Thank you.

            Best,
            Juan Telleria
            h1. *1. Objective*
            To give the possibility to call the execution of external:
            * [Python|https://www.python.org/].
            * Or [R Statistical Programming Language|https://mran.microsoft.com/].

            Scripts directly from MariaDB, just as SQL Server, from 2017 Edition onward, allows to do so:
            * [sp_execute_external_script (Transact-SQL)|https://docs.microsoft.com/es-es/sql/relational-databases/system-stored-procedures/sp-execute-external-script-transact-sql?view=sql-server-2017]
            * [Run Python using T-SQL|https://docs.microsoft.com/en-us/sql/advanced-analytics/tutorials/run-python-using-t-sql?view=sql-server-2017]
            * [Using R functions with SQL Server data (R in SQL quickstart)|https://docs.microsoft.com/en-us/sql/advanced-analytics/tutorials/rtsql-using-r-functions-with-sql-server-data?view=sql-server-2017]

            The ultimate objetive is, for example, to trigger the execution of a remote Python/R Code for updating a predictive model in keras/h2o/tensorflow/... when new data is introduced into the database, or as part of a SQL procedure.

            h1. *2. OPTION A: Through a CONNECT Table*
            h2. *2. MariaDB's CONNECT EXTERNAL SCRIPT: Implementation*
            One possible implementation could be as follows:
            h3. *2.1. Enable External Script Execution:* my.ini
            {code:txt}
            [mysqld]
            connect_enable_execute_external_script = {0|1}
            connect_python_exe_dir = "C:/Users/J-tel/AppData/Local/Programs/Python/Python36-32/python.exe"
            connect_r_exe_dir = "C:/Program Files/Microsoft/R Open/R-3.4.3/bin/Rscript.exe"
            connect_max_exe_parallel = {1(Default)|Number}
            {code}

            h3. *2.2 Script Repository Creation:* CREATE TABLE
            For using the _"CONNECT REMOTE_TABLE"_ Engine, the user will have to create an empty table as follows:

            {code:SQL}
            CREATE [OR REPLACE] [IF NOT EXISTS] TABLE tbl_name_connect
              ENGINE = CONNECT
              TABLE_TYPE = REMOTE_TABLE
              LANGUAGE = {R|Python}
              [PARALLEL={0|1}]
              [WITH VERSION CONTROL];
            {code}

            h3. *3. Call a Script:* SELECT
            There will be 3 main ways of calling a R / Python Script from MariaDB:

            A. To Import an R / Python Script on the fly an call it from MariaDB Server:
            {code:SQL}
            SELECT
              LOAD_FILE('/path/.../script_file_name.txt'))
            FROM
              tbl_name_connect;
            {code}

            B. To write a Script directly in the IDE and call it from MariaDB Server:
            {code:SQL}
            SELECT
              QUOTE("... [R or Python Script] ...")
            FROM
              tbl_name_connect;
            {code}

            C. To call a previously saved R / Python Script into tbl_name:
            {code:SQL}
            SELECT
              (SELECT Col_Script FROM tbl_name_script_repository;)
            FROM
              tbl_name_connect;
            {code}

            h2. MariaDB's CONNECT EXTERNAL SCRIPT Implementation: OPTION A
            Connect would send the SCRIPT text column to the .exe on the PATH (e.g.: RScript exe) and retrieve the select table any warnings that occurred during the execution, that could eventually even be stored in another table as a Data Quality check, to see if the script has been executed correctly.

            In the remote R/Python script, the script will have to make use of a ODBC Connection for importing the data from MariaDB, analyze it, and send it back away.

            This engine feature could imply security issues, so it shall be disabled by default, or even have its own USER security permission.

            Thank you.

            Best,
            Juan Telleria
            Juan Juan Telleria made changes -
            Description h1. *1. Objective*
            To give the possibility to call the execution of external:
            * [Python|https://www.python.org/].
            * Or [R Statistical Programming Language|https://mran.microsoft.com/].

            Scripts directly from MariaDB, just as SQL Server, from 2017 Edition onward, allows to do so:
            * [sp_execute_external_script (Transact-SQL)|https://docs.microsoft.com/es-es/sql/relational-databases/system-stored-procedures/sp-execute-external-script-transact-sql?view=sql-server-2017]
            * [Run Python using T-SQL|https://docs.microsoft.com/en-us/sql/advanced-analytics/tutorials/run-python-using-t-sql?view=sql-server-2017]
            * [Using R functions with SQL Server data (R in SQL quickstart)|https://docs.microsoft.com/en-us/sql/advanced-analytics/tutorials/rtsql-using-r-functions-with-sql-server-data?view=sql-server-2017]

            The ultimate objetive is, for example, to trigger the execution of a remote Python/R Code for updating a predictive model in keras/h2o/tensorflow/... when new data is introduced into the database, or as part of a SQL procedure.

            h1. *2. OPTION A: Through a CONNECT Table*
            h2. *2. MariaDB's CONNECT EXTERNAL SCRIPT: Implementation*
            One possible implementation could be as follows:
            h3. *2.1. Enable External Script Execution:* my.ini
            {code:txt}
            [mysqld]
            connect_enable_execute_external_script = {0|1}
            connect_python_exe_dir = "C:/Users/J-tel/AppData/Local/Programs/Python/Python36-32/python.exe"
            connect_r_exe_dir = "C:/Program Files/Microsoft/R Open/R-3.4.3/bin/Rscript.exe"
            connect_max_exe_parallel = {1(Default)|Number}
            {code}

            h3. *2.2 Script Repository Creation:* CREATE TABLE
            For using the _"CONNECT REMOTE_TABLE"_ Engine, the user will have to create an empty table as follows:

            {code:SQL}
            CREATE [OR REPLACE] [IF NOT EXISTS] TABLE tbl_name_connect
              ENGINE = CONNECT
              TABLE_TYPE = REMOTE_TABLE
              LANGUAGE = {R|Python}
              [PARALLEL={0|1}]
              [WITH VERSION CONTROL];
            {code}

            h3. *3. Call a Script:* SELECT
            There will be 3 main ways of calling a R / Python Script from MariaDB:

            A. To Import an R / Python Script on the fly an call it from MariaDB Server:
            {code:SQL}
            SELECT
              LOAD_FILE('/path/.../script_file_name.txt'))
            FROM
              tbl_name_connect;
            {code}

            B. To write a Script directly in the IDE and call it from MariaDB Server:
            {code:SQL}
            SELECT
              QUOTE("... [R or Python Script] ...")
            FROM
              tbl_name_connect;
            {code}

            C. To call a previously saved R / Python Script into tbl_name:
            {code:SQL}
            SELECT
              (SELECT Col_Script FROM tbl_name_script_repository;)
            FROM
              tbl_name_connect;
            {code}

            h2. MariaDB's CONNECT EXTERNAL SCRIPT Implementation: OPTION A
            Connect would send the SCRIPT text column to the .exe on the PATH (e.g.: RScript exe) and retrieve the select table any warnings that occurred during the execution, that could eventually even be stored in another table as a Data Quality check, to see if the script has been executed correctly.

            In the remote R/Python script, the script will have to make use of a ODBC Connection for importing the data from MariaDB, analyze it, and send it back away.

            This engine feature could imply security issues, so it shall be disabled by default, or even have its own USER security permission.

            Thank you.

            Best,
            Juan Telleria
            h1. *1. Objective*
            To give the possibility to call the execution of external:
            * [Python|https://www.python.org/].
            * Or [R Statistical Programming Language|https://mran.microsoft.com/].

            Scripts directly from MariaDB, just as SQL Server, from 2017 Edition onward, allows to do so:
            * [sp_execute_external_script (Transact-SQL)|https://docs.microsoft.com/es-es/sql/relational-databases/system-stored-procedures/sp-execute-external-script-transact-sql?view=sql-server-2017]
            * [Run Python using T-SQL|https://docs.microsoft.com/en-us/sql/advanced-analytics/tutorials/run-python-using-t-sql?view=sql-server-2017]
            * [Using R functions with SQL Server data (R in SQL quickstart)|https://docs.microsoft.com/en-us/sql/advanced-analytics/tutorials/rtsql-using-r-functions-with-sql-server-data?view=sql-server-2017]

            The ultimate objetive is, for example, to trigger the execution of a remote Python/R Code for updating a predictive model in keras/h2o/tensorflow/... when new data is introduced into the database, or as part of a SQL procedure.

            h1. *2. OPTION A: Through a CONNECT Table*
            h2. *2.1 Implementation*
            One possible implementation could be as follows:
            h3. *2.1.1. Enable External Script Execution:* my.ini
            {code:txt}
            [mysqld]
            connect_enable_execute_external_script = {0|1}
            connect_python_exe_dir = "C:/Users/J-tel/AppData/Local/Programs/Python/Python36-32/python.exe"
            connect_r_exe_dir = "C:/Program Files/Microsoft/R Open/R-3.4.3/bin/Rscript.exe"
            connect_max_exe_parallel = {1(Default)|Number}
            {code}

            h3. *2.1.2. Script Repository Creation:* CREATE TABLE
            For using the _"CONNECT REMOTE_TABLE"_ Engine, the user will have to create an empty table as follows:

            {code:SQL}
            CREATE [OR REPLACE] [IF NOT EXISTS] TABLE tbl_name_connect
              ENGINE = CONNECT
              TABLE_TYPE = REMOTE_TABLE
              LANGUAGE = {R|Python}
              [PARALLEL={0|1}]
              [WITH VERSION CONTROL];
            {code}

            h3. *2.1.3. Call a Script:* SELECT
            There will be 3 main ways of calling a R / Python Script from MariaDB:

            A. To Import an R / Python Script on the fly an call it from MariaDB Server:
            {code:SQL}
            SELECT
              LOAD_FILE('/path/.../script_file_name.txt'))
            FROM
              tbl_name_connect;
            {code}

            B. To write a Script directly in the IDE and call it from MariaDB Server:
            {code:SQL}
            SELECT
              QUOTE("... [R or Python Script] ...")
            FROM
              tbl_name_connect;
            {code}

            C. To call a previously saved R / Python Script into tbl_name:
            {code:SQL}
            SELECT
              (SELECT Col_Script FROM tbl_name_script_repository;)
            FROM
              tbl_name_connect;
            {code}

            h2. MariaDB's CONNECT EXTERNAL SCRIPT Implementation: OPTION A
            Connect would send the SCRIPT text column to the .exe on the PATH (e.g.: RScript exe) and retrieve the select table any warnings that occurred during the execution, that could eventually even be stored in another table as a Data Quality check, to see if the script has been executed correctly.

            In the remote R/Python script, the script will have to make use of a ODBC Connection for importing the data from MariaDB, analyze it, and send it back away.

            This engine feature could imply security issues, so it shall be disabled by default, or even have its own USER security permission.

            Thank you.

            Best,
            Juan Telleria
            Juan Juan Telleria made changes -
            Description h1. *1. Objective*
            To give the possibility to call the execution of external:
            * [Python|https://www.python.org/].
            * Or [R Statistical Programming Language|https://mran.microsoft.com/].

            Scripts directly from MariaDB, just as SQL Server, from 2017 Edition onward, allows to do so:
            * [sp_execute_external_script (Transact-SQL)|https://docs.microsoft.com/es-es/sql/relational-databases/system-stored-procedures/sp-execute-external-script-transact-sql?view=sql-server-2017]
            * [Run Python using T-SQL|https://docs.microsoft.com/en-us/sql/advanced-analytics/tutorials/run-python-using-t-sql?view=sql-server-2017]
            * [Using R functions with SQL Server data (R in SQL quickstart)|https://docs.microsoft.com/en-us/sql/advanced-analytics/tutorials/rtsql-using-r-functions-with-sql-server-data?view=sql-server-2017]

            The ultimate objetive is, for example, to trigger the execution of a remote Python/R Code for updating a predictive model in keras/h2o/tensorflow/... when new data is introduced into the database, or as part of a SQL procedure.

            h1. *2. OPTION A: Through a CONNECT Table*
            h2. *2.1 Implementation*
            One possible implementation could be as follows:
            h3. *2.1.1. Enable External Script Execution:* my.ini
            {code:txt}
            [mysqld]
            connect_enable_execute_external_script = {0|1}
            connect_python_exe_dir = "C:/Users/J-tel/AppData/Local/Programs/Python/Python36-32/python.exe"
            connect_r_exe_dir = "C:/Program Files/Microsoft/R Open/R-3.4.3/bin/Rscript.exe"
            connect_max_exe_parallel = {1(Default)|Number}
            {code}

            h3. *2.1.2. Script Repository Creation:* CREATE TABLE
            For using the _"CONNECT REMOTE_TABLE"_ Engine, the user will have to create an empty table as follows:

            {code:SQL}
            CREATE [OR REPLACE] [IF NOT EXISTS] TABLE tbl_name_connect
              ENGINE = CONNECT
              TABLE_TYPE = REMOTE_TABLE
              LANGUAGE = {R|Python}
              [PARALLEL={0|1}]
              [WITH VERSION CONTROL];
            {code}

            h3. *2.1.3. Call a Script:* SELECT
            There will be 3 main ways of calling a R / Python Script from MariaDB:

            A. To Import an R / Python Script on the fly an call it from MariaDB Server:
            {code:SQL}
            SELECT
              LOAD_FILE('/path/.../script_file_name.txt'))
            FROM
              tbl_name_connect;
            {code}

            B. To write a Script directly in the IDE and call it from MariaDB Server:
            {code:SQL}
            SELECT
              QUOTE("... [R or Python Script] ...")
            FROM
              tbl_name_connect;
            {code}

            C. To call a previously saved R / Python Script into tbl_name:
            {code:SQL}
            SELECT
              (SELECT Col_Script FROM tbl_name_script_repository;)
            FROM
              tbl_name_connect;
            {code}

            h2. MariaDB's CONNECT EXTERNAL SCRIPT Implementation: OPTION A
            Connect would send the SCRIPT text column to the .exe on the PATH (e.g.: RScript exe) and retrieve the select table any warnings that occurred during the execution, that could eventually even be stored in another table as a Data Quality check, to see if the script has been executed correctly.

            In the remote R/Python script, the script will have to make use of a ODBC Connection for importing the data from MariaDB, analyze it, and send it back away.

            This engine feature could imply security issues, so it shall be disabled by default, or even have its own USER security permission.

            Thank you.

            Best,
            Juan Telleria
            h1. *1. Objective*
            To give the possibility to call the execution of external:
            * [Python|https://www.python.org/].
            * Or [R Statistical Programming Language|https://mran.microsoft.com/].

            Scripts directly from MariaDB, just as SQL Server, from 2017 Edition onward, allows to do so:
            * [sp_execute_external_script (Transact-SQL)|https://docs.microsoft.com/es-es/sql/relational-databases/system-stored-procedures/sp-execute-external-script-transact-sql?view=sql-server-2017]
            * [Run Python using T-SQL|https://docs.microsoft.com/en-us/sql/advanced-analytics/tutorials/run-python-using-t-sql?view=sql-server-2017]
            * [Using R functions with SQL Server data (R in SQL quickstart)|https://docs.microsoft.com/en-us/sql/advanced-analytics/tutorials/rtsql-using-r-functions-with-sql-server-data?view=sql-server-2017]

            The ultimate objetive is, for example, to trigger the execution of a remote Python/R Code for updating a predictive model in keras/h2o/tensorflow/... when new data is introduced into the database, or as part of a SQL procedure.

            h1. *2. OPTION A: Through a Table*
            h2. *2.1 Implementation*
            One possible implementation could be as follows:
            h3. *2.1.1. Enable External Script Execution:* my.ini
            {code:txt}
            [mysqld]
            connect_enable_execute_external_script = {0|1}
            connect_python_exe_dir = "C:/Users/J-tel/AppData/Local/Programs/Python/Python36-32/python.exe"
            connect_r_exe_dir = "C:/Program Files/Microsoft/R Open/R-3.4.3/bin/Rscript.exe"
            connect_max_exe_parallel = {1(Default)|Number}
            {code}

            h3. *2.1.2. Script Repository Creation:* CREATE TABLE
            For using the _"CONNECT REMOTE_TABLE"_ Engine, the user will have to create an empty table as follows:

            {code:SQL}
            CREATE [OR REPLACE] [IF NOT EXISTS] TABLE tbl_name_connect
              ENGINE = CONNECT
              TABLE_TYPE = REMOTE_TABLE
              LANGUAGE = {R|Python}
              [PARALLEL={0|1}]
              [WITH VERSION CONTROL];
            {code}

            h3. *2.1.3. Call a Script:* SELECT
            There will be 3 main ways of calling a R / Python Script from MariaDB:

            A. To Import an R / Python Script on the fly an call it from MariaDB Server:
            {code:SQL}
            SELECT
              LOAD_FILE('/path/.../script_file_name.txt'))
            FROM
              tbl_name_connect;
            {code}

            B. To write a Script directly in the IDE and call it from MariaDB Server:
            {code:SQL}
            SELECT
              QUOTE("... [R or Python Script] ...")
            FROM
              tbl_name_connect;
            {code}

            C. To call a previously saved R / Python Script into tbl_name:
            {code:SQL}
            SELECT
              (SELECT Col_Script FROM tbl_name_script_repository;)
            FROM
              tbl_name_connect;
            {code}

            h2. MariaDB's CONNECT EXTERNAL SCRIPT Implementation: OPTION A
            Connect would send the SCRIPT text column to the .exe on the PATH (e.g.: RScript exe) and retrieve the select table any warnings that occurred during the execution, that could eventually even be stored in another table as a Data Quality check, to see if the script has been executed correctly.

            In the remote R/Python script, the script will have to make use of a ODBC Connection for importing the data from MariaDB, analyze it, and send it back away.

            This engine feature could imply security issues, so it shall be disabled by default, or even have its own USER security permission.

            Thank you.

            Best,
            Juan Telleria
            Juan Juan Telleria made changes -
            Description h1. *1. Objective*
            To give the possibility to call the execution of external:
            * [Python|https://www.python.org/].
            * Or [R Statistical Programming Language|https://mran.microsoft.com/].

            Scripts directly from MariaDB, just as SQL Server, from 2017 Edition onward, allows to do so:
            * [sp_execute_external_script (Transact-SQL)|https://docs.microsoft.com/es-es/sql/relational-databases/system-stored-procedures/sp-execute-external-script-transact-sql?view=sql-server-2017]
            * [Run Python using T-SQL|https://docs.microsoft.com/en-us/sql/advanced-analytics/tutorials/run-python-using-t-sql?view=sql-server-2017]
            * [Using R functions with SQL Server data (R in SQL quickstart)|https://docs.microsoft.com/en-us/sql/advanced-analytics/tutorials/rtsql-using-r-functions-with-sql-server-data?view=sql-server-2017]

            The ultimate objetive is, for example, to trigger the execution of a remote Python/R Code for updating a predictive model in keras/h2o/tensorflow/... when new data is introduced into the database, or as part of a SQL procedure.

            h1. *2. OPTION A: Through a Table*
            h2. *2.1 Implementation*
            One possible implementation could be as follows:
            h3. *2.1.1. Enable External Script Execution:* my.ini
            {code:txt}
            [mysqld]
            connect_enable_execute_external_script = {0|1}
            connect_python_exe_dir = "C:/Users/J-tel/AppData/Local/Programs/Python/Python36-32/python.exe"
            connect_r_exe_dir = "C:/Program Files/Microsoft/R Open/R-3.4.3/bin/Rscript.exe"
            connect_max_exe_parallel = {1(Default)|Number}
            {code}

            h3. *2.1.2. Script Repository Creation:* CREATE TABLE
            For using the _"CONNECT REMOTE_TABLE"_ Engine, the user will have to create an empty table as follows:

            {code:SQL}
            CREATE [OR REPLACE] [IF NOT EXISTS] TABLE tbl_name_connect
              ENGINE = CONNECT
              TABLE_TYPE = REMOTE_TABLE
              LANGUAGE = {R|Python}
              [PARALLEL={0|1}]
              [WITH VERSION CONTROL];
            {code}

            h3. *2.1.3. Call a Script:* SELECT
            There will be 3 main ways of calling a R / Python Script from MariaDB:

            A. To Import an R / Python Script on the fly an call it from MariaDB Server:
            {code:SQL}
            SELECT
              LOAD_FILE('/path/.../script_file_name.txt'))
            FROM
              tbl_name_connect;
            {code}

            B. To write a Script directly in the IDE and call it from MariaDB Server:
            {code:SQL}
            SELECT
              QUOTE("... [R or Python Script] ...")
            FROM
              tbl_name_connect;
            {code}

            C. To call a previously saved R / Python Script into tbl_name:
            {code:SQL}
            SELECT
              (SELECT Col_Script FROM tbl_name_script_repository;)
            FROM
              tbl_name_connect;
            {code}

            h2. MariaDB's CONNECT EXTERNAL SCRIPT Implementation: OPTION A
            Connect would send the SCRIPT text column to the .exe on the PATH (e.g.: RScript exe) and retrieve the select table any warnings that occurred during the execution, that could eventually even be stored in another table as a Data Quality check, to see if the script has been executed correctly.

            In the remote R/Python script, the script will have to make use of a ODBC Connection for importing the data from MariaDB, analyze it, and send it back away.

            This engine feature could imply security issues, so it shall be disabled by default, or even have its own USER security permission.

            Thank you.

            Best,
            Juan Telleria
            h1. *1. Objective*
            To give the possibility to call the execution of external:
            * [Python|https://www.python.org/].
            * Or [R Statistical Programming Language|https://mran.microsoft.com/].

            Scripts directly from MariaDB, just as SQL Server, from 2017 Edition onward, allows to do so:
            * [sp_execute_external_script (Transact-SQL)|https://docs.microsoft.com/es-es/sql/relational-databases/system-stored-procedures/sp-execute-external-script-transact-sql?view=sql-server-2017]
            * [Run Python using T-SQL|https://docs.microsoft.com/en-us/sql/advanced-analytics/tutorials/run-python-using-t-sql?view=sql-server-2017]
            * [Using R functions with SQL Server data (R in SQL quickstart)|https://docs.microsoft.com/en-us/sql/advanced-analytics/tutorials/rtsql-using-r-functions-with-sql-server-data?view=sql-server-2017]

            The ultimate objetive is, for example, to trigger the execution of a remote Python/R Code for updating a predictive model in keras/h2o/tensorflow/... when new data is introduced into the database, or as part of a SQL procedure.

            h1. *2. OPTION A: Through a Table*
            h2. *2.1 Implementation*
            One possible implementation could be as follows:
            h3. *2.1.1. Enable External Script Execution:* my.ini
            {code:txt}
            [mysqld]
            connect_enable_execute_external_script = {0|1}
            connect_python_exe_dir = "C:/Users/J-tel/AppData/Local/Programs/Python/Python36-32/python.exe"
            connect_r_exe_dir = "C:/Program Files/Microsoft/R Open/R-3.4.3/bin/Rscript.exe"
            connect_max_exe_parallel = {1(Default)|Number}
            {code}

            h3. *2.1.2. Script Repository Creation:* CREATE TABLE
            For using the _"CONNECT REMOTE_TABLE"_ Engine, the user will have to create an empty table as follows:

            {code:SQL}
            CREATE [OR REPLACE] [IF NOT EXISTS] TABLE tbl_name_connect
              ENGINE = CONNECT
              TABLE_TYPE = REMOTE_TABLE
              LANGUAGE = {R|Python}
              [PARALLEL={0|1}]
              [WITH VERSION CONTROL];
            {code}

            h3. *2.1.3. Call a Script:* SELECT
            There will be 3 main ways of calling a R / Python Script from MariaDB:

            A. To Import an R / Python Script on the fly an call it from MariaDB Server:
            {code:SQL}
            SELECT
              LOAD_FILE('/path/.../script_file_name.txt'))
            FROM
              tbl_name_connect;
            {code}

            B. To write a Script directly in the IDE and call it from MariaDB Server:
            {code:SQL}
            SELECT
              QUOTE("... [R or Python Script] ...")
            FROM
              tbl_name_connect;
            {code}

            C. To call a previously saved R / Python Script into tbl_name:
            {code:SQL}
            SELECT
              (SELECT Col_Script FROM tbl_name_script_repository;)
            FROM
              tbl_name_connect;
            {code}

            h2. *2.2 Internals*

            MariaDB's CONNECT EXTERNAL SCRIPT Implementation: OPTION A
            Connect would send the SCRIPT text column to the .exe on the PATH (e.g.: RScript exe) and retrieve the select table any warnings that occurred during the execution, that could eventually even be stored in another table as a Data Quality check, to see if the script has been executed correctly.

            In the remote R/Python script, the script will have to make use of a ODBC Connection for importing the data from MariaDB, analyze it, and send it back away.

            This engine feature could imply security issues, so it shall be disabled by default, or even have its own USER security permission.

            Thank you.

            Best,
            Juan Telleria
            Juan Juan Telleria made changes -
            Comment [ Of course, will elaborate when I arrive home, study thoroughly SQL Server's Implementation, ideate a simple implementation for MariaDB, and provide useful examples.

            An yes, maybe it would be better to provide some configuration settings through CONNECT Options, or even include some in the my.ini file for greater security, such as the Python or R .exe file path.

            Will also collaborate with documentation if implemented.

            Thank you.
            Juan ]
            Juan Juan Telleria made changes -
            Comment [ SCRIPT TEXT column would need to make use of:
            * NO_BACKSLASH_ESCAPES sql_mode.
            * Be saved with QUOTE() MariaDB function with a Insert into.

            Or even be another path to an external Python or R script in the Server :) ]
            Juan Juan Telleria made changes -
            Description h1. *1. Objective*
            To give the possibility to call the execution of external:
            * [Python|https://www.python.org/].
            * Or [R Statistical Programming Language|https://mran.microsoft.com/].

            Scripts directly from MariaDB, just as SQL Server, from 2017 Edition onward, allows to do so:
            * [sp_execute_external_script (Transact-SQL)|https://docs.microsoft.com/es-es/sql/relational-databases/system-stored-procedures/sp-execute-external-script-transact-sql?view=sql-server-2017]
            * [Run Python using T-SQL|https://docs.microsoft.com/en-us/sql/advanced-analytics/tutorials/run-python-using-t-sql?view=sql-server-2017]
            * [Using R functions with SQL Server data (R in SQL quickstart)|https://docs.microsoft.com/en-us/sql/advanced-analytics/tutorials/rtsql-using-r-functions-with-sql-server-data?view=sql-server-2017]

            The ultimate objetive is, for example, to trigger the execution of a remote Python/R Code for updating a predictive model in keras/h2o/tensorflow/... when new data is introduced into the database, or as part of a SQL procedure.

            h1. *2. OPTION A: Through a Table*
            h2. *2.1 Implementation*
            One possible implementation could be as follows:
            h3. *2.1.1. Enable External Script Execution:* my.ini
            {code:txt}
            [mysqld]
            connect_enable_execute_external_script = {0|1}
            connect_python_exe_dir = "C:/Users/J-tel/AppData/Local/Programs/Python/Python36-32/python.exe"
            connect_r_exe_dir = "C:/Program Files/Microsoft/R Open/R-3.4.3/bin/Rscript.exe"
            connect_max_exe_parallel = {1(Default)|Number}
            {code}

            h3. *2.1.2. Script Repository Creation:* CREATE TABLE
            For using the _"CONNECT REMOTE_TABLE"_ Engine, the user will have to create an empty table as follows:

            {code:SQL}
            CREATE [OR REPLACE] [IF NOT EXISTS] TABLE tbl_name_connect
              ENGINE = CONNECT
              TABLE_TYPE = REMOTE_TABLE
              LANGUAGE = {R|Python}
              [PARALLEL={0|1}]
              [WITH VERSION CONTROL];
            {code}

            h3. *2.1.3. Call a Script:* SELECT
            There will be 3 main ways of calling a R / Python Script from MariaDB:

            A. To Import an R / Python Script on the fly an call it from MariaDB Server:
            {code:SQL}
            SELECT
              LOAD_FILE('/path/.../script_file_name.txt'))
            FROM
              tbl_name_connect;
            {code}

            B. To write a Script directly in the IDE and call it from MariaDB Server:
            {code:SQL}
            SELECT
              QUOTE("... [R or Python Script] ...")
            FROM
              tbl_name_connect;
            {code}

            C. To call a previously saved R / Python Script into tbl_name:
            {code:SQL}
            SELECT
              (SELECT Col_Script FROM tbl_name_script_repository;)
            FROM
              tbl_name_connect;
            {code}

            h2. *2.2 Internals*

            MariaDB's CONNECT EXTERNAL SCRIPT Implementation: OPTION A
            Connect would send the SCRIPT text column to the .exe on the PATH (e.g.: RScript exe) and retrieve the select table any warnings that occurred during the execution, that could eventually even be stored in another table as a Data Quality check, to see if the script has been executed correctly.

            In the remote R/Python script, the script will have to make use of a ODBC Connection for importing the data from MariaDB, analyze it, and send it back away.

            This engine feature could imply security issues, so it shall be disabled by default, or even have its own USER security permission.

            Thank you.

            Best,
            Juan Telleria
            h1. *1. Objective*
            To give the possibility to call the execution of external:
            * [Python|https://www.python.org/].
            * Or [R Statistical Programming Language|https://mran.microsoft.com/].

            Scripts directly from MariaDB, just as SQL Server, from 2017 Edition onward, allows to do so:
            * [sp_execute_external_script (Transact-SQL)|https://docs.microsoft.com/es-es/sql/relational-databases/system-stored-procedures/sp-execute-external-script-transact-sql?view=sql-server-2017]
            * [Run Python using T-SQL|https://docs.microsoft.com/en-us/sql/advanced-analytics/tutorials/run-python-using-t-sql?view=sql-server-2017]
            * [Using R functions with SQL Server data (R in SQL quickstart)|https://docs.microsoft.com/en-us/sql/advanced-analytics/tutorials/rtsql-using-r-functions-with-sql-server-data?view=sql-server-2017]

            The ultimate objetive is, for example, to trigger the execution of a remote Python/R Code for updating a predictive model in keras/h2o/tensorflow/... when new data is introduced into the database, or as part of a SQL procedure.

            h1. *2. OPTION A: Through a Table*
            h2. *2.1 Implementation*
            One possible implementation could be as follows:
            h3. *2.1.1. Enable External Script Execution:* my.ini
            {code:txt}
            [mysqld]
            connect_enable_execute_external_script = {0|1}
            connect_python_exe_dir = "C:/Users/J-tel/AppData/Local/Programs/Python/Python36-32/python.exe"
            connect_r_exe_dir = "C:/Program Files/Microsoft/R Open/R-3.4.3/bin/Rscript.exe"
            connect_max_exe_parallel = {1(Default)|Number}
            {code}

            h3. *2.1.2. Script Repository Creation:* CREATE TABLE
            For using the _"CONNECT REMOTE_TABLE"_ Engine, the user will have to create an empty table as follows:

            {code:SQL}
            CREATE [OR REPLACE] [IF NOT EXISTS] TABLE tbl_name_connect
              ENGINE = CONNECT
              TABLE_TYPE = REMOTE_TABLE
              LANGUAGE = {R|Python}
              [PARALLEL={0|1}]
              [WITH VERSION CONTROL];
            {code}

            h3. *2.1.3. Call a Script:* SELECT
            There will be 3 main ways of calling a R / Python Script from MariaDB:

            A. To Import an R / Python Script on the fly an call it from MariaDB Server:
            {code:SQL}
            SELECT
              LOAD_FILE('/path/.../script_file_name.txt'))
            FROM
              tbl_name_connect;
            {code}

            B. To write a Script directly in the IDE and call it from MariaDB Server:
            {code:SQL}
            SELECT
              QUOTE("... [R or Python Script] ...")
            FROM
              tbl_name_connect;
            {code}

            C. To call a previously saved R / Python Script into tbl_name:
            {code:SQL}
            SELECT
              (SELECT Col_Script FROM tbl_name_script_repository;)
            FROM
              tbl_name_connect;
            {code}

            h2. *2.2 Internals*

            Connect will:
            # Send the Script Text to the .exe file.
            # Retrieve a data.frame Table (Last Evaluated Object or return() Object), or retrieve any error / warnings and if the execution was complete.

            An example R Script to execute in the RScript.exe, which makes use of an ODBC Connection, would be:
            {code:R}
            library(tidyverse)
            library(DBI)
            library(RMariaDB)

            con <- dbConnect(RMariaDB::MariaDB(), group = "my-db")

            dbWriteTable(con, "mtcars", mtcars)
            dbReadTable(con, "mtcars")
            dbDisconnect(con)
            {code}

            This engine feature could imply security issues, so it shall be disabled by default, or even have its own USER security permission.
            Juan Juan Telleria made changes -
            Description h1. *1. Objective*
            To give the possibility to call the execution of external:
            * [Python|https://www.python.org/].
            * Or [R Statistical Programming Language|https://mran.microsoft.com/].

            Scripts directly from MariaDB, just as SQL Server, from 2017 Edition onward, allows to do so:
            * [sp_execute_external_script (Transact-SQL)|https://docs.microsoft.com/es-es/sql/relational-databases/system-stored-procedures/sp-execute-external-script-transact-sql?view=sql-server-2017]
            * [Run Python using T-SQL|https://docs.microsoft.com/en-us/sql/advanced-analytics/tutorials/run-python-using-t-sql?view=sql-server-2017]
            * [Using R functions with SQL Server data (R in SQL quickstart)|https://docs.microsoft.com/en-us/sql/advanced-analytics/tutorials/rtsql-using-r-functions-with-sql-server-data?view=sql-server-2017]

            The ultimate objetive is, for example, to trigger the execution of a remote Python/R Code for updating a predictive model in keras/h2o/tensorflow/... when new data is introduced into the database, or as part of a SQL procedure.

            h1. *2. OPTION A: Through a Table*
            h2. *2.1 Implementation*
            One possible implementation could be as follows:
            h3. *2.1.1. Enable External Script Execution:* my.ini
            {code:txt}
            [mysqld]
            connect_enable_execute_external_script = {0|1}
            connect_python_exe_dir = "C:/Users/J-tel/AppData/Local/Programs/Python/Python36-32/python.exe"
            connect_r_exe_dir = "C:/Program Files/Microsoft/R Open/R-3.4.3/bin/Rscript.exe"
            connect_max_exe_parallel = {1(Default)|Number}
            {code}

            h3. *2.1.2. Script Repository Creation:* CREATE TABLE
            For using the _"CONNECT REMOTE_TABLE"_ Engine, the user will have to create an empty table as follows:

            {code:SQL}
            CREATE [OR REPLACE] [IF NOT EXISTS] TABLE tbl_name_connect
              ENGINE = CONNECT
              TABLE_TYPE = REMOTE_TABLE
              LANGUAGE = {R|Python}
              [PARALLEL={0|1}]
              [WITH VERSION CONTROL];
            {code}

            h3. *2.1.3. Call a Script:* SELECT
            There will be 3 main ways of calling a R / Python Script from MariaDB:

            A. To Import an R / Python Script on the fly an call it from MariaDB Server:
            {code:SQL}
            SELECT
              LOAD_FILE('/path/.../script_file_name.txt'))
            FROM
              tbl_name_connect;
            {code}

            B. To write a Script directly in the IDE and call it from MariaDB Server:
            {code:SQL}
            SELECT
              QUOTE("... [R or Python Script] ...")
            FROM
              tbl_name_connect;
            {code}

            C. To call a previously saved R / Python Script into tbl_name:
            {code:SQL}
            SELECT
              (SELECT Col_Script FROM tbl_name_script_repository;)
            FROM
              tbl_name_connect;
            {code}

            h2. *2.2 Internals*

            Connect will:
            # Send the Script Text to the .exe file.
            # Retrieve a data.frame Table (Last Evaluated Object or return() Object), or retrieve any error / warnings and if the execution was complete.

            An example R Script to execute in the RScript.exe, which makes use of an ODBC Connection, would be:
            {code:R}
            library(tidyverse)
            library(DBI)
            library(RMariaDB)

            con <- dbConnect(RMariaDB::MariaDB(), group = "my-db")

            dbWriteTable(con, "mtcars", mtcars)
            dbReadTable(con, "mtcars")
            dbDisconnect(con)
            {code}

            This engine feature could imply security issues, so it shall be disabled by default, or even have its own USER security permission.
            h1. *1. Objective*
            To give the possibility to call the execution of external:
            * [Python|https://www.python.org/].
            * Or [R Statistical Programming Language|https://mran.microsoft.com/].

            Scripts directly from MariaDB, just as SQL Server, from 2017 Edition onward, allows to do so:
            * [sp_execute_external_script (Transact-SQL)|https://docs.microsoft.com/es-es/sql/relational-databases/system-stored-procedures/sp-execute-external-script-transact-sql?view=sql-server-2017]
            * [Run Python using T-SQL|https://docs.microsoft.com/en-us/sql/advanced-analytics/tutorials/run-python-using-t-sql?view=sql-server-2017]
            * [Using R functions with SQL Server data (R in SQL quickstart)|https://docs.microsoft.com/en-us/sql/advanced-analytics/tutorials/rtsql-using-r-functions-with-sql-server-data?view=sql-server-2017]

            The ultimate objetive is, for example, to trigger the execution of a remote Python/R Code for updating a predictive model in keras/h2o/tensorflow/... when new data is introduced into the database, or as part of a SQL procedure.

            h1. *2. OPTION A: Through a Table*
            h2. *2.1 Implementation*
            One possible implementation could be as follows:
            h3. *2.1.1. Enable External Script Execution:* my.ini
            {code:txt}
            [mysqld]
            connect_enable_execute_external_script = {0|1}
            connect_python_exe_dir = "C:/Users/J-tel/AppData/Local/Programs/Python/Python36-32/python.exe"
            connect_r_exe_dir = "C:/Program Files/Microsoft/R Open/R-3.4.3/bin/Rscript.exe"
            connect_max_exe_parallel = {1(Default)|Number}
            {code}

            h3. *2.1.2. Script Repository Creation:* CREATE TABLE
            For using the _"CONNECT REMOTE_TABLE"_ Engine, the user will have to create an empty table as follows:

            {code:SQL}
            CREATE [OR REPLACE] [IF NOT EXISTS] TABLE tbl_name_connect
              ENGINE = CONNECT
              TABLE_TYPE = REMOTE_TABLE
              LANGUAGE = {R|Python}
              [PARALLEL={0|1}]
              [WITH VERSION CONTROL];
            {code}

            h3. *2.1.3. Call a Script:* SELECT
            There will be 3 main ways of calling a R / Python Script from MariaDB:

            A. To Import an R / Python Script on the fly an call it from MariaDB Server:
            {code:SQL}
            SELECT
              LOAD_FILE('/path/.../script_file_name.txt'))
            FROM
              tbl_name_connect;
            {code}

            B. To write a Script directly in the IDE and call it from MariaDB Server:
            {code:SQL}
            SELECT
              QUOTE("... [R or Python Script] ...")
            FROM
              tbl_name_connect;
            {code}

            C. To call a previously saved R / Python Script into tbl_name:
            {code:SQL}
            SELECT
              (SELECT Col_Script FROM tbl_name_script_repository;)
            FROM
              tbl_name_connect;
            {code}

            h2. *2.2 Internals*

            Connect will:
            # Send the Script Text to the .exe file.
            # Retrieve a data.frame Table (Last Evaluated Object or return() Object), or retrieve any error / warnings and if the execution was complete.

            An example R Script to execute in the RScript.exe, which makes use of an ODBC Connection, would be:
            {code:R}
            library(tidyverse)
            library(DBI)
            library(RMariaDB)

            con <- dbConnect(RMariaDB::MariaDB(), group = "my-db")

            dbWriteTable(con, "mtcars", mtcars)
            dbReadTable(con, "mtcars")
            dbDisconnect(con)
            {code}

            h2. *2.3. Security Issues*
            This engine feature could imply security issues, so it shall be disabled by default, or even have its own USER security permission.
            Juan Juan Telleria made changes -
            Description h1. *1. Objective*
            To give the possibility to call the execution of external:
            * [Python|https://www.python.org/].
            * Or [R Statistical Programming Language|https://mran.microsoft.com/].

            Scripts directly from MariaDB, just as SQL Server, from 2017 Edition onward, allows to do so:
            * [sp_execute_external_script (Transact-SQL)|https://docs.microsoft.com/es-es/sql/relational-databases/system-stored-procedures/sp-execute-external-script-transact-sql?view=sql-server-2017]
            * [Run Python using T-SQL|https://docs.microsoft.com/en-us/sql/advanced-analytics/tutorials/run-python-using-t-sql?view=sql-server-2017]
            * [Using R functions with SQL Server data (R in SQL quickstart)|https://docs.microsoft.com/en-us/sql/advanced-analytics/tutorials/rtsql-using-r-functions-with-sql-server-data?view=sql-server-2017]

            The ultimate objetive is, for example, to trigger the execution of a remote Python/R Code for updating a predictive model in keras/h2o/tensorflow/... when new data is introduced into the database, or as part of a SQL procedure.

            h1. *2. OPTION A: Through a Table*
            h2. *2.1 Implementation*
            One possible implementation could be as follows:
            h3. *2.1.1. Enable External Script Execution:* my.ini
            {code:txt}
            [mysqld]
            connect_enable_execute_external_script = {0|1}
            connect_python_exe_dir = "C:/Users/J-tel/AppData/Local/Programs/Python/Python36-32/python.exe"
            connect_r_exe_dir = "C:/Program Files/Microsoft/R Open/R-3.4.3/bin/Rscript.exe"
            connect_max_exe_parallel = {1(Default)|Number}
            {code}

            h3. *2.1.2. Script Repository Creation:* CREATE TABLE
            For using the _"CONNECT REMOTE_TABLE"_ Engine, the user will have to create an empty table as follows:

            {code:SQL}
            CREATE [OR REPLACE] [IF NOT EXISTS] TABLE tbl_name_connect
              ENGINE = CONNECT
              TABLE_TYPE = REMOTE_TABLE
              LANGUAGE = {R|Python}
              [PARALLEL={0|1}]
              [WITH VERSION CONTROL];
            {code}

            h3. *2.1.3. Call a Script:* SELECT
            There will be 3 main ways of calling a R / Python Script from MariaDB:

            A. To Import an R / Python Script on the fly an call it from MariaDB Server:
            {code:SQL}
            SELECT
              LOAD_FILE('/path/.../script_file_name.txt'))
            FROM
              tbl_name_connect;
            {code}

            B. To write a Script directly in the IDE and call it from MariaDB Server:
            {code:SQL}
            SELECT
              QUOTE("... [R or Python Script] ...")
            FROM
              tbl_name_connect;
            {code}

            C. To call a previously saved R / Python Script into tbl_name:
            {code:SQL}
            SELECT
              (SELECT Col_Script FROM tbl_name_script_repository;)
            FROM
              tbl_name_connect;
            {code}

            h2. *2.2 Internals*

            Connect will:
            # Send the Script Text to the .exe file.
            # Retrieve a data.frame Table (Last Evaluated Object or return() Object), or retrieve any error / warnings and if the execution was complete.

            An example R Script to execute in the RScript.exe, which makes use of an ODBC Connection, would be:
            {code:R}
            library(tidyverse)
            library(DBI)
            library(RMariaDB)

            con <- dbConnect(RMariaDB::MariaDB(), group = "my-db")

            dbWriteTable(con, "mtcars", mtcars)
            dbReadTable(con, "mtcars")
            dbDisconnect(con)
            {code}

            h2. *2.3. Security Issues*
            This engine feature could imply security issues, so it shall be disabled by default, or even have its own USER security permission.
            h1. *1. Objective*
            To give the possibility to call the execution of external:
            * [Python|https://www.python.org/].
            * Or [R Statistical Programming Language|https://mran.microsoft.com/].

            Scripts directly from MariaDB, just as SQL Server, from 2017 Edition onward, allows to do so:
            * [sp_execute_external_script (Transact-SQL)|https://docs.microsoft.com/es-es/sql/relational-databases/system-stored-procedures/sp-execute-external-script-transact-sql?view=sql-server-2017]
            * [Run Python using T-SQL|https://docs.microsoft.com/en-us/sql/advanced-analytics/tutorials/run-python-using-t-sql?view=sql-server-2017]
            * [Using R functions with SQL Server data (R in SQL quickstart)|https://docs.microsoft.com/en-us/sql/advanced-analytics/tutorials/rtsql-using-r-functions-with-sql-server-data?view=sql-server-2017]

            The ultimate objetive is, for example, to trigger the execution of a remote Python/R Code for updating a predictive model in keras/h2o/tensorflow/... when new data is introduced into the database, or as part of a SQL procedure.

            h1. *2. OPTION A: Through a Table*
            h2. *2.1 Implementation*
            One possible implementation could be as follows:
            h3. *2.1.1. Enable External Script Execution:* my.ini
            {code:txt}
            [mysqld]
            connect_enable_execute_external_script = {0|1}
            connect_python_exe_dir = "C:/Users/J-tel/AppData/Local/Programs/Python/Python36-32/python.exe"
            connect_r_exe_dir = "C:/Program Files/Microsoft/R Open/R-3.4.3/bin/Rscript.exe"
            connect_max_exe_parallel = {1(Default)|Number}
            {code}

            h3. *2.1.2. Script Repository Creation:* CREATE TABLE
            For using the _"CONNECT REMOTE_TABLE"_ Engine, the user will have to create an empty table as follows:

            {code:SQL}
            CREATE [OR REPLACE] [IF NOT EXISTS] TABLE tbl_name_connect
              ENGINE = CONNECT
              TABLE_TYPE = REMOTE_TABLE
              LANGUAGE = {R|Python}
              [PARALLEL={0|1}]
              [WITH VERSION CONTROL];
            {code}

            h3. *2.1.3. Call a Script:* SELECT
            There will be 3 main ways of calling a R / Python Script from MariaDB:

            A. To Import an R / Python Script on the fly an call it from MariaDB Server:
            {code:SQL}
            SELECT
              LOAD_FILE('/path/.../script_file_name.txt'))
            FROM
              tbl_name_connect;
            {code}

            B. To write a Script directly in the IDE and call it from MariaDB Server:
            {code:SQL}
            SELECT
              QUOTE("... [R or Python Script] ...")
            FROM
              tbl_name_connect;
            {code}

            C. To call a previously saved R / Python Script into tbl_name:
            {code:SQL}
            SELECT
              (SELECT Col_Script FROM tbl_name_script_repository;)
            FROM
              tbl_name_connect;
            {code}

            h2. *2.2 Internals*

            Connect will:
            # Send the Script Text to the .exe file.
            # Retrieve a data.frame Table (Last Evaluated Object or return() Object), or retrieve any error / warnings and if the execution was complete.

            An example R Script to execute in the RScript.exe, which makes use of an ODBC Connection, would be:
            {code:R}
            library(tidyverse)
            library(DBI)
            library(RMariaDB)

            con <- dbConnect(RMariaDB::MariaDB(), group = "my-db")

            dbWriteTable(con, "mtcars", mtcars)
            dbReadTable(con, "mtcars")
            dbDisconnect(con)
            {code}

            h2. *2.3. Security Issues*
            This engine feature could imply security issues, so it shall be disabled by default, or even have its own USER security permission.

            Maybe one solution would be to have to force the users to store the Python and R .exe directly in the MariaDB installation folders, so that greater care of such executable files can be taken in the system.

            2. OPTION B: Through a Stored Procedure
            It would be a stored procedure that could come by default in the "mysql" database, just as some other database management procedures come with the database instance.

            And it could "copy" how the SQL Server's Stored Procedure works, with MariaDB's particularities.

            I could ask the maintainer of the R "RMariaDB" package (Developed in C++ and R) in case he would be interested in collaborate in this project.
            Juan Juan Telleria made changes -
            Description h1. *1. Objective*
            To give the possibility to call the execution of external:
            * [Python|https://www.python.org/].
            * Or [R Statistical Programming Language|https://mran.microsoft.com/].

            Scripts directly from MariaDB, just as SQL Server, from 2017 Edition onward, allows to do so:
            * [sp_execute_external_script (Transact-SQL)|https://docs.microsoft.com/es-es/sql/relational-databases/system-stored-procedures/sp-execute-external-script-transact-sql?view=sql-server-2017]
            * [Run Python using T-SQL|https://docs.microsoft.com/en-us/sql/advanced-analytics/tutorials/run-python-using-t-sql?view=sql-server-2017]
            * [Using R functions with SQL Server data (R in SQL quickstart)|https://docs.microsoft.com/en-us/sql/advanced-analytics/tutorials/rtsql-using-r-functions-with-sql-server-data?view=sql-server-2017]

            The ultimate objetive is, for example, to trigger the execution of a remote Python/R Code for updating a predictive model in keras/h2o/tensorflow/... when new data is introduced into the database, or as part of a SQL procedure.

            h1. *2. OPTION A: Through a Table*
            h2. *2.1 Implementation*
            One possible implementation could be as follows:
            h3. *2.1.1. Enable External Script Execution:* my.ini
            {code:txt}
            [mysqld]
            connect_enable_execute_external_script = {0|1}
            connect_python_exe_dir = "C:/Users/J-tel/AppData/Local/Programs/Python/Python36-32/python.exe"
            connect_r_exe_dir = "C:/Program Files/Microsoft/R Open/R-3.4.3/bin/Rscript.exe"
            connect_max_exe_parallel = {1(Default)|Number}
            {code}

            h3. *2.1.2. Script Repository Creation:* CREATE TABLE
            For using the _"CONNECT REMOTE_TABLE"_ Engine, the user will have to create an empty table as follows:

            {code:SQL}
            CREATE [OR REPLACE] [IF NOT EXISTS] TABLE tbl_name_connect
              ENGINE = CONNECT
              TABLE_TYPE = REMOTE_TABLE
              LANGUAGE = {R|Python}
              [PARALLEL={0|1}]
              [WITH VERSION CONTROL];
            {code}

            h3. *2.1.3. Call a Script:* SELECT
            There will be 3 main ways of calling a R / Python Script from MariaDB:

            A. To Import an R / Python Script on the fly an call it from MariaDB Server:
            {code:SQL}
            SELECT
              LOAD_FILE('/path/.../script_file_name.txt'))
            FROM
              tbl_name_connect;
            {code}

            B. To write a Script directly in the IDE and call it from MariaDB Server:
            {code:SQL}
            SELECT
              QUOTE("... [R or Python Script] ...")
            FROM
              tbl_name_connect;
            {code}

            C. To call a previously saved R / Python Script into tbl_name:
            {code:SQL}
            SELECT
              (SELECT Col_Script FROM tbl_name_script_repository;)
            FROM
              tbl_name_connect;
            {code}

            h2. *2.2 Internals*

            Connect will:
            # Send the Script Text to the .exe file.
            # Retrieve a data.frame Table (Last Evaluated Object or return() Object), or retrieve any error / warnings and if the execution was complete.

            An example R Script to execute in the RScript.exe, which makes use of an ODBC Connection, would be:
            {code:R}
            library(tidyverse)
            library(DBI)
            library(RMariaDB)

            con <- dbConnect(RMariaDB::MariaDB(), group = "my-db")

            dbWriteTable(con, "mtcars", mtcars)
            dbReadTable(con, "mtcars")
            dbDisconnect(con)
            {code}

            h2. *2.3. Security Issues*
            This engine feature could imply security issues, so it shall be disabled by default, or even have its own USER security permission.

            Maybe one solution would be to have to force the users to store the Python and R .exe directly in the MariaDB installation folders, so that greater care of such executable files can be taken in the system.

            2. OPTION B: Through a Stored Procedure
            It would be a stored procedure that could come by default in the "mysql" database, just as some other database management procedures come with the database instance.

            And it could "copy" how the SQL Server's Stored Procedure works, with MariaDB's particularities.

            I could ask the maintainer of the R "RMariaDB" package (Developed in C++ and R) in case he would be interested in collaborate in this project.
            h1. *1. Objective*
            To give the possibility to call the execution of external:
            * [Python|https://www.python.org/].
            * Or [R Statistical Programming Language|https://mran.microsoft.com/].

            Scripts directly from MariaDB, just as SQL Server, from 2017 Edition onward, allows to do so:
            * [sp_execute_external_script (Transact-SQL)|https://docs.microsoft.com/es-es/sql/relational-databases/system-stored-procedures/sp-execute-external-script-transact-sql?view=sql-server-2017]
            * [Run Python using T-SQL|https://docs.microsoft.com/en-us/sql/advanced-analytics/tutorials/run-python-using-t-sql?view=sql-server-2017]
            * [Using R functions with SQL Server data (R in SQL quickstart)|https://docs.microsoft.com/en-us/sql/advanced-analytics/tutorials/rtsql-using-r-functions-with-sql-server-data?view=sql-server-2017]

            The ultimate objetive is, for example, to trigger the execution of a remote Python/R Code for updating a predictive model in keras/h2o/tensorflow/... when new data is introduced into the database, or as part of a SQL procedure.

            h1. *2. OPTION A: Through a Table*
            h2. *2.1 Implementation*
            One possible implementation could be as follows:
            h3. *2.1.1. Enable External Script Execution:* my.ini
            {code:txt}
            [mysqld]
            connect_enable_execute_external_script = {0|1}
            connect_python_exe_dir = "C:/Users/J-tel/AppData/Local/Programs/Python/Python36-32/python.exe"
            connect_r_exe_dir = "C:/Program Files/Microsoft/R Open/R-3.4.3/bin/Rscript.exe"
            connect_max_exe_parallel = {1(Default)|Number}
            {code}

            h3. *2.1.2. Script Repository Creation:* CREATE TABLE
            For using the _"CONNECT REMOTE_TABLE"_ Engine, the user will have to create an empty table as follows:

            {code:SQL}
            CREATE [OR REPLACE] [IF NOT EXISTS] TABLE tbl_name_connect
              ENGINE = CONNECT
              TABLE_TYPE = REMOTE_TABLE
              LANGUAGE = {R|Python}
              [PARALLEL={0|1}]
              [WITH VERSION CONTROL];
            {code}

            h3. *2.1.3. Call a Script:* SELECT
            There will be 3 main ways of calling a R / Python Script from MariaDB:

            A. To Import an R / Python Script on the fly an call it from MariaDB Server:
            {code:SQL}
            SELECT
              LOAD_FILE('/path/.../script_file_name.txt'))
            FROM
              tbl_name_connect;
            {code}

            B. To write a Script directly in the IDE and call it from MariaDB Server:
            {code:SQL}
            SELECT
              QUOTE("... [R or Python Script] ...")
            FROM
              tbl_name_connect;
            {code}

            C. To call a previously saved R / Python Script into tbl_name:
            {code:SQL}
            SELECT
              (SELECT Col_Script FROM tbl_name_script_repository;)
            FROM
              tbl_name_connect;
            {code}

            h2. *2.2 Internals*

            Connect will:
            # Send the Script Text to the .exe file.
            # Retrieve a data.frame Table (Last Evaluated Object or return() Object), or retrieve any error / warnings and if the execution was complete.

            An example R Script to execute in the RScript.exe, which makes use of an ODBC Connection, would be:
            {code:R}
            library(tidyverse)
            library(DBI)
            library(RMariaDB)

            con <- dbConnect(RMariaDB::MariaDB(), group = "my-db")

            dbWriteTable(con, "mtcars", mtcars)
            dbReadTable(con, "mtcars")
            dbDisconnect(con)
            {code}

            h2. *2.3. Security Issues*
            This engine feature could imply security issues, so it shall be disabled by default, or even have its own USER security permission.

            Maybe one solution would be to have to force the users to store the Python and R .exe directly in the MariaDB installation folders, so that greater care of such executable files can be taken in the system.

            h1. *3. OPTION B: Through a Stored Procedure*
            It would be a stored procedure that could come by default in the "mysql" database, just as some other database management procedures come with the database instance.

            And it could "copy" how the SQL Server's Stored Procedure works, with MariaDB's particularities.

            I could ask the maintainer of the R "RMariaDB" package (Developed in C++ and R) in case he would be interested in collaborate in this project.
            Juan Juan Telleria made changes -
            Description h1. *1. Objective*
            To give the possibility to call the execution of external:
            * [Python|https://www.python.org/].
            * Or [R Statistical Programming Language|https://mran.microsoft.com/].

            Scripts directly from MariaDB, just as SQL Server, from 2017 Edition onward, allows to do so:
            * [sp_execute_external_script (Transact-SQL)|https://docs.microsoft.com/es-es/sql/relational-databases/system-stored-procedures/sp-execute-external-script-transact-sql?view=sql-server-2017]
            * [Run Python using T-SQL|https://docs.microsoft.com/en-us/sql/advanced-analytics/tutorials/run-python-using-t-sql?view=sql-server-2017]
            * [Using R functions with SQL Server data (R in SQL quickstart)|https://docs.microsoft.com/en-us/sql/advanced-analytics/tutorials/rtsql-using-r-functions-with-sql-server-data?view=sql-server-2017]

            The ultimate objetive is, for example, to trigger the execution of a remote Python/R Code for updating a predictive model in keras/h2o/tensorflow/... when new data is introduced into the database, or as part of a SQL procedure.

            h1. *2. OPTION A: Through a Table*
            h2. *2.1 Implementation*
            One possible implementation could be as follows:
            h3. *2.1.1. Enable External Script Execution:* my.ini
            {code:txt}
            [mysqld]
            connect_enable_execute_external_script = {0|1}
            connect_python_exe_dir = "C:/Users/J-tel/AppData/Local/Programs/Python/Python36-32/python.exe"
            connect_r_exe_dir = "C:/Program Files/Microsoft/R Open/R-3.4.3/bin/Rscript.exe"
            connect_max_exe_parallel = {1(Default)|Number}
            {code}

            h3. *2.1.2. Script Repository Creation:* CREATE TABLE
            For using the _"CONNECT REMOTE_TABLE"_ Engine, the user will have to create an empty table as follows:

            {code:SQL}
            CREATE [OR REPLACE] [IF NOT EXISTS] TABLE tbl_name_connect
              ENGINE = CONNECT
              TABLE_TYPE = REMOTE_TABLE
              LANGUAGE = {R|Python}
              [PARALLEL={0|1}]
              [WITH VERSION CONTROL];
            {code}

            h3. *2.1.3. Call a Script:* SELECT
            There will be 3 main ways of calling a R / Python Script from MariaDB:

            A. To Import an R / Python Script on the fly an call it from MariaDB Server:
            {code:SQL}
            SELECT
              LOAD_FILE('/path/.../script_file_name.txt'))
            FROM
              tbl_name_connect;
            {code}

            B. To write a Script directly in the IDE and call it from MariaDB Server:
            {code:SQL}
            SELECT
              QUOTE("... [R or Python Script] ...")
            FROM
              tbl_name_connect;
            {code}

            C. To call a previously saved R / Python Script into tbl_name:
            {code:SQL}
            SELECT
              (SELECT Col_Script FROM tbl_name_script_repository;)
            FROM
              tbl_name_connect;
            {code}

            h2. *2.2 Internals*

            Connect will:
            # Send the Script Text to the .exe file.
            # Retrieve a data.frame Table (Last Evaluated Object or return() Object), or retrieve any error / warnings and if the execution was complete.

            An example R Script to execute in the RScript.exe, which makes use of an ODBC Connection, would be:
            {code:R}
            library(tidyverse)
            library(DBI)
            library(RMariaDB)

            con <- dbConnect(RMariaDB::MariaDB(), group = "my-db")

            dbWriteTable(con, "mtcars", mtcars)
            dbReadTable(con, "mtcars")
            dbDisconnect(con)
            {code}

            h2. *2.3. Security Issues*
            This engine feature could imply security issues, so it shall be disabled by default, or even have its own USER security permission.

            Maybe one solution would be to have to force the users to store the Python and R .exe directly in the MariaDB installation folders, so that greater care of such executable files can be taken in the system.

            h1. *3. OPTION B: Through a Stored Procedure*
            It would be a stored procedure that could come by default in the "mysql" database, just as some other database management procedures come with the database instance.

            And it could "copy" how the SQL Server's Stored Procedure works, with MariaDB's particularities.

            I could ask the maintainer of the R "RMariaDB" package (Developed in C++ and R) in case he would be interested in collaborate in this project.
            h1. *1. Objective*
            To give the possibility to call the execution of external:
            * [Python|https://www.python.org/].
            * Or [R Statistical Programming Language|https://mran.microsoft.com/].

            Scripts directly from MariaDB, just as SQL Server, from 2017 Edition onward, allows to do so:
            * [sp_execute_external_script (Transact-SQL)|https://docs.microsoft.com/es-es/sql/relational-databases/system-stored-procedures/sp-execute-external-script-transact-sql?view=sql-server-2017]
            * [Run Python using T-SQL|https://docs.microsoft.com/en-us/sql/advanced-analytics/tutorials/run-python-using-t-sql?view=sql-server-2017]
            * [Using R functions with SQL Server data (R in SQL quickstart)|https://docs.microsoft.com/en-us/sql/advanced-analytics/tutorials/rtsql-using-r-functions-with-sql-server-data?view=sql-server-2017]

            The ultimate objetive is, for example, to trigger the execution of a remote Python/R Code for updating a predictive model in keras/h2o/tensorflow/... when new data is introduced into the database, or as part of a SQL procedure.

            h1. *2. OPTION A: Through a Table*
            h2. *2.1 Implementation*
            One possible implementation could be as follows:
            h3. *2.1.1. Enable External Script Execution:* my.ini
            {code:txt}
            [mysqld]
            connect_enable_execute_external_script = {0|1}
            connect_python_exe_dir = "C:/Users/J-tel/AppData/Local/Programs/Python/Python36-32/python.exe"
            connect_r_exe_dir = "C:/Program Files/Microsoft/R Open/R-3.4.3/bin/Rscript.exe"
            connect_max_exe_parallel = {1(Default)|Number}
            {code}

            h3. *2.1.2. Script Repository Creation:* CREATE TABLE
            For using the _"CONNECT REMOTE_TABLE"_ Engine, the user will have to create an empty table as follows:

            {code:SQL}
            CREATE [OR REPLACE] [IF NOT EXISTS] TABLE tbl_name_connect
              ENGINE = CONNECT
              TABLE_TYPE = REMOTE_TABLE
              LANGUAGE = {R|Python}
              [PARALLEL={0|1}]
              [WITH VERSION CONTROL];
            {code}

            h3. *2.1.3. Call a Script:* SELECT
            There will be 3 main ways of calling a R / Python Script from MariaDB:

            A. To Import an R / Python Script on the fly an call it from MariaDB Server:
            {code:SQL}
            SELECT
              LOAD_FILE('/path/.../script_file_name.txt'))
            FROM
              tbl_name_connect;
            {code}

            B. To write a Script directly in the IDE and call it from MariaDB Server:
            {code:SQL}
            SELECT
              QUOTE("... [R or Python Script] ...")
            FROM
              tbl_name_connect;
            {code}

            C. To call a previously saved R / Python Script into tbl_name:
            {code:SQL}
            SELECT
              (SELECT Col_Script FROM tbl_name_script_repository;)
            FROM
              tbl_name_connect;
            {code}

            h2. *2.2 Internals*

            Connect will:
            # Send the Script Text to the .exe file.
            # Retrieve a data.frame Table (Last Evaluated Object or return() Object), or retrieve any error / warnings and if the execution was complete.

            An example R Script to execute in the RScript.exe, which makes use of an ODBC Connection, would be:
            {code:R}
            library(tidyverse)
            library(DBI)
            library(RMariaDB)

            con <- dbConnect(RMariaDB::MariaDB(), group = "my-db")

            dbWriteTable(con, "mtcars", mtcars)
            dbReadTable(con, "mtcars")
            dbDisconnect(con)
            {code}

            h2. *2.3. Security Issues*
            This engine feature could imply security issues, so it shall be disabled by default, or even have its own USER security permission.

            Maybe one solution would be to have to force the users to store the Python and R .exe directly in the MariaDB installation folders, so that greater care of such executable files can be taken in the system.

            h1. *3. OPTION B: Through a Stored Procedure*
            It would be a stored procedure that could come by default in the "mysql" database, just as some other database management procedures come with the database instance.

            And it could "copy" how the SQL Server's Stored Procedure works, with MariaDB's particularities.

            h1. *4. Collaboration*
            I could ask the maintainer of the R "RMariaDB" package (Developed in C++ and R) in case he would be interested in collaborate in this project.
            Juan Juan Telleria made changes -
            Comment [ bq. Can you elaborate by giving examples. ]
            Juan Juan Telleria added a comment - - edited

            Can you elaborate by giving examples.

            Done.

            SQL server requires the language to be specified, how about CONNECT?

            CONNECT would also need the language to be specified: 'R' or 'Python'

            So would all specifications of the script to execute be contained in options, not in columns?

            In my example, I've moved to my.ini options some configuration settings for greater sequrity.

            As I previously said, in a create table, columns definition is meant to describe the returned result and cannot be used for other purpose.

            In SQL Server, it is possible to return a Pandas DataFrame, and in R a data.frame, a tibble, and a data.table I guess. Also, it would be nice to return an empty table only with warnings / errors / etc. for remote execution without retrieving any results.

            Another problem is that all this is based on CONNECT executing an exe program. I don't know if it is possible and, even it is, it probably cannot be permitted for security reasons.

            It is also a concern for me, how does SQL Server solve it?

            for instance how to retrieve data from the script?

            We could request collaboration for R maybe to Kirill Müller, creator of package RMariaDB (https://cran.r-project.org/web/packages/RMariaDB/index.html), maybe he will be open for collaboration, or at least, give some advice.

            Thank you

            Juan Juan Telleria added a comment - - edited Can you elaborate by giving examples. Done. SQL server requires the language to be specified, how about CONNECT? CONNECT would also need the language to be specified: 'R' or 'Python' So would all specifications of the script to execute be contained in options, not in columns? In my example, I've moved to my.ini options some configuration settings for greater sequrity. As I previously said, in a create table, columns definition is meant to describe the returned result and cannot be used for other purpose. In SQL Server, it is possible to return a Pandas DataFrame, and in R a data.frame, a tibble, and a data.table I guess. Also, it would be nice to return an empty table only with warnings / errors / etc. for remote execution without retrieving any results. Another problem is that all this is based on CONNECT executing an exe program. I don't know if it is possible and, even it is, it probably cannot be permitted for security reasons. It is also a concern for me, how does SQL Server solve it? for instance how to retrieve data from the script? We could request collaboration for R maybe to Kirill Müller, creator of package RMariaDB ( https://cran.r-project.org/web/packages/RMariaDB/index.html ), maybe he will be open for collaboration, or at least, give some advice. Thank you
            Juan Juan Telleria made changes -
            Description h1. *1. Objective*
            To give the possibility to call the execution of external:
            * [Python|https://www.python.org/].
            * Or [R Statistical Programming Language|https://mran.microsoft.com/].

            Scripts directly from MariaDB, just as SQL Server, from 2017 Edition onward, allows to do so:
            * [sp_execute_external_script (Transact-SQL)|https://docs.microsoft.com/es-es/sql/relational-databases/system-stored-procedures/sp-execute-external-script-transact-sql?view=sql-server-2017]
            * [Run Python using T-SQL|https://docs.microsoft.com/en-us/sql/advanced-analytics/tutorials/run-python-using-t-sql?view=sql-server-2017]
            * [Using R functions with SQL Server data (R in SQL quickstart)|https://docs.microsoft.com/en-us/sql/advanced-analytics/tutorials/rtsql-using-r-functions-with-sql-server-data?view=sql-server-2017]

            The ultimate objetive is, for example, to trigger the execution of a remote Python/R Code for updating a predictive model in keras/h2o/tensorflow/... when new data is introduced into the database, or as part of a SQL procedure.

            h1. *2. OPTION A: Through a Table*
            h2. *2.1 Implementation*
            One possible implementation could be as follows:
            h3. *2.1.1. Enable External Script Execution:* my.ini
            {code:txt}
            [mysqld]
            connect_enable_execute_external_script = {0|1}
            connect_python_exe_dir = "C:/Users/J-tel/AppData/Local/Programs/Python/Python36-32/python.exe"
            connect_r_exe_dir = "C:/Program Files/Microsoft/R Open/R-3.4.3/bin/Rscript.exe"
            connect_max_exe_parallel = {1(Default)|Number}
            {code}

            h3. *2.1.2. Script Repository Creation:* CREATE TABLE
            For using the _"CONNECT REMOTE_TABLE"_ Engine, the user will have to create an empty table as follows:

            {code:SQL}
            CREATE [OR REPLACE] [IF NOT EXISTS] TABLE tbl_name_connect
              ENGINE = CONNECT
              TABLE_TYPE = REMOTE_TABLE
              LANGUAGE = {R|Python}
              [PARALLEL={0|1}]
              [WITH VERSION CONTROL];
            {code}

            h3. *2.1.3. Call a Script:* SELECT
            There will be 3 main ways of calling a R / Python Script from MariaDB:

            A. To Import an R / Python Script on the fly an call it from MariaDB Server:
            {code:SQL}
            SELECT
              LOAD_FILE('/path/.../script_file_name.txt'))
            FROM
              tbl_name_connect;
            {code}

            B. To write a Script directly in the IDE and call it from MariaDB Server:
            {code:SQL}
            SELECT
              QUOTE("... [R or Python Script] ...")
            FROM
              tbl_name_connect;
            {code}

            C. To call a previously saved R / Python Script into tbl_name:
            {code:SQL}
            SELECT
              (SELECT Col_Script FROM tbl_name_script_repository;)
            FROM
              tbl_name_connect;
            {code}

            h2. *2.2 Internals*

            Connect will:
            # Send the Script Text to the .exe file.
            # Retrieve a data.frame Table (Last Evaluated Object or return() Object), or retrieve any error / warnings and if the execution was complete.

            An example R Script to execute in the RScript.exe, which makes use of an ODBC Connection, would be:
            {code:R}
            library(tidyverse)
            library(DBI)
            library(RMariaDB)

            con <- dbConnect(RMariaDB::MariaDB(), group = "my-db")

            dbWriteTable(con, "mtcars", mtcars)
            dbReadTable(con, "mtcars")
            dbDisconnect(con)
            {code}

            h2. *2.3. Security Issues*
            This engine feature could imply security issues, so it shall be disabled by default, or even have its own USER security permission.

            Maybe one solution would be to have to force the users to store the Python and R .exe directly in the MariaDB installation folders, so that greater care of such executable files can be taken in the system.

            h1. *3. OPTION B: Through a Stored Procedure*
            It would be a stored procedure that could come by default in the "mysql" database, just as some other database management procedures come with the database instance.

            And it could "copy" how the SQL Server's Stored Procedure works, with MariaDB's particularities.

            h1. *4. Collaboration*
            I could ask the maintainer of the R "RMariaDB" package (Developed in C++ and R) in case he would be interested in collaborate in this project.
            h1. *1. Objective*
            To give the possibility to call the execution of external:
            * [Python|https://www.python.org/].
            * Or [R Statistical Programming Language|https://mran.microsoft.com/].

            Scripts directly from MariaDB, just as SQL Server, from 2017 Edition onward, allows to do so:
            * [sp_execute_external_script (Transact-SQL)|https://docs.microsoft.com/es-es/sql/relational-databases/system-stored-procedures/sp-execute-external-script-transact-sql?view=sql-server-2017]
            * [Run Python using T-SQL|https://docs.microsoft.com/en-us/sql/advanced-analytics/tutorials/run-python-using-t-sql?view=sql-server-2017]
            * [Using R functions with SQL Server data (R in SQL quickstart)|https://docs.microsoft.com/en-us/sql/advanced-analytics/tutorials/rtsql-using-r-functions-with-sql-server-data?view=sql-server-2017]

            The ultimate objetive is, for example, to trigger the execution of a remote Python/R Code for updating a predictive model in keras/h2o/tensorflow/... when new data is introduced into the database, or as part of a SQL procedure.

            h1. *2. OPTION A: Through a Table*
            h2. *2.1 Implementation*
            One possible implementation could be as follows:
            h3. *2.1.1. Enable External Script Execution:* my.ini
            {code:txt}
            [mysqld]
            connect_enable_execute_external_script = {0|1}
            connect_python_exe_dir = "C:/Users/J-tel/AppData/Local/Programs/Python/Python36-32/python.exe"
            connect_r_exe_dir = "C:/Program Files/Microsoft/R Open/R-3.4.3/bin/Rscript.exe"
            connect_max_exe_parallel = {1(Default)|Number}
            {code}

            h3. *2.1.2. Script Repository Creation:* CREATE TABLE
            For using the _"CONNECT REMOTE_TABLE"_ Engine, the user will have to create an empty table as follows:

            {code:SQL}
            CREATE [OR REPLACE] [IF NOT EXISTS] TABLE tbl_name_connect
              ENGINE = CONNECT
              TABLE_TYPE = REMOTE_TABLE
              LANGUAGE = {R|Python}
              [PARALLEL={0|1}]
              [WITH VERSION CONTROL];
            {code}

            h3. *2.1.3. Call a Script:* SELECT
            There will be 3 main ways of calling a R / Python Script from MariaDB:

            A. To Import an R / Python Script on the fly an call it from MariaDB Server:
            {code:SQL}
            SELECT
              LOAD_FILE('/path/.../script_file_name.txt'))
            FROM
              tbl_name_connect;
            {code}

            B. To write a Script directly in the IDE and call it from MariaDB Server:
            {code:SQL}
            SELECT
              QUOTE("... [R or Python Script] ...")
            FROM
              tbl_name_connect;
            {code}

            C. To call a previously saved R / Python Script into tbl_name:
            {code:SQL}
            SELECT
              (SELECT Col_Script FROM tbl_name_script_repository LIMIT 1;)
            FROM
              tbl_name_connect;
            {code}

            h2. *2.2 Internals*

            Connect will:
            # Send the Script Text to the .exe file.
            # Retrieve a data.frame Table (Last Evaluated Object or return() Object), or retrieve any error / warnings and if the execution was complete.

            An example R Script to execute in the RScript.exe, which makes use of an ODBC Connection, would be:
            {code:R}
            library(tidyverse)
            library(DBI)
            library(RMariaDB)

            con <- dbConnect(RMariaDB::MariaDB(), group = "my-db")

            dbWriteTable(con, "mtcars", mtcars)
            dbReadTable(con, "mtcars")
            dbDisconnect(con)
            {code}

            h2. *2.3. Security Issues*
            This engine feature could imply security issues, so it shall be disabled by default, or even have its own USER security permission.

            Maybe one solution would be to have to force the users to store the Python and R .exe directly in the MariaDB installation folders, so that greater care of such executable files can be taken in the system.

            h1. *3. OPTION B: Through a Stored Procedure*
            It would be a stored procedure that could come by default in the "mysql" database, just as some other database management procedures come with the database instance.

            And it could "copy" how the SQL Server's Stored Procedure works, with MariaDB's particularities.

            h1. *4. Collaboration*
            I could ask the maintainer of the R "RMariaDB" package (Developed in C++ and R) in case he would be interested in collaborate in this project.

            From your description, this looks like a new feature of MariaDB, as it is for SQL Server. However, why this would be implemented by a storage engine? This request should be directly addressed to MariaDB development. Unless there is something proving that only CONNECT can be used to implement it, I won't study how to add it to CONNECT, because it seems to be too a complicate thing to do, and mainly because CONNECT being now a GA product, adding this would regress it to a beta availability product.

            bertrandop Olivier Bertrand added a comment - From your description, this looks like a new feature of MariaDB, as it is for SQL Server. However, why this would be implemented by a storage engine? This request should be directly addressed to MariaDB development. Unless there is something proving that only CONNECT can be used to implement it, I won't study how to add it to CONNECT, because it seems to be too a complicate thing to do, and mainly because CONNECT being now a GA product, adding this would regress it to a beta availability product.
            bertrandop Olivier Bertrand made changes -
            issue.field.resolutiondate 2018-06-09 09:13:06.0 2018-06-09 09:13:06.098
            bertrandop Olivier Bertrand made changes -
            Fix Version/s N/A [ 14700 ]
            Resolution Won't Do [ 10201 ]
            Status Open [ 1 ] Closed [ 6 ]
            Juan Juan Telleria added a comment -

            Maybe it shall have its own storage engine (Alpha), and for greater sequrity, this storage engine shall come with its own distribution of R / Python for greater safety.

            Mmmm... Thank you however, we at least tried

            Juan Juan Telleria added a comment - Maybe it shall have its own storage engine (Alpha), and for greater sequrity, this storage engine shall come with its own distribution of R / Python for greater safety. Mmmm... Thank you however, we at least tried
            Juan Juan Telleria added a comment - - edited

            However, why this would be implemented by a storage engine? This request should be directly addressed to MariaDB development.

            Have opened a new issue: MDEV-16453

            Juan Juan Telleria added a comment - - edited However, why this would be implemented by a storage engine? This request should be directly addressed to MariaDB development. Have opened a new issue: MDEV-16453
            Juan Juan Telleria made changes -
            Juan Juan Telleria made changes -
            Description h1. *1. Objective*
            To give the possibility to call the execution of external:
            * [Python|https://www.python.org/].
            * Or [R Statistical Programming Language|https://mran.microsoft.com/].

            Scripts directly from MariaDB, just as SQL Server, from 2017 Edition onward, allows to do so:
            * [sp_execute_external_script (Transact-SQL)|https://docs.microsoft.com/es-es/sql/relational-databases/system-stored-procedures/sp-execute-external-script-transact-sql?view=sql-server-2017]
            * [Run Python using T-SQL|https://docs.microsoft.com/en-us/sql/advanced-analytics/tutorials/run-python-using-t-sql?view=sql-server-2017]
            * [Using R functions with SQL Server data (R in SQL quickstart)|https://docs.microsoft.com/en-us/sql/advanced-analytics/tutorials/rtsql-using-r-functions-with-sql-server-data?view=sql-server-2017]

            The ultimate objetive is, for example, to trigger the execution of a remote Python/R Code for updating a predictive model in keras/h2o/tensorflow/... when new data is introduced into the database, or as part of a SQL procedure.

            h1. *2. OPTION A: Through a Table*
            h2. *2.1 Implementation*
            One possible implementation could be as follows:
            h3. *2.1.1. Enable External Script Execution:* my.ini
            {code:txt}
            [mysqld]
            connect_enable_execute_external_script = {0|1}
            connect_python_exe_dir = "C:/Users/J-tel/AppData/Local/Programs/Python/Python36-32/python.exe"
            connect_r_exe_dir = "C:/Program Files/Microsoft/R Open/R-3.4.3/bin/Rscript.exe"
            connect_max_exe_parallel = {1(Default)|Number}
            {code}

            h3. *2.1.2. Script Repository Creation:* CREATE TABLE
            For using the _"CONNECT REMOTE_TABLE"_ Engine, the user will have to create an empty table as follows:

            {code:SQL}
            CREATE [OR REPLACE] [IF NOT EXISTS] TABLE tbl_name_connect
              ENGINE = CONNECT
              TABLE_TYPE = REMOTE_TABLE
              LANGUAGE = {R|Python}
              [PARALLEL={0|1}]
              [WITH VERSION CONTROL];
            {code}

            h3. *2.1.3. Call a Script:* SELECT
            There will be 3 main ways of calling a R / Python Script from MariaDB:

            A. To Import an R / Python Script on the fly an call it from MariaDB Server:
            {code:SQL}
            SELECT
              LOAD_FILE('/path/.../script_file_name.txt'))
            FROM
              tbl_name_connect;
            {code}

            B. To write a Script directly in the IDE and call it from MariaDB Server:
            {code:SQL}
            SELECT
              QUOTE("... [R or Python Script] ...")
            FROM
              tbl_name_connect;
            {code}

            C. To call a previously saved R / Python Script into tbl_name:
            {code:SQL}
            SELECT
              (SELECT Col_Script FROM tbl_name_script_repository LIMIT 1;)
            FROM
              tbl_name_connect;
            {code}

            h2. *2.2 Internals*

            Connect will:
            # Send the Script Text to the .exe file.
            # Retrieve a data.frame Table (Last Evaluated Object or return() Object), or retrieve any error / warnings and if the execution was complete.

            An example R Script to execute in the RScript.exe, which makes use of an ODBC Connection, would be:
            {code:R}
            library(tidyverse)
            library(DBI)
            library(RMariaDB)

            con <- dbConnect(RMariaDB::MariaDB(), group = "my-db")

            dbWriteTable(con, "mtcars", mtcars)
            dbReadTable(con, "mtcars")
            dbDisconnect(con)
            {code}

            h2. *2.3. Security Issues*
            This engine feature could imply security issues, so it shall be disabled by default, or even have its own USER security permission.

            Maybe one solution would be to have to force the users to store the Python and R .exe directly in the MariaDB installation folders, so that greater care of such executable files can be taken in the system.

            h1. *3. OPTION B: Through a Stored Procedure*
            It would be a stored procedure that could come by default in the "mysql" database, just as some other database management procedures come with the database instance.

            And it could "copy" how the SQL Server's Stored Procedure works, with MariaDB's particularities.

            h1. *4. Collaboration*
            I could ask the maintainer of the R "RMariaDB" package (Developed in C++ and R) in case he would be interested in collaborate in this project.
            h1. *1. Objective*
            To give the possibility to call the execution of external:
            * [Python|https://www.python.org/].
            * Or [R Statistical Programming Language|https://mran.microsoft.com/].

            Scripts directly from MariaDB, just as SQL Server, from 2017 Edition onward, allows to do so:
            * [sp_execute_external_script (Transact-SQL)|https://docs.microsoft.com/es-es/sql/relational-databases/system-stored-procedures/sp-execute-external-script-transact-sql?view=sql-server-2017]
            * [Run Python using T-SQL|https://docs.microsoft.com/en-us/sql/advanced-analytics/tutorials/run-python-using-t-sql?view=sql-server-2017]
            * [Using R functions with SQL Server data (R in SQL quickstart)|https://docs.microsoft.com/en-us/sql/advanced-analytics/tutorials/rtsql-using-r-functions-with-sql-server-data?view=sql-server-2017]

            And PostgreSQL so does for Python:
            * [Chapter 42. PL/Python - Python Procedural Language|https://www.postgresql.org/docs/9.2/static/plpython.html]
            * [43.2. PL/Python Functions|https://www.postgresql.org/docs/9.4/static/plpython-funcs.html]

            The ultimate objetive is, for example, to trigger the execution of a remote Python/R Code for updating a predictive model in keras/h2o/tensorflow/... when new data is introduced into the database, or as part of a SQL procedure.

            h1. *2. OPTION A: Through a Table*
            h2. *2.1 Implementation*
            One possible implementation could be as follows:
            h3. *2.1.1. Enable External Script Execution:* my.ini
            {code:txt}
            [mysqld]
            connect_enable_execute_external_script = {0|1}
            connect_python_exe_dir = "C:/Users/J-tel/AppData/Local/Programs/Python/Python36-32/python.exe"
            connect_r_exe_dir = "C:/Program Files/Microsoft/R Open/R-3.4.3/bin/Rscript.exe"
            connect_max_exe_parallel = {1(Default)|Number}
            {code}

            h3. *2.1.2. Script Repository Creation:* CREATE TABLE
            For using the _"CONNECT REMOTE_TABLE"_ Engine, the user will have to create an empty table as follows:

            {code:SQL}
            CREATE [OR REPLACE] [IF NOT EXISTS] TABLE tbl_name_connect
              ENGINE = CONNECT
              TABLE_TYPE = REMOTE_TABLE
              LANGUAGE = {R|Python}
              [PARALLEL={0|1}]
              [WITH VERSION CONTROL];
            {code}

            h3. *2.1.3. Call a Script:* SELECT
            There will be 3 main ways of calling a R / Python Script from MariaDB:

            A. To Import an R / Python Script on the fly an call it from MariaDB Server:
            {code:SQL}
            SELECT
              LOAD_FILE('/path/.../script_file_name.txt'))
            FROM
              tbl_name_connect;
            {code}

            B. To write a Script directly in the IDE and call it from MariaDB Server:
            {code:SQL}
            SELECT
              QUOTE("... [R or Python Script] ...")
            FROM
              tbl_name_connect;
            {code}

            C. To call a previously saved R / Python Script into tbl_name:
            {code:SQL}
            SELECT
              (SELECT Col_Script FROM tbl_name_script_repository LIMIT 1;)
            FROM
              tbl_name_connect;
            {code}

            h2. *2.2 Internals*

            Connect will:
            # Send the Script Text to the .exe file.
            # Retrieve a data.frame Table (Last Evaluated Object or return() Object), or retrieve any error / warnings and if the execution was complete.

            An example R Script to execute in the RScript.exe, which makes use of an ODBC Connection, would be:
            {code:R}
            library(tidyverse)
            library(DBI)
            library(RMariaDB)

            con <- dbConnect(RMariaDB::MariaDB(), group = "my-db")

            dbWriteTable(con, "mtcars", mtcars)
            dbReadTable(con, "mtcars")
            dbDisconnect(con)
            {code}

            h2. *2.3. Security Issues*
            This engine feature could imply security issues, so it shall be disabled by default, or even have its own USER security permission.

            Maybe one solution would be to have to force the users to store the Python and R .exe directly in the MariaDB installation folders, so that greater care of such executable files can be taken in the system.

            h1. *3. OPTION B: Through a Stored Procedure*
            It would be a stored procedure that could come by default in the "mysql" database, just as some other database management procedures come with the database instance.

            And it could "copy" how the SQL Server's Stored Procedure works, with MariaDB's particularities.

            h1. *4. Collaboration*
            I could ask the maintainer of the R "RMariaDB" package (Developed in C++ and R) in case he would be interested in collaborate in this project.
            Juan Juan Telleria made changes -
            Description h1. *1. Objective*
            To give the possibility to call the execution of external:
            * [Python|https://www.python.org/].
            * Or [R Statistical Programming Language|https://mran.microsoft.com/].

            Scripts directly from MariaDB, just as SQL Server, from 2017 Edition onward, allows to do so:
            * [sp_execute_external_script (Transact-SQL)|https://docs.microsoft.com/es-es/sql/relational-databases/system-stored-procedures/sp-execute-external-script-transact-sql?view=sql-server-2017]
            * [Run Python using T-SQL|https://docs.microsoft.com/en-us/sql/advanced-analytics/tutorials/run-python-using-t-sql?view=sql-server-2017]
            * [Using R functions with SQL Server data (R in SQL quickstart)|https://docs.microsoft.com/en-us/sql/advanced-analytics/tutorials/rtsql-using-r-functions-with-sql-server-data?view=sql-server-2017]

            And PostgreSQL so does for Python:
            * [Chapter 42. PL/Python - Python Procedural Language|https://www.postgresql.org/docs/9.2/static/plpython.html]
            * [43.2. PL/Python Functions|https://www.postgresql.org/docs/9.4/static/plpython-funcs.html]

            The ultimate objetive is, for example, to trigger the execution of a remote Python/R Code for updating a predictive model in keras/h2o/tensorflow/... when new data is introduced into the database, or as part of a SQL procedure.

            h1. *2. OPTION A: Through a Table*
            h2. *2.1 Implementation*
            One possible implementation could be as follows:
            h3. *2.1.1. Enable External Script Execution:* my.ini
            {code:txt}
            [mysqld]
            connect_enable_execute_external_script = {0|1}
            connect_python_exe_dir = "C:/Users/J-tel/AppData/Local/Programs/Python/Python36-32/python.exe"
            connect_r_exe_dir = "C:/Program Files/Microsoft/R Open/R-3.4.3/bin/Rscript.exe"
            connect_max_exe_parallel = {1(Default)|Number}
            {code}

            h3. *2.1.2. Script Repository Creation:* CREATE TABLE
            For using the _"CONNECT REMOTE_TABLE"_ Engine, the user will have to create an empty table as follows:

            {code:SQL}
            CREATE [OR REPLACE] [IF NOT EXISTS] TABLE tbl_name_connect
              ENGINE = CONNECT
              TABLE_TYPE = REMOTE_TABLE
              LANGUAGE = {R|Python}
              [PARALLEL={0|1}]
              [WITH VERSION CONTROL];
            {code}

            h3. *2.1.3. Call a Script:* SELECT
            There will be 3 main ways of calling a R / Python Script from MariaDB:

            A. To Import an R / Python Script on the fly an call it from MariaDB Server:
            {code:SQL}
            SELECT
              LOAD_FILE('/path/.../script_file_name.txt'))
            FROM
              tbl_name_connect;
            {code}

            B. To write a Script directly in the IDE and call it from MariaDB Server:
            {code:SQL}
            SELECT
              QUOTE("... [R or Python Script] ...")
            FROM
              tbl_name_connect;
            {code}

            C. To call a previously saved R / Python Script into tbl_name:
            {code:SQL}
            SELECT
              (SELECT Col_Script FROM tbl_name_script_repository LIMIT 1;)
            FROM
              tbl_name_connect;
            {code}

            h2. *2.2 Internals*

            Connect will:
            # Send the Script Text to the .exe file.
            # Retrieve a data.frame Table (Last Evaluated Object or return() Object), or retrieve any error / warnings and if the execution was complete.

            An example R Script to execute in the RScript.exe, which makes use of an ODBC Connection, would be:
            {code:R}
            library(tidyverse)
            library(DBI)
            library(RMariaDB)

            con <- dbConnect(RMariaDB::MariaDB(), group = "my-db")

            dbWriteTable(con, "mtcars", mtcars)
            dbReadTable(con, "mtcars")
            dbDisconnect(con)
            {code}

            h2. *2.3. Security Issues*
            This engine feature could imply security issues, so it shall be disabled by default, or even have its own USER security permission.

            Maybe one solution would be to have to force the users to store the Python and R .exe directly in the MariaDB installation folders, so that greater care of such executable files can be taken in the system.

            h1. *3. OPTION B: Through a Stored Procedure*
            It would be a stored procedure that could come by default in the "mysql" database, just as some other database management procedures come with the database instance.

            And it could "copy" how the SQL Server's Stored Procedure works, with MariaDB's particularities.

            h1. *4. Collaboration*
            I could ask the maintainer of the R "RMariaDB" package (Developed in C++ and R) in case he would be interested in collaborate in this project.
            h1. *1. Objective*
            To give the possibility to call the execution of external:
            * [Python|https://www.python.org/].
            * Or [R Statistical Programming Language|https://mran.microsoft.com/].

            Scripts directly from MariaDB, just as SQL Server, from 2017 Edition onward, allows to do so:
            * [sp_execute_external_script (Transact-SQL)|https://docs.microsoft.com/es-es/sql/relational-databases/system-stored-procedures/sp-execute-external-script-transact-sql?view=sql-server-2017]
            * [Run Python using T-SQL|https://docs.microsoft.com/en-us/sql/advanced-analytics/tutorials/run-python-using-t-sql?view=sql-server-2017]
            * [Using R functions with SQL Server data (R in SQL quickstart)|https://docs.microsoft.com/en-us/sql/advanced-analytics/tutorials/rtsql-using-r-functions-with-sql-server-data?view=sql-server-2017]

            And PostgreSQL so does for Python:
            * [Chapter 42. PL/Python - Python Procedural Language|https://www.postgresql.org/docs/9.2/static/plpython.html]
            * [43.2. PL/Python Functions|https://www.postgresql.org/docs/9.4/static/plpython-funcs.html]

            The ultimate objetive is, for example, to trigger the execution of a remote Python/R Code for updating a predictive model in keras/h2o/tensorflow/... when new data is introduced into the database, or as part of a SQL procedure.

            h1. *2. OPTION A: Through a Table*
            h2. *2.1 Implementation*
            One possible implementation could be as follows:
            h3. *2.1.1. Enable External Script Execution:* my.ini
            {code:txt}
            [mysqld]
            connect_enable_execute_external_script = {0|1}
            connect_python_exe_dir = "C:/Users/J-tel/AppData/Local/Programs/Python/Python36-32/python.exe"
            connect_r_exe_dir = "C:/Program Files/Microsoft/R Open/R-3.4.3/bin/Rscript.exe"
            connect_max_exe_parallel = {1(Default)|Number}
            {code}

            h3. *2.1.2. Script Repository Creation:* CREATE TABLE
            For using the _"CONNECT REMOTE_TABLE"_ Engine, the user will have to create an empty table as follows:

            {code:SQL}
            CREATE [OR REPLACE] [IF NOT EXISTS] TABLE tbl_name_connect
              ENGINE = CONNECT
              TABLE_TYPE = REMOTE_TABLE
              LANGUAGE = {R|Python}
              [PARALLEL={0|1}]
              [WITH VERSION CONTROL];
            {code}

            h3. *2.1.3. Call a Script:* SELECT
            There will be 3 main ways of calling a R / Python Script from MariaDB:

            A. To Import an R / Python Script on the fly an call it from MariaDB Server:
            {code:SQL}
            SELECT
              LOAD_FILE('/path/.../script_file_name.txt'))
            FROM
              tbl_name_connect;
            {code}

            B. To write a Script directly in the IDE and call it from MariaDB Server:
            {code:SQL}
            SELECT
              QUOTE("... [R or Python Script] ...")
            FROM
              tbl_name_connect;
            {code}

            C. To call a previously saved R / Python Script into tbl_name:
            {code:SQL}
            SELECT
              (SELECT Col_Script FROM tbl_name_script_repository LIMIT 1;)
            FROM
              tbl_name_connect;
            {code}

            h2. *2.2 Internals*

            Connect will:
            # Send the Script Text to the .exe file.
            # Retrieve a data.frame Table (Last Evaluated Object or return() Object), or retrieve any error / warnings and if the execution was complete.

            An example R Script to execute in the RScript.exe, which makes use of an ODBC Connection, would be:
            {code:R}
            library(tidyverse)
            library(DBI)
            library(RMariaDB)

            con <- dbConnect(RMariaDB::MariaDB(), group = "my-db")

            dbWriteTable(con, "mtcars", mtcars)
            dbReadTable(con, "mtcars")
            dbDisconnect(con)
            {code}

            h2. *2.3. Security Issues*
            This new feature could imply security issues, so:
            * It shall be disabled by default.
            * Have its own USER security permission.
            * MariaDB to include its own trusted distributions of R and Python.

            Also another solution would be to have to force the users to store the Python and R .exe directly in the MariaDB installation folders, so that greater care of such executable files can be taken in the system.

            h1. *3. OPTION B: Through a Stored Procedure*
            It would be a stored procedure that could come by default in the "mysql" database, just as some other database management procedures come with the database instance.

            And it could "copy" how the SQL Server's Stored Procedure works, with MariaDB's particularities.

            h1. *4. Collaboration*
            I could ask the maintainer of the R "RMariaDB" package (Developed in C++ and R) in case he would be interested in collaborate in this project.
            Juan Juan Telleria made changes -
            Description h1. *1. Objective*
            To give the possibility to call the execution of external:
            * [Python|https://www.python.org/].
            * Or [R Statistical Programming Language|https://mran.microsoft.com/].

            Scripts directly from MariaDB, just as SQL Server, from 2017 Edition onward, allows to do so:
            * [sp_execute_external_script (Transact-SQL)|https://docs.microsoft.com/es-es/sql/relational-databases/system-stored-procedures/sp-execute-external-script-transact-sql?view=sql-server-2017]
            * [Run Python using T-SQL|https://docs.microsoft.com/en-us/sql/advanced-analytics/tutorials/run-python-using-t-sql?view=sql-server-2017]
            * [Using R functions with SQL Server data (R in SQL quickstart)|https://docs.microsoft.com/en-us/sql/advanced-analytics/tutorials/rtsql-using-r-functions-with-sql-server-data?view=sql-server-2017]

            And PostgreSQL so does for Python:
            * [Chapter 42. PL/Python - Python Procedural Language|https://www.postgresql.org/docs/9.2/static/plpython.html]
            * [43.2. PL/Python Functions|https://www.postgresql.org/docs/9.4/static/plpython-funcs.html]

            The ultimate objetive is, for example, to trigger the execution of a remote Python/R Code for updating a predictive model in keras/h2o/tensorflow/... when new data is introduced into the database, or as part of a SQL procedure.

            h1. *2. OPTION A: Through a Table*
            h2. *2.1 Implementation*
            One possible implementation could be as follows:
            h3. *2.1.1. Enable External Script Execution:* my.ini
            {code:txt}
            [mysqld]
            connect_enable_execute_external_script = {0|1}
            connect_python_exe_dir = "C:/Users/J-tel/AppData/Local/Programs/Python/Python36-32/python.exe"
            connect_r_exe_dir = "C:/Program Files/Microsoft/R Open/R-3.4.3/bin/Rscript.exe"
            connect_max_exe_parallel = {1(Default)|Number}
            {code}

            h3. *2.1.2. Script Repository Creation:* CREATE TABLE
            For using the _"CONNECT REMOTE_TABLE"_ Engine, the user will have to create an empty table as follows:

            {code:SQL}
            CREATE [OR REPLACE] [IF NOT EXISTS] TABLE tbl_name_connect
              ENGINE = CONNECT
              TABLE_TYPE = REMOTE_TABLE
              LANGUAGE = {R|Python}
              [PARALLEL={0|1}]
              [WITH VERSION CONTROL];
            {code}

            h3. *2.1.3. Call a Script:* SELECT
            There will be 3 main ways of calling a R / Python Script from MariaDB:

            A. To Import an R / Python Script on the fly an call it from MariaDB Server:
            {code:SQL}
            SELECT
              LOAD_FILE('/path/.../script_file_name.txt'))
            FROM
              tbl_name_connect;
            {code}

            B. To write a Script directly in the IDE and call it from MariaDB Server:
            {code:SQL}
            SELECT
              QUOTE("... [R or Python Script] ...")
            FROM
              tbl_name_connect;
            {code}

            C. To call a previously saved R / Python Script into tbl_name:
            {code:SQL}
            SELECT
              (SELECT Col_Script FROM tbl_name_script_repository LIMIT 1;)
            FROM
              tbl_name_connect;
            {code}

            h2. *2.2 Internals*

            Connect will:
            # Send the Script Text to the .exe file.
            # Retrieve a data.frame Table (Last Evaluated Object or return() Object), or retrieve any error / warnings and if the execution was complete.

            An example R Script to execute in the RScript.exe, which makes use of an ODBC Connection, would be:
            {code:R}
            library(tidyverse)
            library(DBI)
            library(RMariaDB)

            con <- dbConnect(RMariaDB::MariaDB(), group = "my-db")

            dbWriteTable(con, "mtcars", mtcars)
            dbReadTable(con, "mtcars")
            dbDisconnect(con)
            {code}

            h2. *2.3. Security Issues*
            This new feature could imply security issues, so:
            * It shall be disabled by default.
            * Have its own USER security permission.
            * MariaDB to include its own trusted distributions of R and Python.

            Also another solution would be to have to force the users to store the Python and R .exe directly in the MariaDB installation folders, so that greater care of such executable files can be taken in the system.

            h1. *3. OPTION B: Through a Stored Procedure*
            It would be a stored procedure that could come by default in the "mysql" database, just as some other database management procedures come with the database instance.

            And it could "copy" how the SQL Server's Stored Procedure works, with MariaDB's particularities.

            h1. *4. Collaboration*
            I could ask the maintainer of the R "RMariaDB" package (Developed in C++ and R) in case he would be interested in collaborate in this project.
            h1. *1. Objective*
            To give the possibility to call the execution of external:
            * [Python|https://www.python.org/].
            * Or [R Statistical Programming Language|https://mran.microsoft.com/].

            Scripts directly from MariaDB, just as SQL Server, from 2017 Edition onward, allows to do so:
            * [sp_execute_external_script (Transact-SQL)|https://docs.microsoft.com/es-es/sql/relational-databases/system-stored-procedures/sp-execute-external-script-transact-sql?view=sql-server-2017]
            * [Run Python using T-SQL|https://docs.microsoft.com/en-us/sql/advanced-analytics/tutorials/run-python-using-t-sql?view=sql-server-2017]
            * [Using R functions with SQL Server data (R in SQL quickstart)|https://docs.microsoft.com/en-us/sql/advanced-analytics/tutorials/rtsql-using-r-functions-with-sql-server-data?view=sql-server-2017]

            And PostgreSQL so does for Python:
            * [Chapter 42. PL/Python - Python Procedural Language|https://www.postgresql.org/docs/9.2/static/plpython.html]
            * [43.2. PL/Python Functions|https://www.postgresql.org/docs/9.4/static/plpython-funcs.html]

            The ultimate objetive is, for example, to trigger the execution of a remote Python/R Code for updating a predictive model in keras/h2o/tensorflow/... when new data is introduced into the database, or as part of a SQL procedure.

            h1. *2. OPTION A: Through a Table*
            h2. *2.1 Implementation*
            One possible implementation could be as follows:
            h3. *2.1.1. Enable External Script Execution:* my.ini
            {code:txt}
            [mysqld]
            connect_enable_execute_external_script = {0|1}
            connect_python_exe_dir = "C:/Users/J-tel/AppData/Local/Programs/Python/Python36-32/python.exe"
            connect_r_exe_dir = "C:/Program Files/Microsoft/R Open/R-3.4.3/bin/Rscript.exe"
            connect_max_exe_parallel = {1(Default)|Number}
            {code}

            h3. *2.1.2. Script Repository Creation:* CREATE TABLE
            For using the _"CONNECT REMOTE_TABLE"_ Engine, the user will have to create an empty table as follows:

            {code:SQL}
            CREATE [OR REPLACE] [IF NOT EXISTS] TABLE tbl_name_connect
              ENGINE = CONNECT
              TABLE_TYPE = REMOTE_TABLE
              LANGUAGE = {R|Python}
              [PARALLEL={0|1}]
              [WITH VERSION CONTROL];
            {code}

            h3. *2.1.3. Call a Script:* SELECT
            There will be 3 main ways of calling a R / Python Script from MariaDB:

            A. To Import an R / Python Script on the fly an call it from MariaDB Server:
            {code:SQL}
            SELECT
              LOAD_FILE('/path/.../script_file_name.txt'))
            FROM
              tbl_name_connect;
            {code}

            B. To write a Script directly in the IDE and call it from MariaDB Server:
            {code:SQL}
            SELECT
              QUOTE("... [R or Python Script] ...")
            FROM
              tbl_name_connect;
            {code}

            C. To call a previously saved R / Python Script into tbl_name:
            {code:SQL}
            SELECT
              (SELECT Col_Script FROM tbl_name_script_repository LIMIT 1;)
            FROM
              tbl_name_connect;
            {code}

            h2. *2.2 Internals*

            Connect will:
            # Send the Script Text to the .exe file.
            # Retrieve a data.frame Table (Last Evaluated Object or return() Object), or retrieve any error / warnings and if the execution was complete.

            An example R Script to execute in the RScript.exe, which makes use of an ODBC Connection, would be:
            {code:R}
            library(tidyverse)
            library(DBI)
            library(RMariaDB)

            con <- dbConnect(RMariaDB::MariaDB(), group = "my-db")

            dbWriteTable(con, "mtcars", mtcars)
            dbReadTable(con, "mtcars")
            dbDisconnect(con)
            {code}

            h2. *2.3. Security Issues*
            This new feature could imply security issues, so:
            * It shall be disabled by default.
            * Have its own USER security permission.
            * MariaDB to include its own trusted distributions of R and Python.

            Also another solution would be to have to force the users to store the Python and R .exe directly in the MariaDB installation folders, so that greater care of such executable files can be taken in the system.

            h1. *3. OPTION B: Through a Stored Procedure*
            This new feature could imply security issues, so:
            * It shall be disabled by default.
            * Have its own USER security permission.
            * MariaDB to include its own trusted distributions of R and Python.

            Also another solution would be to have to force the users to store the Python and R .exe directly in the MariaDB installation folders, so that greater care of such executable files can be taken in the system.

            h1. *4. Collaboration*
            I could ask the maintainer of the R "RMariaDB" package (Developed in C++ and R) in case he would be interested in collaborate in this project.
            Juan Juan Telleria added a comment -

            Do you know who in the MariaDB Development Team could reconsider this implementation with another focus?

            Could you re-assign the issue (if appropriate)?

            Thank you.
            Juan

            Juan Juan Telleria added a comment - Do you know who in the MariaDB Development Team could reconsider this implementation with another focus? Could you re-assign the issue (if appropriate)? Thank you. Juan

            Perhaps serg

            bertrandop Olivier Bertrand added a comment - Perhaps serg
            serg Sergei Golubchik made changes -
            Workflow MariaDB v3 [ 87720 ] MariaDB v4 [ 133583 ]

            People

              bertrandop Olivier Bertrand
              Juan Juan Telleria
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:

                Git Integration

                  Error rendering 'com.xiplink.jira.git.jira_git_plugin:git-issue-webpanel'. Please contact your Jira administrators.