diff --git a/getting-started/frames.ipynb b/getting-started/frames.ipynb index f693ec88..883ff16e 100644 --- a/getting-started/frames.ipynb +++ b/getting-started/frames.ipynb @@ -21,16 +21,16 @@ "## Overview\n", "\n", "[V3IO Frames](https://github.com/v3io/frames) (**\"Frames\"**) is a multi-model open-source data-access library, developed by Iguazio, which provides a unified high-performance DataFrame API for working with data in the data store of the Iguazio Data Science Platform (**\"the platform\"**).\n", - "Frames currently supports the NoSQL (key/value), stream, and time-series (TSDB) data models via its `kv`, `stream`, and `tsdb` backends.\n", + "Frames currently supports the NoSQL (key/value) and time-series (TSDB) data models via its `kv` and `tsdb` backends.\n", "\n", "To use Frames, you first need to import the **v3io_frames** library and create and initialize a client object — an instance of the`Client` class.
\n", - "The `Client` class features the following object methods for supporting basic data operations; the type of data is derived from the backend type (`tsdb` — TSDB table / `kv` — NoSQL table / `stream` — data stream):\n", + "The `Client` class features the following object methods for supporting basic data operations; the type of data is derived from the backend type (`kv` — NoSQL table / `tsdb` — TSDB table):\n", "\n", - "- `create` — creates a new TSDB table or stream (\"backend data\").\n", - "- `delete` — deletes a table or stream.\n", - "- `read` — reads data from a table or stream into pandas DataFrames.\n", - "- `write` — writes data from pandas DataFrames to a table or stream.\n", - "- `execute` — executes a command on a table or stream.\n", + "- `create` — creates a new TSDB table (\"backend data\").\n", + "- `delete` — deletes a table.\n", + "- `read` — reads data from a table into pandas DataFrames.\n", + "- `write` — writes data from pandas DataFrames to a table.\n", + "- `execute` — executes a command on a table.\n", " Each backend may support multiple commands.\n", "\n", "For a detailed description of the Frames API, see the [Frames API reference](https://www.iguazio.com/docs/reference/latest-release/api-reference/frames/).
\n", @@ -1087,15 +1087,20 @@ "#### Overview and Basic Examples\n", "\n", "Use the `read` method of the Frames client with the `tsdb` backend to read data from your TSDB table (i.e., query the database).
\n", - "Note that you cannot mix raw sample-data queries and aggregation queries:\n", + "Note that you cannot mix raw sample-data queries and aggregation queries.\n", "\n", - "**Parameters** — set the `table` parameter to the path to the TSDB table, and optionally set additional method parameters to configure the query.\n", - " `columns` defines the query metrics (default = all); `aggregators` defines aggregation functions (\"aggregators\") to execute for all the configured metrics; `filter` restricts the query by using a platform [filter expression](https://www.iguazio.com/docs/reference/latest-release/expressions/condition-expression/#filter-expression); \n", + "You must set the `table` parameter to the path to the TSDB table.
\n", + "You can optionally set additional method parameters to configure the query:\n", + "\n", + "- `columns` defines the query metrics (default = all).\n", + "- `aggregators` defines aggregation functions (\"aggregators\") to execute for all the configured metrics.\n", + "- `filter` restricts the query by using a platform [filter expression](https://www.iguazio.com/docs/reference/latest-release/expressions/condition-expression/#filter-expression).\n", + "- `start` and `end` define the query's time range — the metric-sample timestamps to which to apply the query.\n", + " The default `end` time is `\"now\"` and the default `start` time is 1 hour before the end time (` - 1h`).\n", + "- `step` defines the interval for aggregation or raw-data downsampling (default = the query's time range).\n", + "- `multi_index` casn be set to `True` to return labels as index columns, as demonstrated in the following examples.\n", + " By default, only the metric sample-time primary-key attribute is returned as an index column.\n", "\n", - "You can also optionally set additional parameters.\n", - "`start` and `end` define the query's time range — the metric-sample timestamps to which to apply the query (the default end time is `\"now\"` and the default start time is 1 hour before the end time); `step` defines the interval for aggregation or raw-data downsampling (default = the query's time range);
\n", - "You can set the optional `multi_index` parameter to `True` to return labels as index columns, as demonstrated in the following examples.\n", - "By default, only the metric sample-time primary-key attribute is returned as an index column.
\n", "See the [Frames API reference](https://www.iguazio.com/docs/reference/latest-release/api-reference/frames/tsdb/read/) for more information about the `read` parameters that are supported for the `tsdb` backend." ] }, @@ -1241,16 +1246,13 @@ "\n", "#### Conditional Read\n", "\n", - "The following examples demonstrate how to use a query filter to conditionally read only a subset of the data from a TSDB table.
\n", - "\n", - "- In non-SQL queries, this is done by setting the value of the `filter` parameter to a [platform filter expression](https://www.iguazio.com/docs/reference/latest-release/expressions/condition-expression/#filter-expression).\n", - "- In SQL queries, this is done by setting the `query` parameter to a query string that includes a `FROM` clause with a platform filter expression expressed as an SQL expression.\n", - " Note that the comparison operator for such queries is `=`, as opposed to `==` in non-SQL queries." + "The following example demonstrates how to use a query filter to conditionally read only a subset of the data from a TSDB table.\n", + "This is done by setting the value of the `filter` parameter to a [platform filter expression](https://www.iguazio.com/docs/reference/latest-release/expressions/condition-expression/#filter-expression)." ] }, { "cell_type": "code", - "execution_count": 18, + "execution_count": 15, "metadata": {}, "outputs": [ { @@ -1437,7 +1439,7 @@ }, { "cell_type": "code", - "execution_count": 20, + "execution_count": 16, "metadata": {}, "outputs": [], "source": [ @@ -1459,7 +1461,7 @@ }, { "cell_type": "code", - "execution_count": 27, + "execution_count": 17, "metadata": {}, "outputs": [], "source": [