{"id":12931,"date":"2023-11-26T18:56:09","date_gmt":"2023-11-26T17:56:09","guid":{"rendered":"https:\/\/www.salvis.com\/blog\/?p=12931"},"modified":"2023-11-26T18:57:40","modified_gmt":"2023-11-26T17:57:40","slug":"installing-mle-modules-in-the-oracle-database","status":"publish","type":"post","link":"https:\/\/www.salvis.com\/blog\/2023\/11\/26\/installing-mle-modules-in-the-oracle-database\/","title":{"rendered":"Installing MLE Modules in the Oracle Database"},"content":{"rendered":"\n<h2 class=\"wp-block-heading\">Introduction<\/h2>\n\n\n\n<p>In my <a href=\"https:\/\/www.salvis.com\/blog\/2023\/11\/12\/mle-typescript-javascript-modules\/#deployment\">previous blog post<\/a>, I&#8217;ve shown how you can deploy an npm module from a URL and a custom ESM module from a local file into a remote Oracle Database 23c using JavaScript and SQLcl. This works well. However, for two MLE modules, I had to write 22 lines of code with duplications. I do not like that. I have therefore developed a small SQLcl custom command that greatly simplifies the installation of MLE modules in the Oracle Database.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">Installing the <code>mle<\/code> Custom Command<\/h2>\n\n\n\n<p>Start SQLcl and run the following command to install the custom command <code>mle<\/code> in the current session.<\/p>\n\n\n\n<div class=\"wp-block-kevinbatdorf-code-block-pro cbp-has-line-numbers\" data-code-block-pro-font-family=\"Code-Pro-JetBrains-Mono\" style=\"font-size:.875rem;font-family:Code-Pro-JetBrains-Mono,ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,monospace;--cbp-line-number-color:#D4D4D4;--cbp-line-number-width:calc(1 * 0.6 * .875rem);line-height:1.25rem;--cbp-tab-width:2;tab-size:var(--cbp-tab-width, 2)\"><span style=\"display:block;padding:16px 0 0 16px;margin-bottom:-1px;width:100%;text-align:left;background-color:#1E1E1E\"><svg xmlns=\"http:\/\/www.w3.org\/2000\/svg\" width=\"54\" height=\"14\" viewBox=\"0 0 54 14\"><g fill=\"none\" fill-rule=\"evenodd\" transform=\"translate(1 1)\"><circle cx=\"6\" cy=\"6\" r=\"6\" fill=\"#FF5F56\" stroke=\"#E0443E\" stroke-width=\".5\"><\/circle><circle cx=\"26\" cy=\"6\" r=\"6\" fill=\"#FFBD2E\" stroke=\"#DEA123\" stroke-width=\".5\"><\/circle><circle cx=\"46\" cy=\"6\" r=\"6\" fill=\"#27C93F\" stroke=\"#1AAB29\" stroke-width=\".5\"><\/circle><\/g><\/svg><\/span><span role=\"button\" tabindex=\"0\" data-code=\"script https:\/\/raw.githubusercontent.com\/PhilippSalvisberg\/mle-sqlcl\/main\/mle.js register\" style=\"color:#D4D4D4;display:none\" aria-label=\"Copy\" class=\"code-block-pro-copy-button\"><svg xmlns=\"http:\/\/www.w3.org\/2000\/svg\" style=\"width:24px;height:24px\" fill=\"none\" viewBox=\"0 0 24 24\" stroke=\"currentColor\" stroke-width=\"2\"><path class=\"with-check\" stroke-linecap=\"round\" stroke-linejoin=\"round\" d=\"M9 5H7a2 2 0 00-2 2v12a2 2 0 002 2h10a2 2 0 002-2V7a2 2 0 00-2-2h-2M9 5a2 2 0 002 2h2a2 2 0 002-2M9 5a2 2 0 012-2h2a2 2 0 012 2m-6 9l2 2 4-4\"><\/path><path class=\"without-check\" stroke-linecap=\"round\" stroke-linejoin=\"round\" d=\"M9 5H7a2 2 0 00-2 2v12a2 2 0 002 2h10a2 2 0 002-2V7a2 2 0 00-2-2h-2M9 5a2 2 0 002 2h2a2 2 0 002-2M9 5a2 2 0 012-2h2a2 2 0 012 2\"><\/path><\/svg><\/span><pre class=\"shiki dark-plus\" style=\"background-color: #1E1E1E\" tabindex=\"0\"><code><span class=\"line\"><span style=\"color: #D4D4D4\">script https:\/\/raw.githubusercontent.com\/PhilippSalvisberg\/mle-sqlcl\/main\/mle.js register<\/span><\/span><\/code><\/pre><\/div>\n\n\n\n<p>The SQLcl script command can read a JavaScript file from the local file system or from a URL. If you feel uncomfortable running JavaScript files directly from a URL, you can have a look at the <a href=\"https:\/\/github.com\/PhilippSalvisberg\/mle-sqlcl\">GitHub repo<\/a> first and download and run a chosen version of the script from the local file system.<\/p>\n\n\n\n<p>The <code>register<\/code> subcommand registers the <code>mle<\/code> script as an SQLcl command. However, this registration is not permanent. It will be lost after closing SQLcl. To make the custom command available in every new SQLcl session add the command above to your <code>login.sql<\/code> or <code>startup.sql<\/code>. SQLcl executes these files on start-up or after establishing a new connection. Just make sure that you have configured the <code>SQLPATH<\/code> environment variable accordingly. <\/p>\n\n\n\n<h2 class=\"wp-block-heading\">Providing Help<\/h2>\n\n\n\n<p>Now you can run the <code>mle<\/code> command like this:<\/p>\n\n\n\n<div class=\"wp-block-kevinbatdorf-code-block-pro cbp-has-line-numbers\" data-code-block-pro-font-family=\"Code-Pro-JetBrains-Mono\" style=\"font-size:.875rem;font-family:Code-Pro-JetBrains-Mono,ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,monospace;--cbp-line-number-color:#D4D4D4;--cbp-line-number-width:calc(1 * 0.6 * .875rem);line-height:1.25rem;--cbp-tab-width:2;tab-size:var(--cbp-tab-width, 2)\"><span style=\"display:block;padding:16px 0 0 16px;margin-bottom:-1px;width:100%;text-align:left;background-color:#1E1E1E\"><svg xmlns=\"http:\/\/www.w3.org\/2000\/svg\" width=\"54\" height=\"14\" viewBox=\"0 0 54 14\"><g fill=\"none\" fill-rule=\"evenodd\" transform=\"translate(1 1)\"><circle cx=\"6\" cy=\"6\" r=\"6\" fill=\"#FF5F56\" stroke=\"#E0443E\" stroke-width=\".5\"><\/circle><circle cx=\"26\" cy=\"6\" r=\"6\" fill=\"#FFBD2E\" stroke=\"#DEA123\" stroke-width=\".5\"><\/circle><circle cx=\"46\" cy=\"6\" r=\"6\" fill=\"#27C93F\" stroke=\"#1AAB29\" stroke-width=\".5\"><\/circle><\/g><\/svg><\/span><span role=\"button\" tabindex=\"0\" data-code=\"mle\" style=\"color:#D4D4D4;display:none\" aria-label=\"Copy\" class=\"code-block-pro-copy-button\"><svg xmlns=\"http:\/\/www.w3.org\/2000\/svg\" style=\"width:24px;height:24px\" fill=\"none\" viewBox=\"0 0 24 24\" stroke=\"currentColor\" stroke-width=\"2\"><path class=\"with-check\" stroke-linecap=\"round\" stroke-linejoin=\"round\" d=\"M9 5H7a2 2 0 00-2 2v12a2 2 0 002 2h10a2 2 0 002-2V7a2 2 0 00-2-2h-2M9 5a2 2 0 002 2h2a2 2 0 002-2M9 5a2 2 0 012-2h2a2 2 0 012 2m-6 9l2 2 4-4\"><\/path><path class=\"without-check\" stroke-linecap=\"round\" stroke-linejoin=\"round\" d=\"M9 5H7a2 2 0 00-2 2v12a2 2 0 002 2h10a2 2 0 002-2V7a2 2 0 00-2-2h-2M9 5a2 2 0 002 2h2a2 2 0 002-2M9 5a2 2 0 012-2h2a2 2 0 012 2\"><\/path><\/svg><\/span><pre class=\"shiki dark-plus\" style=\"background-color: #1E1E1E\" tabindex=\"0\"><code><span class=\"line\"><span style=\"color: #D4D4D4\">mle<\/span><\/span><\/code><\/pre><\/div>\n\n\n\n<p>Without parameters, an error message is displayed along with information on how to use this command.<\/p>\n\n\n\n<figure class=\"wp-block-image size-full\"><a href=\"https:\/\/www.salvis.com\/blog\/wp-content\/uploads\/2023\/11\/image-2.png\"><img loading=\"lazy\" decoding=\"async\" width=\"650\" height=\"498\" src=\"https:\/\/www.salvis.com\/blog\/wp-content\/uploads\/2023\/11\/image-2.png\" alt=\"Output of mle command without parameters\" class=\"wp-image-12934\" srcset=\"https:\/\/www.salvis.com\/blog\/wp-content\/uploads\/2023\/11\/image-2.png 650w, https:\/\/www.salvis.com\/blog\/wp-content\/uploads\/2023\/11\/image-2-300x230.png 300w, https:\/\/www.salvis.com\/blog\/wp-content\/uploads\/2023\/11\/image-2-98x75.png 98w, https:\/\/www.salvis.com\/blog\/wp-content\/uploads\/2023\/11\/image-2-480x368.png 480w\" sizes=\"auto, (max-width:767px) 480px, 650px\" \/><\/a><\/figure>\n\n\n\n<h2 class=\"wp-block-heading\">Installing Validator<\/h2>\n\n\n\n<p>Now we know the syntax to install an MLE module from a URL. However, what&#8217;s the URL for an npm module? We use the free OpenSource CDN <a href=\"https:\/\/www.jsdelivr.com\/?docs=esm\">jsDelivr<\/a> for that. They provide a service returning an npm module as an ECMAScript module. The result can be used in a browser and also in an Oracle Database. The URL looks like this:<\/p>\n\n\n\n<div class=\"wp-block-kevinbatdorf-code-block-pro cbp-has-line-numbers\" data-code-block-pro-font-family=\"Code-Pro-JetBrains-Mono\" style=\"font-size:.875rem;font-family:Code-Pro-JetBrains-Mono,ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,monospace;--cbp-line-number-color:#D4D4D4;--cbp-line-number-width:calc(1 * 0.6 * .875rem);line-height:1.25rem;--cbp-tab-width:2;tab-size:var(--cbp-tab-width, 2)\"><span style=\"display:block;padding:16px 0 0 16px;margin-bottom:-1px;width:100%;text-align:left;background-color:#1E1E1E\"><svg xmlns=\"http:\/\/www.w3.org\/2000\/svg\" width=\"54\" height=\"14\" viewBox=\"0 0 54 14\"><g fill=\"none\" fill-rule=\"evenodd\" transform=\"translate(1 1)\"><circle cx=\"6\" cy=\"6\" r=\"6\" fill=\"#FF5F56\" stroke=\"#E0443E\" stroke-width=\".5\"><\/circle><circle cx=\"26\" cy=\"6\" r=\"6\" fill=\"#FFBD2E\" stroke=\"#DEA123\" stroke-width=\".5\"><\/circle><circle cx=\"46\" cy=\"6\" r=\"6\" fill=\"#27C93F\" stroke=\"#1AAB29\" stroke-width=\".5\"><\/circle><\/g><\/svg><\/span><span role=\"button\" tabindex=\"0\" data-code=\"https:\/\/esm.run\/npm-package-name@npm-package-version\" style=\"color:#D4D4D4;display:none\" aria-label=\"Copy\" class=\"code-block-pro-copy-button\"><svg xmlns=\"http:\/\/www.w3.org\/2000\/svg\" style=\"width:24px;height:24px\" fill=\"none\" viewBox=\"0 0 24 24\" stroke=\"currentColor\" stroke-width=\"2\"><path class=\"with-check\" stroke-linecap=\"round\" stroke-linejoin=\"round\" d=\"M9 5H7a2 2 0 00-2 2v12a2 2 0 002 2h10a2 2 0 002-2V7a2 2 0 00-2-2h-2M9 5a2 2 0 002 2h2a2 2 0 002-2M9 5a2 2 0 012-2h2a2 2 0 012 2m-6 9l2 2 4-4\"><\/path><path class=\"without-check\" stroke-linecap=\"round\" stroke-linejoin=\"round\" d=\"M9 5H7a2 2 0 00-2 2v12a2 2 0 002 2h10a2 2 0 002-2V7a2 2 0 00-2-2h-2M9 5a2 2 0 002 2h2a2 2 0 002-2M9 5a2 2 0 012-2h2a2 2 0 012 2\"><\/path><\/svg><\/span><pre class=\"shiki dark-plus\" style=\"background-color: #1E1E1E\" tabindex=\"0\"><code><span class=\"line\"><span style=\"color: #D4D4D4\">https:\/\/esm.run\/npm-package-name@npm-package-version<\/span><\/span><\/code><\/pre><\/div>\n\n\n\n<p>We want to install the current version 13.11.0 of the npm module <a href=\"https:\/\/www.npmjs.com\/package\/validator\">validator<\/a>. Based on the information provided above our SQLcl command for that looks like this:<\/p>\n\n\n\n<div class=\"wp-block-kevinbatdorf-code-block-pro cbp-has-line-numbers\" data-code-block-pro-font-family=\"Code-Pro-JetBrains-Mono\" style=\"font-size:.875rem;font-family:Code-Pro-JetBrains-Mono,ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,monospace;--cbp-line-number-color:#D4D4D4;--cbp-line-number-width:calc(1 * 0.6 * .875rem);line-height:1.25rem;--cbp-tab-width:2;tab-size:var(--cbp-tab-width, 2)\"><span style=\"display:block;padding:16px 0 0 16px;margin-bottom:-1px;width:100%;text-align:left;background-color:#1E1E1E\"><svg xmlns=\"http:\/\/www.w3.org\/2000\/svg\" width=\"54\" height=\"14\" viewBox=\"0 0 54 14\"><g fill=\"none\" fill-rule=\"evenodd\" transform=\"translate(1 1)\"><circle cx=\"6\" cy=\"6\" r=\"6\" fill=\"#FF5F56\" stroke=\"#E0443E\" stroke-width=\".5\"><\/circle><circle cx=\"26\" cy=\"6\" r=\"6\" fill=\"#FFBD2E\" stroke=\"#DEA123\" stroke-width=\".5\"><\/circle><circle cx=\"46\" cy=\"6\" r=\"6\" fill=\"#27C93F\" stroke=\"#1AAB29\" stroke-width=\".5\"><\/circle><\/g><\/svg><\/span><span role=\"button\" tabindex=\"0\" data-code=\"mle install validator_mod https:\/\/esm.run\/validator@13.11.0 13.11.0\" style=\"color:#D4D4D4;display:none\" aria-label=\"Copy\" class=\"code-block-pro-copy-button\"><svg xmlns=\"http:\/\/www.w3.org\/2000\/svg\" style=\"width:24px;height:24px\" fill=\"none\" viewBox=\"0 0 24 24\" stroke=\"currentColor\" stroke-width=\"2\"><path class=\"with-check\" stroke-linecap=\"round\" stroke-linejoin=\"round\" d=\"M9 5H7a2 2 0 00-2 2v12a2 2 0 002 2h10a2 2 0 002-2V7a2 2 0 00-2-2h-2M9 5a2 2 0 002 2h2a2 2 0 002-2M9 5a2 2 0 012-2h2a2 2 0 012 2m-6 9l2 2 4-4\"><\/path><path class=\"without-check\" stroke-linecap=\"round\" stroke-linejoin=\"round\" d=\"M9 5H7a2 2 0 00-2 2v12a2 2 0 002 2h10a2 2 0 002-2V7a2 2 0 00-2-2h-2M9 5a2 2 0 002 2h2a2 2 0 002-2M9 5a2 2 0 012-2h2a2 2 0 012 2\"><\/path><\/svg><\/span><pre class=\"shiki dark-plus\" style=\"background-color: #1E1E1E\" tabindex=\"0\"><code><span class=\"line\"><span style=\"color: #D4D4D4\">mle install validator_mod https:\/\/esm.run\/validator@13.<\/span><span style=\"color: #B5CEA8\">11<\/span><span style=\"color: #D4D4D4\">.<\/span><span style=\"color: #B5CEA8\">0<\/span><span style=\"color: #D4D4D4\"> <\/span><span style=\"color: #B5CEA8\">13<\/span><span style=\"color: #D4D4D4\">.<\/span><span style=\"color: #B5CEA8\">11<\/span><span style=\"color: #D4D4D4\">.<\/span><span style=\"color: #B5CEA8\">0<\/span><\/span><\/code><\/pre><\/div>\n\n\n\n<p>And here is the result in SQLcl :<\/p>\n\n\n\n<figure class=\"wp-block-image size-full\"><a href=\"https:\/\/www.salvis.com\/blog\/wp-content\/uploads\/2023\/11\/image-9.png\"><img loading=\"lazy\" decoding=\"async\" width=\"642\" height=\"194\" src=\"https:\/\/www.salvis.com\/blog\/wp-content\/uploads\/2023\/11\/image-9.png\" alt=\"Output of successfully executed mle command to install the validator module from npm\" class=\"wp-image-12945\" srcset=\"https:\/\/www.salvis.com\/blog\/wp-content\/uploads\/2023\/11\/image-9.png 642w, https:\/\/www.salvis.com\/blog\/wp-content\/uploads\/2023\/11\/image-9-300x91.png 300w, https:\/\/www.salvis.com\/blog\/wp-content\/uploads\/2023\/11\/image-9-150x45.png 150w, https:\/\/www.salvis.com\/blog\/wp-content\/uploads\/2023\/11\/image-9-480x145.png 480w\" sizes=\"auto, (max-width:767px) 480px, 642px\" \/><\/a><\/figure>\n\n\n\n<p>Please note that the response message by SQLcl 23.3 is not 100% correct for MLE modules. However, our module is installed correctly. We verify that later.<\/p>\n\n\n\n<p>Maybe you&#8217;d like to know what the SQL statement looks like to install this module. The last statement is still in SQLcl&#8217;s buffer. Therefore we can type <code>l<\/code> followed by <code>enter<\/code> to see the content of the buffer.<\/p>\n\n\n<div class=\"accordion\"><div class=\"mfn-acc accordion_wrapper  toggle\"><br \/>\n<div class=\"question\"><div class=\"title\"><i class=\"icon-plus acc-icon-plus\" aria-hidden=\"true\"><\/i><i class=\"icon-minus acc-icon-minus\" aria-hidden=\"true\"><\/i>SQLcl's buffer<\/div><div class=\"answer\"><\/p>\n\n\n\n<p>The first line contains the start of the SQL statement. Lines 2 to 7 are comments generated by jsDelivr. Line 8 contains the complete module. Yes, as a single line. The code is minified. All unnecessary whitespace is gone and internally used identifiers are shortened to save space. On line 9 we would see a JavaScript comment with a pointer to a map file that points to the original, nicely formatted source code. This is interesting when debugging in other environments. It&#8217;s currently not used in the database.<\/p>\n\n\n\n<figure class=\"wp-block-image size-full\"><a href=\"https:\/\/www.salvis.com\/blog\/wp-content\/uploads\/2023\/11\/image-7.png\"><img wpfc-lazyload-disable=\"true\" loading=\"lazy\" decoding=\"async\" width=\"1050\" height=\"17704\" src=\"https:\/\/www.salvis.com\/blog\/wp-content\/uploads\/2023\/11\/image-7.png\" alt=\"SQLcl buffer containing the SQL command to install the validator module\" class=\"wp-image-12937\"\/><\/a><\/figure>\n\n\n<p><\/div><\/div>\n<br \/>\n<\/div><\/div>\n\n\n\n\n<h2 class=\"wp-block-heading\">Querying MLE Modules<\/h2>\n\n\n\n<p>The following SQL statement shows some data regarding the previously deployed MLE module:<\/p>\n\n\n\n<div class=\"wp-block-kevinbatdorf-code-block-pro cbp-has-line-numbers\" data-code-block-pro-font-family=\"Code-Pro-JetBrains-Mono\" style=\"font-size:.875rem;font-family:Code-Pro-JetBrains-Mono,ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,monospace;--cbp-line-number-color:#D4D4D4;--cbp-line-number-width:calc(1 * 0.6 * .875rem);line-height:1.25rem;--cbp-tab-width:2;tab-size:var(--cbp-tab-width, 2)\"><span style=\"display:block;padding:16px 0 0 16px;margin-bottom:-1px;width:100%;text-align:left;background-color:#1E1E1E\"><svg xmlns=\"http:\/\/www.w3.org\/2000\/svg\" width=\"54\" height=\"14\" viewBox=\"0 0 54 14\"><g fill=\"none\" fill-rule=\"evenodd\" transform=\"translate(1 1)\"><circle cx=\"6\" cy=\"6\" r=\"6\" fill=\"#FF5F56\" stroke=\"#E0443E\" stroke-width=\".5\"><\/circle><circle cx=\"26\" cy=\"6\" r=\"6\" fill=\"#FFBD2E\" stroke=\"#DEA123\" stroke-width=\".5\"><\/circle><circle cx=\"46\" cy=\"6\" r=\"6\" fill=\"#27C93F\" stroke=\"#1AAB29\" stroke-width=\".5\"><\/circle><\/g><\/svg><\/span><span role=\"button\" tabindex=\"0\" data-code=\"set sqlformat ansiconsole\nselect module_name, version, language_name, length(module)\n  from user_mle_modules;\" style=\"color:#D4D4D4;display:none\" aria-label=\"Copy\" class=\"code-block-pro-copy-button\"><svg xmlns=\"http:\/\/www.w3.org\/2000\/svg\" style=\"width:24px;height:24px\" fill=\"none\" viewBox=\"0 0 24 24\" stroke=\"currentColor\" stroke-width=\"2\"><path class=\"with-check\" stroke-linecap=\"round\" stroke-linejoin=\"round\" d=\"M9 5H7a2 2 0 00-2 2v12a2 2 0 002 2h10a2 2 0 002-2V7a2 2 0 00-2-2h-2M9 5a2 2 0 002 2h2a2 2 0 002-2M9 5a2 2 0 012-2h2a2 2 0 012 2m-6 9l2 2 4-4\"><\/path><path class=\"without-check\" stroke-linecap=\"round\" stroke-linejoin=\"round\" d=\"M9 5H7a2 2 0 00-2 2v12a2 2 0 002 2h10a2 2 0 002-2V7a2 2 0 00-2-2h-2M9 5a2 2 0 002 2h2a2 2 0 002-2M9 5a2 2 0 012-2h2a2 2 0 012 2\"><\/path><\/svg><\/span><pre class=\"shiki dark-plus\" style=\"background-color: #1E1E1E\" tabindex=\"0\"><code><span class=\"line\"><span style=\"color: #569CD6\">set<\/span><span style=\"color: #D4D4D4\"> sqlformat ansiconsole<\/span><\/span>\n<span class=\"line\"><span style=\"color: #569CD6\">select<\/span><span style=\"color: #D4D4D4\"> module_name, <\/span><span style=\"color: #569CD6\">version<\/span><span style=\"color: #D4D4D4\">, language_name, <\/span><span style=\"color: #569CD6\">length<\/span><span style=\"color: #D4D4D4\">(module)<\/span><\/span>\n<span class=\"line\"><span style=\"color: #D4D4D4\">  <\/span><span style=\"color: #569CD6\">from<\/span><span style=\"color: #D4D4D4\"> user_mle_modules;<\/span><\/span><\/code><\/pre><\/div>\n\n\n\n<p>The result in SQLcl looks like this:<\/p>\n\n\n\n<figure class=\"wp-block-image size-full\"><a href=\"https:\/\/www.salvis.com\/blog\/wp-content\/uploads\/2023\/11\/image-8.png\"><img loading=\"lazy\" decoding=\"async\" width=\"642\" height=\"171\" src=\"https:\/\/www.salvis.com\/blog\/wp-content\/uploads\/2023\/11\/image-8.png\" alt=\"\" class=\"wp-image-12944\" srcset=\"https:\/\/www.salvis.com\/blog\/wp-content\/uploads\/2023\/11\/image-8.png 642w, https:\/\/www.salvis.com\/blog\/wp-content\/uploads\/2023\/11\/image-8-300x80.png 300w, https:\/\/www.salvis.com\/blog\/wp-content\/uploads\/2023\/11\/image-8-150x40.png 150w, https:\/\/www.salvis.com\/blog\/wp-content\/uploads\/2023\/11\/image-8-480x128.png 480w\" sizes=\"auto, (max-width:767px) 480px, 642px\" \/><\/a><\/figure>\n\n\n\n<p>We see the version of the module and also the size in bytes of the blob column where the module is stored. It is one byte larger than the result of the URL since It contains a final line feed character due to the way we built the SQL statement.<\/p>\n\n\n\n<p>IMO it is helpful to provide the version of the external ESM as long as there is no proper package registry within the Oracle Database.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">Verifying Installation<\/h2>\n\n\n\n<p>Let&#8217;s write a call specification in order to verify the successful installation of the validator module.<\/p>\n\n\n\n<div class=\"wp-block-kevinbatdorf-code-block-pro cbp-has-line-numbers\" data-code-block-pro-font-family=\"Code-Pro-JetBrains-Mono\" style=\"font-size:.875rem;font-family:Code-Pro-JetBrains-Mono,ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,monospace;--cbp-line-number-color:#D4D4D4;--cbp-line-number-width:calc(1 * 0.6 * .875rem);line-height:1.25rem;--cbp-tab-width:2;tab-size:var(--cbp-tab-width, 2)\"><span style=\"display:block;padding:16px 0 0 16px;margin-bottom:-1px;width:100%;text-align:left;background-color:#1E1E1E\"><svg xmlns=\"http:\/\/www.w3.org\/2000\/svg\" width=\"54\" height=\"14\" viewBox=\"0 0 54 14\"><g fill=\"none\" fill-rule=\"evenodd\" transform=\"translate(1 1)\"><circle cx=\"6\" cy=\"6\" r=\"6\" fill=\"#FF5F56\" stroke=\"#E0443E\" stroke-width=\".5\"><\/circle><circle cx=\"26\" cy=\"6\" r=\"6\" fill=\"#FFBD2E\" stroke=\"#DEA123\" stroke-width=\".5\"><\/circle><circle cx=\"46\" cy=\"6\" r=\"6\" fill=\"#27C93F\" stroke=\"#1AAB29\" stroke-width=\".5\"><\/circle><\/g><\/svg><\/span><span role=\"button\" tabindex=\"0\" data-code=\"create or replace function is_email(\n   in_email in varchar2\n) return boolean as mle module validator_mod signature 'default.isEmail(string)';\n\/\" style=\"color:#D4D4D4;display:none\" aria-label=\"Copy\" class=\"code-block-pro-copy-button\"><svg xmlns=\"http:\/\/www.w3.org\/2000\/svg\" style=\"width:24px;height:24px\" fill=\"none\" viewBox=\"0 0 24 24\" stroke=\"currentColor\" stroke-width=\"2\"><path class=\"with-check\" stroke-linecap=\"round\" stroke-linejoin=\"round\" d=\"M9 5H7a2 2 0 00-2 2v12a2 2 0 002 2h10a2 2 0 002-2V7a2 2 0 00-2-2h-2M9 5a2 2 0 002 2h2a2 2 0 002-2M9 5a2 2 0 012-2h2a2 2 0 012 2m-6 9l2 2 4-4\"><\/path><path class=\"without-check\" stroke-linecap=\"round\" stroke-linejoin=\"round\" d=\"M9 5H7a2 2 0 00-2 2v12a2 2 0 002 2h10a2 2 0 002-2V7a2 2 0 00-2-2h-2M9 5a2 2 0 002 2h2a2 2 0 002-2M9 5a2 2 0 012-2h2a2 2 0 012 2\"><\/path><\/svg><\/span><pre class=\"shiki dark-plus\" style=\"background-color: #1E1E1E\" tabindex=\"0\"><code><span class=\"line\"><span style=\"color: #569CD6\">create or replace<\/span><span style=\"color: #D4D4D4\"> <\/span><span style=\"color: #569CD6\">function<\/span><span style=\"color: #D4D4D4\"> <\/span><span style=\"color: #DCDCAA\">is_email<\/span><span style=\"color: #D4D4D4\">(<\/span><\/span>\n<span class=\"line\"><span style=\"color: #D4D4D4\">   in_email <\/span><span style=\"color: #569CD6\">in<\/span><span style=\"color: #D4D4D4\"> <\/span><span style=\"color: #569CD6\">varchar2<\/span><\/span>\n<span class=\"line\"><span style=\"color: #D4D4D4\">) <\/span><span style=\"color: #569CD6\">return<\/span><span style=\"color: #D4D4D4\"> <\/span><span style=\"color: #569CD6\">boolean<\/span><span style=\"color: #D4D4D4\"> <\/span><span style=\"color: #569CD6\">as<\/span><span style=\"color: #D4D4D4\"> mle module validator_mod <\/span><span style=\"color: #569CD6\">signature<\/span><span style=\"color: #D4D4D4\"> <\/span><span style=\"color: #CE9178\">&#39;default.isEmail(string)&#39;<\/span><span style=\"color: #D4D4D4\">;<\/span><\/span>\n<span class=\"line\"><span style=\"color: #D4D4D4\">\/<\/span><\/span><\/code><\/pre><\/div>\n\n\n\n<p>Now we can run the following query to verify e-mail addresses and the installation of the validator module:<\/p>\n\n\n\n<div class=\"wp-block-kevinbatdorf-code-block-pro cbp-has-line-numbers\" data-code-block-pro-font-family=\"Code-Pro-JetBrains-Mono\" style=\"font-size:.875rem;font-family:Code-Pro-JetBrains-Mono,ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,monospace;--cbp-line-number-color:#D4D4D4;--cbp-line-number-width:calc(1 * 0.6 * .875rem);line-height:1.25rem;--cbp-tab-width:2;tab-size:var(--cbp-tab-width, 2)\"><span style=\"display:block;padding:16px 0 0 16px;margin-bottom:-1px;width:100%;text-align:left;background-color:#1E1E1E\"><svg xmlns=\"http:\/\/www.w3.org\/2000\/svg\" width=\"54\" height=\"14\" viewBox=\"0 0 54 14\"><g fill=\"none\" fill-rule=\"evenodd\" transform=\"translate(1 1)\"><circle cx=\"6\" cy=\"6\" r=\"6\" fill=\"#FF5F56\" stroke=\"#E0443E\" stroke-width=\".5\"><\/circle><circle cx=\"26\" cy=\"6\" r=\"6\" fill=\"#FFBD2E\" stroke=\"#DEA123\" stroke-width=\".5\"><\/circle><circle cx=\"46\" cy=\"6\" r=\"6\" fill=\"#27C93F\" stroke=\"#1AAB29\" stroke-width=\".5\"><\/circle><\/g><\/svg><\/span><span role=\"button\" tabindex=\"0\" data-code=\"select is_email('jane.doe@example.org') as jane_doe,\n       is_email('john.doe@example') as john_doe;\" style=\"color:#D4D4D4;display:none\" aria-label=\"Copy\" class=\"code-block-pro-copy-button\"><svg xmlns=\"http:\/\/www.w3.org\/2000\/svg\" style=\"width:24px;height:24px\" fill=\"none\" viewBox=\"0 0 24 24\" stroke=\"currentColor\" stroke-width=\"2\"><path class=\"with-check\" stroke-linecap=\"round\" stroke-linejoin=\"round\" d=\"M9 5H7a2 2 0 00-2 2v12a2 2 0 002 2h10a2 2 0 002-2V7a2 2 0 00-2-2h-2M9 5a2 2 0 002 2h2a2 2 0 002-2M9 5a2 2 0 012-2h2a2 2 0 012 2m-6 9l2 2 4-4\"><\/path><path class=\"without-check\" stroke-linecap=\"round\" stroke-linejoin=\"round\" d=\"M9 5H7a2 2 0 00-2 2v12a2 2 0 002 2h10a2 2 0 002-2V7a2 2 0 00-2-2h-2M9 5a2 2 0 002 2h2a2 2 0 002-2M9 5a2 2 0 012-2h2a2 2 0 012 2\"><\/path><\/svg><\/span><pre class=\"shiki dark-plus\" style=\"background-color: #1E1E1E\" tabindex=\"0\"><code><span class=\"line\"><span style=\"color: #569CD6\">select<\/span><span style=\"color: #D4D4D4\"> is_email(<\/span><span style=\"color: #CE9178\">&#39;jane.doe@example.org&#39;<\/span><span style=\"color: #D4D4D4\">) <\/span><span style=\"color: #569CD6\">as<\/span><span style=\"color: #D4D4D4\"> jane_doe,<\/span><\/span>\n<span class=\"line\"><span style=\"color: #D4D4D4\">       is_email(<\/span><span style=\"color: #CE9178\">&#39;john.doe@example&#39;<\/span><span style=\"color: #D4D4D4\">) <\/span><span style=\"color: #569CD6\">as<\/span><span style=\"color: #D4D4D4\"> john_doe;<\/span><\/span><\/code><\/pre><\/div>\n\n\n\n<p>In SQLcl 23.3 the result looks like this (boolean values as <code>1<\/code> and <code>0<\/code>):<\/p>\n\n\n\n<figure class=\"wp-block-image size-full\"><a href=\"https:\/\/www.salvis.com\/blog\/wp-content\/uploads\/2023\/11\/image-10.png\"><img loading=\"lazy\" decoding=\"async\" width=\"642\" height=\"189\" src=\"https:\/\/www.salvis.com\/blog\/wp-content\/uploads\/2023\/11\/image-10.png\" alt=\"Result of calling the is_email validator function in SQLcl\" class=\"wp-image-12949\" srcset=\"https:\/\/www.salvis.com\/blog\/wp-content\/uploads\/2023\/11\/image-10.png 642w, https:\/\/www.salvis.com\/blog\/wp-content\/uploads\/2023\/11\/image-10-300x88.png 300w, https:\/\/www.salvis.com\/blog\/wp-content\/uploads\/2023\/11\/image-10-150x44.png 150w, https:\/\/www.salvis.com\/blog\/wp-content\/uploads\/2023\/11\/image-10-480x141.png 480w\" sizes=\"auto, (max-width:767px) 480px, 642px\" \/><\/a><\/figure>\n\n\n\n<p>And in SQL*Plus 23.3 the result looks like this (boolean values as <code>TRUE<\/code> and <code>FALSE<\/code>):<\/p>\n\n\n\n<figure class=\"wp-block-image size-full\"><a href=\"https:\/\/www.salvis.com\/blog\/wp-content\/uploads\/2023\/11\/image-12.png\"><img loading=\"lazy\" decoding=\"async\" width=\"642\" height=\"193\" src=\"https:\/\/www.salvis.com\/blog\/wp-content\/uploads\/2023\/11\/image-12.png\" alt=\"Result of calling the is_email validator function in SQL*Plus\" class=\"wp-image-12952\" srcset=\"https:\/\/www.salvis.com\/blog\/wp-content\/uploads\/2023\/11\/image-12.png 642w, https:\/\/www.salvis.com\/blog\/wp-content\/uploads\/2023\/11\/image-12-300x90.png 300w, https:\/\/www.salvis.com\/blog\/wp-content\/uploads\/2023\/11\/image-12-150x45.png 150w, https:\/\/www.salvis.com\/blog\/wp-content\/uploads\/2023\/11\/image-12-480x144.png 480w\" sizes=\"auto, (max-width:767px) 480px, 642px\" \/><\/a><\/figure>\n\n\n\n<h2 class=\"wp-block-heading\">Installing More Modules<\/h2>\n\n\n\n<p>Let&#8217;s install some other modules I find useful. You find them on <a href=\"https:\/\/www.npmjs.com\/\">npm<\/a> if you want to know what they do.<\/p>\n\n\n\n<div class=\"wp-block-kevinbatdorf-code-block-pro cbp-has-line-numbers\" data-code-block-pro-font-family=\"Code-Pro-JetBrains-Mono\" style=\"font-size:.875rem;font-family:Code-Pro-JetBrains-Mono,ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,monospace;--cbp-line-number-color:#D4D4D4;--cbp-line-number-width:calc(1 * 0.6 * .875rem);line-height:1.25rem;--cbp-tab-width:2;tab-size:var(--cbp-tab-width, 2)\"><span style=\"display:block;padding:16px 0 0 16px;margin-bottom:-1px;width:100%;text-align:left;background-color:#1E1E1E\"><svg xmlns=\"http:\/\/www.w3.org\/2000\/svg\" width=\"54\" height=\"14\" viewBox=\"0 0 54 14\"><g fill=\"none\" fill-rule=\"evenodd\" transform=\"translate(1 1)\"><circle cx=\"6\" cy=\"6\" r=\"6\" fill=\"#FF5F56\" stroke=\"#E0443E\" stroke-width=\".5\"><\/circle><circle cx=\"26\" cy=\"6\" r=\"6\" fill=\"#FFBD2E\" stroke=\"#DEA123\" stroke-width=\".5\"><\/circle><circle cx=\"46\" cy=\"6\" r=\"6\" fill=\"#27C93F\" stroke=\"#1AAB29\" stroke-width=\".5\"><\/circle><\/g><\/svg><\/span><span role=\"button\" tabindex=\"0\" data-code=\"mle install sentiment_mod https:\/\/esm.run\/sentiment@5.0.2 5.0.22\nmle install jimp_mod https:\/\/esm.run\/jimp@0.22.10\/browser\/lib\/jimp.js 0.22.10\nmle install sql_assert_mod https:\/\/esm.run\/sql-assert@1.0.3 1.0.3\nmle install lodash_mod https:\/\/esm.run\/lodash@4.17.21 4.17.21\nmle install js_yaml_mod https:\/\/esm.run\/js-yaml@4.1.0 4.1.0\nmle install minimist_mod https:\/\/esm.run\/minimist@1.2.8 1.2.8\nmle install typeorm_mod https:\/\/esm.run\/typeorm@0.3.17 0.3.17\" style=\"color:#D4D4D4;display:none\" aria-label=\"Copy\" class=\"code-block-pro-copy-button\"><svg xmlns=\"http:\/\/www.w3.org\/2000\/svg\" style=\"width:24px;height:24px\" fill=\"none\" viewBox=\"0 0 24 24\" stroke=\"currentColor\" stroke-width=\"2\"><path class=\"with-check\" stroke-linecap=\"round\" stroke-linejoin=\"round\" d=\"M9 5H7a2 2 0 00-2 2v12a2 2 0 002 2h10a2 2 0 002-2V7a2 2 0 00-2-2h-2M9 5a2 2 0 002 2h2a2 2 0 002-2M9 5a2 2 0 012-2h2a2 2 0 012 2m-6 9l2 2 4-4\"><\/path><path class=\"without-check\" stroke-linecap=\"round\" stroke-linejoin=\"round\" d=\"M9 5H7a2 2 0 00-2 2v12a2 2 0 002 2h10a2 2 0 002-2V7a2 2 0 00-2-2h-2M9 5a2 2 0 002 2h2a2 2 0 002-2M9 5a2 2 0 012-2h2a2 2 0 012 2\"><\/path><\/svg><\/span><pre class=\"shiki dark-plus\" style=\"background-color: #1E1E1E\" tabindex=\"0\"><code><span class=\"line\"><span style=\"color: #D4D4D4\">mle install sentiment_mod https:\/\/esm.run\/sentiment@5.<\/span><span style=\"color: #B5CEA8\">0<\/span><span style=\"color: #D4D4D4\">.<\/span><span style=\"color: #B5CEA8\">2<\/span><span style=\"color: #D4D4D4\"> <\/span><span style=\"color: #B5CEA8\">5<\/span><span style=\"color: #D4D4D4\">.<\/span><span style=\"color: #B5CEA8\">0<\/span><span style=\"color: #D4D4D4\">.<\/span><span style=\"color: #B5CEA8\">22<\/span><\/span>\n<span class=\"line\"><span style=\"color: #D4D4D4\">mle install jimp_mod https:\/\/esm.run\/jimp@0.<\/span><span style=\"color: #B5CEA8\">22<\/span><span style=\"color: #D4D4D4\">.<\/span><span style=\"color: #B5CEA8\">10<\/span><span style=\"color: #D4D4D4\">\/browser\/lib\/jimp.js <\/span><span style=\"color: #B5CEA8\">0<\/span><span style=\"color: #D4D4D4\">.<\/span><span style=\"color: #B5CEA8\">22<\/span><span style=\"color: #D4D4D4\">.<\/span><span style=\"color: #B5CEA8\">10<\/span><\/span>\n<span class=\"line\"><span style=\"color: #D4D4D4\">mle install sql_assert_mod https:\/\/esm.run\/<\/span><span style=\"color: #569CD6\">sql<\/span><span style=\"color: #D4D4D4\">-assert@1.<\/span><span style=\"color: #B5CEA8\">0<\/span><span style=\"color: #D4D4D4\">.<\/span><span style=\"color: #B5CEA8\">3<\/span><span style=\"color: #D4D4D4\"> <\/span><span style=\"color: #B5CEA8\">1<\/span><span style=\"color: #D4D4D4\">.<\/span><span style=\"color: #B5CEA8\">0<\/span><span style=\"color: #D4D4D4\">.<\/span><span style=\"color: #B5CEA8\">3<\/span><\/span>\n<span class=\"line\"><span style=\"color: #D4D4D4\">mle install lodash_mod https:\/\/esm.run\/lodash@4.<\/span><span style=\"color: #B5CEA8\">17<\/span><span style=\"color: #D4D4D4\">.<\/span><span style=\"color: #B5CEA8\">21<\/span><span style=\"color: #D4D4D4\"> <\/span><span style=\"color: #B5CEA8\">4<\/span><span style=\"color: #D4D4D4\">.<\/span><span style=\"color: #B5CEA8\">17<\/span><span style=\"color: #D4D4D4\">.<\/span><span style=\"color: #B5CEA8\">21<\/span><\/span>\n<span class=\"line\"><span style=\"color: #D4D4D4\">mle install js_yaml_mod https:\/\/esm.run\/js-yaml@4.<\/span><span style=\"color: #B5CEA8\">1<\/span><span style=\"color: #D4D4D4\">.<\/span><span style=\"color: #B5CEA8\">0<\/span><span style=\"color: #D4D4D4\"> <\/span><span style=\"color: #B5CEA8\">4<\/span><span style=\"color: #D4D4D4\">.<\/span><span style=\"color: #B5CEA8\">1<\/span><span style=\"color: #D4D4D4\">.<\/span><span style=\"color: #B5CEA8\">0<\/span><\/span>\n<span class=\"line\"><span style=\"color: #D4D4D4\">mle install minimist_mod https:\/\/esm.run\/minimist@1.<\/span><span style=\"color: #B5CEA8\">2<\/span><span style=\"color: #D4D4D4\">.<\/span><span style=\"color: #B5CEA8\">8<\/span><span style=\"color: #D4D4D4\"> <\/span><span style=\"color: #B5CEA8\">1<\/span><span style=\"color: #D4D4D4\">.<\/span><span style=\"color: #B5CEA8\">2<\/span><span style=\"color: #D4D4D4\">.<\/span><span style=\"color: #B5CEA8\">8<\/span><\/span>\n<span class=\"line\"><span style=\"color: #D4D4D4\">mle install typeorm_mod https:\/\/esm.run\/typeorm@0.<\/span><span style=\"color: #B5CEA8\">3<\/span><span style=\"color: #D4D4D4\">.<\/span><span style=\"color: #B5CEA8\">17<\/span><span style=\"color: #D4D4D4\"> <\/span><span style=\"color: #B5CEA8\">0<\/span><span style=\"color: #D4D4D4\">.<\/span><span style=\"color: #B5CEA8\">3<\/span><span style=\"color: #D4D4D4\">.<\/span><span style=\"color: #B5CEA8\">17<\/span><\/span><\/code><\/pre><\/div>\n\n\n\n<p>Installing all modules is just a matter of a few seconds. <\/p>\n\n\n\n<h2 class=\"wp-block-heading\">Conclusion<\/h2>\n\n\n\n<p>Using the SQLcl custom <code>mle<\/code> command to install ECMAScript modules from a file or from a URL is not only easy and fast, but it is also an excellent way to provide tested functionality within the database. <\/p>\n\n\n\n<p>Technically it should be possible to generate the PL\/SQL call specifications based on the information that is provided for IDEs to better support code completion (type definitions). I hope that Oracle will provide such a feature in one of the coming releases of SQLcl or as part of a dedicated MLE tool (similar to <code>dbjs<\/code> which was part of the experimental version of the MLE back in 2017). Even if I do not want to provide access to all underlying functionality of an MLE module within the database or provide the functionality with the same signature, a PL\/SQL package with all call specifications would simplify the work for a wrapper PL\/SQL package that exposes just the relevant subset in a suitable way for the use in PL\/SQL or SQL.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Introduction In my previous blog post, I&#8217;ve shown how you can deploy an npm module from a URL and a custom ESM module from a local file into a remote Oracle Database 23c using JavaScript and SQLcl. This works well. However, for two MLE modules, I had to write 22 lines of<span class=\"excerpt-hellip\"> [\u2026]<\/span><\/p>\n","protected":false},"author":1,"featured_media":12966,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[5],"tags":[135,149,140,13,126],"class_list":["post-12931","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-oracle","tag-javascript","tag-mle","tag-oracle-26ai","tag-plsql","tag-sqlcl"],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v27.4 - https:\/\/yoast.com\/product\/yoast-seo-wordpress\/ -->\n<title>Installing MLE Modules in the Oracle Database - Philipp Salvisberg&#039;s Blog<\/title>\n<meta name=\"description\" content=\"Using a custom SQLcl command to install ECMAScript modules via file or via URL from npm into the Oracle Database 23c as MLE modules.\" \/>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/www.salvis.com\/blog\/2023\/11\/26\/installing-mle-modules-in-the-oracle-database\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"Installing MLE Modules in the Oracle Database - Philipp Salvisberg&#039;s Blog\" \/>\n<meta property=\"og:description\" content=\"Using a custom SQLcl command to install ECMAScript modules via file or via URL from npm into the Oracle Database 23c as MLE modules.\" \/>\n<meta property=\"og:url\" content=\"https:\/\/www.salvis.com\/blog\/2023\/11\/26\/installing-mle-modules-in-the-oracle-database\/\" \/>\n<meta property=\"og:site_name\" content=\"Philipp Salvisberg&#039;s Blog\" \/>\n<meta property=\"article:published_time\" content=\"2023-11-26T17:56:09+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2023-11-26T17:57:40+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/www.salvis.com\/blog\/wp-content\/uploads\/2023\/11\/oracle-database-23c-npm-mle.png\" \/>\n\t<meta property=\"og:image:width\" content=\"1069\" \/>\n\t<meta property=\"og:image:height\" content=\"805\" \/>\n\t<meta property=\"og:image:type\" content=\"image\/png\" \/>\n<meta name=\"author\" content=\"Philipp Salvisberg\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:creator\" content=\"@phsalvisberg\" \/>\n<meta name=\"twitter:site\" content=\"@phsalvisberg\" \/>\n<meta name=\"twitter:label1\" content=\"Written by\" \/>\n\t<meta name=\"twitter:data1\" content=\"Philipp Salvisberg\" \/>\n\t<meta name=\"twitter:label2\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data2\" content=\"5 minutes\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\\\/\\\/schema.org\",\"@graph\":[{\"@type\":\"Article\",\"@id\":\"https:\\\/\\\/www.salvis.com\\\/blog\\\/2023\\\/11\\\/26\\\/installing-mle-modules-in-the-oracle-database\\\/#article\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/www.salvis.com\\\/blog\\\/2023\\\/11\\\/26\\\/installing-mle-modules-in-the-oracle-database\\\/\"},\"author\":{\"name\":\"Philipp Salvisberg\",\"@id\":\"https:\\\/\\\/www.salvis.com\\\/blog\\\/#\\\/schema\\\/person\\\/34352245c48678b1a5a05d4bc1339515\"},\"headline\":\"Installing MLE Modules in the Oracle Database\",\"datePublished\":\"2023-11-26T17:56:09+00:00\",\"dateModified\":\"2023-11-26T17:57:40+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\\\/\\\/www.salvis.com\\\/blog\\\/2023\\\/11\\\/26\\\/installing-mle-modules-in-the-oracle-database\\\/\"},\"wordCount\":874,\"commentCount\":0,\"publisher\":{\"@id\":\"https:\\\/\\\/www.salvis.com\\\/blog\\\/#\\\/schema\\\/person\\\/34352245c48678b1a5a05d4bc1339515\"},\"image\":{\"@id\":\"https:\\\/\\\/www.salvis.com\\\/blog\\\/2023\\\/11\\\/26\\\/installing-mle-modules-in-the-oracle-database\\\/#primaryimage\"},\"thumbnailUrl\":\"https:\\\/\\\/www.salvis.com\\\/blog\\\/wp-content\\\/uploads\\\/2023\\\/11\\\/oracle-database-23c-npm-mle.png\",\"keywords\":[\"JavaScript\",\"MLE\",\"Oracle 26ai\",\"PL\\\/SQL\",\"SQLcl\"],\"articleSection\":[\"Oracle\"],\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"CommentAction\",\"name\":\"Comment\",\"target\":[\"https:\\\/\\\/www.salvis.com\\\/blog\\\/2023\\\/11\\\/26\\\/installing-mle-modules-in-the-oracle-database\\\/#respond\"]}]},{\"@type\":\"WebPage\",\"@id\":\"https:\\\/\\\/www.salvis.com\\\/blog\\\/2023\\\/11\\\/26\\\/installing-mle-modules-in-the-oracle-database\\\/\",\"url\":\"https:\\\/\\\/www.salvis.com\\\/blog\\\/2023\\\/11\\\/26\\\/installing-mle-modules-in-the-oracle-database\\\/\",\"name\":\"Installing MLE Modules in the Oracle Database - Philipp Salvisberg&#039;s Blog\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/www.salvis.com\\\/blog\\\/#website\"},\"primaryImageOfPage\":{\"@id\":\"https:\\\/\\\/www.salvis.com\\\/blog\\\/2023\\\/11\\\/26\\\/installing-mle-modules-in-the-oracle-database\\\/#primaryimage\"},\"image\":{\"@id\":\"https:\\\/\\\/www.salvis.com\\\/blog\\\/2023\\\/11\\\/26\\\/installing-mle-modules-in-the-oracle-database\\\/#primaryimage\"},\"thumbnailUrl\":\"https:\\\/\\\/www.salvis.com\\\/blog\\\/wp-content\\\/uploads\\\/2023\\\/11\\\/oracle-database-23c-npm-mle.png\",\"datePublished\":\"2023-11-26T17:56:09+00:00\",\"dateModified\":\"2023-11-26T17:57:40+00:00\",\"description\":\"Using a custom SQLcl command to install ECMAScript modules via file or via URL from npm into the Oracle Database 23c as MLE modules.\",\"breadcrumb\":{\"@id\":\"https:\\\/\\\/www.salvis.com\\\/blog\\\/2023\\\/11\\\/26\\\/installing-mle-modules-in-the-oracle-database\\\/#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\\\/\\\/www.salvis.com\\\/blog\\\/2023\\\/11\\\/26\\\/installing-mle-modules-in-the-oracle-database\\\/\"]}]},{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\\\/\\\/www.salvis.com\\\/blog\\\/2023\\\/11\\\/26\\\/installing-mle-modules-in-the-oracle-database\\\/#primaryimage\",\"url\":\"https:\\\/\\\/www.salvis.com\\\/blog\\\/wp-content\\\/uploads\\\/2023\\\/11\\\/oracle-database-23c-npm-mle.png\",\"contentUrl\":\"https:\\\/\\\/www.salvis.com\\\/blog\\\/wp-content\\\/uploads\\\/2023\\\/11\\\/oracle-database-23c-npm-mle.png\",\"width\":1069,\"height\":805,\"caption\":\"Installing MLE Modules in the Oracle Database 23c\"},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\\\/\\\/www.salvis.com\\\/blog\\\/2023\\\/11\\\/26\\\/installing-mle-modules-in-the-oracle-database\\\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\\\/\\\/www.salvis.com\\\/blog\\\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Installing MLE Modules in the Oracle Database\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\\\/\\\/www.salvis.com\\\/blog\\\/#website\",\"url\":\"https:\\\/\\\/www.salvis.com\\\/blog\\\/\",\"name\":\"Philipp Salvisberg&#039;s Blog\",\"description\":\"Database-centric development\",\"publisher\":{\"@id\":\"https:\\\/\\\/www.salvis.com\\\/blog\\\/#\\\/schema\\\/person\\\/34352245c48678b1a5a05d4bc1339515\"},\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\\\/\\\/www.salvis.com\\\/blog\\\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"en-US\"},{\"@type\":[\"Person\",\"Organization\"],\"@id\":\"https:\\\/\\\/www.salvis.com\\\/blog\\\/#\\\/schema\\\/person\\\/34352245c48678b1a5a05d4bc1339515\",\"name\":\"Philipp Salvisberg\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\\\/\\\/www.salvis.com\\\/blog\\\/wp-content\\\/uploads\\\/2010\\\/11\\\/phs_trivadis4.jpg\",\"url\":\"https:\\\/\\\/www.salvis.com\\\/blog\\\/wp-content\\\/uploads\\\/2010\\\/11\\\/phs_trivadis4.jpg\",\"contentUrl\":\"https:\\\/\\\/www.salvis.com\\\/blog\\\/wp-content\\\/uploads\\\/2010\\\/11\\\/phs_trivadis4.jpg\",\"width\":400,\"height\":400,\"caption\":\"Philipp Salvisberg\"},\"logo\":{\"@id\":\"https:\\\/\\\/www.salvis.com\\\/blog\\\/wp-content\\\/uploads\\\/2010\\\/11\\\/phs_trivadis4.jpg\"},\"sameAs\":[\"http:\\\/\\\/www.salvis.com\\\/\"]}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"Installing MLE Modules in the Oracle Database - Philipp Salvisberg&#039;s Blog","description":"Using a custom SQLcl command to install ECMAScript modules via file or via URL from npm into the Oracle Database 23c as MLE modules.","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/www.salvis.com\/blog\/2023\/11\/26\/installing-mle-modules-in-the-oracle-database\/","og_locale":"en_US","og_type":"article","og_title":"Installing MLE Modules in the Oracle Database - Philipp Salvisberg&#039;s Blog","og_description":"Using a custom SQLcl command to install ECMAScript modules via file or via URL from npm into the Oracle Database 23c as MLE modules.","og_url":"https:\/\/www.salvis.com\/blog\/2023\/11\/26\/installing-mle-modules-in-the-oracle-database\/","og_site_name":"Philipp Salvisberg&#039;s Blog","article_published_time":"2023-11-26T17:56:09+00:00","article_modified_time":"2023-11-26T17:57:40+00:00","og_image":[{"width":1069,"height":805,"url":"https:\/\/www.salvis.com\/blog\/wp-content\/uploads\/2023\/11\/oracle-database-23c-npm-mle.png","type":"image\/png"}],"author":"Philipp Salvisberg","twitter_card":"summary_large_image","twitter_creator":"@phsalvisberg","twitter_site":"@phsalvisberg","twitter_misc":{"Written by":"Philipp Salvisberg","Est. reading time":"5 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/www.salvis.com\/blog\/2023\/11\/26\/installing-mle-modules-in-the-oracle-database\/#article","isPartOf":{"@id":"https:\/\/www.salvis.com\/blog\/2023\/11\/26\/installing-mle-modules-in-the-oracle-database\/"},"author":{"name":"Philipp Salvisberg","@id":"https:\/\/www.salvis.com\/blog\/#\/schema\/person\/34352245c48678b1a5a05d4bc1339515"},"headline":"Installing MLE Modules in the Oracle Database","datePublished":"2023-11-26T17:56:09+00:00","dateModified":"2023-11-26T17:57:40+00:00","mainEntityOfPage":{"@id":"https:\/\/www.salvis.com\/blog\/2023\/11\/26\/installing-mle-modules-in-the-oracle-database\/"},"wordCount":874,"commentCount":0,"publisher":{"@id":"https:\/\/www.salvis.com\/blog\/#\/schema\/person\/34352245c48678b1a5a05d4bc1339515"},"image":{"@id":"https:\/\/www.salvis.com\/blog\/2023\/11\/26\/installing-mle-modules-in-the-oracle-database\/#primaryimage"},"thumbnailUrl":"https:\/\/www.salvis.com\/blog\/wp-content\/uploads\/2023\/11\/oracle-database-23c-npm-mle.png","keywords":["JavaScript","MLE","Oracle 26ai","PL\/SQL","SQLcl"],"articleSection":["Oracle"],"inLanguage":"en-US","potentialAction":[{"@type":"CommentAction","name":"Comment","target":["https:\/\/www.salvis.com\/blog\/2023\/11\/26\/installing-mle-modules-in-the-oracle-database\/#respond"]}]},{"@type":"WebPage","@id":"https:\/\/www.salvis.com\/blog\/2023\/11\/26\/installing-mle-modules-in-the-oracle-database\/","url":"https:\/\/www.salvis.com\/blog\/2023\/11\/26\/installing-mle-modules-in-the-oracle-database\/","name":"Installing MLE Modules in the Oracle Database - Philipp Salvisberg&#039;s Blog","isPartOf":{"@id":"https:\/\/www.salvis.com\/blog\/#website"},"primaryImageOfPage":{"@id":"https:\/\/www.salvis.com\/blog\/2023\/11\/26\/installing-mle-modules-in-the-oracle-database\/#primaryimage"},"image":{"@id":"https:\/\/www.salvis.com\/blog\/2023\/11\/26\/installing-mle-modules-in-the-oracle-database\/#primaryimage"},"thumbnailUrl":"https:\/\/www.salvis.com\/blog\/wp-content\/uploads\/2023\/11\/oracle-database-23c-npm-mle.png","datePublished":"2023-11-26T17:56:09+00:00","dateModified":"2023-11-26T17:57:40+00:00","description":"Using a custom SQLcl command to install ECMAScript modules via file or via URL from npm into the Oracle Database 23c as MLE modules.","breadcrumb":{"@id":"https:\/\/www.salvis.com\/blog\/2023\/11\/26\/installing-mle-modules-in-the-oracle-database\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/www.salvis.com\/blog\/2023\/11\/26\/installing-mle-modules-in-the-oracle-database\/"]}]},{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/www.salvis.com\/blog\/2023\/11\/26\/installing-mle-modules-in-the-oracle-database\/#primaryimage","url":"https:\/\/www.salvis.com\/blog\/wp-content\/uploads\/2023\/11\/oracle-database-23c-npm-mle.png","contentUrl":"https:\/\/www.salvis.com\/blog\/wp-content\/uploads\/2023\/11\/oracle-database-23c-npm-mle.png","width":1069,"height":805,"caption":"Installing MLE Modules in the Oracle Database 23c"},{"@type":"BreadcrumbList","@id":"https:\/\/www.salvis.com\/blog\/2023\/11\/26\/installing-mle-modules-in-the-oracle-database\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/www.salvis.com\/blog\/"},{"@type":"ListItem","position":2,"name":"Installing MLE Modules in the Oracle Database"}]},{"@type":"WebSite","@id":"https:\/\/www.salvis.com\/blog\/#website","url":"https:\/\/www.salvis.com\/blog\/","name":"Philipp Salvisberg&#039;s Blog","description":"Database-centric development","publisher":{"@id":"https:\/\/www.salvis.com\/blog\/#\/schema\/person\/34352245c48678b1a5a05d4bc1339515"},"potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/www.salvis.com\/blog\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"en-US"},{"@type":["Person","Organization"],"@id":"https:\/\/www.salvis.com\/blog\/#\/schema\/person\/34352245c48678b1a5a05d4bc1339515","name":"Philipp Salvisberg","image":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/www.salvis.com\/blog\/wp-content\/uploads\/2010\/11\/phs_trivadis4.jpg","url":"https:\/\/www.salvis.com\/blog\/wp-content\/uploads\/2010\/11\/phs_trivadis4.jpg","contentUrl":"https:\/\/www.salvis.com\/blog\/wp-content\/uploads\/2010\/11\/phs_trivadis4.jpg","width":400,"height":400,"caption":"Philipp Salvisberg"},"logo":{"@id":"https:\/\/www.salvis.com\/blog\/wp-content\/uploads\/2010\/11\/phs_trivadis4.jpg"},"sameAs":["http:\/\/www.salvis.com\/"]}]}},"_links":{"self":[{"href":"https:\/\/www.salvis.com\/blog\/wp-json\/wp\/v2\/posts\/12931","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.salvis.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.salvis.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.salvis.com\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.salvis.com\/blog\/wp-json\/wp\/v2\/comments?post=12931"}],"version-history":[{"count":24,"href":"https:\/\/www.salvis.com\/blog\/wp-json\/wp\/v2\/posts\/12931\/revisions"}],"predecessor-version":[{"id":12965,"href":"https:\/\/www.salvis.com\/blog\/wp-json\/wp\/v2\/posts\/12931\/revisions\/12965"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/www.salvis.com\/blog\/wp-json\/wp\/v2\/media\/12966"}],"wp:attachment":[{"href":"https:\/\/www.salvis.com\/blog\/wp-json\/wp\/v2\/media?parent=12931"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.salvis.com\/blog\/wp-json\/wp\/v2\/categories?post=12931"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.salvis.com\/blog\/wp-json\/wp\/v2\/tags?post=12931"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}