Skip to content

Commit 2ad5eb4

Browse files
Merge branch 'development' of github.com:v3io/tutorials
2 parents d74c6d2 + eb499d5 commit 2ad5eb4

File tree

1 file changed

+24
-22
lines changed

1 file changed

+24
-22
lines changed

getting-started/frames.ipynb

Lines changed: 24 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -21,16 +21,16 @@
2121
"## Overview\n",
2222
"\n",
2323
"[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",
24-
"Frames currently supports the NoSQL (key/value), stream, and time-series (TSDB) data models via its `kv`, `stream`, and `tsdb` backends.\n",
24+
"Frames currently supports the NoSQL (key/value) and time-series (TSDB) data models via its `kv` and `tsdb` backends.\n",
2525
"\n",
2626
"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",
27-
"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",
27+
"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",
2828
"\n",
29-
"- `create` &mdash; creates a new TSDB table or stream (\"backend data\").\n",
30-
"- `delete` &mdash; deletes a table or stream.\n",
31-
"- `read` &mdash; reads data from a table or stream into pandas DataFrames.\n",
32-
"- `write` &mdash; writes data from pandas DataFrames to a table or stream.\n",
33-
"- `execute` &mdash; executes a command on a table or stream.\n",
29+
"- `create` &mdash; creates a new TSDB table (\"backend data\").\n",
30+
"- `delete` &mdash; deletes a table.\n",
31+
"- `read` &mdash; reads data from a table into pandas DataFrames.\n",
32+
"- `write` &mdash; writes data from pandas DataFrames to a table.\n",
33+
"- `execute` &mdash; executes a command on a table.\n",
3434
" Each backend may support multiple commands.\n",
3535
"\n",
3636
"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",
@@ -1087,15 +1087,20 @@
10871087
"#### Overview and Basic Examples\n",
10881088
"\n",
10891089
"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",
1090-
"Note that you cannot mix raw sample-data queries and aggregation queries:\n",
1090+
"Note that you cannot mix raw sample-data queries and aggregation queries.\n",
10911091
"\n",
1092-
"**Parameters** &mdash; set the `table` parameter to the path to the TSDB table, and optionally set additional method parameters to configure the query.\n",
1093-
" `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",
1092+
"You must set the `table` parameter to the path to the TSDB table.<br>\n",
1093+
"You can optionally set additional method parameters to configure the query:\n",
1094+
"\n",
1095+
"- `columns` defines the query metrics (default = all).\n",
1096+
"- `aggregators` defines aggregation functions (\"aggregators\") to execute for all the configured metrics.\n",
1097+
"- `filter` restricts the query by using a platform [filter expression](https://www.iguazio.com/docs/reference/latest-release/expressions/condition-expression/#filter-expression).\n",
1098+
"- `start` and `end` define the query's time range &mdash; the metric-sample timestamps to which to apply the query.\n",
1099+
" The default `end` time is `\"now\"` and the default `start` time is 1 hour before the end time (`<end> - 1h`).\n",
1100+
"- `step` defines the interval for aggregation or raw-data downsampling (default = the query's time range).\n",
1101+
"- `multi_index` casn be set to `True` to return labels as index columns, as demonstrated in the following examples.\n",
1102+
" By default, only the metric sample-time primary-key attribute is returned as an index column.\n",
10941103
"\n",
1095-
"You can also optionally set additional parameters.\n",
1096-
"`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",
1097-
"You can set the optional `multi_index` parameter to `True` to return labels as index columns, as demonstrated in the following examples.\n",
1098-
"By default, only the metric sample-time primary-key attribute is returned as an index column.<br>\n",
10991104
"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."
11001105
]
11011106
},
@@ -1241,16 +1246,13 @@
12411246
"<a id=\"frames-tsdb-read-conditional\"></a>\n",
12421247
"#### Conditional Read\n",
12431248
"\n",
1244-
"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",
1245-
"\n",
1246-
"- 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",
1247-
"- 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",
1248-
" Note that the comparison operator for such queries is `=`, as opposed to `==` in non-SQL queries."
1249+
"The following example demonstrates how to use a query filter to conditionally read only a subset of the data from a TSDB table.\n",
1250+
"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)."
12491251
]
12501252
},
12511253
{
12521254
"cell_type": "code",
1253-
"execution_count": 18,
1255+
"execution_count": 15,
12541256
"metadata": {},
12551257
"outputs": [
12561258
{
@@ -1437,7 +1439,7 @@
14371439
},
14381440
{
14391441
"cell_type": "code",
1440-
"execution_count": 20,
1442+
"execution_count": 16,
14411443
"metadata": {},
14421444
"outputs": [],
14431445
"source": [
@@ -1459,7 +1461,7 @@
14591461
},
14601462
{
14611463
"cell_type": "code",
1462-
"execution_count": 27,
1464+
"execution_count": 17,
14631465
"metadata": {},
14641466
"outputs": [],
14651467
"source": [

0 commit comments

Comments
 (0)