Details
-
Task
-
Status: Open (View Workflow)
-
Major
-
Resolution: Unresolved
-
None
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:
- sp_execute_external_script (Transact-SQL)
- Run Python using T-SQL
- Using R functions with SQL Server data (R in SQL quickstart)
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. Implementation: Using 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:
- Copy the Script (TEXT) from MariaDB.
- Send it to the trusted .exe of R (RScript.exe) or Python (python.exe)
- Return a Pandas DataFrame (Python) or a data.table, data.frame, tibble (R), if anything returned, plus warnings and errors.
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.
Attachments
Issue Links
- is caused by
-
MDEV-16418 CONNECT Engine - Feature Request: Remote Script Execution
- Closed