Skip to content

Commit

Permalink
Merge pull request #232 from Sharon-iguazio/doc-frames-gs-pr-227-fix
Browse files Browse the repository at this point in the history
[DOC] Doc review for PR #227 — getting-started/frames.ipynb edits to remove unsupported Tech Preview features
  • Loading branch information
Sharon-iguazio authored Apr 12, 2020
2 parents 4397efe + 998357f commit eb499d5
Showing 1 changed file with 24 additions and 22 deletions.
46 changes: 24 additions & 22 deletions getting-started/frames.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -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 &mdash; an instance of the`Client` class.<br>\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` &mdash; TSDB table / `kv` &mdash; NoSQL table / `stream` &mdash; 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` &mdash; NoSQL table / `tsdb` &mdash; TSDB table):\n",
"\n",
"- `create` &mdash; creates a new TSDB table or stream (\"backend data\").\n",
"- `delete` &mdash; deletes a table or stream.\n",
"- `read` &mdash; reads data from a table or stream into pandas DataFrames.\n",
"- `write` &mdash; writes data from pandas DataFrames to a table or stream.\n",
"- `execute` &mdash; executes a command on a table or stream.\n",
"- `create` &mdash; creates a new TSDB table (\"backend data\").\n",
"- `delete` &mdash; deletes a table.\n",
"- `read` &mdash; reads data from a table into pandas DataFrames.\n",
"- `write` &mdash; writes data from pandas DataFrames to a table.\n",
"- `execute` &mdash; 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/).<br>\n",
Expand Down Expand Up @@ -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).<br>\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** &mdash; 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.<br>\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 &mdash; 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 (`<end> - 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 &mdash; 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);<br>\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.<br>\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."
]
},
Expand Down Expand Up @@ -1241,16 +1246,13 @@
"<a id=\"frames-tsdb-read-conditional\"></a>\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.<br>\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": [
{
Expand Down Expand Up @@ -1437,7 +1439,7 @@
},
{
"cell_type": "code",
"execution_count": 20,
"execution_count": 16,
"metadata": {},
"outputs": [],
"source": [
Expand All @@ -1459,7 +1461,7 @@
},
{
"cell_type": "code",
"execution_count": 27,
"execution_count": 17,
"metadata": {},
"outputs": [],
"source": [
Expand Down

0 comments on commit eb499d5

Please sign in to comment.