{
  "date": "2018-05-04T19:22:46",
  "slug": "adwc-the-hidden-gem-zepplin-notebook",
  "link": "https://www.dbi-services.com/blog/adwc-the-hidden-gem-zepplin-notebook/",
  "title": {
    "rendered": "ADWC &#8211; the hidden gem: Zepplin Notebook"
  },
  "content": {
    "rendered": "<h2>By Franck Pachot</h2>\n<p>.<br />\n<a href=\"https://www.dbi-services.com/blog/wp-content/uploads/sites/2/2022/04/IMG_5339.jpg\"><img loading=\"lazy\" decoding=\"async\" src=\"https://www.dbi-services.com/blog/wp-content/uploads/sites/2/2022/04/IMG_5339.jpg\" alt=\"IMG_5339\" width=\"300\" height=\"266\" class=\"alignright size-medium wp-image-23023\" /></a><br />\nIn the <a href=\"https://www.dbi-services.com/blog/?s=ADWC\" target=\"_blank\" rel=\"noopener noreferrer\">previous blog posts</a> I explained how to create, and stop/start the Autonomous Data Warehouse Cloud service. And I didn&#8217;t show yet how to connect to it. It is easy, from sqlplus or SQL Developer, or SQLcl. </p>\n<p>But there&#8217;s something more exciting to run some SQL queries: the Oracle Machine Learning Notebooks based on Apache Zepplin. At first, I didn&#8217;t realize why the administration menu entry to create users in the ADWC service was named &#8216;Manage Oracle ML Users&#8217;, and didn&#8217;t realize that the &#8216;Autonomous Data Warehouse Cloud&#8217; header was replaced by &#8216;Machine Learning&#8217;.</p>\n<p>But last week at IOUG Collaborate 18, I visited the Demo Grounds and thanks to Charlie Berger I realized all the power of this: we are in the &#8216;Machine Learning&#8217; interface here and the home button opens all the features available to query the ADWC database, including the SQL Notebooks based on Apache Zepplin.<br />\n<!--more--><br />\nHere is the path to this hidden Gem. From your ADWC service, you go to the Service Console:<br />\n<a href=\"https://www.dbi-services.com/blog/wp-content/uploads/sites/2/2022/04/CaptureZepplin001.png\"><img loading=\"lazy\" decoding=\"async\" src=\"https://www.dbi-services.com/blog/wp-content/uploads/sites/2/2022/04/CaptureZepplin001.png\" alt=\"CaptureZepplin001\" width=\"1085\" height=\"212\" class=\"aligncenter size-full wp-image-23020\" /></a></p>\n<p>Here you log as the ADMIN user with the &gt;12 characters password that you have defined at service creation. Don&#8217;t worry if you forgot it, you can reset it from here:<br />\n<a href=\"https://www.dbi-services.com/blog/wp-content/uploads/sites/2/2022/04/CaptureZepplin002.png\"><img loading=\"lazy\" decoding=\"async\" src=\"https://www.dbi-services.com/blog/wp-content/uploads/sites/2/2022/04/CaptureZepplin002.png\" alt=\"CaptureZepplin002\" width=\"1024\" height=\"245\" class=\"aligncenter size-large wp-image-23029\" /></a></p>\n<p>Once connected, you go to the Administration tab and choose the &#8216;Manage Oracle ML Users&#8217;:</p>\n<p><a href=\"https://www.dbi-services.com/blog/wp-content/uploads/sites/2/2022/04/CaptureZepplin003.png\"><img loading=\"lazy\" decoding=\"async\" src=\"https://www.dbi-services.com/blog/wp-content/uploads/sites/2/2022/04/CaptureZepplin003.png\" alt=\"CaptureZepplin003\" width=\"1024\" height=\"290\" class=\"aligncenter size-large wp-image-23031\" /></a></p>\n<p>Here you have to create a user because the ADMIN user not a Machine Learning user. Machine Learning users need one of the following roles: OML_DEVELOPER, OML_APP_ADMIN, OML_SYS_ADMIN. The user you will create here will have OML_DEVELOPER which is required to use SQL Notebooks.</p>\n<p>Now that you have a user created from here, you can click on this little house icon, which is your home in the Machine Learning part of the ADWC:</p>\n<p><a href=\"https://www.dbi-services.com/blog/wp-content/uploads/sites/2/2022/04/CaptureZepplin004.png\"><img loading=\"lazy\" decoding=\"async\" src=\"https://www.dbi-services.com/blog/wp-content/uploads/sites/2/2022/04/CaptureZepplin004.png\" alt=\"CaptureZepplin004\" width=\"776\" height=\"422\" class=\"aligncenter size-full wp-image-23034\" /></a></p>\n<p>Here you connect with the user you have created from the Oracle ML User page (not the ADMIN one as it has no OML role granted).</p>\n<p><a href=\"https://www.dbi-services.com/blog/wp-content/uploads/sites/2/2022/04/CaptureZepplin005.png\"><img loading=\"lazy\" decoding=\"async\" src=\"https://www.dbi-services.com/blog/wp-content/uploads/sites/2/2022/04/CaptureZepplin005.png\" alt=\"CaptureZepplin005\" width=\"734\" height=\"491\" class=\"aligncenter size-full wp-image-23037\" /></a></p>\n<p>Then you are in your OML home, ready to run SQL from a Notebook:</p>\n<p><a href=\"https://www.dbi-services.com/blog/wp-content/uploads/sites/2/2022/04/CaptureZepplin006.png\"><img loading=\"lazy\" decoding=\"async\" src=\"https://www.dbi-services.com/blog/wp-content/uploads/sites/2/2022/04/CaptureZepplin006.png\" alt=\"CaptureZepplin006\" width=\"1024\" height=\"217\" class=\"aligncenter size-large wp-image-23039\" /></a></p>\n<p>I&#8217;ll show what you can do in future post. But just to give you an idea, you have a Notebook where you can type a query, execute it, and have the result displayed as a table, or as a graph. Here I was looking at I/O latency and the following shows me that the &#8216;cell single block physical read&#8217;, which are nothing else than the buffered one-block-at-a-time reads that are called &#8216;db file sequential read&#8217; when not on Exadata, in dark green here, have most of their I/O call time between 128 and 512 microseconds.</p>\n<p><a href=\"https://www.dbi-services.com/blog/wp-content/uploads/sites/2/2022/04/CaptureZepplin007.png\"><img loading=\"lazy\" decoding=\"async\" src=\"https://www.dbi-services.com/blog/wp-content/uploads/sites/2/2022/04/CaptureZepplin007.png\" alt=\"CaptureZepplin007\" width=\"1024\" height=\"409\" class=\"aligncenter size-large wp-image-23043\" /></a></p>\n<p>I like this way to have the result just under the query, with easy formatting. The code, documented, is at the same place as the result, in a notebook that is easy to refresh, or share. And you can export the whole in a simple JSON file.</p>\n",
    "protected": false
  }
}
