diff --git a/doc/tutorials/cloud/00_setup.ipynb b/doc/tutorials/cloud/00_setup.ipynb index 91212601..2ab7a975 100644 --- a/doc/tutorials/cloud/00_setup.ipynb +++ b/doc/tutorials/cloud/00_setup.ipynb @@ -2,13 +2,13 @@ "cells": [ { "cell_type": "code", - "execution_count": 1, + "execution_count": 19, "id": "initial_id", "metadata": { "collapsed": true, "ExecuteTime": { - "end_time": "2023-10-31T08:39:59.255115Z", - "start_time": "2023-10-31T08:39:58.937116Z" + "end_time": "2023-10-31T12:54:55.864998Z", + "start_time": "2023-10-31T12:54:55.794920Z" } }, "outputs": [ @@ -16,13 +16,13 @@ "name": "stdout", "output_type": "stream", "text": [ - "Schema created in 76.59ms\n" + "Schema created in 55.96ms\n" ] } ], "source": [ "%run ../setup_db.ipynb\n", - "conf = SandboxConfig(EXTERNAL_HOST_NAME=\"127.0.0.1\", HOST_PORT=8563)\n", + "conf = SandboxConfig(EXTERNAL_HOST_NAME=\"127.0.0.1\", HOST_PORT=8563, BUCKETFS_PORT=2580)\n", "setup_schema(conf)" ] }, @@ -58,6 +58,16 @@ }, "id": "39d3eb644ca970c5" }, + { + "cell_type": "markdown", + "source": [ + "# Retrieve the latest released jar file" + ], + "metadata": { + "collapsed": false + }, + "id": "5d0ea9b81b7ee1b5" + }, { "cell_type": "code", "execution_count": 3, @@ -121,6 +131,142 @@ }, "id": "26a9c3d99a84c280" }, + { + "cell_type": "markdown", + "source": [ + "# Upload the jar to the bucketfs" + ], + "metadata": { + "collapsed": false + }, + "id": "11f54801bd4f0e52" + }, + { + "cell_type": "code", + "execution_count": 38, + "outputs": [], + "source": [ + "from exasol import bucketfs" + ], + "metadata": { + "collapsed": false, + "ExecuteTime": { + "end_time": "2023-10-31T13:04:56.196743Z", + "start_time": "2023-10-31T13:04:56.192806Z" + } + }, + "id": "22c106f0dce7686c" + }, + { + "cell_type": "code", + "execution_count": 46, + "outputs": [], + "source": [ + "UDFS_BUCKET = \"myudfs\"" + ], + "metadata": { + "collapsed": false, + "ExecuteTime": { + "end_time": "2023-10-31T13:05:34.722940Z", + "start_time": "2023-10-31T13:05:34.716676Z" + } + }, + "id": "76848da2905675e4" + }, + { + "cell_type": "code", + "execution_count": 39, + "outputs": [], + "source": [ + "bfs_url = conf.BUCKETFS_URL_PREFIX + conf.EXTERNAL_BUCKETFS_HOST\n", + "bfs_creds = {\n", + " UDFS_BUCKET: {\n", + " \"username\": conf.BUCKETFS_USER,\n", + " \"password\": conf.BUCKETFS_PASSWORD,\n", + " } \n", + "}" + ], + "metadata": { + "collapsed": false, + "ExecuteTime": { + "end_time": "2023-10-31T13:04:56.818120Z", + "start_time": "2023-10-31T13:04:56.810084Z" + } + }, + "id": "30f7167bfef7541f" + }, + { + "cell_type": "code", + "execution_count": 40, + "outputs": [], + "source": [ + "svc = bucketfs.Service(bfs_url, bfs_creds)" + ], + "metadata": { + "collapsed": false, + "ExecuteTime": { + "end_time": "2023-10-31T13:04:57.776464Z", + "start_time": "2023-10-31T13:04:57.768738Z" + } + }, + "id": "97cd73ff4671111b" + }, + { + "cell_type": "code", + "execution_count": 42, + "outputs": [], + "source": [ + "bucket = svc[UDFS_BUCKET]" + ], + "metadata": { + "collapsed": false, + "ExecuteTime": { + "end_time": "2023-10-31T13:05:00.470849Z", + "start_time": "2023-10-31T13:05:00.457197Z" + } + }, + "id": "7a1edeb504facdda" + }, + { + "cell_type": "code", + "execution_count": 50, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Jar file is already present in the bucketfs\n" + ] + } + ], + "source": [ + "jar_exists = local_jar_name in list(bucket)\n", + "if jar_exists:\n", + " print(\"Jar file is already present in the bucketfs\")\n", + "else:\n", + " print(\"Upload jar to bucketfs\")\n", + " with local_jar_path.open(\"rb\") as fd:\n", + " bucket.upload(local_jar_name, fd) " + ], + "metadata": { + "collapsed": false, + "ExecuteTime": { + "end_time": "2023-10-31T13:09:47.544790Z", + "start_time": "2023-10-31T13:09:47.527581Z" + } + }, + "id": "43231d82c5d3cef8" + }, + { + "cell_type": "markdown", + "source": [ + "# Create connection script" + ], + "metadata": { + "collapsed": false + }, + "id": "54a1efeb33bc7a8" + }, { "cell_type": "code", "execution_count": null, @@ -129,7 +275,7 @@ "metadata": { "collapsed": false }, - "id": "321aa2e89281542c" + "id": "6a11f64e0fd52c71" } ], "metadata": {