From ddf25278c1d9819518f87986aec7d9257cc6758d Mon Sep 17 00:00:00 2001 From: demo-kratia <56242907+demo-kratia@users.noreply.github.com> Date: Fri, 9 Jun 2023 17:05:28 -0700 Subject: [PATCH 1/2] update links --- .../Python_API_Tutorial.ipynb | 34 +++++++++++++++++- .../jupyter-notebooks/api-tutorial.ipynb | 35 ++++++++++++++++--- .../jupyter-notebooks/sql-tutorial.ipynb | 23 +++++++++++- 3 files changed, 85 insertions(+), 7 deletions(-) diff --git a/examples/quickstart/jupyter-notebooks/Python_API_Tutorial.ipynb b/examples/quickstart/jupyter-notebooks/Python_API_Tutorial.ipynb index 851f1896db93..40eca7d78711 100644 --- a/examples/quickstart/jupyter-notebooks/Python_API_Tutorial.ipynb +++ b/examples/quickstart/jupyter-notebooks/Python_API_Tutorial.ipynb @@ -1,6 +1,7 @@ { "cells": [ { + "attachments": {}, "cell_type": "markdown", "id": "ce2efaaa", "metadata": {}, @@ -26,7 +27,7 @@ " ~ under the License.\n", " -->\n", "\n", - "This notebook provides a quick introduction to the Python wrapper around the [Druid REST API](api-tutorial.ipynb). This notebook assumes you are familiar with the basics of the REST API, and the [set of operations which Druid provides](https://druid.apache.org/docs/latest/operations/api-reference.html). This tutorial focuses on using Python to access those APIs rather than explaining the APIs themselves. The APIs themselves are covered in other notebooks that use the Python API.\n", + "This notebook provides a quick introduction to the Python wrapper around the [Druid REST API](api-tutorial.ipynb). This notebook assumes you are familiar with the basics of the REST API, and the [set of operations which Druid provides](https://druid.apache.org/docs/latest/api-reference/api-reference.html). This tutorial focuses on using Python to access those APIs rather than explaining the APIs themselves. The APIs themselves are covered in other notebooks that use the Python API.\n", "\n", "This tutorial works with Druid 25.0.0 or later.\n", "\n", @@ -52,6 +53,7 @@ ] }, { + "attachments": {}, "cell_type": "markdown", "id": "fb68a838", "metadata": {}, @@ -78,6 +80,7 @@ ] }, { + "attachments": {}, "cell_type": "markdown", "id": "8b4e774b", "metadata": {}, @@ -98,6 +101,7 @@ ] }, { + "attachments": {}, "cell_type": "markdown", "id": "be992774", "metadata": {}, @@ -116,6 +120,7 @@ ] }, { + "attachments": {}, "cell_type": "markdown", "id": "e803c9fe", "metadata": {}, @@ -134,6 +139,7 @@ ] }, { + "attachments": {}, "cell_type": "markdown", "id": "d78a6c35", "metadata": {}, @@ -152,6 +158,7 @@ ] }, { + "attachments": {}, "cell_type": "markdown", "id": "012b2e61", "metadata": {}, @@ -174,6 +181,7 @@ ] }, { + "attachments": {}, "cell_type": "markdown", "id": "d051bc5e", "metadata": {}, @@ -192,6 +200,7 @@ ] }, { + "attachments": {}, "cell_type": "markdown", "id": "b8261ab0", "metadata": {}, @@ -210,6 +219,7 @@ ] }, { + "attachments": {}, "cell_type": "markdown", "id": "ff311595", "metadata": {}, @@ -228,6 +238,7 @@ ] }, { + "attachments": {}, "cell_type": "markdown", "id": "7392e484", "metadata": {}, @@ -251,6 +262,7 @@ ] }, { + "attachments": {}, "cell_type": "markdown", "id": "c6c4e1d4", "metadata": {}, @@ -259,6 +271,7 @@ ] }, { + "attachments": {}, "cell_type": "markdown", "id": "f414d145", "metadata": {}, @@ -279,6 +292,7 @@ ] }, { + "attachments": {}, "cell_type": "markdown", "id": "7b944084", "metadata": {}, @@ -305,6 +319,7 @@ ] }, { + "attachments": {}, "cell_type": "markdown", "id": "937dc6b1", "metadata": {}, @@ -349,6 +364,7 @@ ] }, { + "attachments": {}, "cell_type": "markdown", "id": "481af1f2", "metadata": {}, @@ -367,6 +383,7 @@ ] }, { + "attachments": {}, "cell_type": "markdown", "id": "99f8db7b", "metadata": {}, @@ -375,6 +392,7 @@ ] }, { + "attachments": {}, "cell_type": "markdown", "id": "9e3be017", "metadata": {}, @@ -431,6 +449,7 @@ ] }, { + "attachments": {}, "cell_type": "markdown", "id": "ef4512f8", "metadata": {}, @@ -449,6 +468,7 @@ ] }, { + "attachments": {}, "cell_type": "markdown", "id": "11d9c95a", "metadata": {}, @@ -467,6 +487,7 @@ ] }, { + "attachments": {}, "cell_type": "markdown", "id": "936f57fb", "metadata": {}, @@ -485,6 +506,7 @@ ] }, { + "attachments": {}, "cell_type": "markdown", "id": "c1152f41", "metadata": {}, @@ -506,6 +528,7 @@ ] }, { + "attachments": {}, "cell_type": "markdown", "id": "c96fdcc6", "metadata": {}, @@ -527,6 +550,7 @@ ] }, { + "attachments": {}, "cell_type": "markdown", "id": "1deaf95f", "metadata": {}, @@ -548,6 +572,7 @@ ] }, { + "attachments": {}, "cell_type": "markdown", "id": "dcb8055f", "metadata": {}, @@ -566,6 +591,7 @@ ] }, { + "attachments": {}, "cell_type": "markdown", "id": "2654e72c", "metadata": {}, @@ -588,6 +614,7 @@ ] }, { + "attachments": {}, "cell_type": "markdown", "id": "837e08b0", "metadata": {}, @@ -629,6 +656,7 @@ ] }, { + "attachments": {}, "cell_type": "markdown", "id": "edc4ee39", "metadata": {}, @@ -659,6 +687,7 @@ ] }, { + "attachments": {}, "cell_type": "markdown", "id": "b661b29f", "metadata": {}, @@ -677,6 +706,7 @@ ] }, { + "attachments": {}, "cell_type": "markdown", "id": "5e789ca7", "metadata": {}, @@ -697,6 +727,7 @@ ] }, { + "attachments": {}, "cell_type": "markdown", "id": "7b9dc7e3", "metadata": {}, @@ -715,6 +746,7 @@ ] }, { + "attachments": {}, "cell_type": "markdown", "id": "ddaf0dc2", "metadata": {}, diff --git a/examples/quickstart/jupyter-notebooks/api-tutorial.ipynb b/examples/quickstart/jupyter-notebooks/api-tutorial.ipynb index b2616b5d8e2c..28dab6e0d446 100644 --- a/examples/quickstart/jupyter-notebooks/api-tutorial.ipynb +++ b/examples/quickstart/jupyter-notebooks/api-tutorial.ipynb @@ -1,6 +1,7 @@ { "cells": [ { + "attachments": {}, "cell_type": "markdown", "id": "ad4e60b6", "metadata": { @@ -36,7 +37,7 @@ "\n", "Different [Druid server types](https://druid.apache.org/docs/latest/design/processes.html#server-types) are responsible for handling different APIs for the Druid services. For example, the Overlord service on the Master server provides the status of a task. You'll also interact the Broker service on the Query Server to see what datasources are available. And to run queries, you'll interact with the Broker. The Router service on the Query servers routes API calls.\n", "\n", - "For more information, see the [API reference](https://druid.apache.org/docs/latest/operations/api-reference.html), which is organized by server type.\n", + "For more information, see the [API reference](https://druid.apache.org/docs/latest/api-reference/api-reference.html), which is organized by server type.\n", "\n", "For work within other notebooks, prefer to use the [Python API](Python_API_Tutorial.ipynb) which is a notebook-friendly wrapper around the low-level API calls shown here.\n", "\n", @@ -52,6 +53,7 @@ ] }, { + "attachments": {}, "cell_type": "markdown", "id": "8d6bbbcb", "metadata": { @@ -76,6 +78,7 @@ ] }, { + "attachments": {}, "cell_type": "markdown", "id": "12c0e1c3", "metadata": {}, @@ -104,6 +107,7 @@ ] }, { + "attachments": {}, "cell_type": "markdown", "id": "a22c69c8", "metadata": {}, @@ -122,6 +126,7 @@ ] }, { + "attachments": {}, "cell_type": "markdown", "id": "2093ecf0-fb4b-405b-a216-094583580e0a", "metadata": {}, @@ -130,6 +135,7 @@ ] }, { + "attachments": {}, "cell_type": "markdown", "id": "29c24856", "metadata": { @@ -157,6 +163,7 @@ ] }, { + "attachments": {}, "cell_type": "markdown", "id": "1e853795", "metadata": {}, @@ -179,6 +186,7 @@ ] }, { + "attachments": {}, "cell_type": "markdown", "id": "de82029e", "metadata": {}, @@ -197,6 +205,7 @@ ] }, { + "attachments": {}, "cell_type": "markdown", "id": "cbeb5a63", "metadata": { @@ -231,6 +240,7 @@ ] }, { + "attachments": {}, "cell_type": "markdown", "id": "1917aace", "metadata": { @@ -243,7 +253,7 @@ "\n", "This tutorial uses the multi-stage query (MSQ) task engine and its `sql/task` endpoint to perform SQL-based ingestion.\n", "\n", - "To learn more about SQL-based ingestion, see [SQL-based ingestion](https://druid.apache.org/docs/latest/multi-stage-query/index.html). For information about the endpoint specifically, see [SQL-based ingestion and multi-stage query task API](https://druid.apache.org/docs/latest/multi-stage-query/api.html)." + "To learn more about SQL-based ingestion, see [SQL-based ingestion](https://druid.apache.org/docs/latest/multi-stage-query/index.html). For information about the endpoint specifically, see [SQL-based ingestion and multi-stage query task API](https://druid.apache.org/docs/latest/api-reference/api.html)." ] }, { @@ -258,6 +268,7 @@ ] }, { + "attachments": {}, "cell_type": "markdown", "id": "2168db3a", "metadata": { @@ -266,7 +277,7 @@ "source": [ "The example uses INSERT, but you could also use REPLACE INTO. In fact, if you have an existing datasource with the name `wikipedia_api`, you need to use REPLACE INTO instead. \n", "\n", - "The `/sql/task` endpoint accepts [SQL requests in the JSON-over-HTTP format](https://druid.apache.org/docs/latest/querying/sql-api.html#request-body) using the `query`, `context`, and `parameters` fields.\n", + "The `/sql/task` endpoint accepts [SQL requests in the JSON-over-HTTP format](https://druid.apache.org/docs/latest/api-reference/sql-api.html#request-body) using the `query`, `context`, and `parameters` fields.\n", "\n", "The query inserts data from an external source into a table named `wikipedia_api`. \n", "\n", @@ -307,6 +318,7 @@ ] }, { + "attachments": {}, "cell_type": "markdown", "id": "f7dcddd7", "metadata": {}, @@ -332,6 +344,7 @@ ] }, { + "attachments": {}, "cell_type": "markdown", "id": "6aa7f230", "metadata": {}, @@ -352,6 +365,7 @@ ] }, { + "attachments": {}, "cell_type": "markdown", "id": "9ba1821f", "metadata": { @@ -362,6 +376,7 @@ ] }, { + "attachments": {}, "cell_type": "markdown", "id": "f9cc2e45", "metadata": {}, @@ -380,6 +395,7 @@ ] }, { + "attachments": {}, "cell_type": "markdown", "id": "a983270d", "metadata": {}, @@ -401,6 +417,7 @@ ] }, { + "attachments": {}, "cell_type": "markdown", "id": "9f9c1b6b", "metadata": {}, @@ -420,6 +437,7 @@ ] }, { + "attachments": {}, "cell_type": "markdown", "id": "f17892d9-a8c1-43d6-890c-7d68cd792c72", "metadata": { @@ -458,6 +476,7 @@ ] }, { + "attachments": {}, "cell_type": "markdown", "id": "74a9b593", "metadata": {}, @@ -491,6 +510,7 @@ ] }, { + "attachments": {}, "cell_type": "markdown", "id": "3b55af57-9c79-4e45-a22c-438c1b94112e", "metadata": { @@ -528,6 +548,7 @@ ] }, { + "attachments": {}, "cell_type": "markdown", "id": "622f2158-75c9-4b12-bd8a-c92d30994c1f", "metadata": { @@ -551,6 +572,7 @@ ] }, { + "attachments": {}, "cell_type": "markdown", "id": "b2b366ad", "metadata": {}, @@ -574,6 +596,7 @@ ] }, { + "attachments": {}, "cell_type": "markdown", "id": "0df529d6", "metadata": {}, @@ -593,6 +616,7 @@ ] }, { + "attachments": {}, "cell_type": "markdown", "id": "950b2cc4-9935-497d-a3f5-e89afcc85965", "metadata": { @@ -648,6 +672,7 @@ ] }, { + "attachments": {}, "cell_type": "markdown", "id": "8fbfa1fa-2cde-46d5-8107-60bd436fb64e", "metadata": { @@ -658,8 +683,8 @@ "\n", "This tutorial covers the some of the basics related to the Druid API. To learn more about the kinds of things you can do, see the API documentation:\n", "\n", - "- [Druid SQL API](https://druid.apache.org/docs/latest/querying/sql-api.html)\n", - "- [API reference](https://druid.apache.org/docs/latest/operations/api-reference.html)\n", + "- [Druid SQL API](https://druid.apache.org/docs/latest/api-reference/api-reference.html)\n", + "- [API reference](https://druid.apache.org/docs/latest/api-reference/api-reference.html)\n", "\n", "You can also try out the [druid-client](https://github.com/paul-rogers/druid-client), a Python library for Druid created by Paul Rogers, a Druid contributor. A simplified version of that library is included with these tutorials. See [the Python API Tutorial](Python_API_Tutorial.ipynb) for an overview. That tutorial shows how to do the same tasks as this one, but in a simpler form: focusing on the Druid actions and not the mechanics of the REST API." ] diff --git a/examples/quickstart/jupyter-notebooks/sql-tutorial.ipynb b/examples/quickstart/jupyter-notebooks/sql-tutorial.ipynb index b0ce6238e92a..7048af4d23ee 100644 --- a/examples/quickstart/jupyter-notebooks/sql-tutorial.ipynb +++ b/examples/quickstart/jupyter-notebooks/sql-tutorial.ipynb @@ -1,6 +1,7 @@ { "cells": [ { + "attachments": {}, "cell_type": "markdown", "id": "ad4e60b6", "metadata": { @@ -38,6 +39,7 @@ ] }, { + "attachments": {}, "cell_type": "markdown", "id": "8d6bbbcb", "metadata": { @@ -91,6 +93,7 @@ ] }, { + "attachments": {}, "cell_type": "markdown", "id": "e893ef7d-7136-442f-8bd9-31b5a5276518", "metadata": {}, @@ -142,6 +145,7 @@ ] }, { + "attachments": {}, "cell_type": "markdown", "id": "a141e962", "metadata": {}, @@ -160,6 +164,7 @@ ] }, { + "attachments": {}, "cell_type": "markdown", "id": "240b0ad5-48f2-4737-b12b-5fd5f98da300", "metadata": {}, @@ -188,6 +193,7 @@ ] }, { + "attachments": {}, "cell_type": "markdown", "id": "cbeb5a63", "metadata": { @@ -228,6 +234,7 @@ ] }, { + "attachments": {}, "cell_type": "markdown", "id": "59f41229", "metadata": {}, @@ -246,6 +253,7 @@ ] }, { + "attachments": {}, "cell_type": "markdown", "id": "c59ca797-dd91-442b-8d02-67b711b3fcc6", "metadata": {}, @@ -281,6 +289,7 @@ ] }, { + "attachments": {}, "cell_type": "markdown", "id": "f7cfdfae-ccba-49ba-a70f-63d0bd3527b2", "metadata": {}, @@ -293,6 +302,7 @@ ] }, { + "attachments": {}, "cell_type": "markdown", "id": "29c24856", "metadata": { @@ -321,6 +331,7 @@ ] }, { + "attachments": {}, "cell_type": "markdown", "id": "8cf212e5-fb3f-4206-acdd-46ef1da327ab", "metadata": { @@ -359,6 +370,7 @@ ] }, { + "attachments": {}, "cell_type": "markdown", "id": "5160db26-7e8d-40f7-8588-b7eabfc08355", "metadata": {}, @@ -396,6 +408,7 @@ ] }, { + "attachments": {}, "cell_type": "markdown", "id": "dd24470d-25c2-4031-a711-8477d69c9e94", "metadata": { @@ -408,6 +421,7 @@ ] }, { + "attachments": {}, "cell_type": "markdown", "id": "2baf21b9-74d1-4df6-862f-afbaeef1812b", "metadata": {}, @@ -437,6 +451,7 @@ ] }, { + "attachments": {}, "cell_type": "markdown", "id": "eab67db4-a0f3-4177-b5be-1fef355bf33f", "metadata": {}, @@ -467,6 +482,7 @@ ] }, { + "attachments": {}, "cell_type": "markdown", "id": "9c2e56af-3fdf-40f1-869b-822ac8aafbc8", "metadata": { @@ -489,6 +505,7 @@ ] }, { + "attachments": {}, "cell_type": "markdown", "id": "2de6e6ba-473c-4ef0-9739-a9472a4c7065", "metadata": {}, @@ -518,13 +535,14 @@ ] }, { + "attachments": {}, "cell_type": "markdown", "id": "407cf489-3947-4326-9d81-18b38abaee58", "metadata": {}, "source": [ "### TopN\n", "\n", - "The TopN native query type returns a sorted set of results for the values in a given dimension according to some criteria. TopN results are always computed in memory. In some cases, the TopN query type delivers approximate ranking and results. To prevent this, set the `useApproximateTopN` query context parameter to `false` when calling the [Druid SQL API](https://druid.apache.org/docs/latest/querying/sql-api.html). See [SQL query context](https://druid.apache.org/docs/latest/querying/sql-query-context.html) for more information.\n", + "The TopN native query type returns a sorted set of results for the values in a given dimension according to some criteria. TopN results are always computed in memory. In some cases, the TopN query type delivers approximate ranking and results. To prevent this, set the `useApproximateTopN` query context parameter to `false` when calling the [Druid SQL API](https://druid.apache.org/docs/latest/api-reference/sql-api.html). See [SQL query context](https://druid.apache.org/docs/latest/querying/sql-query-context.html) for more information.\n", "\n", "Druid SQL uses TopN for queries that meet the following criteria:\n", "- queries that GROUP BY a single expression\n", @@ -553,6 +571,7 @@ ] }, { + "attachments": {}, "cell_type": "markdown", "id": "38ee7d1d-2d47-4d36-b8c6-b0868c36c871", "metadata": {}, @@ -592,6 +611,7 @@ ] }, { + "attachments": {}, "cell_type": "markdown", "id": "eb5cfc5c-8f58-4e56-a218-7a55867e3e0c", "metadata": {}, @@ -625,6 +645,7 @@ ] }, { + "attachments": {}, "cell_type": "markdown", "id": "8fbfa1fa-2cde-46d5-8107-60bd436fb64e", "metadata": { From 98d3139efc320e282faf565e06c3d3ac5d575b62 Mon Sep 17 00:00:00 2001 From: demo-kratia <56242907+demo-kratia@users.noreply.github.com> Date: Fri, 16 Jun 2023 15:49:24 -0700 Subject: [PATCH 2/2] Fix MSQ link --- examples/quickstart/jupyter-notebooks/api-tutorial.ipynb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/examples/quickstart/jupyter-notebooks/api-tutorial.ipynb b/examples/quickstart/jupyter-notebooks/api-tutorial.ipynb index 28dab6e0d446..03b738e6dab3 100644 --- a/examples/quickstart/jupyter-notebooks/api-tutorial.ipynb +++ b/examples/quickstart/jupyter-notebooks/api-tutorial.ipynb @@ -253,7 +253,7 @@ "\n", "This tutorial uses the multi-stage query (MSQ) task engine and its `sql/task` endpoint to perform SQL-based ingestion.\n", "\n", - "To learn more about SQL-based ingestion, see [SQL-based ingestion](https://druid.apache.org/docs/latest/multi-stage-query/index.html). For information about the endpoint specifically, see [SQL-based ingestion and multi-stage query task API](https://druid.apache.org/docs/latest/api-reference/api.html)." + "To learn more about SQL-based ingestion, see [SQL-based ingestion](https://druid.apache.org/docs/latest/multi-stage-query/index.html). For information about the endpoint specifically, see [SQL-based ingestion and multi-stage query task API](https://druid.apache.org/docs/latest/api-reference/sql-ingestion-api.html)." ] }, {