{ "metadata": { "language_info": { "codemirror_mode": { "name": "ipython", "version": 3 }, "file_extension": ".py", "mimetype": "text/x-python", "name": "python", "nbconvert_exporter": "python", "pygments_lexer": "ipython3", "version": 3 }, "orig_nbformat": 2 }, "nbformat": 4, "nbformat_minor": 2, "cells": [ { "source": [ "# InfluxDB organizing concepts (Organization, Buckets, Data elements)" ], "cell_type": "markdown", "metadata": {} }, { "source": [ "## Organizations\n", "\n", "Organizations behave as workspaces. They can possess\n", "\n", "- a user or a group of users,\n", "- dashboards\n", "- tasks\n", "- buckets" ], "cell_type": "markdown", "metadata": {} }, { "source": [ "## Buckets\n", "\n", "InfluxDB data is stored in buckets. Each bucket belongs to an organization.\n", "\n", "Buckets are basically databases with the important addition of retention policies.\n", "\n", "A bucket's **retention policy** determines the time duration for which its datapoints persist.\n", "\n", "### Bucket creation\n", "\n", "You can create bucket on the UI either in the \n", "\n", "- **Data Explorer**, or\n", "- in the **Load Data** menu points.\n", "\n", "Here you need to give a name and also set when would you like to delete the data.\n", "\n", "### Edit buckets\n", "\n", "You can view your existing buckets and edit them under the **Data** / **Load Data** menu points.\n", "\n", "### Delete buckets\n", "\n", "You can delet buckets under the **Data** / **Load Data** menu points.\n", "\n", "### Explore bucket data\n", "\n", "In the **Data** / **Load Data** menu point, you can simply click on a bucket to open it in the **Data Explorer**" ], "cell_type": "markdown", "metadata": {} }, { "source": [ "## Data elements\n", "\n" ], "cell_type": "markdown", "metadata": {} }, { "source": [ "- `_time`, timestamp (in epoch nanosecond)\n", "- `_measurement`, string\n", "- `_field`, string: field key\n", "- `_value`, string, floats, integers, or booleans: field value\n", "\n", "Fields are not indexed, and required. Tags are indexed but are not required.\n", "\n", "An additional element is a 'field set' which are the collection of field key-value pairs having the same timestamp.\n", "\n", "Tags: these are simple column-like structure where the column name is the 'tag key' and its content are 'tag values'.\n", "\n", "Tag sets are the tag-key value combinations in the data.\n", "\n", "As tags are indexed, they are more performant than fields. For this reason, often, you might want to restructure your tables so your fields will become tags and the other way around.\n", "\n", "With tags having many unique values, however, look out for [series cardinality](https://docs.influxdata.com/influxdb/v2.0/reference/glossary/#series-cardinality) as it can eat up your memory!\n", "\n", "\n", "### Series\n", "\n", "Series key is a collection of points which have the same\n", "- measurement,\n", "- tag set, and\n", "- field key.\n", "\n", "Their use is a core element in definint the data schema.\n", "\n", "\n", "### Points\n", "\n", "A **Point** consists of a series key, a field value, and a timestamp.\n" ], "cell_type": "markdown", "metadata": {} } ] }