From 6223ef0ecd3b3c49cc4e936e796cc2e73530864e Mon Sep 17 00:00:00 2001 From: Scott Anderson Date: Wed, 26 Apr 2023 08:03:37 -0600 Subject: [PATCH] Cloud Dedicated documentation (#4903) * base changes for influxdb cloud dedicated * removed unnecessary whitespace from dedicated homepage * influxctl reference documentation (#4855) * influxctl reference docs * fixed typo, added auth0 token life span * Apply suggestions from code review Co-authored-by: Jason Stirnaman * more updates to influxctl docs * update influxctl docs to address PR feedback --------- Co-authored-by: Jason Stirnaman * Add admin and manage databases sections to Cloud Dedicated (#4857) * add admin and manage databases sections * Apply suggestions from code review Co-authored-by: Jason Stirnaman * added missing page descriptions to admin docs --------- Co-authored-by: Jason Stirnaman * Add token management documentation to Cloud Dedicated documentation (#4861) * add manage tokens documentation to dedicated * Apply suggestions from code review Co-authored-by: Jason Stirnaman * update admin token docs to address PR feedback --------- Co-authored-by: Jason Stirnaman * Dedicated get started (#4878) * WIP dedicated get started content * fix(cst): infinite cardinality (#4851) * WIP cloud dedicated get started * feat(cloud-dedicated): WIP - write data to Cloud Dedicated * fix(cloud-dedicated): grammar. * feat(cloud-dedicated): WIP outline write methods, v1 API use * fix(cloud-dedicated): dupe name. * updated staging config, fixed dedicated page titles * updated dedicated setup doc * Cloud Dedicated primers v1 API: auth and write (#4865) * feat(cloud-dedicated): v1 API with Cloud Dedicated - Add /primers >> /api >> /v1 and /v2 - Move draft started in /write-data to /primers/api/v1 - Created code samples that still need testing - v1 authentication schemes. * fix(cloud-dedicated): list children pages * wip(cloud-dedicated): v1 primer intro * wip(cloud-dedicated): auth fixes. * feat(cloud-dedicated): v1 API primer - part of #4863, #4864 Still untested against CST: - v1 auth methods - v1 /write - Telegraf config - Precision - API sample code * Update content/influxdb/cloud-dedicated/primers/_index.md Co-authored-by: Scott Anderson * Update content/influxdb/cloud-dedicated/primers/api/_index.md Co-authored-by: Scott Anderson * Update content/influxdb/cloud-dedicated/primers/_index.md Co-authored-by: Scott Anderson * Update content/influxdb/cloud-dedicated/primers/_index.md * Update content/influxdb/cloud-dedicated/primers/api/v1/_index.md Co-authored-by: Scott Anderson * Update content/influxdb/cloud-dedicated/primers/api/v1/_index.md Co-authored-by: Scott Anderson * Update content/influxdb/cloud-dedicated/primers/api/v1/_index.md Co-authored-by: Scott Anderson * Update content/influxdb/cloud-dedicated/primers/api/v1/_index.md Co-authored-by: Scott Anderson * Update content/influxdb/cloud-dedicated/primers/api/v1/_index.md * Update content/influxdb/cloud-dedicated/primers/api/v1/_index.md Co-authored-by: Scott Anderson * Update content/influxdb/cloud-dedicated/primers/api/v1/_index.md Co-authored-by: Scott Anderson * Update content/influxdb/cloud-dedicated/primers/api/v1/_index.md Co-authored-by: Scott Anderson * Update content/influxdb/cloud-dedicated/primers/api/v1/_index.md Co-authored-by: Scott Anderson * Update content/influxdb/cloud-dedicated/primers/api/v1/_index.md Co-authored-by: Scott Anderson * Update content/influxdb/cloud-dedicated/primers/api/v1/_index.md Co-authored-by: Scott Anderson * Update content/influxdb/cloud-dedicated/primers/api/v1/_index.md Co-authored-by: Scott Anderson * Update content/influxdb/cloud-dedicated/primers/api/v1/_index.md Co-authored-by: Scott Anderson * Update content/influxdb/cloud-dedicated/primers/api/v1/_index.md Co-authored-by: Scott Anderson * Update content/influxdb/cloud-dedicated/primers/api/v1/_index.md Co-authored-by: Scott Anderson * Update content/influxdb/cloud-dedicated/primers/api/v1/_index.md Co-authored-by: Scott Anderson * Update content/influxdb/cloud-dedicated/primers/api/v1/_index.md Co-authored-by: Scott Anderson * Update content/influxdb/cloud-dedicated/primers/api/v1/_index.md Co-authored-by: Scott Anderson * Update content/influxdb/cloud-dedicated/primers/api/v1/_index.md Co-authored-by: Scott Anderson * Update content/influxdb/cloud-dedicated/primers/api/v2/_index.md Co-authored-by: Scott Anderson * Update content/influxdb/cloud-dedicated/primers/api/v1/_index.md Co-authored-by: Scott Anderson * Update content/influxdb/cloud-dedicated/primers/api/v2/_index.md Co-authored-by: Scott Anderson * Update layouts/shortcodes/api/cloud/v2-prefer.html Co-authored-by: Scott Anderson * Update shared/text/api/cloud-dedicated/basic-auth.js Co-authored-by: Scott Anderson --------- Co-authored-by: Scott Anderson * Dedicated v1 write (#4873) * wip(v1): Revise v1 and add client library info. * feat(cloud-dedicated): primer v1 API auth and writes - Fixes for v1 auth and writes - Configuring node and python v1 client libraries for Cloud Dedicated. * fix(cloud-dedicated): v1 intros: - Fix redundant intro - Query intros * Apply suggestions from code review Co-authored-by: Scott Anderson --------- Co-authored-by: Scott Anderson * Dedicated v2 write (#4875) * fix(cloud-dedicated): v1 API primer: - fix typo - fix description * wip(cloud-dedicated): v2 auth, write, Telegraf * feat(cloud-dedicated): v2 API primer (#4874) - v2 authentication - Write using /api/v2/write - Cleanup in v1 * Update content/influxdb/cloud-dedicated/primers/api/v2/_index.md Co-authored-by: Scott Anderson * Update content/influxdb/cloud-dedicated/primers/api/v1/_index.md Co-authored-by: Scott Anderson * Update shared/text/api/cloud-dedicated/token-auth-v2-write.sh Co-authored-by: Scott Anderson * fix(cloud-dedicated): parameters for v1 and v2 writes - testing proves that org can't be empty Ongoing: - writes with v2 client library appear to work, but I can't find the measurement when I query. - v1 writes with curl respond with 404. --------- Co-authored-by: Scott Anderson * Add Python and Go write instructions to Cloud Dedicated get started (#4876) * added python and go write instructions to dedicated get started * Add get started query guide to dedicated (#4877) * Add get started query guide to dedicated * Apply suggestions from code review Co-authored-by: Jason Stirnaman --------- Co-authored-by: Jason Stirnaman * Apply suggestions from code review Co-authored-by: Jason Stirnaman * Apply suggestions from code review --------- Co-authored-by: Jason Stirnaman --------- Co-authored-by: Jason Stirnaman * Port reference content into dedicated (#4879) * ported line protocol and sql reference * port glossary to dedicated * fix(cloud-dedicated): cleanup (#4880) * fix(cloud-dedicated): v1 parameter values - Fixes parameter values in requests. - Based on inspection of the request (default port, content-type headers). - Still not working in CST. * fix(cloud-dedicated): cleanup auth description and list query tools. * fix(cloud-dedicated): cleanup auth examples: - remove boilerplate JS examples. Eventually replace with client lib examples. - fix incorrect URL - replace localhost with cloud2 host * fix(cloud-dedicated): replace placeholders * Add support for custom dedicated URLs (#4882) * add support for custom dedicated urls * Apply suggestions from code review Co-authored-by: Jason Stirnaman * removed unnecessary conditional in influxdb-urls.js --------- Co-authored-by: Jason Stirnaman * add information about flight sql support (#4894) * Update influxctl install and setup instructions (#4893) * updated influxctl install and setup instructions * added details to influxctl init page * Apply suggestions from code review Co-authored-by: Jason Stirnaman --------- Co-authored-by: Jason Stirnaman * Dedicated query data (#4895) * WIP port query data section to dedicated * updated database-name to iox-namespace-name * updated grafana instructions * update grafana install instructions * updated images and links * fixed broken links in query data section * fix(cloud-dedicated): get-started write (#4890) * fix(cloud-dedicated): package name typo * fix(cloud-dedicated): URL missing query * fix(cloud-dedicated): iox-namespace-name * fix(cloud-dedicated): use get-started database name * fix(cloud-dedicated): add auth-specific examples. * fix(cloud-dedicated): use Bearer for v2 example * fix(cloud-dedicated): add a note about token schemes and link to primer. * fix(cloud-dedicated): org no longer required by API, remove from curl example * fix(cloud-dedicated): use Bearer * fix(cloud-dedicated): wordsmithing * fix(cloud-dedicated): file name * fix(cloud-dedicated): Go client works without org * fix(cloud-dedicated): separate the commands for copy-pasting * fix(cloud-dedicated): v1 API token authentication * fix(cloud-dedicated): org parameter ignored, but needed in python clients * fix(cloud-dedicated): v1 API examples and params for /query (#4897) * fix(cloud-dedicated): minor word change (#4898) * New homepage and structural changes (#4899) * WIP first sweep of cloud-iox to cloud-serverless * WIP iox to serverless content updates * WIP iox to serverless updates in page templates and data files * WIP new homepage * chore(dedicated): copy best-practices from serverless * fix(serverless): missing shortcut * new homepage * fix(dedicated): token links in v1 API primer * chore(dedicated): write csv with Telegraf * fix(serverless): write CSV with Telegraf * updated homepage styles * updated deps, fix unclosed shortcodes, fix light css * fix product selector order * updated database naming restrictions, add resource delete confirmation * add cloud-ios to cloud-serverless redirect to edge.js * remove sh from allowed extentions * fix bug in redirect logic * add sections to product dropdown (#4900) * minor homepage css adjustment * fixed page titles * fixed more iox references in templates * Apply suggestions from code review Co-authored-by: Jason Stirnaman * Migrate 1.x data to dedicated (#4901) * fix(serverless): cleanup * chore(dedicated): Migrate 1.x data to dedicated - Minimal adaptation of IOx to Dedicated for now. - Use APIs for writing data (CLIs? pyinflux3 only writes CSV? Can't promote influxdb_iox for now) - Add 2.x CLI warning * fix(dedicated): URL typos * Update content/influxdb/cloud-dedicated/write-data/migrate-data/_index.md Co-authored-by: Scott Anderson * Update content/influxdb/cloud-dedicated/write-data/migrate-data/migrate-1x-to-cloud-dedicated.md Co-authored-by: Scott Anderson * Update content/influxdb/cloud-dedicated/write-data/migrate-data/migrate-1x-to-cloud-dedicated.md Co-authored-by: Scott Anderson * Update content/influxdb/cloud-dedicated/write-data/migrate-data/migrate-1x-to-cloud-dedicated.md Co-authored-by: Scott Anderson * Update content/influxdb/cloud-dedicated/write-data/migrate-data/migrate-1x-to-cloud-dedicated.md Co-authored-by: Scott Anderson * Update content/influxdb/cloud-dedicated/write-data/migrate-data/migrate-1x-to-cloud-dedicated.md Co-authored-by: Scott Anderson --------- Co-authored-by: Scott Anderson --------- Co-authored-by: Jason Stirnaman * add step for requesting a cluster in dedicated setup * minor content fixes in best practices --------- Co-authored-by: Jason Stirnaman --- assets/js/get-started-timestamps.js | 4 - assets/js/influxdb-url.js | 155 ++- assets/js/tabbed-content.js | 1 + assets/styles/layouts/_homepage.scss | 231 ++-- .../styles/layouts/_syntax-highlighting.scss | 6 +- assets/styles/layouts/_top-nav.scss | 30 +- .../layouts/article/_html-diagrams.scss | 4 + .../styles/layouts/modals/_url-selector.scss | 16 +- assets/styles/themes/_theme-light.scss | 2 +- config.staging.toml | 2 + config.toml | 3 +- content/influxdb/cloud-dedicated/_index.md | 34 + .../influxdb/cloud-dedicated/admin/_index.md | 15 + .../cloud-dedicated/admin/databases/_index.md | 51 + .../cloud-dedicated/admin/databases/create.md | 112 ++ .../cloud-dedicated/admin/databases/delete.md | 39 + .../cloud-dedicated/admin/databases/list.md | 56 + .../cloud-dedicated/admin/tokens/_index.md | 40 + .../cloud-dedicated/admin/tokens/create.md | 99 ++ .../cloud-dedicated/admin/tokens/delete.md | 52 + .../cloud-dedicated/admin/tokens/list.md | 56 + .../cloud-dedicated/get-started/_index.md | 120 ++ .../cloud-dedicated/get-started/query.md | 677 ++++++++++ .../cloud-dedicated/get-started/setup.md | 120 ++ .../cloud-dedicated/get-started/write.md | 519 ++++++++ .../cloud-dedicated/primers/_index.md | 12 + .../cloud-dedicated/primers/api/_index.md | 23 + .../cloud-dedicated/primers/api/v1/_index.md | 491 +++++++ .../cloud-dedicated/primers/api/v2/_index.md | 338 +++++ .../query-data/_index.md | 4 +- .../query-data/execute-queries/_index.md | 8 +- .../execute-queries/flight-sql/_index.md | 8 +- .../execute-queries/flight-sql/python.md | 302 +++++ .../execute-queries/flight-sql/superset.md | 258 ++++ .../query-data/sql/_index.md | 4 +- .../query-data/sql/aggregate-select.md | 24 +- .../query-data/sql/basic-query.md | 194 +++ .../query-data/sql/cast-types.md | 12 +- .../query-data/sql/explore-schema.md | 77 ++ .../query-data/tools/_index.md | 16 + .../query-data/tools/grafana.md | 248 ++++ .../query-data/tools/pandas.md | 200 +++ .../query-data/tools/pyarrow.md | 136 ++ .../query-data/tools/superset.md | 38 + .../cloud-dedicated/reference/_index.md | 12 + .../cloud-dedicated/reference/cli/_index.md | 19 + .../reference/cli/influxctl/_index.md | 92 ++ .../cli/influxctl/database/_index.md | 33 + .../cli/influxctl/database/create.md | 86 ++ .../cli/influxctl/database/delete.md | 50 + .../reference/cli/influxctl/database/list.md | 26 + .../reference/cli/influxctl/help.md | 19 + .../reference/cli/influxctl/init.md | 25 + .../reference/cli/influxctl/token/_index.md | 33 + .../reference/cli/influxctl/token/create.md | 87 ++ .../reference/cli/influxctl/token/delete.md | 50 + .../reference/cli/influxctl/token/list.md | 26 + .../reference/cli/influxctl/version.md | 19 + .../cloud-dedicated/reference/glossary.md | 1113 ++++++++++++++++ .../reference/internals/_index.md | 11 + .../reference/internals/arrow-flightsql.md | 68 + .../reference/sql/_index.md | 6 +- .../reference/sql/data-types.md | 6 +- .../reference/sql/explain.md | 2 +- .../reference/sql/functions/_index.md | 2 +- .../reference/sql/functions/aggregate.md | 36 +- .../reference/sql/functions/conditional.md | 2 +- .../reference/sql/functions/math.md | 42 +- .../reference/sql/functions/misc.md | 6 +- .../sql/functions/regular-expression.md | 8 +- .../reference/sql/functions/selector.md | 4 +- .../reference/sql/functions/string.md | 52 +- .../reference/sql/functions/time-and-date.md | 12 +- .../reference/sql/group-by.md | 2 +- .../reference/sql/having.md | 2 +- .../reference/sql/information-schema.md | 8 +- .../reference/sql/limit.md | 2 +- .../reference/sql/order-by.md | 4 +- .../reference/sql/select.md | 2 +- .../reference/sql/table-value-constructor.md | 4 +- .../reference/sql/union.md | 8 +- .../reference/sql/where.md | 2 +- .../reference/syntax/_index.md | 14 + .../reference/syntax/line-protocol.md | 16 + .../cloud-dedicated/write-data/_index.md | 26 + .../write-data/best-practices/_index.md | 17 + .../best-practices/schema-design.md | 376 ++++++ .../cloud-dedicated/write-data/csv/_index.md | 18 + .../write-data/csv/telegraf.md | 152 +++ .../write-data/migrate-data/_index.md | 74 + .../migrate-1x-to-cloud-dedicated.md | 238 ++++ .../cloud-iox/admin/accounts/_index.md | 14 - .../cloud-iox/admin/accounts/data-usage.md | 30 - .../influxdb/cloud-iox/reference/_index.md | 12 - .../reference/cli/influx/apply/_index.md | 26 - .../reference/cli/influx/auth/_index.md | 17 - .../cli/influx/bucket-schema/_index.md | 19 - .../reference/cli/influx/bucket/_index.md | 18 - .../reference/cli/influx/bucket/delete.md | 15 - .../reference/cli/influx/completion/_index.md | 18 - .../reference/cli/influx/config/_index.md | 17 - .../reference/cli/influx/dashboards/_index.md | 25 - .../reference/cli/influx/delete/_index.md | 19 - .../reference/cli/influx/export/_index.md | 24 - .../reference/cli/influx/export/all.md | 15 - .../reference/cli/influx/help/_index.md | 15 - .../reference/cli/influx/org/_index.md | 17 - .../reference/cli/influx/query/_index.md | 30 - .../reference/cli/influx/scripts/_index.md | 18 - .../reference/cli/influx/secret/_index.md | 18 - .../reference/cli/influx/stacks/_index.md | 20 - .../reference/cli/influx/task/_index.md | 18 - .../reference/cli/influx/telegrafs/_index.md | 20 - .../reference/cli/influx/template/_index.md | 18 - .../reference/cli/influx/user/password.md | 16 - .../reference/cli/influx/v1/_index.md | 17 - .../reference/cli/influx/v1/shell.md | 19 - .../reference/cli/influx/write/_index.md | 24 - .../cloud-iox/reference/internals/_index.md | 12 - .../influxdb/cloud-iox/reference/regions.md | 47 - .../cloud-iox/write-data/delete-data.md | 21 - .../use-telegraf/telegraf-configs/_index.md | 18 - .../{cloud-iox => cloud-serverless}/_index.md | 26 +- .../admin/_index.md | 11 +- .../cloud-serverless/admin/accounts/_index.md | 14 + .../admin/accounts/data-usage.md | 39 + .../admin/accounts/limits.md | 29 +- .../admin/accounts/switch-account.md | 4 +- .../admin/buckets/_index.md | 12 +- .../admin/buckets/create-bucket.md | 27 +- .../buckets/manage-explicit-bucket-schemas.md | 64 +- .../admin/buckets/update-bucket.md | 18 +- .../admin/buckets/view-buckets.md | 18 +- .../admin/organizations/_index.md | 8 +- .../admin/organizations/switch-org.md | 8 +- .../get-started/_index.md | 18 +- .../get-started/process.md | 2 +- .../get-started/query.md | 49 +- .../get-started/setup.md | 57 +- .../get-started/visualize.md | 2 +- .../get-started/write.md | 44 +- .../cloud-serverless/query-data/_index.md | 19 + .../query-data/execute-queries/_index.md | 15 + .../execute-queries/data-explorer/_index.md | 18 +- .../execute-queries/flight-sql/_index.md | 27 + .../execute-queries/flight-sql/python.md | 19 +- .../execute-queries/flight-sql/superset.md | 32 +- .../query-data/flux-sql.md | 18 +- .../cloud-serverless/query-data/sql/_index.md | 20 + .../query-data/sql/aggregate-select.md | 295 ++++ .../query-data/sql/basic-query.md | 12 +- .../query-data/sql/cast-types.md | 309 +++++ .../query-data/sql/explore-schema.md | 4 +- .../query-data/tools/_index.md | 10 +- .../query-data/tools/grafana.md | 26 +- .../query-data/tools/pandas.md | 18 +- .../query-data/tools/pyarrow.md | 17 +- .../query-data/tools/superset.md | 16 +- .../cloud-serverless/reference/_index.md | 12 + .../reference/api/_index.md | 8 +- .../reference/cli/_index.md | 4 +- .../reference/cli/influx/_index.md | 4 +- .../reference/cli/influx/apply/_index.md | 26 + .../reference/cli/influx/auth/_index.md | 17 + .../reference/cli/influx/auth/active.md | 2 +- .../reference/cli/influx/auth/create.md | 2 +- .../reference/cli/influx/auth/delete.md | 2 +- .../reference/cli/influx/auth/inactive.md | 2 +- .../reference/cli/influx/auth/list.md | 2 +- .../reference/cli/influx/backup/_index.md | 10 +- .../cli/influx/bucket-schema/_index.md | 19 + .../cli/influx/bucket-schema/create.md | 2 +- .../cli/influx/bucket-schema/list.md | 2 +- .../cli/influx/bucket-schema/update.md | 2 +- .../reference/cli/influx/bucket/_index.md | 18 + .../reference/cli/influx/bucket/create.md | 6 +- .../reference/cli/influx/bucket/delete.md | 15 + .../reference/cli/influx/bucket/list.md | 2 +- .../reference/cli/influx/bucket/update.md | 2 +- .../reference/cli/influx/completion/_index.md | 18 + .../reference/cli/influx/config/_index.md | 17 + .../reference/cli/influx/config/create.md | 2 +- .../reference/cli/influx/config/list.md | 2 +- .../reference/cli/influx/config/rm.md | 2 +- .../reference/cli/influx/config/set.md | 2 +- .../reference/cli/influx/dashboards/_index.md | 25 + .../reference/cli/influx/delete/_index.md | 19 + .../reference/cli/influx/export/_index.md | 24 + .../reference/cli/influx/export/all.md | 15 + .../reference/cli/influx/export/stack.md | 2 +- .../reference/cli/influx/help/_index.md | 15 + .../reference/cli/influx/org/_index.md | 17 + .../reference/cli/influx/org/create.md | 9 +- .../reference/cli/influx/org/delete.md | 9 +- .../reference/cli/influx/org/list.md | 2 +- .../cli/influx/org/members/_index.md | 9 +- .../reference/cli/influx/org/members/add.md | 8 +- .../reference/cli/influx/org/members/list.md | 2 +- .../cli/influx/org/members/remove.md | 6 +- .../reference/cli/influx/org/update.md | 2 +- .../reference/cli/influx/ping/_index.md | 8 +- .../reference/cli/influx/query/_index.md | 30 + .../reference/cli/influx/remote/_index.md | 4 +- .../reference/cli/influx/remote/create.md | 4 +- .../reference/cli/influx/remote/delete.md | 4 +- .../reference/cli/influx/remote/list.md | 4 +- .../reference/cli/influx/remote/update.md | 4 +- .../cli/influx/replication/_index.md | 4 +- .../cli/influx/replication/create.md | 4 +- .../cli/influx/replication/delete.md | 4 +- .../reference/cli/influx/replication/list.md | 4 +- .../cli/influx/replication/update.md | 4 +- .../reference/cli/influx/restore/index.md | 8 +- .../reference/cli/influx/scripts/_index.md | 18 + .../reference/cli/influx/scripts/create.md | 2 +- .../reference/cli/influx/scripts/delete.md | 2 +- .../reference/cli/influx/scripts/invoke.md | 2 +- .../reference/cli/influx/scripts/list.md | 2 +- .../reference/cli/influx/scripts/retrieve.md | 2 +- .../reference/cli/influx/scripts/update.md | 2 +- .../reference/cli/influx/secret/_index.md | 18 + .../reference/cli/influx/secret/delete.md | 2 +- .../reference/cli/influx/secret/list.md | 2 +- .../reference/cli/influx/secret/update.md | 2 +- .../reference/cli/influx/setup/_index.md | 8 +- .../reference/cli/influx/stacks/_index.md | 20 + .../reference/cli/influx/stacks/init.md | 4 +- .../reference/cli/influx/stacks/remove.md | 4 +- .../reference/cli/influx/stacks/update.md | 4 +- .../reference/cli/influx/task/_index.md | 18 + .../reference/cli/influx/task/create.md | 2 +- .../reference/cli/influx/task/delete.md | 2 +- .../reference/cli/influx/task/list.md | 2 +- .../reference/cli/influx/task/log/_index.md | 4 +- .../reference/cli/influx/task/log/list.md | 2 +- .../reference/cli/influx/task/retry-failed.md | 2 +- .../reference/cli/influx/task/run/_index.md | 2 +- .../reference/cli/influx/task/run/list.md | 2 +- .../reference/cli/influx/task/run/retry.md | 2 +- .../reference/cli/influx/task/update.md | 2 +- .../reference/cli/influx/telegrafs/_index.md | 20 + .../reference/cli/influx/telegrafs/create.md | 2 +- .../reference/cli/influx/telegrafs/rm.md | 2 +- .../reference/cli/influx/telegrafs/update.md | 2 +- .../reference/cli/influx/template/_index.md | 18 + .../reference/cli/influx/template/validate.md | 2 +- .../reference/cli/influx/transpile/_index.md | 4 +- .../reference/cli/influx/user/_index.md | 8 +- .../reference/cli/influx/user/create.md | 2 +- .../reference/cli/influx/user/delete.md | 2 +- .../reference/cli/influx/user/list.md | 2 +- .../reference/cli/influx/user/password.md | 16 + .../reference/cli/influx/user/update.md | 2 +- .../reference/cli/influx/v1/_index.md | 17 + .../reference/cli/influx/v1/auth/_index.md | 4 +- .../reference/cli/influx/v1/auth/create.md | 4 +- .../reference/cli/influx/v1/auth/delete.md | 4 +- .../reference/cli/influx/v1/auth/list.md | 4 +- .../cli/influx/v1/auth/set-active.md | 4 +- .../cli/influx/v1/auth/set-inactive.md | 4 +- .../cli/influx/v1/auth/set-password.md | 4 +- .../reference/cli/influx/v1/dbrp/_index.md | 4 +- .../reference/cli/influx/v1/dbrp/create.md | 4 +- .../reference/cli/influx/v1/dbrp/delete.md | 4 +- .../reference/cli/influx/v1/dbrp/list.md | 4 +- .../reference/cli/influx/v1/dbrp/update.md | 4 +- .../reference/cli/influx/v1/shell.md | 19 + .../reference/cli/influx/version/_index.md | 4 +- .../reference/cli/influx/write/_index.md | 24 + .../reference/cli/influx/write/dryrun.md | 4 +- .../reference/flux.md | 8 +- .../reference/glossary.md | 4 +- .../reference/internals/_index.md | 12 + .../reference/internals/storage-limits.md | 4 +- .../cloud-serverless/reference/regions.md | 47 + .../cloud-serverless/reference/sql/_index.md | 622 +++++++++ .../reference/sql/data-types.md | 210 +++ .../cloud-serverless/reference/sql/explain.md | 74 + .../reference/sql/functions/_index.md | 14 + .../reference/sql/functions/aggregate.md | 752 +++++++++++ .../reference/sql/functions/conditional.md | 100 ++ .../reference/sql/functions/math.md | 681 ++++++++++ .../reference/sql/functions/misc.md | 122 ++ .../sql/functions/regular-expression.md | 105 ++ .../reference/sql/functions/selector.md | 200 +++ .../reference/sql/functions/string.md | 1185 +++++++++++++++++ .../reference/sql/functions/time-and-date.md | 460 +++++++ .../reference/sql/group-by.md | 98 ++ .../cloud-serverless/reference/sql/having.md | 85 ++ .../reference/sql/information-schema.md | 146 ++ .../cloud-serverless/reference/sql/limit.md | 76 ++ .../reference/sql/order-by.md | 98 ++ .../cloud-serverless/reference/sql/select.md | 112 ++ .../reference/sql/table-value-constructor.md | 121 ++ .../cloud-serverless/reference/sql/union.md | 168 +++ .../cloud-serverless/reference/sql/where.md | 132 ++ .../reference/syntax/_index.md | 4 +- .../reference/syntax/annotated-csv/_index.md | 14 +- .../syntax/annotated-csv/extended.md | 12 +- .../reference/syntax/line-protocol.md | 6 +- .../write-data/_index.md | 6 +- .../write-data/best-practices/_index.md | 2 +- .../best-practices/schema-design.md | 23 +- .../write-data/csv/_index.md | 8 +- .../write-data/csv/influx-cli.md | 48 +- .../write-data/csv/telegraf.md | 35 +- .../write-data/csv/user-interface.md | 6 +- .../write-data/delete-data.md | 21 + .../write-data/migrate-data/_index.md | 37 +- .../migrate-data/migrate-1x-to-iox.md | 42 +- .../migrate-data/migrate-tsm-to-iox.md | 54 +- .../write-data/use-telegraf/_index.md | 12 +- .../use-telegraf/configure/_index.md | 2 +- .../use-telegraf/configure/auto-config.md | 16 +- .../use-telegraf/configure/manual-config.md | 22 +- .../write-data/use-telegraf/dual-write.md | 6 +- .../use-telegraf/telegraf-configs/_index.md | 19 + .../use-telegraf/telegraf-configs/create.md | 12 +- .../use-telegraf/telegraf-configs/remove.md | 4 +- .../use-telegraf/telegraf-configs/update.md | 4 +- .../use-telegraf/telegraf-configs/view.md | 4 +- .../v2.0/security/tokens/view-tokens.md | 2 +- .../v2.1/security/tokens/view-tokens.md | 2 +- .../client-library-starter/python.md | 15 - .../v2.2/query-data/flux/flux-version.md | 1 + .../v2.2/security/tokens/view-tokens.md | 2 +- .../v2.3/api-guide/tutorials/python.md | 15 - .../v2.3/query-data/flux/flux-version.md | 1 + .../influxdb/v2.3/write-data/troubleshoot.md | 2 + .../v2.4/api-guide/tutorials/python.md | 51 - .../v2.4/query-data/flux/flux-version.md | 1 + .../explore-data/offset-and-soffset.md | 9 +- .../v2.5/api-guide/tutorials/python.md | 51 - .../v2.5/query-data/flux/flux-version.md | 1 + .../explore-data/offset-and-soffset.md | 3 +- .../v2.6/api-guide/tutorials/python.md | 51 - .../v2.6/query-data/flux/flux-version.md | 1 + .../explore-data/offset-and-soffset.md | 3 +- .../v2.7/api-guide/tutorials/python.md | 51 - .../v2.7/query-data/flux/flux-version.md | 1 + .../explore-data/offset-and-soffset.md | 3 +- .../v2.7/reference/syntax/line-protocol.md | 13 +- data/notifications.yaml | 8 +- data/products.yml | 50 +- deploy/edge.js | 4 +- layouts/index.html | 75 +- layouts/partials/footer.html | 2 +- layouts/partials/footer/iox-wayfinding.html | 20 +- layouts/partials/footer/javascript.html | 4 +- .../partials/footer/modals/influxdb-url.html | 28 +- layouts/partials/footer/search.html | 13 +- layouts/partials/header/title.html | 8 +- layouts/partials/sidebar.html | 15 +- layouts/partials/topnav/product-selector.html | 261 +++- layouts/shortcodes/api/cloud/v2-prefer.html | 4 + layouts/shortcodes/cloud-link.html | 1 - layouts/shortcodes/dedicated-link.html | 1 + .../shortcodes/influxdb/line-protocol.html | 5 +- layouts/shortcodes/readfile.html | 1 - layouts/shortcodes/sql/sql-schema-intro.md | 5 +- shared/text/api/cloud-dedicated/basic-auth.sh | 11 + .../cloud-dedicated/bearer-auth-v1-query.sh | 10 + .../cloud-dedicated/bearer-auth-v1-write.sh | 9 + .../cloud-dedicated/bearer-auth-v2-write.sh | 8 + .../api/cloud-dedicated/querystring-auth.sh | 12 + .../cloud-dedicated/token-auth-v1-query.sh | 10 + .../cloud-dedicated/token-auth-v1-write.sh | 9 + .../cloud-dedicated/token-auth-v2-write.sh | 8 + .../download-grafana-flightsql-plugin.sh | 28 - ...dedicated-grafana-flightsql-datasource.png | Bin 0 -> 538684 bytes ...-dedicated-grafana-influxdb-datasource.png | Bin 0 -> 987420 bytes .../influxdb/cloud-iox-superset-schema.png | Bin 19791 -> 0 bytes ...rverless-grafana-flightsql-datasource.png} | Bin ...ess-grafana-flightsql-explore-query-1.png} | Bin ... cloud-serverless-migration-dashboard.png} | Bin ... => cloud-serverless-superset-connect.png} | Bin ...> cloud-serverless-superset-dashboard.png} | Bin .../cloud-serverless-superset-schema.png | Bin 0 -> 27088 bytes static/img/wind-turbine.jpg | Bin 45403 -> 0 bytes yarn.lock | 152 +-- 380 files changed, 15539 insertions(+), 2032 deletions(-) create mode 100644 content/influxdb/cloud-dedicated/_index.md create mode 100644 content/influxdb/cloud-dedicated/admin/_index.md create mode 100644 content/influxdb/cloud-dedicated/admin/databases/_index.md create mode 100644 content/influxdb/cloud-dedicated/admin/databases/create.md create mode 100644 content/influxdb/cloud-dedicated/admin/databases/delete.md create mode 100644 content/influxdb/cloud-dedicated/admin/databases/list.md create mode 100644 content/influxdb/cloud-dedicated/admin/tokens/_index.md create mode 100644 content/influxdb/cloud-dedicated/admin/tokens/create.md create mode 100644 content/influxdb/cloud-dedicated/admin/tokens/delete.md create mode 100644 content/influxdb/cloud-dedicated/admin/tokens/list.md create mode 100644 content/influxdb/cloud-dedicated/get-started/_index.md create mode 100644 content/influxdb/cloud-dedicated/get-started/query.md create mode 100644 content/influxdb/cloud-dedicated/get-started/setup.md create mode 100644 content/influxdb/cloud-dedicated/get-started/write.md create mode 100644 content/influxdb/cloud-dedicated/primers/_index.md create mode 100644 content/influxdb/cloud-dedicated/primers/api/_index.md create mode 100644 content/influxdb/cloud-dedicated/primers/api/v1/_index.md create mode 100644 content/influxdb/cloud-dedicated/primers/api/v2/_index.md rename content/influxdb/{cloud-iox => cloud-dedicated}/query-data/_index.md (86%) rename content/influxdb/{cloud-iox => cloud-dedicated}/query-data/execute-queries/_index.md (62%) rename content/influxdb/{cloud-iox => cloud-dedicated}/query-data/execute-queries/flight-sql/_index.md (80%) create mode 100644 content/influxdb/cloud-dedicated/query-data/execute-queries/flight-sql/python.md create mode 100644 content/influxdb/cloud-dedicated/query-data/execute-queries/flight-sql/superset.md rename content/influxdb/{cloud-iox => cloud-dedicated}/query-data/sql/_index.md (73%) rename content/influxdb/{cloud-iox => cloud-dedicated}/query-data/sql/aggregate-select.md (89%) create mode 100644 content/influxdb/cloud-dedicated/query-data/sql/basic-query.md rename content/influxdb/{cloud-iox => cloud-dedicated}/query-data/sql/cast-types.md (94%) create mode 100644 content/influxdb/cloud-dedicated/query-data/sql/explore-schema.md create mode 100644 content/influxdb/cloud-dedicated/query-data/tools/_index.md create mode 100644 content/influxdb/cloud-dedicated/query-data/tools/grafana.md create mode 100644 content/influxdb/cloud-dedicated/query-data/tools/pandas.md create mode 100644 content/influxdb/cloud-dedicated/query-data/tools/pyarrow.md create mode 100644 content/influxdb/cloud-dedicated/query-data/tools/superset.md create mode 100644 content/influxdb/cloud-dedicated/reference/_index.md create mode 100644 content/influxdb/cloud-dedicated/reference/cli/_index.md create mode 100644 content/influxdb/cloud-dedicated/reference/cli/influxctl/_index.md create mode 100644 content/influxdb/cloud-dedicated/reference/cli/influxctl/database/_index.md create mode 100644 content/influxdb/cloud-dedicated/reference/cli/influxctl/database/create.md create mode 100644 content/influxdb/cloud-dedicated/reference/cli/influxctl/database/delete.md create mode 100644 content/influxdb/cloud-dedicated/reference/cli/influxctl/database/list.md create mode 100644 content/influxdb/cloud-dedicated/reference/cli/influxctl/help.md create mode 100644 content/influxdb/cloud-dedicated/reference/cli/influxctl/init.md create mode 100644 content/influxdb/cloud-dedicated/reference/cli/influxctl/token/_index.md create mode 100644 content/influxdb/cloud-dedicated/reference/cli/influxctl/token/create.md create mode 100644 content/influxdb/cloud-dedicated/reference/cli/influxctl/token/delete.md create mode 100644 content/influxdb/cloud-dedicated/reference/cli/influxctl/token/list.md create mode 100644 content/influxdb/cloud-dedicated/reference/cli/influxctl/version.md create mode 100644 content/influxdb/cloud-dedicated/reference/glossary.md create mode 100644 content/influxdb/cloud-dedicated/reference/internals/_index.md create mode 100644 content/influxdb/cloud-dedicated/reference/internals/arrow-flightsql.md rename content/influxdb/{cloud-iox => cloud-dedicated}/reference/sql/_index.md (98%) rename content/influxdb/{cloud-iox => cloud-dedicated}/reference/sql/data-types.md (95%) rename content/influxdb/{cloud-iox => cloud-dedicated}/reference/sql/explain.md (99%) rename content/influxdb/{cloud-iox => cloud-dedicated}/reference/sql/functions/_index.md (82%) rename content/influxdb/{cloud-iox => cloud-dedicated}/reference/sql/functions/aggregate.md (89%) rename content/influxdb/{cloud-iox => cloud-dedicated}/reference/sql/functions/conditional.md (98%) rename content/influxdb/{cloud-iox => cloud-dedicated}/reference/sql/functions/math.md (85%) rename content/influxdb/{cloud-iox => cloud-dedicated}/reference/sql/functions/misc.md (91%) rename content/influxdb/{cloud-iox => cloud-dedicated}/reference/sql/functions/regular-expression.md (90%) rename content/influxdb/{cloud-iox => cloud-dedicated}/reference/sql/functions/selector.md (98%) rename content/influxdb/{cloud-iox => cloud-dedicated}/reference/sql/functions/string.md (90%) rename content/influxdb/{cloud-iox => cloud-dedicated}/reference/sql/functions/time-and-date.md (96%) rename content/influxdb/{cloud-iox => cloud-dedicated}/reference/sql/group-by.md (98%) rename content/influxdb/{cloud-iox => cloud-dedicated}/reference/sql/having.md (97%) rename content/influxdb/{cloud-iox => cloud-dedicated}/reference/sql/information-schema.md (94%) rename content/influxdb/{cloud-iox => cloud-dedicated}/reference/sql/limit.md (98%) rename content/influxdb/{cloud-iox => cloud-dedicated}/reference/sql/order-by.md (97%) rename content/influxdb/{cloud-iox => cloud-dedicated}/reference/sql/select.md (99%) rename content/influxdb/{cloud-iox => cloud-dedicated}/reference/sql/table-value-constructor.md (96%) rename content/influxdb/{cloud-iox => cloud-dedicated}/reference/sql/union.md (92%) rename content/influxdb/{cloud-iox => cloud-dedicated}/reference/sql/where.md (99%) create mode 100644 content/influxdb/cloud-dedicated/reference/syntax/_index.md create mode 100644 content/influxdb/cloud-dedicated/reference/syntax/line-protocol.md create mode 100644 content/influxdb/cloud-dedicated/write-data/_index.md create mode 100644 content/influxdb/cloud-dedicated/write-data/best-practices/_index.md create mode 100644 content/influxdb/cloud-dedicated/write-data/best-practices/schema-design.md create mode 100644 content/influxdb/cloud-dedicated/write-data/csv/_index.md create mode 100644 content/influxdb/cloud-dedicated/write-data/csv/telegraf.md create mode 100644 content/influxdb/cloud-dedicated/write-data/migrate-data/_index.md create mode 100644 content/influxdb/cloud-dedicated/write-data/migrate-data/migrate-1x-to-cloud-dedicated.md delete mode 100644 content/influxdb/cloud-iox/admin/accounts/_index.md delete mode 100644 content/influxdb/cloud-iox/admin/accounts/data-usage.md delete mode 100644 content/influxdb/cloud-iox/reference/_index.md delete mode 100644 content/influxdb/cloud-iox/reference/cli/influx/apply/_index.md delete mode 100644 content/influxdb/cloud-iox/reference/cli/influx/auth/_index.md delete mode 100644 content/influxdb/cloud-iox/reference/cli/influx/bucket-schema/_index.md delete mode 100644 content/influxdb/cloud-iox/reference/cli/influx/bucket/_index.md delete mode 100644 content/influxdb/cloud-iox/reference/cli/influx/bucket/delete.md delete mode 100644 content/influxdb/cloud-iox/reference/cli/influx/completion/_index.md delete mode 100644 content/influxdb/cloud-iox/reference/cli/influx/config/_index.md delete mode 100644 content/influxdb/cloud-iox/reference/cli/influx/dashboards/_index.md delete mode 100644 content/influxdb/cloud-iox/reference/cli/influx/delete/_index.md delete mode 100644 content/influxdb/cloud-iox/reference/cli/influx/export/_index.md delete mode 100644 content/influxdb/cloud-iox/reference/cli/influx/export/all.md delete mode 100644 content/influxdb/cloud-iox/reference/cli/influx/help/_index.md delete mode 100644 content/influxdb/cloud-iox/reference/cli/influx/org/_index.md delete mode 100644 content/influxdb/cloud-iox/reference/cli/influx/query/_index.md delete mode 100644 content/influxdb/cloud-iox/reference/cli/influx/scripts/_index.md delete mode 100644 content/influxdb/cloud-iox/reference/cli/influx/secret/_index.md delete mode 100644 content/influxdb/cloud-iox/reference/cli/influx/stacks/_index.md delete mode 100644 content/influxdb/cloud-iox/reference/cli/influx/task/_index.md delete mode 100644 content/influxdb/cloud-iox/reference/cli/influx/telegrafs/_index.md delete mode 100644 content/influxdb/cloud-iox/reference/cli/influx/template/_index.md delete mode 100644 content/influxdb/cloud-iox/reference/cli/influx/user/password.md delete mode 100644 content/influxdb/cloud-iox/reference/cli/influx/v1/_index.md delete mode 100644 content/influxdb/cloud-iox/reference/cli/influx/v1/shell.md delete mode 100644 content/influxdb/cloud-iox/reference/cli/influx/write/_index.md delete mode 100644 content/influxdb/cloud-iox/reference/internals/_index.md delete mode 100644 content/influxdb/cloud-iox/reference/regions.md delete mode 100644 content/influxdb/cloud-iox/write-data/delete-data.md delete mode 100644 content/influxdb/cloud-iox/write-data/use-telegraf/telegraf-configs/_index.md rename content/influxdb/{cloud-iox => cloud-serverless}/_index.md (66%) rename content/influxdb/{cloud-iox => cloud-serverless}/admin/_index.md (55%) create mode 100644 content/influxdb/cloud-serverless/admin/accounts/_index.md create mode 100644 content/influxdb/cloud-serverless/admin/accounts/data-usage.md rename content/influxdb/{cloud-iox => cloud-serverless}/admin/accounts/limits.md (73%) rename content/influxdb/{cloud-iox => cloud-serverless}/admin/accounts/switch-account.md (90%) rename content/influxdb/{cloud-iox => cloud-serverless}/admin/buckets/_index.md (64%) rename content/influxdb/{cloud-iox => cloud-serverless}/admin/buckets/create-bucket.md (83%) rename content/influxdb/{cloud-iox => cloud-serverless}/admin/buckets/manage-explicit-bucket-schemas.md (74%) rename content/influxdb/{cloud-iox => cloud-serverless}/admin/buckets/update-bucket.md (83%) rename content/influxdb/{cloud-iox => cloud-serverless}/admin/buckets/view-buckets.md (56%) rename content/influxdb/{cloud-iox => cloud-serverless}/admin/organizations/_index.md (80%) rename content/influxdb/{cloud-iox => cloud-serverless}/admin/organizations/switch-org.md (81%) rename content/influxdb/{cloud-iox => cloud-serverless}/get-started/_index.md (84%) rename content/influxdb/{cloud-iox => cloud-serverless}/get-started/process.md (92%) rename content/influxdb/{cloud-iox => cloud-serverless}/get-started/query.md (86%) rename content/influxdb/{cloud-iox => cloud-serverless}/get-started/setup.md (80%) rename content/influxdb/{cloud-iox => cloud-serverless}/get-started/visualize.md (91%) rename content/influxdb/{cloud-iox => cloud-serverless}/get-started/write.md (89%) create mode 100644 content/influxdb/cloud-serverless/query-data/_index.md create mode 100644 content/influxdb/cloud-serverless/query-data/execute-queries/_index.md rename content/influxdb/{cloud-iox => cloud-serverless}/query-data/execute-queries/data-explorer/_index.md (88%) create mode 100644 content/influxdb/cloud-serverless/query-data/execute-queries/flight-sql/_index.md rename content/influxdb/{cloud-iox => cloud-serverless}/query-data/execute-queries/flight-sql/python.md (94%) rename content/influxdb/{cloud-iox => cloud-serverless}/query-data/execute-queries/flight-sql/superset.md (88%) rename content/influxdb/{cloud-iox => cloud-serverless}/query-data/flux-sql.md (96%) create mode 100644 content/influxdb/cloud-serverless/query-data/sql/_index.md create mode 100644 content/influxdb/cloud-serverless/query-data/sql/aggregate-select.md rename content/influxdb/{cloud-iox => cloud-serverless}/query-data/sql/basic-query.md (92%) create mode 100644 content/influxdb/cloud-serverless/query-data/sql/cast-types.md rename content/influxdb/{cloud-iox => cloud-serverless}/query-data/sql/explore-schema.md (97%) rename content/influxdb/{cloud-iox => cloud-serverless}/query-data/tools/_index.md (53%) rename content/influxdb/{cloud-iox => cloud-serverless}/query-data/tools/grafana.md (87%) rename content/influxdb/{cloud-iox => cloud-serverless}/query-data/tools/pandas.md (90%) rename content/influxdb/{cloud-iox => cloud-serverless}/query-data/tools/pyarrow.md (90%) rename content/influxdb/{cloud-iox => cloud-serverless}/query-data/tools/superset.md (71%) create mode 100644 content/influxdb/cloud-serverless/reference/_index.md rename content/influxdb/{cloud-iox => cloud-serverless}/reference/api/_index.md (68%) rename content/influxdb/{cloud-iox => cloud-serverless}/reference/cli/_index.md (87%) rename content/influxdb/{cloud-iox => cloud-serverless}/reference/cli/influx/_index.md (84%) create mode 100644 content/influxdb/cloud-serverless/reference/cli/influx/apply/_index.md create mode 100644 content/influxdb/cloud-serverless/reference/cli/influx/auth/_index.md rename content/influxdb/{cloud-iox => cloud-serverless}/reference/cli/influx/auth/active.md (88%) rename content/influxdb/{cloud-iox => cloud-serverless}/reference/cli/influx/auth/create.md (88%) rename content/influxdb/{cloud-iox => cloud-serverless}/reference/cli/influx/auth/delete.md (87%) rename content/influxdb/{cloud-iox => cloud-serverless}/reference/cli/influx/auth/inactive.md (88%) rename content/influxdb/{cloud-iox => cloud-serverless}/reference/cli/influx/auth/list.md (87%) rename content/influxdb/{cloud-iox => cloud-serverless}/reference/cli/influx/backup/_index.md (55%) create mode 100644 content/influxdb/cloud-serverless/reference/cli/influx/bucket-schema/_index.md rename content/influxdb/{cloud-iox => cloud-serverless}/reference/cli/influx/bucket-schema/create.md (92%) rename content/influxdb/{cloud-iox => cloud-serverless}/reference/cli/influx/bucket-schema/list.md (92%) rename content/influxdb/{cloud-iox => cloud-serverless}/reference/cli/influx/bucket-schema/update.md (92%) create mode 100644 content/influxdb/cloud-serverless/reference/cli/influx/bucket/_index.md rename content/influxdb/{cloud-iox => cloud-serverless}/reference/cli/influx/bucket/create.md (52%) create mode 100644 content/influxdb/cloud-serverless/reference/cli/influx/bucket/delete.md rename content/influxdb/{cloud-iox => cloud-serverless}/reference/cli/influx/bucket/list.md (89%) rename content/influxdb/{cloud-iox => cloud-serverless}/reference/cli/influx/bucket/update.md (89%) create mode 100644 content/influxdb/cloud-serverless/reference/cli/influx/completion/_index.md create mode 100644 content/influxdb/cloud-serverless/reference/cli/influx/config/_index.md rename content/influxdb/{cloud-iox => cloud-serverless}/reference/cli/influx/config/create.md (88%) rename content/influxdb/{cloud-iox => cloud-serverless}/reference/cli/influx/config/list.md (88%) rename content/influxdb/{cloud-iox => cloud-serverless}/reference/cli/influx/config/rm.md (88%) rename content/influxdb/{cloud-iox => cloud-serverless}/reference/cli/influx/config/set.md (88%) create mode 100644 content/influxdb/cloud-serverless/reference/cli/influx/dashboards/_index.md create mode 100644 content/influxdb/cloud-serverless/reference/cli/influx/delete/_index.md create mode 100644 content/influxdb/cloud-serverless/reference/cli/influx/export/_index.md create mode 100644 content/influxdb/cloud-serverless/reference/cli/influx/export/all.md rename content/influxdb/{cloud-iox => cloud-serverless}/reference/cli/influx/export/stack.md (88%) create mode 100644 content/influxdb/cloud-serverless/reference/cli/influx/help/_index.md create mode 100644 content/influxdb/cloud-serverless/reference/cli/influx/org/_index.md rename content/influxdb/{cloud-iox => cloud-serverless}/reference/cli/influx/org/create.md (66%) rename content/influxdb/{cloud-iox => cloud-serverless}/reference/cli/influx/org/delete.md (60%) rename content/influxdb/{cloud-iox => cloud-serverless}/reference/cli/influx/org/list.md (87%) rename content/influxdb/{cloud-iox => cloud-serverless}/reference/cli/influx/org/members/_index.md (64%) rename content/influxdb/{cloud-iox => cloud-serverless}/reference/cli/influx/org/members/add.md (66%) rename content/influxdb/{cloud-iox => cloud-serverless}/reference/cli/influx/org/members/list.md (89%) rename content/influxdb/{cloud-iox => cloud-serverless}/reference/cli/influx/org/members/remove.md (74%) rename content/influxdb/{cloud-iox => cloud-serverless}/reference/cli/influx/org/update.md (88%) rename content/influxdb/{cloud-iox => cloud-serverless}/reference/cli/influx/ping/_index.md (54%) create mode 100644 content/influxdb/cloud-serverless/reference/cli/influx/query/_index.md rename content/influxdb/{cloud-iox => cloud-serverless}/reference/cli/influx/remote/_index.md (77%) rename content/influxdb/{cloud-iox => cloud-serverless}/reference/cli/influx/remote/create.md (76%) rename content/influxdb/{cloud-iox => cloud-serverless}/reference/cli/influx/remote/delete.md (76%) rename content/influxdb/{cloud-iox => cloud-serverless}/reference/cli/influx/remote/list.md (76%) rename content/influxdb/{cloud-iox => cloud-serverless}/reference/cli/influx/remote/update.md (77%) rename content/influxdb/{cloud-iox => cloud-serverless}/reference/cli/influx/replication/_index.md (80%) rename content/influxdb/{cloud-iox => cloud-serverless}/reference/cli/influx/replication/create.md (74%) rename content/influxdb/{cloud-iox => cloud-serverless}/reference/cli/influx/replication/delete.md (71%) rename content/influxdb/{cloud-iox => cloud-serverless}/reference/cli/influx/replication/list.md (72%) rename content/influxdb/{cloud-iox => cloud-serverless}/reference/cli/influx/replication/update.md (70%) rename content/influxdb/{cloud-iox => cloud-serverless}/reference/cli/influx/restore/index.md (60%) create mode 100644 content/influxdb/cloud-serverless/reference/cli/influx/scripts/_index.md rename content/influxdb/{cloud-iox => cloud-serverless}/reference/cli/influx/scripts/create.md (88%) rename content/influxdb/{cloud-iox => cloud-serverless}/reference/cli/influx/scripts/delete.md (88%) rename content/influxdb/{cloud-iox => cloud-serverless}/reference/cli/influx/scripts/invoke.md (88%) rename content/influxdb/{cloud-iox => cloud-serverless}/reference/cli/influx/scripts/list.md (88%) rename content/influxdb/{cloud-iox => cloud-serverless}/reference/cli/influx/scripts/retrieve.md (89%) rename content/influxdb/{cloud-iox => cloud-serverless}/reference/cli/influx/scripts/update.md (89%) create mode 100644 content/influxdb/cloud-serverless/reference/cli/influx/secret/_index.md rename content/influxdb/{cloud-iox => cloud-serverless}/reference/cli/influx/secret/delete.md (87%) rename content/influxdb/{cloud-iox => cloud-serverless}/reference/cli/influx/secret/list.md (87%) rename content/influxdb/{cloud-iox => cloud-serverless}/reference/cli/influx/secret/update.md (87%) rename content/influxdb/{cloud-iox => cloud-serverless}/reference/cli/influx/setup/_index.md (61%) create mode 100644 content/influxdb/cloud-serverless/reference/cli/influx/stacks/_index.md rename content/influxdb/{cloud-iox => cloud-serverless}/reference/cli/influx/stacks/init.md (73%) rename content/influxdb/{cloud-iox => cloud-serverless}/reference/cli/influx/stacks/remove.md (80%) rename content/influxdb/{cloud-iox => cloud-serverless}/reference/cli/influx/stacks/update.md (76%) create mode 100644 content/influxdb/cloud-serverless/reference/cli/influx/task/_index.md rename content/influxdb/{cloud-iox => cloud-serverless}/reference/cli/influx/task/create.md (87%) rename content/influxdb/{cloud-iox => cloud-serverless}/reference/cli/influx/task/delete.md (87%) rename content/influxdb/{cloud-iox => cloud-serverless}/reference/cli/influx/task/list.md (87%) rename content/influxdb/{cloud-iox => cloud-serverless}/reference/cli/influx/task/log/_index.md (77%) rename content/influxdb/{cloud-iox => cloud-serverless}/reference/cli/influx/task/log/list.md (90%) rename content/influxdb/{cloud-iox => cloud-serverless}/reference/cli/influx/task/retry-failed.md (89%) rename content/influxdb/{cloud-iox => cloud-serverless}/reference/cli/influx/task/run/_index.md (89%) rename content/influxdb/{cloud-iox => cloud-serverless}/reference/cli/influx/task/run/list.md (88%) rename content/influxdb/{cloud-iox => cloud-serverless}/reference/cli/influx/task/run/retry.md (88%) rename content/influxdb/{cloud-iox => cloud-serverless}/reference/cli/influx/task/update.md (88%) create mode 100644 content/influxdb/cloud-serverless/reference/cli/influx/telegrafs/_index.md rename content/influxdb/{cloud-iox => cloud-serverless}/reference/cli/influx/telegrafs/create.md (91%) rename content/influxdb/{cloud-iox => cloud-serverless}/reference/cli/influx/telegrafs/rm.md (88%) rename content/influxdb/{cloud-iox => cloud-serverless}/reference/cli/influx/telegrafs/update.md (92%) create mode 100644 content/influxdb/cloud-serverless/reference/cli/influx/template/_index.md rename content/influxdb/{cloud-iox => cloud-serverless}/reference/cli/influx/template/validate.md (87%) rename content/influxdb/{cloud-iox => cloud-serverless}/reference/cli/influx/transpile/_index.md (70%) rename content/influxdb/{cloud-iox => cloud-serverless}/reference/cli/influx/user/_index.md (62%) rename content/influxdb/{cloud-iox => cloud-serverless}/reference/cli/influx/user/create.md (90%) rename content/influxdb/{cloud-iox => cloud-serverless}/reference/cli/influx/user/delete.md (90%) rename content/influxdb/{cloud-iox => cloud-serverless}/reference/cli/influx/user/list.md (91%) create mode 100644 content/influxdb/cloud-serverless/reference/cli/influx/user/password.md rename content/influxdb/{cloud-iox => cloud-serverless}/reference/cli/influx/user/update.md (91%) create mode 100644 content/influxdb/cloud-serverless/reference/cli/influx/v1/_index.md rename content/influxdb/{cloud-iox => cloud-serverless}/reference/cli/influx/v1/auth/_index.md (86%) rename content/influxdb/{cloud-iox => cloud-serverless}/reference/cli/influx/v1/auth/create.md (88%) rename content/influxdb/{cloud-iox => cloud-serverless}/reference/cli/influx/v1/auth/delete.md (88%) rename content/influxdb/{cloud-iox => cloud-serverless}/reference/cli/influx/v1/auth/list.md (88%) rename content/influxdb/{cloud-iox => cloud-serverless}/reference/cli/influx/v1/auth/set-active.md (88%) rename content/influxdb/{cloud-iox => cloud-serverless}/reference/cli/influx/v1/auth/set-inactive.md (88%) rename content/influxdb/{cloud-iox => cloud-serverless}/reference/cli/influx/v1/auth/set-password.md (89%) rename content/influxdb/{cloud-iox => cloud-serverless}/reference/cli/influx/v1/dbrp/_index.md (81%) rename content/influxdb/{cloud-iox => cloud-serverless}/reference/cli/influx/v1/dbrp/create.md (72%) rename content/influxdb/{cloud-iox => cloud-serverless}/reference/cli/influx/v1/dbrp/delete.md (72%) rename content/influxdb/{cloud-iox => cloud-serverless}/reference/cli/influx/v1/dbrp/list.md (72%) rename content/influxdb/{cloud-iox => cloud-serverless}/reference/cli/influx/v1/dbrp/update.md (72%) create mode 100644 content/influxdb/cloud-serverless/reference/cli/influx/v1/shell.md rename content/influxdb/{cloud-iox => cloud-serverless}/reference/cli/influx/version/_index.md (68%) create mode 100644 content/influxdb/cloud-serverless/reference/cli/influx/write/_index.md rename content/influxdb/{cloud-iox => cloud-serverless}/reference/cli/influx/write/dryrun.md (88%) rename content/influxdb/{cloud-iox => cloud-serverless}/reference/flux.md (87%) rename content/influxdb/{cloud-iox => cloud-serverless}/reference/glossary.md (70%) create mode 100644 content/influxdb/cloud-serverless/reference/internals/_index.md rename content/influxdb/{cloud-iox => cloud-serverless}/reference/internals/storage-limits.md (93%) create mode 100644 content/influxdb/cloud-serverless/reference/regions.md create mode 100644 content/influxdb/cloud-serverless/reference/sql/_index.md create mode 100644 content/influxdb/cloud-serverless/reference/sql/data-types.md create mode 100644 content/influxdb/cloud-serverless/reference/sql/explain.md create mode 100644 content/influxdb/cloud-serverless/reference/sql/functions/_index.md create mode 100644 content/influxdb/cloud-serverless/reference/sql/functions/aggregate.md create mode 100644 content/influxdb/cloud-serverless/reference/sql/functions/conditional.md create mode 100644 content/influxdb/cloud-serverless/reference/sql/functions/math.md create mode 100644 content/influxdb/cloud-serverless/reference/sql/functions/misc.md create mode 100644 content/influxdb/cloud-serverless/reference/sql/functions/regular-expression.md create mode 100644 content/influxdb/cloud-serverless/reference/sql/functions/selector.md create mode 100644 content/influxdb/cloud-serverless/reference/sql/functions/string.md create mode 100644 content/influxdb/cloud-serverless/reference/sql/functions/time-and-date.md create mode 100644 content/influxdb/cloud-serverless/reference/sql/group-by.md create mode 100644 content/influxdb/cloud-serverless/reference/sql/having.md create mode 100644 content/influxdb/cloud-serverless/reference/sql/information-schema.md create mode 100644 content/influxdb/cloud-serverless/reference/sql/limit.md create mode 100644 content/influxdb/cloud-serverless/reference/sql/order-by.md create mode 100644 content/influxdb/cloud-serverless/reference/sql/select.md create mode 100644 content/influxdb/cloud-serverless/reference/sql/table-value-constructor.md create mode 100644 content/influxdb/cloud-serverless/reference/sql/union.md create mode 100644 content/influxdb/cloud-serverless/reference/sql/where.md rename content/influxdb/{cloud-iox => cloud-serverless}/reference/syntax/_index.md (79%) rename content/influxdb/{cloud-iox => cloud-serverless}/reference/syntax/annotated-csv/_index.md (94%) rename content/influxdb/{cloud-iox => cloud-serverless}/reference/syntax/annotated-csv/extended.md (54%) rename content/influxdb/{cloud-iox => cloud-serverless}/reference/syntax/line-protocol.md (67%) rename content/influxdb/{cloud-iox => cloud-serverless}/write-data/_index.md (72%) rename content/influxdb/{cloud-iox => cloud-serverless}/write-data/best-practices/_index.md (93%) rename content/influxdb/{cloud-iox => cloud-serverless}/write-data/best-practices/schema-design.md (94%) rename content/influxdb/{cloud-iox => cloud-serverless}/write-data/csv/_index.md (58%) rename content/influxdb/{cloud-iox => cloud-serverless}/write-data/csv/influx-cli.md (87%) rename content/influxdb/{cloud-iox => cloud-serverless}/write-data/csv/telegraf.md (69%) rename content/influxdb/{cloud-iox => cloud-serverless}/write-data/csv/user-interface.md (81%) create mode 100644 content/influxdb/cloud-serverless/write-data/delete-data.md rename content/influxdb/{cloud-iox => cloud-serverless}/write-data/migrate-data/_index.md (68%) rename content/influxdb/{cloud-iox => cloud-serverless}/write-data/migrate-data/migrate-1x-to-iox.md (84%) rename content/influxdb/{cloud-iox => cloud-serverless}/write-data/migrate-data/migrate-tsm-to-iox.md (87%) rename content/influxdb/{cloud-iox => cloud-serverless}/write-data/use-telegraf/_index.md (81%) rename content/influxdb/{cloud-iox => cloud-serverless}/write-data/use-telegraf/configure/_index.md (93%) rename content/influxdb/{cloud-iox => cloud-serverless}/write-data/use-telegraf/configure/auto-config.md (90%) rename content/influxdb/{cloud-iox => cloud-serverless}/write-data/use-telegraf/configure/manual-config.md (85%) rename content/influxdb/{cloud-iox => cloud-serverless}/write-data/use-telegraf/dual-write.md (93%) create mode 100644 content/influxdb/cloud-serverless/write-data/use-telegraf/telegraf-configs/_index.md rename content/influxdb/{cloud-iox => cloud-serverless}/write-data/use-telegraf/telegraf-configs/create.md (54%) rename content/influxdb/{cloud-iox => cloud-serverless}/write-data/use-telegraf/telegraf-configs/remove.md (82%) rename content/influxdb/{cloud-iox => cloud-serverless}/write-data/use-telegraf/telegraf-configs/update.md (82%) rename content/influxdb/{cloud-iox => cloud-serverless}/write-data/use-telegraf/telegraf-configs/view.md (82%) create mode 100644 layouts/shortcodes/api/cloud/v2-prefer.html delete mode 100644 layouts/shortcodes/cloud-link.html create mode 100644 layouts/shortcodes/dedicated-link.html delete mode 100644 layouts/shortcodes/readfile.html create mode 100644 shared/text/api/cloud-dedicated/basic-auth.sh create mode 100644 shared/text/api/cloud-dedicated/bearer-auth-v1-query.sh create mode 100644 shared/text/api/cloud-dedicated/bearer-auth-v1-write.sh create mode 100644 shared/text/api/cloud-dedicated/bearer-auth-v2-write.sh create mode 100644 shared/text/api/cloud-dedicated/querystring-auth.sh create mode 100644 shared/text/api/cloud-dedicated/token-auth-v1-query.sh create mode 100644 shared/text/api/cloud-dedicated/token-auth-v1-write.sh create mode 100644 shared/text/api/cloud-dedicated/token-auth-v2-write.sh delete mode 100644 static/downloads/download-grafana-flightsql-plugin.sh create mode 100644 static/img/influxdb/cloud-dedicated-grafana-flightsql-datasource.png create mode 100644 static/img/influxdb/cloud-dedicated-grafana-influxdb-datasource.png delete mode 100644 static/img/influxdb/cloud-iox-superset-schema.png rename static/img/influxdb/{cloud-iox-grafana-flightsql-datasource.png => cloud-serverless-grafana-flightsql-datasource.png} (100%) rename static/img/influxdb/{cloud-iox-grafana-flightsql-explore-query-1.png => cloud-serverless-grafana-flightsql-explore-query-1.png} (100%) rename static/img/influxdb/{cloud-iox-migration-dashboard.png => cloud-serverless-migration-dashboard.png} (100%) rename static/img/influxdb/{cloud-iox-superset-connect.png => cloud-serverless-superset-connect.png} (100%) rename static/img/influxdb/{cloud-iox-superset-dashboard.png => cloud-serverless-superset-dashboard.png} (100%) create mode 100644 static/img/influxdb/cloud-serverless-superset-schema.png delete mode 100644 static/img/wind-turbine.jpg diff --git a/assets/js/get-started-timestamps.js b/assets/js/get-started-timestamps.js index 966474803..0bbefb152 100644 --- a/assets/js/get-started-timestamps.js +++ b/assets/js/get-started-timestamps.js @@ -92,8 +92,6 @@ function updateTimestamps(newStartDate) { $(updateBlockElWhitelist.join()).each(function() { var wrapper = $(this)[0] - console.log(wrapper) - times.forEach(function(x) { oldDatePart = datePart(x.rfc3339.replace(/T.*$/, "")) newDatePart = datePart(x.rfc3339_new.replace(/T.*$/, "")) @@ -110,8 +108,6 @@ function updateTimestamps(newStartDate) { $('span.get-started-timestamps').each(function() { var wrapper = $(this)[0] - console.log(wrapper) - times.forEach(function(x) { oldDatePart = datePart(x.rfc3339.replace(/T.*$/, "")) newDatePart = datePart(x.rfc3339_new.replace(/T.*$/, "")) diff --git a/assets/js/influxdb-url.js b/assets/js/influxdb-url.js index 9d69a645b..fd52635f5 100644 --- a/assets/js/influxdb-url.js +++ b/assets/js/influxdb-url.js @@ -1,19 +1,23 @@ var placeholderUrls = { cloud: "https://cloud2.influxdata.com", - oss: "http://localhost:8086" + oss: "http://localhost:8086", + dedicated: "cluster-id.influxdb.io" } var defaultUrls = { cloud: "https://us-west-2-1.aws.cloud2.influxdata.com", - oss: "http://localhost:8086" + oss: "http://localhost:8086", + dedicated: "cluster-id.influxdb.io" } var elementSelector = ".article--content pre:not(.preserve)" // Return the page context (cloud, oss/enterprise, other) function context() { - if (/\/influxdb\/cloud/.test(window.location.pathname)) { + if (/\/influxdb\/cloud(?:-iox)/.test(window.location.pathname)) { return "cloud" + } else if (/\/influxdb\/cloud-dedicated/.test(window.location.pathname)) { + return "dedicated" } else if (/\/(enterprise_|influxdb).*\/v[1-2]\.[0-9]{1,2}\//.test(window.location.pathname)) { return "oss/enterprise" } else { @@ -45,8 +49,10 @@ function setApiLibPreference(preference) { // // influxdb_oss_url // influxdb_cloud_url +// influxdb_dedicated_url // influxdb_prev_oss_url // influxdb_prev_cloud_url +// influxdb_prev_dedicated_url // influxdb_pref (cloud | oss) // influxdb_custom_url @@ -69,6 +75,19 @@ function removeCustomUrl() { Cookies.remove('influxdb_custom_url') } +// Store dedicated URL session cookie – influxdb_dedicated_url +// Used to populate the custom URL field +function storeDedicatedUrl(dedicatedUrl) { + Cookies.set('influxdb_dedicated_url', dedicatedUrl) + $('input#dedicated-url-field').val(dedicatedUrl) +} + +// Remove dedicated URL session cookie – influxdb_dedicated_url +// Used to clear the form when dedicated url input is left empty +function removeDedicatedUrl() { + Cookies.remove('influxdb_dedicated_url') +} + //////////////////////////////////////////////////////////////////////////////// //////////////////////// InfluxDB URL utility functions //////////////////////// //////////////////////////////////////////////////////////////////////////////// @@ -94,9 +113,11 @@ function addPreserve() { function getUrls() { var currentCloudUrl = Cookies.get('influxdb_cloud_url') || defaultUrls.cloud var currentOSSUrl = Cookies.get('influxdb_oss_url') || defaultUrls.oss + var currentDedicatedUrl = Cookies.get('influxdb_dedicated_url') || defaultUrls.dedicated var urls = { cloud: currentCloudUrl, - oss: currentOSSUrl + oss: currentOSSUrl, + dedicated: currentDedicatedUrl }; return urls; } @@ -107,9 +128,11 @@ function getUrls() { function getPrevUrls() { var prevCloudUrl = Cookies.get('influxdb_prev_cloud_url') || defaultUrls.cloud var prevOSSUrl = Cookies.get('influxdb_prev_oss_url') || defaultUrls.oss + var prevDedicatedUrl = Cookies.get('influxdb_prev_dedicated_url') || defaultUrls.dedicated var prevUrls = { cloud: prevCloudUrl, - oss: prevOSSUrl + oss: prevOSSUrl, + dedicated: prevDedicatedUrl }; return prevUrls; } @@ -133,19 +156,21 @@ function updateUrls(prevUrls, newUrls) { var preference = getPreference() var prevUrlsParsed = { cloud: {}, - oss: {} + oss: {}, + dedicated: {} } var newUrlsParsed = { cloud: {}, - oss: {} + oss: {}, + dedicated: {} } Object.keys(prevUrls).forEach(function(k) { try { prevUrlsParsed[k] = new URL(prevUrls[k]) } catch { - prevUrlsParsed[k] = { host: prevUrls[k] } + prevUrlsParsed[k] = { origin: prevUrls[k], host: prevUrls[k] } } }) @@ -153,7 +178,7 @@ function updateUrls(prevUrls, newUrls) { try { newUrlsParsed[k] = new URL(newUrls[k]) } catch { - newUrlsParsed[k] = { host: newUrls[k] } + newUrlsParsed[k] = { origin: newUrls[k], host: newUrls[k] } } }) @@ -169,8 +194,12 @@ function updateUrls(prevUrls, newUrls) { { replace: prevUrlsParsed.cloud, with: newUrlsParsed.cloud }, { replace: prevUrlsParsed.oss, with: newUrlsParsed.oss }, ] + var dedicatedReplacements = [ + { replace: prevUrlsParsed.dedicated, with: newUrlsParsed.dedicated }, + ] if (context() === "cloud") { var replacements = cloudReplacements } + else if (context() === "dedicated") { var replacements = dedicatedReplacements } else if (context() === "oss/enterprise") { var replacements = ossReplacements } else if ( preference === "cloud" ) { var replacements = cloudReplacements } else { var replacements = ossReplacements } @@ -193,7 +222,7 @@ function updateUrls(prevUrls, newUrls) { var endsWithSeparator = new RegExp('[-.:]'); if(!startsWithSeparator.test(startStr) && !endsWithSeparator.test(endStr)) { var newHost = startStr + replacement + endStr - return startStr + replacement + endStr; + return newHost; } } @@ -219,10 +248,12 @@ function updateUrls(prevUrls, newUrls) { // Append the URL selector button to each codeblock with an InfluxDB Cloud or OSS URL function appendUrlSelector() { - var appendToUrls = [ placeholderUrls.cloud, placeholderUrls.oss ] + var appendToUrls = [ placeholderUrls.cloud, placeholderUrls.oss, placeholderUrls.dedicated ] if (context() === "cloud") { var selectorText = "InfluxDB Cloud Region" + } else if (context() === "dedicated") { + var selectorText = "Set dedicated cluster URL" } else if (context() === "oss/enterprise") { var selectorText = "Change InfluxDB URL" } else { @@ -320,6 +351,12 @@ $('input[name="influxdb-oss-url"]').change(function() { }) $('input[name="influxdb-oss-url"]').click(function() {setPreference("oss")}) +$('input[name="influxdb-dedicated-url"]').change(function() { + var newUrl = $(this).val() + storeUrl("dedicated", newUrl, getUrls().dedicated) + updateUrls(getPrevUrls(), getUrls()) +}) + // Toggle preference tabs function togglePrefBtns(el) { preference = el.length ? el.attr("id").replace("pref-", "") : "cloud" @@ -353,26 +390,46 @@ showPreference() // Validate custom URLs function validateUrl(url) { - try { - new URL(url); - return {valid: true, error: ""} - } catch(e) { - var validProtocol = /^http(s?)/ - var protocol = url.match(/http(s?):\/\//) ? url.match(/http(s?):\/\//)[0] : ""; - var domain = url.replace(protocol, "") - /** validDomain = (Named host | IPv6 host | IPvFuture host)(:Port)? **/ - var validDomain = new RegExp(`([a-z0-9\-._~%]+` - + `|\[[a-f0-9:.]+\]` - + `|\[v[a-f0-9][a-z0-9\-._~%!$&'()*+,;=:]+\])` - + `(:[0-9]+)?`); - if (validProtocol.test(protocol) == false) { - return {valid: false, error: "Invalid protocol, use http[s]"} + /** validDomain = (Named host | IPv6 host | IPvFuture host)(:Port)? **/ + var validDomain = new RegExp(`([a-z0-9\-._~%]+` + + `|\[[a-f0-9:.]+\]` + + `|\[v[a-f0-9][a-z0-9\-._~%!$&'()*+,;=:]+\])` + + `(:[0-9]+)?`); + + if (context() !== 'dedicated') { + // Validation for non-dedicated custom InfluxDB URLs + try { + new URL(url); + return {valid: true, error: ""} + } catch(e) { + var validProtocol = /^http(s?)/ + var protocol = url.match(/http(s?):\/\//) ? url.match(/http(s?):\/\//)[0] : ""; + var domain = url.replace(protocol, "") + + if (validProtocol.test(protocol) == false) { + return {valid: false, error: "Invalid protocol, use http[s]"} + } else if (validDomain.test(domain) == false) { + return {valid: false, error: "Invalid domain"} + } else if (e) { + return {valid: false, error: "Invalid URL"} + } + } + } else { + // Validation for dedicated URLs + var includesProtocol = /^.*:\/\// + var protocol = url.match(/^.*:\/\//) ? url.match(/^.*:\/\//)[0] : ""; + var domain = url.replace(protocol, "") + + if (url.length === 0) { + return {valid: true, error: ""} + } else if (includesProtocol.test(protocol) == true) { + return {valid: false, error: "Do not include the protocol"} } else if (validDomain.test(domain) == false) { return {valid: false, error: "Invalid domain"} - } else if (e) { - return {valid: false, error: "Invalid URL"} + } else { + return {valid: true, error: ""} } - } + } } // Show validation errors @@ -400,7 +457,6 @@ function applyCustomUrl() { } else { showValidationMessage(urlValidation) } - } else { removeCustomUrl(); hideValidationMessage() @@ -408,6 +464,26 @@ function applyCustomUrl() { } } +// Set the dedicated URL cookie and apply the change +// If the dedicated URL field is empty, it defaults to the dedicated default +function applyDedicatedUrl() { + var dedicatedUrl = $('#dedicated-url-field').val() + let urlValidation = validateUrl(dedicatedUrl) + if (dedicatedUrl.length > 0 ) { + if (urlValidation.valid) { + hideValidationMessage() + storeDedicatedUrl(dedicatedUrl) + getUrls("dedicated", dedicatedUrl, getUrls().dedicated) + updateUrls(getPrevUrls(), getUrls()) + } else { + showValidationMessage(urlValidation) + } + } else { + removeDedicatedUrl(); + hideValidationMessage(); + } +} + // Trigger radio button on custom URL field focus $('input#custom-url-field').focus(function(e) { $('input#custom[type="radio"]').trigger('click') @@ -416,20 +492,23 @@ $('input#custom-url-field').focus(function(e) { // Update URLs and close modal when using 'enter' to exit custom URL field $("#custom-url").submit(function(e) { let url = $('#custom-url-field').val() ? $('#custom-url-field').val() : "" + if (context() === 'dedicated') { + url = $('#dedicated-url-field').val() ? $('#dedicated-url-field').val() : "" + } let urlValidation = validateUrl(url) e.preventDefault(); if (url === "" | urlValidation.valid) { - applyCustomUrl() + (context() !== 'dedicated') ? applyCustomUrl() : applyDedicatedUrl(); $('#modal-close').trigger('click') } else { showValidationMessage(urlValidation) } }); -// Store the custom InfluxDB URL when exiting the field -$('#custom-url-field').blur(function() { - applyCustomUrl() +// Store the custom InfluxDB URL or dedicated URL when exiting the field +$('#custom-url-field, #dedicated-url-field').blur(function() { + (context() !== 'dedicated') ? applyCustomUrl() : applyDedicatedUrl(); }) /** Delay execution of a function `fn` for a number of milliseconds `ms` @@ -444,7 +523,7 @@ function delay(fn, ms) { } function handleUrlValidation() { - let url = $('#custom-url-field').val() + let url = $('#custom-url-field, #dedicated-url-field').val() let urlValidation = validateUrl(url) if (urlValidation.valid) { hideValidationMessage() @@ -453,7 +532,7 @@ function handleUrlValidation() { } } // When in erred state, revalidate custom URL on keyup -$(document).on("keyup", "#custom-url-field", delay(handleUrlValidation, 500)); +$(document).on("keyup", "#custom-url-field, #dedicated-url-field", delay(handleUrlValidation, 500)); // Populate the custom InfluxDB URL field on page load if ( Cookies.get('influxdb_custom_url') != undefined ) { @@ -461,6 +540,12 @@ if ( Cookies.get('influxdb_custom_url') != undefined ) { $('#custom-url-field').val(Cookies.get('influxdb_custom_url')) } +// Populate the dedicated URL field on page load +if ( Cookies.get('influxdb_dedicated_url') != undefined ) { + $('input#dedicated-url-field').val(Cookies.get('influxdb_dedicated_url')) + $('#dedicated-url-field').val(Cookies.get('influxdb_dedicated_url')) +} + //////////////////////////////////////////////////////////////////////////////// /////////////////////////// Dynamically update URLs //////////////////////////// //////////////////////////////////////////////////////////////////////////////// diff --git a/assets/js/tabbed-content.js b/assets/js/tabbed-content.js index 74a795cf4..7442103de 100644 --- a/assets/js/tabbed-content.js +++ b/assets/js/tabbed-content.js @@ -97,5 +97,6 @@ function activateTabs(selector, tab) { **/ var tab = getApiLibPreference(); (['.code-tabs']).forEach(selector => activateTabs(selector, tab), updateBtnURLs(tab)); + tab = getTabQueryParam(); (['.tabs', '.code-tabs']).forEach(selector => activateTabs(selector, tab), updateBtnURLs(tab)); diff --git a/assets/styles/layouts/_homepage.scss b/assets/styles/layouts/_homepage.scss index df1090f12..fb8edd4e2 100644 --- a/assets/styles/layouts/_homepage.scss +++ b/assets/styles/layouts/_homepage.scss @@ -192,19 +192,21 @@ body.home { h3 { margin: 0 0 1.5rem; line-height: 1.1em; - font-size: 2.75rem; + font-size: 2.35rem; } + .no-wrap { white-space: nowrap; } + p { margin-bottom: 2rem; - }; + } .card-links { margin-top: auto; a { position: relative; - display: block; + display: inline-block; color: $article-text; font-weight: $medium; text-decoration: none; @@ -221,7 +223,7 @@ body.home { &:hover{ color: $br-new-magenta; - &:after {width: 30%} + &:after {width: 100%} } } } @@ -258,118 +260,134 @@ body.home { #influxdb { - padding-top: .5rem; - display: flex; + padding-top: 3rem; - .actions { + .categories { display: flex; - justify-content: center; - align-items: center; - max-width: 50%; - padding: 0 3rem 3rem; + width: 100%; flex: 1 1 0; } + .category { + width: 50%; + margin-right: 2rem; + display: flex; + flex-direction: column; + + &:last-child { margin-right: 0; } + + .category-card{ + padding: 3rem; + background: $sidebar-search-bg; + border-radius: 30px; + box-shadow: 1px 1px 7px $sidebar-search-shadow; + flex: 1 1 0; + display: flex; + flex-direction: column; + // justify-content: space-evenly; + + .product { + margin-bottom: 2.5rem; + + &:last-child{margin-bottom: 0;} + &.new{ + h3:after { + content: "New"; + display: inline-block; + margin-left: .5rem; + padding: .15rem .35rem; + font-size: 1rem; + vertical-align: middle; + border-radius: $radius; + color: $br-dark-blue; + background-color: $br-chartreuse; + } + } + } + + .product-links { + margin-top: .9rem; + + a { + position: relative; + display: inline-block; + color: $article-text; + font-weight: $medium; + text-decoration: none; + + &:after { + content: ""; + display: block; + margin-top: .15rem; + border-top: 2px solid $br-new-magenta; + width: 0; + transition: width .2s; + } + + &:hover{ + color: $br-new-magenta; + &:after {width: 100%} + } + + &:not(:first-child) { + position: relative; + margin-left: 1.8rem; + &:before { + content: ""; + position: absolute; + display: inline-block; + left: -1rem; + top: .1rem; + height: 1em; + width: 1px; + margin-right: 1rem; + border-left: 1px solid rgba($article-text, .5); + } + } + } + } + } + } + h2 { margin: 0; font-size: 3.5rem; line-height: 1.1em; + width: 100%; + text-align: center; + & + p { font-size: 1.2rem; margin: .5rem 0 2rem; + text-align: center; } } h3 { margin: 0; - color: $g20-white; - font-size: 2.25rem; + font-size: 2rem; + color: $br-new-magenta; + .version { + opacity: .5; + font-size: .7em; + color: $article-bold; + transition: color .2s;} + & > a { + text-decoration: none; + color: inherit; + transition: color .2s; + &:hover { + color: $article-bold; + .version {color: $article-bold;} + } + } & + p {margin: .5rem 0;} } - .hero-img { - background-image: url('/img/wind-turbine.jpg'); - background-size: cover; - margin: -.5rem .75rem 0 1rem; - z-index: -1; - min-height: 600px; - border-radius: 0 0 30px 30px; - flex: 1 1 0; - } - } - - #influxdb-btn { - .exp-btn { - @include gradient($grad-burningDusk, 270deg); - color: $g20-white; - position: relative; - z-index: 1; - - &:after { - content: ""; - top: 0; - left: 0; - position: absolute; - width: 100%; - height: 100%; - @include gradient($grad-coolDusk); - border-radius: 6px; - z-index: -1; - opacity: 0; - transition: opacity .2s; - } - - &:hover, &.open { - &:after {opacity: 1;} - } - - &.open { - padding: 0; - li a {padding: 1rem 2rem;} - } - } - - .exp-btn-links { - color: $g20-white; - li { - @include gradient($grad-coolDusk); - - &:first-child { - a:after {border-radius: 6px 6px 0 0;} - } - - &:not(:last-child) {border-bottom: 1px solid rgba($body-bg, .5);} - - &:last-child a:after {border-radius: 0 0 6px 6px;} - - a { - color: $g20-white; - position: relative; - z-index: 1; - - &:after { - content: ""; - top: 0; - left: 0; - position: absolute; - width: 100%; - height: 100%; - @include gradient($grad-burningDusk, 270deg); - border-radius: 6px; - z-index: -1; - opacity: 0; - transition: opacity .2s; - } - - &:hover:after {opacity: 1} - } - } - } - - .close-btn { - color: rgba($br-new-magenta, .6); - &:hover {color: $br-new-magenta;} + h4 { + font-size: 1.15rem; + margin: 1rem 0 .75rem 1.5rem; } } @@ -543,12 +561,13 @@ body.home { @include media(medium) { #influxdb { - .actions { - max-width: 100%; - padding-top: 3rem; - text-align: center; + .categories { + flex-direction: column; + .category { + width: 100%; + margin: 0; + } } - .hero-img {display: none} } #api-guides { .padding-wrapper{ @@ -600,8 +619,16 @@ body.home { h3 {font-size: 2rem;} } #influxdb { - .actions {padding: 2rem;} - h2 {font-size: 2.65rem;} + h2 {font-size: 2.15rem; } + .subhead {margin-bottom: 1.5rem;} + .categories { + .category-card { + padding: 2rem; + h3 {font-size: 1.75rem;} + + .product { margin-bottom: 2rem; } + } + } } #api-guides { .padding-wrapper { diff --git a/assets/styles/layouts/_syntax-highlighting.scss b/assets/styles/layouts/_syntax-highlighting.scss index 50577cf8c..6e1e49e06 100644 --- a/assets/styles/layouts/_syntax-highlighting.scss +++ b/assets/styles/layouts/_syntax-highlighting.scss @@ -9,9 +9,9 @@ pre[class*="language-"] { word-break: normal; word-wrap: normal; - -moz-tab-size: 1; - -o-tab-size: 1; - tab-size: 1; + -moz-tab-size: 4; + -o-tab-size: 4; + tab-size: 4; -webkit-hyphens: none; -moz-hyphens: none; diff --git a/assets/styles/layouts/_top-nav.scss b/assets/styles/layouts/_top-nav.scss index ae9110d60..212e9814d 100644 --- a/assets/styles/layouts/_top-nav.scss +++ b/assets/styles/layouts/_top-nav.scss @@ -102,25 +102,17 @@ flex-direction: column; &.products{ - li { - &:before { - display: inline-block; - font-size: .85rem; - color: $g2-kevlar; - text-transform: uppercase; - font-weight: bold; - letter-spacing: .04rem; - opacity: .65; - mix-blend-mode: multiply; - } - &:first-child:before { - content: "Products"; - margin: .3rem .75rem .15rem; - } - &.flux:before { - content: "Languages"; - margin: .75rem .75rem .15rem; - } + &:before { + content: attr(data-category); + display: inline-block; + margin: .75rem .75rem .15rem; + font-size: .85rem; + color: $g2-kevlar; + text-transform: uppercase; + font-weight: bold; + letter-spacing: .04rem; + opacity: .65; + mix-blend-mode: multiply; } } } diff --git a/assets/styles/layouts/article/_html-diagrams.scss b/assets/styles/layouts/article/_html-diagrams.scss index 509d449b1..7cde1f720 100644 --- a/assets/styles/layouts/article/_html-diagrams.scss +++ b/assets/styles/layouts/article/_html-diagrams.scss @@ -321,6 +321,10 @@ table tr.point{ } } } + + &.hide-elements {p span.el { border: none; &:before, &:after {display: none}}} + &.hide-commas {p span.comma { border: none; &:before, &:after {display: none}}} + &.hide-whitespace {p span.whitespace { border: none; &:before, &:after {display: none}}} } //////////////////////////////////////////////////////////////////////////////// diff --git a/assets/styles/layouts/modals/_url-selector.scss b/assets/styles/layouts/modals/_url-selector.scss index 4a753e42c..f055f6bec 100644 --- a/assets/styles/layouts/modals/_url-selector.scss +++ b/assets/styles/layouts/modals/_url-selector.scss @@ -92,7 +92,8 @@ li.custom { &.error { &:after { display: block; } - input#custom-url-field { + input#custom-url-field, + input#dedicated-url-field { border-color: $r-fire; &:focus { border-color: $r-fire; @@ -102,7 +103,8 @@ li.custom { } input { - &#custom-url-field { + &#custom-url-field, + &#dedicated-url-field { font-family: $proxima; font-weight: $medium; background: $modal-field-bg; @@ -129,6 +131,16 @@ li.custom { } } +#dedicated-urls { + .providers { + padding-bottom: 1rem; + } + #custom-url { + margin-top: .5rem; + padding: 0; + } +} + .radio { position: relative; display: inline-block; diff --git a/assets/styles/themes/_theme-light.scss b/assets/styles/themes/_theme-light.scss index 7619f186a..fcbc07cc5 100644 --- a/assets/styles/themes/_theme-light.scss +++ b/assets/styles/themes/_theme-light.scss @@ -31,7 +31,7 @@ $sidebar-search-highlight: $b-pool !default; $sidebar-search-text: $g6-smoke !default; // Left Navigation -$nav-category: $b-dodger !default; +$nav-category: $b-ocean !default; $nav-category-hover: $br-magenta !default; $nav-item: $g9-mountain !default; $nav-item-hover: $br-magenta !default; diff --git a/config.staging.toml b/config.staging.toml index 8e37f4154..b55479680 100644 --- a/config.staging.toml +++ b/config.staging.toml @@ -34,6 +34,8 @@ smartDashes = false "influxdb/v2.1/tag" = "influxdb/v2.1/tags" "influxdb/v2.0/tag" = "influxdb/v2.0/tags" "influxdb/cloud/tag" = "influxdb/cloud/tags" + "influxdb/cloud-serverless/tag" = "influxdb/cloud-serverless/tags" + "influxdb/cloud-dedicated/tag" = "influxdb/cloud-dedicated/tags" "flux/v0.x/tag" = "flux/v0.x/tags" [markup] diff --git a/config.toml b/config.toml index f5082c0f9..9c51c7f7f 100644 --- a/config.toml +++ b/config.toml @@ -30,7 +30,8 @@ smartDashes = false "influxdb/v2.1/tag" = "influxdb/v2.1/tags" "influxdb/v2.0/tag" = "influxdb/v2.0/tags" "influxdb/cloud/tag" = "influxdb/cloud/tags" - "influxdb/cloud-iox/tag" = "influxdb/cloud-iox/tags" + "influxdb/cloud-serverless/tag" = "influxdb/cloud-serverless/tags" + "influxdb/cloud-dedicated/tag" = "influxdb/cloud-dedicated/tags" "flux/v0.x/tag" = "flux/v0.x/tags" [markup] diff --git a/content/influxdb/cloud-dedicated/_index.md b/content/influxdb/cloud-dedicated/_index.md new file mode 100644 index 000000000..4ba0b2243 --- /dev/null +++ b/content/influxdb/cloud-dedicated/_index.md @@ -0,0 +1,34 @@ +--- +title: InfluxDB Cloud Dedicated documentation +description: > + InfluxDB Cloud Dedicated is a hosted and managed InfluxDB Cloud cluster + dedicated to a single tenant. + The InfluxDB time series platform is designed to handle high write and query loads. + Learn how to use and leverage InfluxDB Cloud Dedicated for your specific + time series use case. +menu: + influxdb_cloud_dedicated: + name: InfluxDB Cloud Dedicated +weight: 1 +--- + +InfluxDB Cloud Dedicated is a hosted and managed InfluxDB Cloud cluster +dedicated to a single tenant. +The InfluxDB time series platform is designed to handle high write and query loads. +Learn how to use and leverage InfluxDB Cloud Dedicated for your specific +time series use case. + +Request an InfluxDB Cloud Dedicated cluster +Get started with InfluxDB Cloud Dedicated + +## The InfluxDB IOx storage engine + +**InfluxDB IOx** is InfluxDB's next generation storage engine that unlocks series +limitations present in the Time Structured Merge Tree (TSM) storage engine. +InfluxDB IOx allows infinite series cardinality without any impact on +overall database performance. It also brings with it native +**SQL support** and improved InfluxQL performance. + +View the following video for more information about InfluxDB IOx: + +{{< youtube "CzWVcDxmWbM" >}} diff --git a/content/influxdb/cloud-dedicated/admin/_index.md b/content/influxdb/cloud-dedicated/admin/_index.md new file mode 100644 index 000000000..2a3096a98 --- /dev/null +++ b/content/influxdb/cloud-dedicated/admin/_index.md @@ -0,0 +1,15 @@ +--- +title: Administer InfluxDB Cloud Dedicated +description: > + Perform administrative tasks in your InfluxDB Cloud Dedicated cluster such as + creating and managing tokens and databases. +menu: + influxdb_cloud_dedicated: + name: Administer InfluxDB +weight: 5 +--- + +The following articles provide information about managing your InfluxDB Cloud +Dedicated resources: + +{{< children >}} \ No newline at end of file diff --git a/content/influxdb/cloud-dedicated/admin/databases/_index.md b/content/influxdb/cloud-dedicated/admin/databases/_index.md new file mode 100644 index 000000000..4f3a99a3c --- /dev/null +++ b/content/influxdb/cloud-dedicated/admin/databases/_index.md @@ -0,0 +1,51 @@ +--- +title: Manage databases +seotitle: Manage databases in InfluxDB Cloud Dedicated +description: > + Manage databases in your InfluxDB Cloud Dedicated cluster. + A database is a named location where time series data is stored. + Each InfluxDB database has a retention period, which defines the maximum age + of data stored in the database. +menu: + influxdb_cloud_dedicated: + parent: Administer InfluxDB +weight: 101 +influxdb/cloud-dedicated/tags: [databases] +--- + +An InfluxDB database is a named location where time series data is stored. +Each InfluxDB database has a [retention period](#retention-periods). + +{{% note %}} +**If coming from InfluxDB v1**, the concepts of databases and retention policies +have been combined into a single concept--database. Retention policies are no +longer part of the InfluxDB data model. However, InfluxDB Cloud Dedicated does +support InfluxQL, which requires databases and retention policies. +See [InfluxQL DBRP naming convention](/influxdb/cloud-dedicated/admin/databases/create/#influxql-dbrp-naming-convention). + +**If coming from InfluxDB v2 or InfluxDB Cloud**, _database_ and _bucket_ are synonymous. +{{% /note %}} + +## Retention periods + +A database **retention period** is the maximum age of data stored in the database. +The age of data is determined by the timestamp associated with each point. +When a point's timestamp is beyond the retention period (relative to now), the +point is marked for deletion and is removed from the database the next time the +retention enforcement service runs. + +The _minimum_ retention period for and InfluxDB database is 1 hour. +The _maximum_ retention period is infinite meaning data does not expire and will +never be removed by the retention enforcement service. + +{{% warn %}} +#### Retention periods cannot be updated + +Retention periods cannot be changed after a database is created. +To move to a different retention period, create a new database with the retention +period you want and migrate existing data to the new database. +{{% /warn %}} + +--- + +{{< children hlevel="h2" readmore=true hr=true >}} diff --git a/content/influxdb/cloud-dedicated/admin/databases/create.md b/content/influxdb/cloud-dedicated/admin/databases/create.md new file mode 100644 index 000000000..8088d5e62 --- /dev/null +++ b/content/influxdb/cloud-dedicated/admin/databases/create.md @@ -0,0 +1,112 @@ +--- +title: Create a database +description: > + Use the [`influxctl database create` command](/influxdb/cloud-dedicated/reference/cli/influxctl/database/create/) + to create a new InfluxDB database in your InfluxDB Cloud Dedicated cluster. + Provide a database name and an optional retention period. +menu: + influxdb_cloud_dedicated: + parent: Manage databases +weight: 201 +list_code_example: | + ```sh + influxctl database create --retention-period 30d + ``` +--- + +Use the [`influxctl database create` command](/influxdb/cloud-dedicated/reference/cli/influxctl/database/create/) +to create a database in your InfluxDB Cloud Dedicated cluster. + +1. If you haven't already, [download and install the `influxctl` CLI](/influxdb/cloud-dedicated/reference/cli/influxctl/#download-and-install-influxctl). +2. Run the `influxctl database create` command and provide the following: + + - _(Optional)_ Database [retention period](/influxdb/cloud-dedicated/admin/databases/#retention-periods) + (default is infinite) + - Database name _(see [Database naming restrictions](#database-naming-restrictions))_ + +```sh +influxctl database create --retention-period 30d +``` + +{{% warn %}} +#### Retention periods cannot be updated + +Retention periods cannot be changed after a database is created. +To move to a different retention period, create a new database with the retention +period you want and migrate existing data to the new database. +{{% /warn %}} + +- [Retention period syntax](#retention-period-syntax) +- [Database naming restrictions](#database-naming-restrictions) +- [InfluxQL DBRP naming convention](#influxql-dbrp-naming-convention) + +## Retention period syntax + +Use the `--retention-period` flag to define a specific +[retention period](/influxdb/cloud-dedicated/admin/databases/#retention-periods) +for the database. +The retention period value is a time duration value made up of a numeric value +plus a duration unit. For example, `30d` means 30 days. +A zero duration retention period is infinite and data will not expire. +The retention period value cannot be negative or contain whitespace. + +{{< flex >}} +{{% flex-content %}} + +##### Valid durations units include + +- **m**: minute +- **h**: hour +- **d**: day +- **w**: week +- **mo**: month +- **y**: year + +{{% /flex-content %}} +{{% flex-content %}} + +##### Example retention period values + +- `0d`: infinite/none +- `3d`: 3 days +- `6w`: 6 weeks +- `1mo`: 1 month (30 days) +- `1y`: 1 year +- `30d30d`: 60 days +- `2.5d`: 60 hours + +{{% /flex-content %}} +{{< /flex >}} + +## Database naming restrictions + +Database names must adhere to the following naming restrictions: + +- Must contain two or more characters +- Cannot start with an underscore (`_`) +- Cannot contain whitespace characters, double quotes (`"`), or percent signs (`%`) + +## InfluxQL DBRP naming convention + +In InfluxDB 1.x, data is stored in [databases](/{{< latest "influxdb" "v1" >}}/concepts/glossary/#database) +and [retention policies](/{{< latest "influxdb" "v1" >}}/concepts/glossary/#retention-policy-rp). +In InfluxDB Cloud Dedicated, databases and retention policies have been merged into +_databases_, where databases have a retention period, but retention policies +are no longer part of the data model. +Because InfluxQL uses the 1.x data model, a database must be mapped to a v1 +database and retention policy (DBRP) to be queryable with InfluxQL. + +**When naming a database that you want to query with InfluxQL**, use the following +naming convention to automatically map v1 DBRP combinations to a database: + +```sh +database_name/retention_policy_name +``` + +##### Database naming examples + +| v1 Database name | v1 Retention Policy name | New database name | +| :--------------- | :----------------------- | :------------------------ | +| db | rp | db/rp | +| telegraf | autogen | telegraf/autogen | +| webmetrics | 1w-downsampled | webmetrics/1w-downsampled | diff --git a/content/influxdb/cloud-dedicated/admin/databases/delete.md b/content/influxdb/cloud-dedicated/admin/databases/delete.md new file mode 100644 index 000000000..758cdf4ec --- /dev/null +++ b/content/influxdb/cloud-dedicated/admin/databases/delete.md @@ -0,0 +1,39 @@ +--- +title: Delete a database +description: > + Use the [`influxctl database delete` command](/influxdb/cloud-dedicated/reference/cli/influxctl/database/delete/) + to delete a database from your InfluxDB Cloud Dedicated cluster. + Provide the name of the database you want to delete. +menu: + influxdb_cloud_dedicated: + parent: Manage databases +weight: 203 +list_code_example: | + ```sh + influxctl database delete + ``` +--- + +Use the [`influxctl database delete` command](/influxdb/cloud-dedicated/reference/cli/influxctl/database/delete/) +to delete a database from your InfluxDB Cloud Dedicated cluster. + +1. If you haven't already, [download and install the `influxctl` CLI](/influxdb/cloud-dedicated/reference/cli/influxctl/#download-and-install-influxctl). +2. Run the `influxctl database delete` command and provide the following: + + - Name of the database to delete + + ```sh + influxctl database delete + ``` + +3. Confirm that you want to delete the database. + +{{% warn %}} +#### Deleting a database cannot be undone + +Once a database is deleted, data stored in that database cannot be recovered. + +#### Cannot reuse database names + +After a database is deleted, you cannot reuse the same name for a new database. +{{% /warn %}} \ No newline at end of file diff --git a/content/influxdb/cloud-dedicated/admin/databases/list.md b/content/influxdb/cloud-dedicated/admin/databases/list.md new file mode 100644 index 000000000..d30a2373a --- /dev/null +++ b/content/influxdb/cloud-dedicated/admin/databases/list.md @@ -0,0 +1,56 @@ +--- +title: List databases +description: > + Use the [`influxctl database list` command](/influxdb/cloud-dedicated/reference/cli/influxctl/database/list/) + to list databases in your InfluxDB Cloud Dedicated cluster. +menu: + influxdb_cloud_dedicated: + parent: Manage databases +weight: 202 +list_code_example: | + ```sh + influxctl database list + ``` +--- + +Use the [`influxctl database list` command](/influxdb/cloud-dedicated/reference/cli/influxctl/database/list/) +to list databases in your InfluxDB Cloud Dedicated cluster. + +1. If you haven't already, [download and install the `influxctl` CLI](/influxdb/cloud-dedicated/reference/cli/influxctl/#download-and-install-influxctl). +2. Run `influxctl database list` with the following: + + - _(Optional)_ [Output format](#output-formats) + +```sh +influxctl database list --format table +``` + +### Output formats + +The `influxctl database list` command supports two output formats: `table` and `json`. +By default, the command outputs the list of databases formatted as a table. +For easier programmatic access to the command output, include `--format json` +with your command to format the database list as JSON. + +#### Example output + +{{< code-tabs-wrapper >}} +{{% code-tabs %}} +[table](#) +[json](#) +{{% /code-tabs %}} +{{% code-tab-content %}} + +```sh +# Insert table output +``` + +{{% /code-tab-content %}} +{{% code-tab-content %}} + +```json +// Insert json output +``` + +{{% /code-tab-content %}} +{{< /code-tabs-wrapper >}} diff --git a/content/influxdb/cloud-dedicated/admin/tokens/_index.md b/content/influxdb/cloud-dedicated/admin/tokens/_index.md new file mode 100644 index 000000000..eb1255ef2 --- /dev/null +++ b/content/influxdb/cloud-dedicated/admin/tokens/_index.md @@ -0,0 +1,40 @@ +--- +title: Manage tokens +seotitle: Manage tokens in InfluxDB Cloud Dedicated +description: > + Manage database tokens in your InfluxDB Cloud Dedicated cluster. + Database tokens grant read and write permissions to one or more databases and + allow for actions like writing and querying data. +menu: + influxdb_cloud_dedicated: + parent: Administer InfluxDB +weight: 101 +influxdb/cloud-dedicated/tags: [tokens] +--- + +InfluxDB uses token authentication to authorize access to data in your InfluxDB +Cloud Dedicated cluster. Each token grants read and write permissions to one or +more databases and allows for actions like writing and querying data. + +All read and write actions performed against time series data in your InfluxDB +Cloud Dedicated cluster must be authorized using a token. Administrative actions +such as managing tokens and databases are authorized using **management tokens** +issued by **Auth0**. Management tokens allow clients, such as the `influxctl` CLI, +to perform administrative actions. + +{{% note %}} +#### Store secure tokens in a secret store + +Token strings are returned _only_ on token creation. +We recommend storing database tokens in a secure secret store. + +#### Tokens cannot be updated + +Once created, token permissions cannot be updated. +If you need a token with different permissions, create a token with the +appropriate permissions. +{{% /note %}} + +--- + +{{< children hlevel="h2" readmore=true hr=true >}} diff --git a/content/influxdb/cloud-dedicated/admin/tokens/create.md b/content/influxdb/cloud-dedicated/admin/tokens/create.md new file mode 100644 index 000000000..83789ca50 --- /dev/null +++ b/content/influxdb/cloud-dedicated/admin/tokens/create.md @@ -0,0 +1,99 @@ +--- +title: Create a token +description: > + Use the [`influxctl token create` command](/influxdb/cloud-dedicated/reference/cli/influxctl/token/create/) + to create a database token in your InfluxDB Cloud Dedicated cluster. + Provide a token description and grant permissions to databases. +menu: + influxdb_cloud_dedicated: + parent: Manage tokens +weight: 201 +list_code_example: | + ```sh + influxctl token create \ + --write-database \ + --read-database \ + + ``` +--- + +Use the [`influxctl token create` command](/influxdb/cloud-dedicated/reference/cli/influxctl/token/create/) +to create a token that grants access to databases in your InfluxDB Cloud Dedicated cluster. + +1. If you haven't already, [download and install the `influxctl` CLI](/influxdb/cloud-dedicated/reference/cli/influxctl/#download-and-install-influxctl). +2. Run the `influxctl token create` command and provide the following: + + - Token permissions (read and write per database) + - `--read-database`: Grant read permissions to a database + - `--write-database`: Grant write permissions to a database + - Token description + +```sh +influxctl token create \ + --read-database \ + --write-database \ + +``` + +The command returns the token ID and the token string. +**This is the only time the token string is available in plain text.** + +{{% note %}} +#### Store secure tokens in a secret store + +Token strings are returned _only_ on token creation. +We recommend storing database tokens in a secure secret store. +{{% /note %}} + +#### Example token creation commands + +{{< expand-wrapper >}} +{{% expand "Create a token with read and write access to a database" %}} + +```sh +influxctl token create \ + --read-database mydb \ + --write-database mydb \ + "Read/write token for mydb" +``` + +{{% /expand %}} +{{% expand "Create a token with read-only access to a database" %}} + +```sh +influxctl token create \ + --read-database mydb \ + "Read-only token for mydb" +``` + +{{% /expand %}} +{{% expand "Create a token with read-only access to multiple database" %}} + +```sh +influxctl token create \ + --read-database mydb1 \ + --read-database mydb2 \ + "Read-only token for mydb1 and mydb2" +``` + +{{% /expand %}} +{{% expand "Create a token with mixed permissions on multiple database" %}} + +```sh +influxctl token create \ + --read-database mydb1 \ + --read-database mydb2 \ + --write-database mydb2 \ + "Read-only on mydb1, Read/write on mydb2" +``` + +{{% /expand %}} +{{< /expand-wrapper >}} + +{{% note %}} +#### Tokens cannot be updated + +Once created, token permissions cannot be updated. +If you need a token with different permissions, create a new token with the +appropriate permissions. +{{% /note %}} diff --git a/content/influxdb/cloud-dedicated/admin/tokens/delete.md b/content/influxdb/cloud-dedicated/admin/tokens/delete.md new file mode 100644 index 000000000..e1eebb96d --- /dev/null +++ b/content/influxdb/cloud-dedicated/admin/tokens/delete.md @@ -0,0 +1,52 @@ +--- +title: Delete a token +description: > + Use the [`influxctl token delete` command](/influxdb/cloud-dedicated/reference/cli/influxctl/token/delete/) + to delete a token from your InfluxDB Cloud Dedicated cluster and revoke all + permissions associated with the token. + Provide the ID of the token you want to delete. +menu: + influxdb_cloud_dedicated: + parent: Manage tokens +weight: 203 +list_code_example: | + ```sh + influxctl token delete + ``` +--- + +Use the [`influxctl token delete` command](/influxdb/cloud-dedicated/reference/cli/influxctl/token/delete/) +to delete a database token from your InfluxDB Cloud Dedicated cluster and revoke +all permissions associated with the token. + +1. If you haven't already, [download and install the `influxctl` CLI](/influxdb/cloud-dedicated/reference/cli/influxctl/#download-and-install-influxctl). +2. Run the [`influxctl token list` command](/influxdb/cloud-dedicated/reference/cli/influxctl/token/list) + to output tokens with their IDs. + Copy the **token ID** of the token you want to delete. + + ```sh + influxctl token list + ``` + +3. Run the `influxctl token delete` command and provide the following: + + - Token ID to delete + + ```sh + influxctl token delete + ``` + +4. Confirm that you want to delete the token. + +{{% warn %}} +#### Deleting a token is immediate and cannot be undone + +Deleting a database token is a destructive action that takes place immediately +and cannot be undone. + +#### Rotate deleted tokens + +After deleting a database token, any clients using the deleted token need to be +updated with a new database token to continue to interact with your InfluxDB +Cloud Dedicated cluster. +{{% /warn %}} diff --git a/content/influxdb/cloud-dedicated/admin/tokens/list.md b/content/influxdb/cloud-dedicated/admin/tokens/list.md new file mode 100644 index 000000000..72c445297 --- /dev/null +++ b/content/influxdb/cloud-dedicated/admin/tokens/list.md @@ -0,0 +1,56 @@ +--- +title: List tokens +description: > + Use the [`influxctl token list` command](/influxdb/cloud-dedicated/reference/cli/influxctl/token/list/) + to list tokens in your InfluxDB Cloud Dedicated cluster. +menu: + influxdb_cloud_dedicated: + parent: Manage tokens +weight: 202 +list_code_example: | + ```sh + influxctl token list + ``` +--- + +Use the [`influxctl token list` command](/influxdb/cloud-dedicated/reference/cli/influxctl/token/list/) +to list database tokens in your InfluxDB Cloud Dedicated cluster. + +1. If you haven't already, [download and install the `influxctl` CLI](/influxdb/cloud-dedicated/reference/cli/influxctl/#download-and-install-influxctl). +2. Run `influxctl token list` with the following: + + - _(Optional)_ [Output format](#output-formats) + +```sh +influxctl token list --format table +``` + +### Output formats + +The `influxctl token list` command supports two output formats: `table` and `json`. +By default, the command outputs the list of tokens formatted as a table. +For easier programmatic access to the command output, include `--format json` +with your command to format the token list as JSON. + +#### Example output + +{{< code-tabs-wrapper >}} +{{% code-tabs %}} +[table](#) +[json](#) +{{% /code-tabs %}} +{{% code-tab-content %}} + +```sh +# Insert table output +``` + +{{% /code-tab-content %}} +{{% code-tab-content %}} + +```json +// Insert json output +``` + +{{% /code-tab-content %}} +{{< /code-tabs-wrapper >}} diff --git a/content/influxdb/cloud-dedicated/get-started/_index.md b/content/influxdb/cloud-dedicated/get-started/_index.md new file mode 100644 index 000000000..f340042b8 --- /dev/null +++ b/content/influxdb/cloud-dedicated/get-started/_index.md @@ -0,0 +1,120 @@ +--- +title: Get started with InfluxDB Cloud Dedicated +list_title: Get started +description: > + Start writing and querying time series data in InfluxDB Cloud Dedicated. +menu: + influxdb_cloud_dedicated: + name: Get started +weight: 3 +influxdb/cloud-dedicated/tags: [get-started] +--- + +InfluxDB Cloud Dedicated is the platform purpose-built to collect, store, and +query time series data. +It is powered by the InfluxDB IOx storage engine which provides a number of +benefits including nearly unlimited series cardinality, improved query performance, +and interoperability with widely used data processing tools and platforms. + +**Time series data** is a sequence of data points indexed in time order. +Data points typically consist of successive measurements made from the same +source and are used to track changes over time. +Examples of time series data include: + +- Industrial sensor data +- Server performance metrics +- Heartbeats per minute +- Electrical activity in the brain +- Rainfall measurements +- Stock prices + +This multi-part tutorial walks you through writing time series data to +your dedicated InfluxDB Cloud cluster, querying, and then visualizing that data. + +## Key concepts before you get started + +Before you get started using InfluxDB, it's important to understand how time series +data is organized and stored in InfluxDB and some key definitions that are used +throughout this documentation. + +- [Data organization](#data-organization) +- [Schema on write](#schema-on-write) +- [Important definitions](#important-definitions) + +### Data organization + +The InfluxDB Cloud Dedicated data model organizes time series data into databases +and measurements. A database can contain multiple measurements. +Measurements contain multiple tags and fields. + +- **Database**: Named location where time series data is stored. + A database can contain multiple _measurements_. + - **Measurement**: Logical grouping for time series data. + All _points_ in a given measurement should have the same _tags_. + A measurement contains multiple _tags_ and _fields_. + - **Tags**: Key-value pairs that provide metadata for each point--for example, + something to identify the source or context of the data like host, + location, station, etc. + - **Fields**: Key-value pairs with values that change over time--for example, + temperature, pressure, stock price, etc. + - **Timestamp**: Timestamp associated with the data. + When stored on disk and queried, all data is ordered by time. + +### Schema on write + +When using InfluxDB, you define your schema as you write your data. +You don't need to create measurements (equivalent to a relational table) or +explicitly define the schema of the measurement. +Measurement schemas are defined by the schema of data as it is written to the measurement. + +### Important definitions + +The following definitions are important to understand when using InfluxDB: + +- **Point**: Single data record identified by its _measurement, tag keys, tag values, field key, and timestamp_. +- **Series**: A group of points with the same _measurement, tag keys and values, and field key_. +- **Primary key**: Columns used to uniquely identify each row in a table. + Rows are uniquely identified by their _timestamp and tag set_. + +##### Example InfluxDB query results + +{{< influxdb/points-series-sql >}} + +## Tools to use + +Throughout this tutorial, there are multiple tools you can use to manage and +interact with your InfluxDB Cloud Dedicated cluster. +Examples are provided for each of the following: + + + +{{% note %}} +#### InfluxDB client libraries + +[InfluxDB v1 and v2 client libraries](/influxdb/cloud/api-guide/client-libraries/) +are language-specific clients that interact with the InfluxDB HTTP v1 and v2 API. +Examples for client libraries are not provided in this tutorial, but these can +be used to perform actions outlined in this tutorial. +{{% /note %}} + +## Authorization + +**InfluxDB Cloud Dedicated requires authentication** using +[tokens](/influxdb/cloud-dedicated/security/tokens/). + +There a two types of tokens: + +- **Database token**: A token that grants read and write access to InfluxDB + databases. +- **Management token**: A short-lived (1 hour) [Auth0 token](#) used to + administer your InfluxDB Cloud Dedicated cluster. + These are generated by the `influxctl` and do not require any direct management. + Management tokens authorize a user to perform tasks related to: + + - Account management + - Database management + - Database token management + - Pricing + + +{{< page-nav next="/influxdb/cloud-dedicated/get-started/setup/" >}} \ No newline at end of file diff --git a/content/influxdb/cloud-dedicated/get-started/query.md b/content/influxdb/cloud-dedicated/get-started/query.md new file mode 100644 index 000000000..8024dca47 --- /dev/null +++ b/content/influxdb/cloud-dedicated/get-started/query.md @@ -0,0 +1,677 @@ +--- +title: Get started querying data +seotitle: Query data | Get started with InfluxDB Cloud Dedicated +list_title: Query data +description: > + Get started querying data in InfluxDB Cloud Dedicated by learning about SQL and + InfluxQL and using tools like InfluxDB client libraries and Flight SQL clients. +menu: + influxdb_cloud_dedicated: + name: Query data + parent: Get started + identifier: get-started-query-data +weight: 102 +metadata: [3 / 3] +related: + - /influxdb/cloud-dedicated/query-data/ + - /influxdb/cloud-dedicated/query-data/sql/ +--- + +InfluxDB Cloud Dedicated supports multiple query languages: + +- **SQL**: Traditional SQL powered by the [Apache Arrow DataFusion](https://arrow.apache.org/datafusion/) + query engine. The supported SQL syntax is similar to PostgreSQL. +- **InfluxQL**: A SQL-like query language designed to query time series data from + InfluxDB. + +This tutorial walks you through the fundamentals of querying data in InfluxDB and +**focuses on using SQL** to query your time series data. +The InfluxDB SQL implementation is built using [Arrow Flight SQL](https://arrow.apache.org/docs/format/FlightSql.html), +a protocol for interacting with SQL databases using the Arrow in-memory format and the +[Flight RPC](https://arrow.apache.org/docs/format/Flight.html) framework. +It leverages the performance of [Apache Arrow](https://arrow.apache.org/) with +the simplicity of SQL. + +{{% note %}} +The examples in this section of the tutorial query the +[**get-started** database](/influxdb/cloud-dedicated/get-started/setup/#create-a-database) for data written in the +[Get started writing data](/influxdb/cloud-dedicated/get-started/write/#write-line-protocol-to-influxdb) section. +{{% /note %}} + +## Tools to execute queries + +InfluxDB Cloud Dedicated supports many different tools for querying data, including: + +{{< req type="key" text="Covered in this tutorial" color="magenta" >}} + +- [Flight SQL clients](){{< req text="\* " color="magenta" >}} +- [InfluxDB client libraries](){{< req text="\* " color="magenta" >}} +- [InfluxDB v1 HTTP API](?t=InfluxDB+API#execute-a-sql-query) +- [Superset](https://superset.apache.org/) +- [Grafana](/influxdb/cloud-dedicated/query-data/tools/grafana/) +- [Chronograf](/{{< latest "Chronograf" >}}/) + +## SQL query basics + +InfluxDB Cloud's SQL implementation is powered by the [Apache Arrow DataFusion](https://arrow.apache.org/datafusion/) +query engine which provides a SQL syntax similar to PostgreSQL. + +{{% note %}} +This is a brief introduction to writing SQL queries for InfluxDB. +For more in-depth details, see [Query data with SQL](/influxdb/cloud-dedicated/query-data/sql/). +{{% /note %}} + +InfluxDB SQL queries most commonly include the following clauses: + +{{< req type="key" >}} + +- {{< req "\*">}} `SELECT`: Identify specific fields and tags to query from a + measurement or use the wild card alias (`*`) to select all fields and tags + from a measurement. +- {{< req "\*">}} `FROM`: Identify the measurement to query. + If coming from a SQL background, an InfluxDB measurement is the equivalent + of a relational table. +- `WHERE`: Only return data that meets defined conditions such as falling within + a time range, containing specific tag values, etc. +- `GROUP BY`: Group data into SQL partitions and apply an aggregate or selector + function to each group. + +{{% influxdb/custom-timestamps %}} +```sql +-- Return the average temperature and humidity within time bounds from each room +SELECT + avg(temp), + avg(hum), + room +FROM + home +WHERE + time >= '2022-01-01T08:00:00Z' + AND time <= '2022-01-01T20:00:00Z' +GROUP BY + room +``` +{{% /influxdb/custom-timestamps %}} + +##### Example SQL queries + +{{< expand-wrapper >}} +{{% expand "Select all data in a measurement" %}} +```sql +SELECT * FROM measurement +``` +{{% /expand %}} + +{{% expand "Select all data in a measurement within time bounds" %}} +```sql +SELECT + * +FROM + home +WHERE + time >= '2022-01-01T08:00:00Z' + AND time <= '2022-01-01T20:00:00Z' +``` +{{% /expand %}} + +{{% expand "Select a specific field within relative time bounds" %}} +```sql +SELECT temp FROM home WHERE time >= now() - INTERVAL '1 day' +``` +{{% /expand %}} + +{{% expand "Select specific fields and tags from a measurement" %}} +```sql +SELECT temp, room FROM home +``` +{{% /expand %}} + +{{% expand "Select data based on tag value" %}} +```sql +SELECT * FROM home WHERE room = 'Kitchen' +``` +{{% /expand %}} + +{{% expand "Select data based on tag value within time bounds" %}} +```sql +SELECT + * +FROM + home +WHERE + time >= '2022-01-01T08:00:00Z' + AND time <= '2022-01-01T20:00:00Z' + AND room = 'Living Room' +``` +{{% /expand %}} + +{{% expand "Downsample data by applying interval-based aggregates" %}} +```sql +SELECT + DATE_BIN(INTERVAL '1 hour', time, '2022-01-01T00:00:00Z'::TIMESTAMP) as _time, + room + selector_max(temp, time)['value'] AS 'max temp', +FROM + home +GROUP BY + _time, + 'max temp', + room +ORDER BY room, _time +``` +{{% /expand %}} +{{< /expand-wrapper >}} + +### Execute a SQL query + +Use the **InfluxDB UI**, **`influx` CLI**, or **InfluxDB API** to execute SQL queries. +For this example, use the following query to select all the data written to the +**get-started** bucket between +{{% influxdb/custom-timestamps-span %}} +**2022-01-01T08:00:00Z** and **2022-01-01T20:00:00Z**. +{{% /influxdb/custom-timestamps-span %}} + +{{% influxdb/custom-timestamps %}} +```sql +SELECT + * +FROM + home +WHERE + time >= '2022-01-01T08:00:00Z' + AND time <= '2022-01-01T20:00:00Z' +``` +{{% /influxdb/custom-timestamps %}} + +{{< tabs-wrapper >}} +{{% tabs %}} +[Python](#) +[Go](#) +{{% /tabs %}} + +{{% tab-content %}} + + +To query data from InfluxDB Cloud Dedicated using Python, use the +[`pyinflux3` module](https://github.com/InfluxCommunity/pyinflux3). +The following steps include setting up a Python virtual environment already +covered in [Get started writing data](/influxdb/cloud-dedicated/get-started/write/?t=Python#write-line-protocol-to-influxdb). +_If your projects virtual environment is already running, skip to step 3._ + +1. Setup your Python virtual environment. + Inside of your project directory: + + ```sh + python -m venv envs/virtual-env + ``` + +2. Activate the virtual environment. + + ```sh + source ./envs/virtual-env/bin/activate + ``` + +3. Install the following dependencies: + + {{< req type="key" text="Already installed in the [Write data section](/influxdb/cloud-dedicated/get-started/write/?t=Python#write-line-protocol-to-influxdb)" color="magenta" >}} + + - `pyarrow` {{< req text="\*" color="magenta" >}} + - `flightsql-dbapi` {{< req text="\*" color="magenta" >}} + - `pyinflux3` {{< req text="\*" color="magenta" >}} + - `pandas` + - `tabulate` _(to return formatted tables)_ + + ```sh + pip install pandas tabulate + ``` + +4. Build your python script to query your InfluxDB database. + _These can be structured as a Python script or executed in a `python` shell._ + + 1. Import the `InfluxDBClient3` constructor from the `influxdb_client_3` module. + + 2. Use the `InfluxDBClient3` constructor to instantiate an InfluxDB Client. + The example below assigns it to the `client` variable. + Provide the following credentials: + + - **host**: InfluxDB Cloud Dedicated cluster URL (without protocol or trailing slash) + - **token**: Database token with read access to the specified database + - **database**: Database name to query + + 3. Provide the SQL query to execute. In the example below, it's assigned + to the `query`variable. + + 4. Use the `client.query` method to query data in the **get-started** + database and return an Arrow table. Assign the return value to the + `table` variable. Provide the following: + + - **sql_query** SQL query string to execute + + 5. Use [`read_all`](https://docs.python.org/3/library/telnetlib.html#telnetlib.Telnet.read_all) + to read the data from InfluxDB and return an Arrow table. + + 6. Use [`to_pandas`](https://arrow.apache.org/docs/python/generated/pyarrow.Table.html#pyarrow.Table.to_pandas) + to convert the Arrow table to a pandas DataFrame. + + 7. Use [`to_markdown`](https://pandas.pydata.org/docs/reference/api/pandas.DataFrame.to_markdown.html) + to convert the DataFrame to a markdown table. + + 8. Use `print` to print out the markdown table. + +{{% influxdb/custom-timestamps %}} + +```py +from influxdb_client_3 import InfluxDBClient3 + +client = InfluxDBClient3( + host="cluster-id.influxdb.io", + token="DATABASE_TOKEN", + database="get-started", +) + +sql = ''' +SELECT + * +FROM + home +WHERE + time >= '2022-01-01T08:00:00Z' + AND time <= '2022-01-01T20:00:00Z' +''' + +table = client.query(sql_query=sql) +reader = table.read_all() +print(reader.to_pandas().to_markdown()) +``` + +{{% /influxdb/custom-timestamps %}} + +{{< expand-wrapper >}} +{{% expand "View returned markdown table" %}} +{{% influxdb/custom-timestamps %}} + +| | co | hum | room | temp | time | +|---:|-----:|------:|:------------|-------:|:--------------------| +| 0 | 0 | 35.9 | Kitchen | 21 | 2022-01-01 08:00:00 | +| 1 | 0 | 36.2 | Kitchen | 23 | 2022-01-01 09:00:00 | +| 2 | 0 | 36.1 | Kitchen | 22.7 | 2022-01-01 10:00:00 | +| 3 | 0 | 36 | Kitchen | 22.4 | 2022-01-01 11:00:00 | +| 4 | 0 | 36 | Kitchen | 22.5 | 2022-01-01 12:00:00 | +| 5 | 1 | 36.5 | Kitchen | 22.8 | 2022-01-01 13:00:00 | +| 6 | 1 | 36.3 | Kitchen | 22.8 | 2022-01-01 14:00:00 | +| 7 | 3 | 36.2 | Kitchen | 22.7 | 2022-01-01 15:00:00 | +| 8 | 7 | 36 | Kitchen | 22.4 | 2022-01-01 16:00:00 | +| 9 | 9 | 36 | Kitchen | 22.7 | 2022-01-01 17:00:00 | +| 10 | 18 | 36.9 | Kitchen | 23.3 | 2022-01-01 18:00:00 | +| 11 | 22 | 36.6 | Kitchen | 23.1 | 2022-01-01 19:00:00 | +| 12 | 26 | 36.5 | Kitchen | 22.7 | 2022-01-01 20:00:00 | +| 13 | 0 | 35.9 | Living Room | 21.1 | 2022-01-01 08:00:00 | +| 14 | 0 | 35.9 | Living Room | 21.4 | 2022-01-01 09:00:00 | +| 15 | 0 | 36 | Living Room | 21.8 | 2022-01-01 10:00:00 | +| 16 | 0 | 36 | Living Room | 22.2 | 2022-01-01 11:00:00 | +| 17 | 0 | 35.9 | Living Room | 22.2 | 2022-01-01 12:00:00 | +| 18 | 0 | 36 | Living Room | 22.4 | 2022-01-01 13:00:00 | +| 19 | 0 | 36.1 | Living Room | 22.3 | 2022-01-01 14:00:00 | +| 20 | 1 | 36.1 | Living Room | 22.3 | 2022-01-01 15:00:00 | +| 21 | 4 | 36 | Living Room | 22.4 | 2022-01-01 16:00:00 | +| 22 | 5 | 35.9 | Living Room | 22.6 | 2022-01-01 17:00:00 | +| 23 | 9 | 36.2 | Living Room | 22.8 | 2022-01-01 18:00:00 | +| 24 | 14 | 36.3 | Living Room | 22.5 | 2022-01-01 19:00:00 | +| 25 | 17 | 36.4 | Living Room | 22.2 | 2022-01-01 20:00:00 | + +{{% /influxdb/custom-timestamps %}} +{{% /expand %}} +{{< /expand-wrapper >}} + + +{{% /tab-content %}} +{{% tab-content %}} + + +1. In the `influxdb_go_client` directory you created in the + [Write data section](/influxdb/cloud-dedicated/get-started/write/?t=Go#write-line-protocol-to-influxdb), + create a new file named `query.go`. + +2. In `query.go`: + + 1. Import the following packages: + + - `context` + - `crypto/x509` + - `encoding/json` + - `fmt` + - `os` + - `github.com/apache/arrow/go/v12/arrow/flight/flightsql` + - `google.golang.org/grpc` + - `google.golang.org/grpc/credentials` + - `google.golang.org/grpc/metadata` + + 2. Create a `dbQuery` function. In `dbQuery, define the following + variables: + + - **url**: InfluxDB Cloud Dedicated cluster URL _(no protocol, include port `443`)_ + - **token**: [Database token](/influxdb/cloud-dedicated/admin/tokens/) with + read access to the **get-started** database. + _For security reasons, we recommend setting this as an environment + variable rather than including the raw token string._ + - **database**: Database name to query + + 3. In the `dbQuery` function, create a gRPC transport to use to communicate + with your InfluxDB Cloud Dedicated cluster over the gRPC protocol. + + 4. Use `flightsql.NewClient` to create a new Flight SQL client. + + 5. Append the following key-value pairs to the outgoing context: + + - **authorization**: Bearer + - **database-name**: Database name + + 6. Define the query to execute. + + 7. Create a reader to read the Arrow table returned by the query and print + the results as JSON. + + 8. Create a `main` function that executes the `dbQuery` function. + +{{% influxdb/custom-timestamps %}} + +```go +package main + +import ( + "context" + "crypto/x509" + "encoding/json" + "fmt" + "os" + + "github.com/apache/arrow/go/v12/arrow/flight/flightsql" + "google.golang.org/grpc" + "google.golang.org/grpc/credentials" + "google.golang.org/grpc/metadata" +) + +func dbQuery(ctx context.Context) error { + url := "cluster-id.influxdb.io:443" + token := os.Getenv("INFLUX_TOKEN") + database := "get-started" + + // Create a gRPC transport + pool, err := x509.SystemCertPool() + if err != nil { + return fmt.Errorf("x509: %s", err) + } + transport := grpc.WithTransportCredentials(credentials.NewClientTLSFromCert(pool, "")) + opts := []grpc.DialOption{ + transport, + } + + // Create query client + client, err := flightsql.NewClient(url, nil, nil, opts...) + if err != nil { + return fmt.Errorf("flightsql: %s", err) + } + + ctx = metadata.AppendToOutgoingContext(ctx, "authorization", "Bearer "+token) + ctx = metadata.AppendToOutgoingContext(ctx, "iox-namespace-name", database) + + // Execute query + query := `SELECT + * + FROM + home + WHERE + time >= '2022-01-01T08:00:00Z' + AND time <= '2022-01-01T20:00:00Z'` + + info, err := client.Execute(ctx, query) + if err != nil { + return fmt.Errorf("flightsql flight info: %s", err) + } + reader, err := client.DoGet(ctx, info.Endpoint[0].Ticket) + if err != nil { + return fmt.Errorf("flightsql do get: %s", err) + } + + // Print results as JSON + for reader.Next() { + record := reader.Record() + b, err := json.MarshalIndent(record, "", " ") + if err != nil { + return err + } + fmt.Println("RECORD BATCH") + fmt.Println(string(b)) + + if err := reader.Err(); err != nil { + return fmt.Errorf("flightsql reader: %s", err) + } + } + + return nil +} + +func main() { + if err := dbQuery(context.Background()); err != nil { + fmt.Fprintf(os.Stderr, "error: %v\n", err) + os.Exit(1) + } +} +``` + +{{% /influxdb/custom-timestamps %}} + +Install all the necessary packages and run the program to write the line +protocol to your InfluxDB Cloud Dedicated cluster. + +```sh +go get ./... +go run ./query.go +``` + +{{< expand-wrapper >}} +{{% expand "View program output" %}} +{{% influxdb/custom-timestamps %}} + +```json +RECORD BATCH +[ + { + "co": 0, + "hum": 35.9, + "room": "Kitchen", + "temp": 21, + "time": "2022-01-01 08:00:00" + }, + { + "co": 0, + "hum": 36.2, + "room": "Kitchen", + "temp": 23, + "time": "2022-01-01 09:00:00" + }, + { + "co": 0, + "hum": 36.1, + "room": "Kitchen", + "temp": 22.7, + "time": "2022-01-01 10:00:00" + }, + { + "co": 0, + "hum": 36, + "room": "Kitchen", + "temp": 22.4, + "time": "2022-01-01 11:00:00" + }, + { + "co": 0, + "hum": 36, + "room": "Kitchen", + "temp": 22.5, + "time": "2022-01-01 12:00:00" + }, + { + "co": 1, + "hum": 36.5, + "room": "Kitchen", + "temp": 22.8, + "time": "2022-01-01 13:00:00" + }, + { + "co": 1, + "hum": 36.3, + "room": "Kitchen", + "temp": 22.8, + "time": "2022-01-01 14:00:00" + }, + { + "co": 3, + "hum": 36.2, + "room": "Kitchen", + "temp": 22.7, + "time": "2022-01-01 15:00:00" + }, + { + "co": 7, + "hum": 36, + "room": "Kitchen", + "temp": 22.4, + "time": "2022-01-01 16:00:00" + }, + { + "co": 9, + "hum": 36, + "room": "Kitchen", + "temp": 22.7, + "time": "2022-01-01 17:00:00" + }, + { + "co": 18, + "hum": 36.9, + "room": "Kitchen", + "temp": 23.3, + "time": "2022-01-01 18:00:00" + }, + { + "co": 22, + "hum": 36.6, + "room": "Kitchen", + "temp": 23.1, + "time": "2022-01-01 19:00:00" + }, + { + "co": 26, + "hum": 36.5, + "room": "Kitchen", + "temp": 22.7, + "time": "2022-01-01 20:00:00" + }, + { + "co": 0, + "hum": 35.9, + "room": "Living Room", + "temp": 21.1, + "time": "2022-01-01 08:00:00" + }, + { + "co": 0, + "hum": 35.9, + "room": "Living Room", + "temp": 21.4, + "time": "2022-01-01 09:00:00" + }, + { + "co": 0, + "hum": 36, + "room": "Living Room", + "temp": 21.8, + "time": "2022-01-01 10:00:00" + }, + { + "co": 0, + "hum": 36, + "room": "Living Room", + "temp": 22.2, + "time": "2022-01-01 11:00:00" + }, + { + "co": 0, + "hum": 35.9, + "room": "Living Room", + "temp": 22.2, + "time": "2022-01-01 12:00:00" + }, + { + "co": 0, + "hum": 36, + "room": "Living Room", + "temp": 22.4, + "time": "2022-01-01 13:00:00" + }, + { + "co": 0, + "hum": 36.1, + "room": "Living Room", + "temp": 22.3, + "time": "2022-01-01 14:00:00" + }, + { + "co": 1, + "hum": 36.1, + "room": "Living Room", + "temp": 22.3, + "time": "2022-01-01 15:00:00" + }, + { + "co": 4, + "hum": 36, + "room": "Living Room", + "temp": 22.4, + "time": "2022-01-01 16:00:00" + }, + { + "co": 5, + "hum": 35.9, + "room": "Living Room", + "temp": 22.6, + "time": "2022-01-01 17:00:00" + }, + { + "co": 9, + "hum": 36.2, + "room": "Living Room", + "temp": 22.8, + "time": "2022-01-01 18:00:00" + }, + { + "co": 14, + "hum": 36.3, + "room": "Living Room", + "temp": 22.5, + "time": "2022-01-01 19:00:00" + }, + { + "co": 17, + "hum": 36.4, + "room": "Living Room", + "temp": 22.2, + "time": "2022-01-01 20:00:00" + } +] +``` + +{{% /influxdb/custom-timestamps %}} +{{% /expand %}} +{{< /expand-wrapper >}} + + +{{% /tab-content %}} +{{< /tabs-wrapper >}} + +**Congratulations!** You've learned the basics of querying data in InfluxDB +Cloud Dedicated with SQL. +For a deep dive into all the ways you can query InfluxDB, see the +[Query data in InfluxDB](/influxdb/cloud-dedicated/query-data/) section of documentation. + +{{< page-nav prev="/influxdb/cloud-dedicated/get-started/write/" keepTab=true >}} \ No newline at end of file diff --git a/content/influxdb/cloud-dedicated/get-started/setup.md b/content/influxdb/cloud-dedicated/get-started/setup.md new file mode 100644 index 000000000..cced205a2 --- /dev/null +++ b/content/influxdb/cloud-dedicated/get-started/setup.md @@ -0,0 +1,120 @@ +--- +title: Set up InfluxDB Cloud Dedicated +seotitle: Set up InfluxDB | Get started with InfluxDB Cloud Dedicated +list_title: Set up InfluxDB +description: > + Learn how to set up InfluxDB Cloud Dedicated for the "Get started with InfluxDB" + tutorial and for general use. +menu: + influxdb_cloud_dedicated: + name: Set up InfluxDB + parent: Get started + identifier: get-started-set-up +weight: 101 +metadata: [1 / 3] +related: + - /influxdb/cloud-dedicated/admin/buckets/ + - /influxdb/cloud-dedicated/reference/cli/influx/ + - /influxdb/cloud-dedicated/reference/api/ +--- + +As you get started with this tutorial, do the following to make sure everything +you need is in place. + +- [Request an InfluxDB Cloud Dedicated cluster](#request-an-influxdb-cloud-dedicated-cluster) +- [Download, install, and configure the influxctl CLI](#download-install-and-configure-the-influxctl-cli) +- [Create a database](#create-a-database) +- [Create a database token](#create-a-database-token) + +## Request an InfluxDB Cloud Dedicated cluster + +[Contact the InfluxData Sales team]({{< dedicated-link >}}) to request an +InfluxDB Cloud Dedicated cluster. +When your cluster is deployed, your InfluxData account representative provides +the following: + +- An **Auth0 login** to authenticate access to your cluster +- Your InfluxDB Cloud Dedicated **account ID** +- Your InfluxDB Cloud Dedicated **cluster ID** +- Your InfluxDB Cloud Dedicated **cluster URL** + +## Download, install, and configure the influxctl CLI + +The [`influxctl` CLI](/influxdb/cloud-dedicated/reference/cli/influxctl/) +provides a simple way to manage your InfluxDB Cloud Dedicated cluster from a +command line. It lets you perform administrative tasks such as managing +databases and tokens. + +1. **Download the `influxctl` CLI**. + + _Contact your InfluxData account representative for information about + downloading and installing the `influxctl` CLI._ + +2. **Create a connection profile and provide your InfluxDB Cloud Dedicated connection credentials**. + The `influxctl` CLI uses [connection profiles](/influxdb/cloud-dedicated/reference/cli/influxctl/#configure-connection-profiles) + to connect to and authenticate with your InfluxDB Cloud Dedicated cluster. + + To create a connection profile, run `influxctl init` to start an interactive + prompt that creates and stores a connection profile. + + ```sh + influxctl init + ``` + + Provide the following required credentials: + + - Account ID + - Cluster ID + + _For more information about `influxctl` profiles, see + [Configure connection profiles](/influxdb/cloud-dedicated/reference/cli/influxctl/#configure-connection-profiles)_. + +## Create a database + +Use the [`influxctl database create` command](/influxdb/cloud-dedicated/reference/cli/influxctl/database/create/) +to create a database. You can use an existing database or create a new one +specifically for this getting started tutorial. +_Examples in this getting started tutorial assume a database named **"get-started"**._ + +{{% note %}} +#### Authenticate with your cluster + +The first time you run an `influxctl` CLI command, you are directed +to login to **Auth0**. Once logged in, Auth0 issues a short-lived (1 hour) +management token for the `influxctl` CLI that grants administrative access +to your InfluxDB Cloud Dedicated cluster. +{{% /note %}} + +Provide the following: + +- Database name. +- _(Optional)_ Database [retention period](/influxdb/cloud-dedicated/admin/databases/#retention-periods) + as a duration value. + If no retention period is specified, the default is infinite. + +```sh +influxctl database create \ + --retention-period 1y \ + get-started +``` + +## Create a database token + +Use the [`influxctl token create` command](/influxdb/cloud-dedicated/reference/cli/influxctl/token/create/) +to create a database token with read and write permissions for your database. + +Provide the following: + +- Permission grants + - `--read-database`: Grants read access to a database + - `--write-database` Grants write access to a database +- Token description + +```sh +influxctl token create \ + --read-database get-started \ + --write-database get-started \ + "Read/write token for get-started database" +``` + +{{< page-nav prev="/influxdb/cloud-dedicated/get-started/" next="/influxdb/cloud-dedicated/get-started/write/" keepTab=true >}} diff --git a/content/influxdb/cloud-dedicated/get-started/write.md b/content/influxdb/cloud-dedicated/get-started/write.md new file mode 100644 index 000000000..a225c845b --- /dev/null +++ b/content/influxdb/cloud-dedicated/get-started/write.md @@ -0,0 +1,519 @@ +--- +title: Get started writing data +seotitle: Write data | Get started with InfluxDB Cloud Dedicated +list_title: Write data +description: > + Get started writing data to InfluxDB Cloud Dedicated by learning about line protocol + and using tools like the InfluxDB API and Telegraf. +menu: + influxdb_cloud_dedicated: + name: Write data + parent: Get started + identifier: get-started-write-data +weight: 101 +metadata: [2 / 3] +related: + - /influxdb/cloud-dedicated/write-data/ + - /influxdb/cloud-dedicated/write-data/best-practices/ + - /influxdb/cloud-dedicated/reference/syntax/line-protocol/ + - /{{< latest "telegraf" >}}/ +--- + +InfluxDB provides many different options for ingesting or writing data, including +the following: + +- [InfluxDB HTTP API (v1 and v2)](/influxdb/cloud-serverless/reference/api/) +- [`influx` CLI (v1 and v2)](/influxdb/cloud-dedicated/reference/cli/influx/) +- [Telegraf](/{{< latest "telegraf" >}}/) +- [InfluxDB client libraries](/influxdb/cloud-dedicated/api-guide/client-libraries/) +- etc. + +This tutorial walks you through the fundamental of using **line protocol** to write +data to InfluxDB. If using tools like Telegraf or InfluxDB client libraries, they can +build the line protocol for you, but it's good to understand how line protocol works. + +## Line protocol + +All data written to InfluxDB is written using **line protocol**, a text-based +format that lets you provide the necessary information to write a data point to InfluxDB. +_This tutorial covers the basics of line protocol, but for detailed information, +see the [Line protocol reference](/influxdb/cloud-dedicated/reference/syntax/line-protocol/)._ + +### Line protocol elements + +Each line of line protocol contains the following elements: + +{{< req type="key" >}} + +- {{< req "\*" >}} **measurement**: String that identifies the [measurement]() to store the data in. +- **tag set**: Comma-delimited list of key value pairs, each representing a tag. + Tag keys and values are unquoted strings. _Spaces, commas, and equal characters must be escaped._ +- {{< req "\*" >}} **field set**: Comma-delimited list of key value pairs, each representing a field. + Field keys are unquoted strings. _Spaces and commas must be escaped._ + Field values can be [strings](/influxdb/cloud-dedicated/reference/syntax/line-protocol/#string) (quoted), + [floats](/influxdb/cloud-dedicated/reference/syntax/line-protocol/#float), + [integers](/influxdb/cloud-dedicated/reference/syntax/line-protocol/#integer), + [unsigned integers](/influxdb/cloud-dedicated/reference/syntax/line-protocol/#uinteger), + or [booleans](/influxdb/cloud-dedicated/reference/syntax/line-protocol/#boolean). +- **timestamp**: [Unix timestamp](/influxdb/cloud-dedicated/reference/syntax/line-protocol/#unix-timestamp) + associated with the data. InfluxDB supports up to nanosecond precision. + _If the precision of the timestamp is not in nanoseconds, you must specify the + precision when writing the data to InfluxDB._ + +#### Line protocol element parsing + +- **measurement**: Everything before the _first unescaped comma before the first whitespace_. +- **tag set**: Key-value pairs between the _first unescaped comma_ and the _first unescaped whitespace_. +- **field set**: Key-value pairs between the _first and second unescaped whitespaces_. +- **timestamp**: Integer value after the _second unescaped whitespace_. +- Lines are separated by the newline character (`\n`). + Line protocol is whitespace sensitive. + +--- + +{{< influxdb/line-protocol >}} + +--- + +_For schema design recommendations, see [InfluxDB schema design](/influxdb/cloud-iox/write-data/best-practices/schema-design/)._ + +## Construct line protocol + +With a basic understanding of line protocol, you can now construct line protocol +and write data to InfluxDB. +Consider a use case where you collect data from sensors in your home. +Each sensor collects temperature, humidity, and carbon monoxide readings. +To collect this data, use the following schema: + +- **measurement**: `home` + - **tags** + - `room`: Living Room or Kitchen + - **fields** + - `temp`: temperature in °C (float) + - `hum`: percent humidity (float) + - `co`: carbon monoxide in parts per million (integer) + - **timestamp**: Unix timestamp in _second_ precision + +Data is collected hourly beginning at +{{% influxdb/custom-timestamps-span %}}**2022-01-01T08:00:00Z (UTC)** until **2022-01-01T20:00:00Z (UTC)**{{% /influxdb/custom-timestamps-span %}}. +The resulting line protocol would look something like the following: + +{{% influxdb/custom-timestamps %}} + +##### Home sensor data line protocol + +```sh +home,room=Living\ Room temp=21.1,hum=35.9,co=0i 1641024000 +home,room=Kitchen temp=21.0,hum=35.9,co=0i 1641024000 +home,room=Living\ Room temp=21.4,hum=35.9,co=0i 1641027600 +home,room=Kitchen temp=23.0,hum=36.2,co=0i 1641027600 +home,room=Living\ Room temp=21.8,hum=36.0,co=0i 1641031200 +home,room=Kitchen temp=22.7,hum=36.1,co=0i 1641031200 +home,room=Living\ Room temp=22.2,hum=36.0,co=0i 1641034800 +home,room=Kitchen temp=22.4,hum=36.0,co=0i 1641034800 +home,room=Living\ Room temp=22.2,hum=35.9,co=0i 1641038400 +home,room=Kitchen temp=22.5,hum=36.0,co=0i 1641038400 +home,room=Living\ Room temp=22.4,hum=36.0,co=0i 1641042000 +home,room=Kitchen temp=22.8,hum=36.5,co=1i 1641042000 +home,room=Living\ Room temp=22.3,hum=36.1,co=0i 1641045600 +home,room=Kitchen temp=22.8,hum=36.3,co=1i 1641045600 +home,room=Living\ Room temp=22.3,hum=36.1,co=1i 1641049200 +home,room=Kitchen temp=22.7,hum=36.2,co=3i 1641049200 +home,room=Living\ Room temp=22.4,hum=36.0,co=4i 1641052800 +home,room=Kitchen temp=22.4,hum=36.0,co=7i 1641052800 +home,room=Living\ Room temp=22.6,hum=35.9,co=5i 1641056400 +home,room=Kitchen temp=22.7,hum=36.0,co=9i 1641056400 +home,room=Living\ Room temp=22.8,hum=36.2,co=9i 1641060000 +home,room=Kitchen temp=23.3,hum=36.9,co=18i 1641060000 +home,room=Living\ Room temp=22.5,hum=36.3,co=14i 1641063600 +home,room=Kitchen temp=23.1,hum=36.6,co=22i 1641063600 +home,room=Living\ Room temp=22.2,hum=36.4,co=17i 1641067200 +home,room=Kitchen temp=22.7,hum=36.5,co=26i 1641067200 +``` + +{{% /influxdb/custom-timestamps %}} + +## Write line protocol to InfluxDB + +Use the **InfluxDB v2 HTTP API** or **InfluxDB client libraries** to write the +line protocol above to InfluxDB. +The following examples show how to use the **Python** and **Go** client libraries to write line protocol. + +{{< tabs-wrapper >}} +{{% tabs %}} +[InfluxDB API](#) +[Python](#) +[Go](#) +{{% /tabs %}} + +{{% tab-content %}} + + +To write data to InfluxDB Cloud Dedicated using the InfluxDB v2 HTTP API, send a +request to the InfluxDB API `/api/v2/write` endpoint using the `POST` request method. + +{{< api-endpoint endpoint="https://cluster-id.influxdb.io/api/v2/write" method="post" api-ref="/influxdb/cloud-iox/api/#operation/PostWrite" >}} + +Include the following with your request: + +- **Headers**: + - **Authorization**: Bearer + - **Content-Type**: text/plain; charset=utf-8 + - **Accept**: application/json +- **Query parameters**: + - **bucket**: InfluxDB database name + - **precision**: Timestamp precision (default is `ns`) +- **Request body**: Line protocol as plain text + +{{% note %}} +With the InfluxDB Cloud Dedicated v2 API `/api/v2/write` endpoint, `Authorization: Bearer` and `Authorization: Token` are equivalent and you can use either scheme to pass a database token in your request. For more information about HTTP API token schemes, see how to [authenticate API requests](/influxdb/cloud-dedicated/primers/api/v2/#authenticate-api-requests). +{{% /note %}} + +The following example uses cURL and the InfluxDB v2 API to write line protocol +to InfluxDB Cloud dedicated: + +{{% influxdb/custom-timestamps %}} +```sh +export INFLUX_HOST=https://cluster-id.influxdb.io +export INFLUX_TOKEN=DATABASE_TOKEN + +DATABASE_NAME=get-started + +curl --request POST \ +"$INFLUX_HOST/api/v2/write?bucket=$DATABASE_NAME&precision=s" \ + --header "Authorization: Bearer $INFLUX_TOKEN" \ + --header "Content-Type: text/plain; charset=utf-8" \ + --header "Accept: application/json" \ + --data-binary " +home,room=Living\ Room temp=21.1,hum=35.9,co=0i 1641024000 +home,room=Kitchen temp=21.0,hum=35.9,co=0i 1641024000 +home,room=Living\ Room temp=21.4,hum=35.9,co=0i 1641027600 +home,room=Kitchen temp=23.0,hum=36.2,co=0i 1641027600 +home,room=Living\ Room temp=21.8,hum=36.0,co=0i 1641031200 +home,room=Kitchen temp=22.7,hum=36.1,co=0i 1641031200 +home,room=Living\ Room temp=22.2,hum=36.0,co=0i 1641034800 +home,room=Kitchen temp=22.4,hum=36.0,co=0i 1641034800 +home,room=Living\ Room temp=22.2,hum=35.9,co=0i 1641038400 +home,room=Kitchen temp=22.5,hum=36.0,co=0i 1641038400 +home,room=Living\ Room temp=22.4,hum=36.0,co=0i 1641042000 +home,room=Kitchen temp=22.8,hum=36.5,co=1i 1641042000 +home,room=Living\ Room temp=22.3,hum=36.1,co=0i 1641045600 +home,room=Kitchen temp=22.8,hum=36.3,co=1i 1641045600 +home,room=Living\ Room temp=22.3,hum=36.1,co=1i 1641049200 +home,room=Kitchen temp=22.7,hum=36.2,co=3i 1641049200 +home,room=Living\ Room temp=22.4,hum=36.0,co=4i 1641052800 +home,room=Kitchen temp=22.4,hum=36.0,co=7i 1641052800 +home,room=Living\ Room temp=22.6,hum=35.9,co=5i 1641056400 +home,room=Kitchen temp=22.7,hum=36.0,co=9i 1641056400 +home,room=Living\ Room temp=22.8,hum=36.2,co=9i 1641060000 +home,room=Kitchen temp=23.3,hum=36.9,co=18i 1641060000 +home,room=Living\ Room temp=22.5,hum=36.3,co=14i 1641063600 +home,room=Kitchen temp=23.1,hum=36.6,co=22i 1641063600 +home,room=Living\ Room temp=22.2,hum=36.4,co=17i 1641067200 +home,room=Kitchen temp=22.7,hum=36.5,co=26i 1641067200 +" +``` +{{% /influxdb/custom-timestamps %}} + +{{% /tab-content %}} +{{% tab-content %}} + + +To write data to InfluxDB Cloud Dedicated using Python, use the +[`pyinflux3` module](https://github.com/InfluxCommunity/pyinflux3). +The following steps include setting up a Python virtual environment to scope +dependencies to your current project. + +1. Setup your Python virtual environment. + Inside of your project directory: + + ```sh + python -m venv envs/virtual-env + ``` + +2. Activate the virtual environment. + + ```sh + source ./envs/virtual-env/bin/activate + ``` + +3. Install the following dependencies: + + - `pyarrow` + - `flightsql-dbapi` + - `pyinflux3` + + ```python + pip install pyarrow flightsql-dbapi pyinflux3 + ``` + +4. Build your python script to write the [sample line protocol](#home-sensor-data-line-protocol) + to InfluxDB. _Save the script to a file and run `python SCRIPT_NAME` or run `python` to write and execute the script using the interactive shell._ + + 1. Import the `InfluxDBClient3` object from the `influxdb_client_3` module. + 2. Use the `InfluxDBClient3` constructor to instantiate an InfluxDB Client. + The example below assigns it to the `client` variable. + Provide the following credentials: + + - **host**: InfluxDB Cloud Dedicated cluster URL (without protocol or trailing slash) + - **org**: _Leave as an empty string_ (InfluxDB Cloud Dedicated ignores `org`, but the client requires the parameter) + - **token**: Database token with write access to the target database + - **database**: Database name to write to + + 3. Use the `client.write` method to write the line protocol to the **get-started** + database. Provide the following: + + - **Line protocol** as an array of strings where each element is an individual + line of line protocol. + - **`write_precision` option** to specify the timestamp precision as + seconds (`s`). + +{{% influxdb/custom-timestamps %}} + +```py +from influxdb_client_3 import InfluxDBClient3 + +client = InfluxDBClient3( + host="cluster-id.influxdb.io", + org="", + token="DATABASE_TOKEN", + database="get-started" +) + +client.write([ + "home,room=Living\ Room temp=21.1,hum=35.9,co=0i 1641024000", + "home,room=Kitchen temp=21.0,hum=35.9,co=0i 1641024000", + "home,room=Living\ Room temp=21.4,hum=35.9,co=0i 1641027600", + "home,room=Kitchen temp=23.0,hum=36.2,co=0i 1641027600", + "home,room=Living\ Room temp=21.8,hum=36.0,co=0i 1641031200", + "home,room=Kitchen temp=22.7,hum=36.1,co=0i 1641031200", + "home,room=Living\ Room temp=22.2,hum=36.0,co=0i 1641034800", + "home,room=Kitchen temp=22.4,hum=36.0,co=0i 1641034800", + "home,room=Living\ Room temp=22.2,hum=35.9,co=0i 1641038400", + "home,room=Kitchen temp=22.5,hum=36.0,co=0i 1641038400", + "home,room=Living\ Room temp=22.4,hum=36.0,co=0i 1641042000", + "home,room=Kitchen temp=22.8,hum=36.5,co=1i 1641042000", + "home,room=Living\ Room temp=22.3,hum=36.1,co=0i 1641045600", + "home,room=Kitchen temp=22.8,hum=36.3,co=1i 1641045600", + "home,room=Living\ Room temp=22.3,hum=36.1,co=1i 1641049200", + "home,room=Kitchen temp=22.7,hum=36.2,co=3i 1641049200", + "home,room=Living\ Room temp=22.4,hum=36.0,co=4i 1641052800", + "home,room=Kitchen temp=22.4,hum=36.0,co=7i 1641052800", + "home,room=Living\ Room temp=22.6,hum=35.9,co=5i 1641056400", + "home,room=Kitchen temp=22.7,hum=36.0,co=9i 1641056400", + "home,room=Living\ Room temp=22.8,hum=36.2,co=9i 1641060000", + "home,room=Kitchen temp=23.3,hum=36.9,co=18i 1641060000", + "home,room=Living\ Room temp=22.5,hum=36.3,co=14i 1641063600", + "home,room=Kitchen temp=23.1,hum=36.6,co=22i 1641063600", + "home,room=Living\ Room temp=22.2,hum=36.4,co=17i 1641067200", + "home,room=Kitchen temp=22.7,hum=36.5,co=26i 1641067200"], + write_precision='s' +) +``` + +{{% /influxdb/custom-timestamps %}} + + +{{% /tab-content %}} +{{% tab-content %}} + + +To write data to InfluxDB Cloud Dedicated using Go, use the +[influxdb-client-go module](https://github.com/influxdata/influxdb-client-go). + +1. Create a new go module in your project directory. + + 1. Create a new module directory and navigate into it. + 2. Initialize a new Go module in the current working directory. + 3. Create a `write.go` file. + + ```sh + mkdir influxdb_go_client && cd $_ + go mod init influxdb_go_client + touch write.go + ``` + +2. Inside of `write.go` instantiate an InfluxDB write client to write the + [line protocol above](#home-sensor-data-line-protocol) to InfluxDB. + + 1. Import the following packages + + - `context` + - `fmt` + - `log` + - `os` + - `time` + - `github.com/influxdata/influxdb-client-go/v2` aliased as `influxdb2` + + 2. Create a `dbWrite` function. + 3. In the `dbWrite` function, use `influxdb2.NewClientWithOptions` to + create a `writeClient` that accepts write options. + The write client requires the following credentials: + + - **url**: InfluxDB Cloud Dedicated cluster URL + - **token**: [Database token](/influxdb/cloud-dedicated/admin/tokens/) + with write access to the **get-started** database. + _For security reasons, we recommend setting this as an environment + variable rather than including the raw token string._ + + Because the timestamps in the line protocol are in second + precision, **use `SetPrecision(time.Second)` to define the write precision option**. + + 4. Use `writeClient.WriteAPIBlocking` to define a `writeAPI`. + The write API requires the following credentials: + + - **bucket**: InfluxDB database name. + + 5. Define an array of line protocol strings where each element is a single + line of line protocol. + + 6. Iterate through the array of line protocol and use `writeAPI.WriteRecord` + to write each line of line protocol to InfluxDB. + + 7. Define a `main` function that executes the `dbWrite` function. + +{{% influxdb/custom-timestamps %}} + +```go +package main + +import ( + "context" + "fmt" + "log" + "os" + "time" + + influxdb2 "github.com/influxdata/influxdb-client-go/v2" +) + +func dbWrite(ctx context.Context) error { + // Create write client + url := "https://cluster-id.influxdb.io" + token := os.Getenv("INFLUX_TOKEN") + writeClient := influxdb2.NewClientWithOptions(url, token, influxdb2.DefaultOptions().SetPrecision(time.Second)) + + // Define write API + org := "ignored" + bucket := "DATABASE_NAME" + writeAPI := writeClient.WriteAPIBlocking(org, bucket) + + line := [...]string{ + `home,room=Living\ Room temp=21.1,hum=35.9,co=0i 1641024000`, + `home,room=Kitchen temp=21.0,hum=35.9,co=0i 1641024000`, + `home,room=Living\ Room temp=21.4,hum=35.9,co=0i 1641027600`, + `home,room=Kitchen temp=23.0,hum=36.2,co=0i 1641027600`, + `home,room=Living\ Room temp=21.8,hum=36.0,co=0i 1641031200`, + `home,room=Kitchen temp=22.7,hum=36.1,co=0i 1641031200`, + `home,room=Living\ Room temp=22.2,hum=36.0,co=0i 1641034800`, + `home,room=Kitchen temp=22.4,hum=36.0,co=0i 1641034800`, + `home,room=Living\ Room temp=22.2,hum=35.9,co=0i 1641038400`, + `home,room=Kitchen temp=22.5,hum=36.0,co=0i 1641038400`, + `home,room=Living\ Room temp=22.4,hum=36.0,co=0i 1641042000`, + `home,room=Kitchen temp=22.8,hum=36.5,co=1i 1641042000`, + `home,room=Living\ Room temp=22.3,hum=36.1,co=0i 1641045600`, + `home,room=Kitchen temp=22.8,hum=36.3,co=1i 1641045600`, + `home,room=Living\ Room temp=22.3,hum=36.1,co=1i 1641049200`, + `home,room=Kitchen temp=22.7,hum=36.2,co=3i 1641049200`, + `home,room=Living\ Room temp=22.4,hum=36.0,co=4i 1641052800`, + `home,room=Kitchen temp=22.4,hum=36.0,co=7i 1641052800`, + `home,room=Living\ Room temp=22.6,hum=35.9,co=5i 1641056400`, + `home,room=Kitchen temp=22.7,hum=36.0,co=9i 1641056400`, + `home,room=Living\ Room temp=22.8,hum=36.2,co=9i 1641060000`, + `home,room=Kitchen temp=23.3,hum=36.9,co=18i 1641060000`, + `home,room=Living\ Room temp=22.5,hum=36.3,co=14i 1641063600`, + `home,room=Kitchen temp=23.1,hum=36.6,co=22i 1641063600`, + `home,room=Living\ Room temp=22.2,hum=36.4,co=17i 1641067200`, + `home,room=Kitchen temp=22.7,hum=36.5,co=26i 1641067200`, + } + + for _, lp := range line { + err := writeAPI.WriteRecord(context.Background(), lp) + if err != nil { + log.Fatalf("Error writing line protocol: %v", err) + } + } + + fmt.Println("Data has been written successfully.") + writeClient.Close() + return nil +} + +func main() { + if err := dbWrite(context.Background()); err != nil { + fmt.Fprintf(os.Stderr, "error: %v\n", err) + os.Exit(1) + } +} +``` + +Replace the following: + +- **`DATABASE_NAME`**: your InfluxDB Cloud Dedicated database +- **`DATABASE_TOKEN`**: a [database token](/influxdb/cloud-dedicated/admin/tokens/) with sufficient permissions to the database + +Run the following command to install the necessary packages: + +```sh +go get ./... +``` + +Run `write.go` to write the line protocol to your InfluxDB Cloud Dedicated cluster: + +```sh +go run ./write.go +``` + +{{% /influxdb/custom-timestamps %}} + + +{{% /tab-content %}} +{{< /tabs-wrapper >}} + +{{< expand-wrapper >}} +{{% expand "View the written data" %}} + +{{% influxdb/custom-timestamps %}} +| time | room | co | hum | temp | +| :------------------- | :---------- | --: | ---: | ---: | +| 2022-01-01T08:00:00Z | Kitchen | 0 | 35.9 | 21 | +| 2022-01-01T09:00:00Z | Kitchen | 0 | 36.2 | 23 | +| 2022-01-01T10:00:00Z | Kitchen | 0 | 36.1 | 22.7 | +| 2022-01-01T11:00:00Z | Kitchen | 0 | 36 | 22.4 | +| 2022-01-01T12:00:00Z | Kitchen | 0 | 36 | 22.5 | +| 2022-01-01T13:00:00Z | Kitchen | 1 | 36.5 | 22.8 | +| 2022-01-01T14:00:00Z | Kitchen | 1 | 36.3 | 22.8 | +| 2022-01-01T15:00:00Z | Kitchen | 3 | 36.2 | 22.7 | +| 2022-01-01T16:00:00Z | Kitchen | 7 | 36 | 22.4 | +| 2022-01-01T17:00:00Z | Kitchen | 9 | 36 | 22.7 | +| 2022-01-01T18:00:00Z | Kitchen | 18 | 36.9 | 23.3 | +| 2022-01-01T19:00:00Z | Kitchen | 22 | 36.6 | 23.1 | +| 2022-01-01T20:00:00Z | Kitchen | 26 | 36.5 | 22.7 | +| 2022-01-01T08:00:00Z | Living Room | 0 | 35.9 | 21.1 | +| 2022-01-01T09:00:00Z | Living Room | 0 | 35.9 | 21.4 | +| 2022-01-01T10:00:00Z | Living Room | 0 | 36 | 21.8 | +| 2022-01-01T11:00:00Z | Living Room | 0 | 36 | 22.2 | +| 2022-01-01T12:00:00Z | Living Room | 0 | 35.9 | 22.2 | +| 2022-01-01T13:00:00Z | Living Room | 0 | 36 | 22.4 | +| 2022-01-01T14:00:00Z | Living Room | 0 | 36.1 | 22.3 | +| 2022-01-01T15:00:00Z | Living Room | 1 | 36.1 | 22.3 | +| 2022-01-01T16:00:00Z | Living Room | 4 | 36 | 22.4 | +| 2022-01-01T17:00:00Z | Living Room | 5 | 35.9 | 22.6 | +| 2022-01-01T18:00:00Z | Living Room | 9 | 36.2 | 22.8 | +| 2022-01-01T19:00:00Z | Living Room | 14 | 36.3 | 22.5 | +| 2022-01-01T20:00:00Z | Living Room | 17 | 36.4 | 22.2 | +{{% /influxdb/custom-timestamps %}} + +{{% /expand %}} +{{< /expand-wrapper >}} + +**Congratulations!** You have written data to InfluxDB. +With data now stored in InfluxDB, let's query it. + + + +{{< page-nav prev="/influxdb/cloud-dedicated/get-started/setup/" next="/influxdb/cloud-dedicated/get-started/query/" keepTab=true >}} diff --git a/content/influxdb/cloud-dedicated/primers/_index.md b/content/influxdb/cloud-dedicated/primers/_index.md new file mode 100644 index 000000000..dfdec1beb --- /dev/null +++ b/content/influxdb/cloud-dedicated/primers/_index.md @@ -0,0 +1,12 @@ +--- +title: How existing InfluxDB workloads work +description: > + Learn to use InfluxDB Cloud Dedicated for existing write and query workloads coming from InfluxDB version 1.x. +weight: 3 +menu: + influxdb_cloud_dedicated: + name: Primers +influxdb/cloud-dedicated/tags: [] +--- + +{{% children %}} \ No newline at end of file diff --git a/content/influxdb/cloud-dedicated/primers/api/_index.md b/content/influxdb/cloud-dedicated/primers/api/_index.md new file mode 100644 index 000000000..42247b6d3 --- /dev/null +++ b/content/influxdb/cloud-dedicated/primers/api/_index.md @@ -0,0 +1,23 @@ +--- +title: Learn to use APIs for your workloads +seo_title: Learn to use APIs for your data workloads in InfluxDB Cloud Dedicated +description: > + Choose the API and tools that fit your workload. + Learn how to authenticate, write, and query using Telegraf, client libraries, and HTTP clients. +weight: 3 +menu: + influxdb_cloud_dedicated: + parent: Primers + name: API primers +influxdb/cloud-dedicated/tags: [api] +# related: +# - /influxdb/cloud/api/#tag/Write, InfluxDB API /write endpoint +# - /influxdb/cloud/reference/syntax/line-protocol +# - /influxdb/cloud/reference/syntax/annotated-csv +# - /influxdb/cloud/reference/cli/influx/write +# - /resources/videos/ingest-data/, How to Ingest Data in InfluxDB (Video) +--- + +Choose the {{% cloud-name %}} API and tools that best fit your workload: + +{{< children sort>}} \ No newline at end of file diff --git a/content/influxdb/cloud-dedicated/primers/api/v1/_index.md b/content/influxdb/cloud-dedicated/primers/api/v1/_index.md new file mode 100644 index 000000000..aced46ca6 --- /dev/null +++ b/content/influxdb/cloud-dedicated/primers/api/v1/_index.md @@ -0,0 +1,491 @@ +--- +title: Use the InfluxDB v1 API with InfluxDB Cloud Dedicated +list_title: Use the InfluxDB v1 API +description: > + Use InfluxDB v1 API authentication, endpoints, and tools. + Learn how to use InfluxDB Cloud Dedicated v1 `/query`, `/write`, and username/password authentication when bringing existing 1.x workloads. +weight: 3 +menu: + influxdb_cloud_dedicated: + parent: API primers + name: v1 API primer +influxdb/cloud-dedicated/tags: [write, line protocol] +--- + +Use the InfluxDB v1 API with v1 workloads that you bring to InfluxDB Cloud Dedicated. +InfluxDB Cloud Dedicated v1 `/write` and `/query` endpoints work with username/password authentication and existing InfluxDB 1.x tools and code. +The InfluxDB v1 API `/write` endpoint works with +InfluxDB 1.x client libraries and the [Telegraf v1 Output Plugin](/telegraf/v1.26/plugins/#output-influxdb). +The InfluxDB v1 API `/query` endpoint supports InfluxQL and third-party integrations like [Grafana](https://grafana.com). + +{{% warn %}} +{{% api/cloud/v2-prefer %}} +{{% /warn %}} + + + +- [Authenticate API requests](#authenticate-api-requests) + - [Authenticate with a username and password scheme](#authenticate-with-a-username-and-password-scheme) + - [Basic authentication](#basic-authentication) + - [Syntax](#syntax) + - [Example](#example) + - [Query string authentication](#query-string-authentication) + - [Syntax](#syntax) + - [Example](#example) + - [Authenticate with a token](#authenticate-with-a-token) + - [Syntax](#syntax) + - [Examples](#examples) +- [Write data with the v1 API](#write-data-with-the-v1-api) + - [Write using Telegraf](#write-using-telegraf) + - [Other Telegraf configuration options](#other-telegraf-configuration-options) + - [Write using client libraries](#write-using-client-libraries) + - [Write using HTTP clients](#write-using-http-clients) + - [v1 API /write parameters](#v1-api-write-parameters) + - [Timestamp precision](#timestamp-precision) + - [Use clients for interactive testing](#use-clients-for-interactive-testing) + - [v1 CLI not supported](#v1-cli-not-supported) +- [Query data](#query-data) + - [Query using the v1 API](#query-using-the-v1-api) + - [v1 API /query parameters](#v1-api-query-parameters) + - [Timestamp precision](#timestamp-precision) + - [Query using HTTP clients](#query-using-http-clients) + - [Query using Flight SQL](#query-using-flight-sql) + - [Database management with InfluxQL not supported](#database-management-with-influxql-not-supported) + + + + +## Authenticate API requests + +InfluxDB requires each write request to be authenticated with a +[database token](/influxdb/cloud-dedicated/admin/tokens/). +With the InfluxDB v1 API, you can use database tokens in InfluxDB 1.x username and password +schemes or in the InfluxDB v2 `Authorization: Token` scheme: + +- [Authenticate with a username and password scheme](#authenticate-with-a-username-and-password-scheme) +- [Authenticate with a token](#authenticate-with-a-token) + +### Authenticate with a username and password scheme + +With the InfluxDB v1 API, you can use the InfluxDB 1.x convention of +username and password to authenticate database reads and writes by passing a +[database token](/influxdb/cloud-dedicated/admin/tokens/) +as the `password` credential. +When authenticating requests to the v1 API `/write` and `/query` endpoints, InfluxDB Cloud Dedicated checks that `password` (`p`) is an authorized [database token](/influxdb/cloud-dedicated/admin/tokens/). +InfluxDB Cloud ignores the `username` (`u`) parameter in the request. + +Use one of the following authentication schemes with clients that support Basic authentication or query parameters (that don't support [token authentication](#authenticate-with-a-token)): + +- [Basic authentication](#basic-authentication) +- [Query string authentication](#query-string-authentication) + +#### Basic authentication + +Use the `Authorization` header with the `Basic` scheme to authenticate v1 API `/write` and `/query` requests. +When authenticating requests, InfluxDB Cloud Dedicated checks that the `password` part of the decoded credential is an authorized [database token](/influxdb/cloud-dedicated/admin/tokens/). +InfluxDB Cloud Dedicated ignores the `username` part of the decoded credential. + +##### Syntax + +```http +Authorization: Basic +``` + +Replace the following: + +- **`[USERNAME]`**: an optional string value (ignored by InfluxDB Cloud Dedicated). +- **`DATABASE_TOKEN`**: a [database token](/influxdb/cloud-dedicated/admin/tokens/). +- Encode the `[USERNAME]:DATABASE_TOKEN` credential using base64 encoding, and then append the encoded string to the `Authorization: Basic` header. + +{{% api/v1-compat/basic-auth-syntax %}} + +##### Example + +The following example shows how to use cURL with the `Basic` authentication scheme and a [database token](/influxdb/cloud-dedicated/admin/tokens/): + +```sh +{{% get-shared-text "api/cloud-dedicated/basic-auth.sh" %}} +``` + +Replace the following: + +- **`DATABASE_NAME`**: your InfluxDB Cloud Dedicated database +- **`DATABASE_TOKEN`**: a [database token](/influxdb/cloud-dedicated/admin/tokens/) with sufficient permissions to the database + +#### Query string authentication + +In the URL, pass the `p` query parameter to authenticate `/write` and `/query` requests. +When authenticating requests, InfluxDB Cloud Dedicated checks that `p` (_password_) is an authorized database token and ignores the `u` (_username_) parameter. + +##### Syntax + +```sh +https://cluster-id.influxdb.io/query/?[u=any]&p=DATABASE_TOKEN +https://cluster-id.influxdb.io/write/?[u=any]&p=DATABASE_TOKEN +``` + +##### Example + +The following example shows how to use cURL with query string authentication and [database token](/influxdb/cloud-dedicated/admin/tokens/). + +```sh +{{% get-shared-text "api/cloud-dedicated/querystring-auth.sh" %}} +``` + +Replace the following: + +- **`DATABASE_NAME`**: your InfluxDB Cloud Dedicated database +- **`DATABASE_TOKEN`**: a [database token](/influxdb/cloud-dedicated/admin/tokens/) with sufficient permissions to the database + +### Authenticate with a token + +Use the `Authorization: Bearer` or the `Authorization: Token` scheme to pass a [database token](/influxdb/cloud-dedicated/admin/tokens/) for authenticating +v1 API `/write` and `/query` requests. +In the InfluxDB Cloud Dedicated HTTP API, the schemes are equivalent. +The `Token` scheme is used in the InfluxDB 2.x API. +The [`Bearer` scheme](https://www.rfc-editor.org/rfc/rfc6750#page-14) is more common. +Support for one or the other may vary across InfluxDB API clients. + +#### Syntax + +```http +Authorization: Bearer DATABASE_TOKEN +``` + +```http +Authorization: Token DATABASE_TOKEN +``` + +#### Examples + +Use `Bearer` to authenticate a write request: + +```sh +{{% get-shared-text "api/cloud-dedicated/bearer-auth-v1-write.sh" %}} +``` + +Use `Token` to authenticate a write request: + +```sh +{{% get-shared-text "api/cloud-dedicated/token-auth-v1-write.sh" %}} +``` + +Replace the following: + +- **`DATABASE_NAME`**: your InfluxDB Cloud Dedicated database +- **`DATABASE_TOKEN`**: a [database token](/influxdb/cloud-dedicated/admin/tokens/) with sufficient permissions to the database + + + +## Write data with the v1 API + +Write data with your existing workloads that already use the InfluxDB v1 API or v1.x-compatibility API. + +See how to set parameters and configure the following tools for writing to InfluxDB Cloud Dedicated: + +- [Write using Telegraf](#write-using-telegraf) +- [Write using client libraries](#write-using-client-libraries) +- [Write using HTTP clients](#write-using-http-clients) + - [v1 API /write parameters](#v1-api-write-parameters) + - [Use clients for interactive testing](#use-clients-for-interactive-testing) + +### Write using Telegraf + +If you have existing v1 workloads that use Telegraf, +you can use the [InfluxDB v1.x `influxdb` Telegraf output plugin](https://github.com/influxdata/telegraf/blob/master/plugins/outputs/influxdb/README.md) to write data. + +{{% warn %}} +Use [Telegraf and the v2 API](/influxdb/cloud-dedicated/primers/api/v2/) for new workloads that don't use already use the v1 API. +{{% /warn %}} + +The following table shows `outputs.influxdb` parameters and values writing +to InfluxDB Cloud Dedicated: + +Parameter | Ignored | Value +-------------------------|--------------------------|--------------------------------------------------------------------------------------------------- +`database` | Honored | Database name +`retention_policy` | Honored, but discouraged | [Duration](/influxdb/cloud-dedicated/reference/glossary/#duration) +`username` | Ignored | String or empty +`password` | Honored | [Database token](/influxdb/cloud-dedicated/admin/tokens/) with permission to write to the database +`content_encoding` | Honored | `gzip` (compressed data) or `identity` (uncompressed) +`skip_database_creation` | Ignored | N/A (see how to [create a database](/influxdb/cloud-dedicated/admin/databases/create/)) + +To configure the v1.x output plugin for writing to InfluxDB Cloud Dedicated, +add the following `outputs.influxdb` configuration in your `telegraf.conf` file: + +```toml +[[outputs.influxdb]] + urls = ["https://cluster-id.influxdb.io"] + database = "DATABASE_NAME" + skip_database_creation = true + retention_policy = "" + username = "ignored" + password = "DATABASE_TOKEN" + content_encoding = "gzip” +``` + +Replace the following: + +- **`DATABASE_NAME`**: your InfluxDB Cloud Dedicated database +- **`DATABASE_TOKEN`**: a [database token](/influxdb/cloud-dedicated/get-started/setup/#create-a-database-token) with permission to write to the database + +#### Other Telegraf configuration options + +`influx_uint_support`: supported in InfluxDB IOx. + +For more plugin options, see [`influxdb`](https://github.com/influxdata/telegraf/blob/master/plugins/outputs/influxdb/README.md) on GitHub. + +### Write using client libraries + +Use language-specific [v1 client libraries](/influxdb/v1.8/tools/api_client_libraries/) and your custom code to write data to InfluxDB Cloud Dedicated. +v1 client libraries send data in [line protocol](/influxdb/cloud-dedicated/reference/syntax/line-protocol/) syntax to the v1 API `/write` endpoint. + +The following samples show how to configure **v1** client libraries for writing to InfluxDB Cloud Dedicated: + +{{< code-tabs-wrapper >}} +{{% code-tabs %}} +[Node.js](#nodejs) +[Python](#python) +{{% /code-tabs %}} +{{% code-tab-content %}} + + +Create a v1 API client using the [node-influx](/influxdb/v1.7/tools/api_client_libraries/#javascriptnodejs) JavaScript client library: + +```js +const Influx = require('influx') + +// Instantiate a client for writing to InfluxDB Cloud Dedicated v1 API +const client = new Influx.InfluxDB({ + host: 'cluster-id.influxdb.io', + port: 443, + protocol: 'https' + database: 'DATABASE_NAME', + username: 'ignored', + password: 'DATABASE_TOKEN' +}) +``` + +{{% /code-tab-content %}} +{{% code-tab-content %}} + + +Create a v1 API client using the [influxdb-python](/influxdb/v1.7/tools/api_client_libraries/#python) Python client library: + +```py +from influxdb import InfluxDBClient + +# Instantiate a client for writing to InfluxDB Cloud Dedicated v1 API +client = InfluxDBClient( + host='cluster-id.influxdb.io', + ssl=True, + database='DATABASE_NAME', + username='', + password='DATABASE_TOKEN' + headers={'Content-Type': 'text/plain; charset=utf-8'} + ) +``` + +{{% /code-tab-content %}} +{{< /code-tabs-wrapper >}} + +Replace the following: + +- **`DATABASE_NAME`**: your InfluxDB Cloud Dedicated database +- **`DATABASE_TOKEN`**: a [database token](/influxdb/cloud-dedicated/admin/tokens/) with sufficient permissions to the database + +### Write using HTTP clients + +Use HTTP clients and your custom code to send write requests to the v1 API `/write` endpoint. + +{{% api-endpoint endpoint="https://cluster-id.influxdb.io/write" method="post"%}} + +Include the following in your request: + +- A `db` query string parameter with the name of the database to write to. +- A request body that contains a string of data in [line protocol](/influxdb/cloud-dedicated/reference/syntax/line-protocol/) syntax. +- A [database token](/influxdb/cloud-dedicated/admin/tokens/) in one of the following authentication schemes: [Basic authentication](#basic-authentication), [query string authentication](#query-string-authentication), or [token authentication](#authenticate-with-a-token). +- Optional [parameters](#v1-api-write-parameters). + +#### v1 API /write parameters + +Parameter | Allowed in | Ignored | Value +-----------------------|--------------|--------------------------|--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- +`consistency` | Query string | Ignored | N/A +`db` {{% req " \*" %}} | Query string | Honored | Database name +`precision` | Query string | Honored | [Timestamp precision](#timestamp-precision) +`rp` | Query string | Honored, but discouraged | Retention policy +`u` | Query string | Ignored | For [query string authentication](#query-string-authentication), any arbitrary string +`p` | Query string | Honored | For [query string authentication](#query-string-authentication), a [database token](/influxdb/cloud-dedicated/get-started/setup/#create-a-database-token) with permission to write to the database +`Content-Encoding` | Header | Honored | `gzip` (compressed data) or `identity` (uncompressed) +`Authorization` | Header | Honored | `Bearer DATABASE_TOKEN`, `Token DATABASE_TOKEN`, or `Basic ` + +{{% caption %}}{{% req " \*" %}} = {{% req "Required" %}}{{% /caption %}} + +#### Timestamp precision + +Use one of the following `precision` values in v1 API `/write` requests: + +- `ns`: nanoseconds +- `u`: microseconds +- `ms`: milliseconds +- `s`: seconds +- `m`: minutes +- `h`: hours + +#### Use clients for interactive testing + +To test interactively, use common HTTP clients such as cURL and Postman to send requests to the v1 API `/write` endpoint. + +{{% warn %}} +While the v1 CLI may coincidentally work with InfluxDB Cloud Dedicated, it isn't officially supported. +{{% /warn %}} + +The following example shows how to use the **cURL** command line tool and the InfluxDB Cloud Dedicated v1 API to write line protocol data to a database: + +```sh +curl -i 'https://cluster-id.influxdb.io/write?db=DATABASE_NAME&precision=s' \ + --header 'Authorization: Token DATABASE_TOKEN' \ + --header "Content-type: text/plain; charset=utf-8" + --data-binary 'home,room=kitchen temp=72 1463683075' +``` + +Replace the following: + +- **`DATABASE_NAME`**: your InfluxDB Cloud Dedicated database +- **`DATABASE_TOKEN`**: a [database token](/influxdb/cloud-dedicated/admin/tokens/) with sufficient permissions to the database + +### v1 CLI (not supported) + +Don't use the v1 CLI with {{% cloud-name %}}. +While it may coincidentally work, it isn't officially supported. + +If you need to test writes interactively, see how to [write using HTTP clients](#write-using-http-clients). + +## Query data + +### Query using the v1 API + +Use the v1 API `/query` endpoint and [InfluxQL](/influxdb/cloud-dedicated/reference/glossary/#influxql) with InfluxDB Cloud Dedicated when you +bring InfluxDB 1.x workloads that already use them. + +InfluxDB Cloud Dedicated + +{{% note %}} +For new workloads, see how to [query using Flight SQL](#query-using-flight-sql). +{{% /note %}} + +#### v1 API /query parameters + +Parameter | Allowed in | Ignored | Value +----------|------------|---------|------------------------------------------------------------------------- +`chunked` | | Ignored | N/A _(Note that an unbounded query might return a large amount of data)_ +`db` | Query string | Honored | Database name | +`epoch` | Query string | Honored | [Timestamp precision](#timestamp-precision) | +`p` | Query string | Honored | Database token +`pretty` | Query string | Ignored | N/A +`u` | Query string | Ignored | For [query string authentication](#query-string-authentication), any arbitrary string +`p` | Query string | Honored | For [query string authentication](#query-string-authentication), a [database token](/influxdb/cloud-dedicated/get-started/setup/#create-a-database-token) with permission to write to the database +`rp` | Query string | Honored, but discouraged | Retention policy + +#### Timestamp precision + +Use one of the following values for timestamp precision: + +- `ns`: nanoseconds +- `u`: microseconds +- `ms`: milliseconds +- `s`: seconds +- `m`: minutes +- `h`: hours + +#### Query using HTTP clients + +Use HTTP clients and your custom code to send InfluxQL queries to the v1 API `/query` endpoint. + +{{% api-endpoint endpoint="https://cluster-id.influxdb.io/query" method="get"%}} + +Include the following in your request: + +- A `db` query string parameter with the name of the database to write to. +- A [database token](/influxdb/cloud-dedicated/admin/tokens/) in one of the following authentication schemes: [Basic authentication](#basic-authentication), [query string authentication](#query-string-authentication), or [token authentication](#authenticate-with-a-token). +- A `q` query string parameter with the InfluxQL query. +- Optional [parameters](#v1-api-query-parameters). + +The following examples show how to query using the v1 API `/query` endpoint and InfluxQL: + +{{< code-tabs-wrapper >}} +{{% code-tabs %}} +[cURL](#curl) +[Python](#python) +{{% /code-tabs %}} +{{% code-tab-content %}} + +```sh +{{% get-shared-text "api/cloud-dedicated/bearer-auth-v1-query.sh" %}} +``` + +```sh +{{% get-shared-text "api/cloud-dedicated/token-auth-v1-query.sh" %}} +``` + +{{% /code-tab-content %}} +{{% code-tab-content %}} + +```py +from influxdb import InfluxDBClient +import os + +DATABASE_NAME = os.getenv('CLOUD_DEDICATED_DATABASE_NAME') +DATABASE_TOKEN = os.getenv('CLOUD_DEDICATED_DATABASE_TOKEN') +INFLUXDB_URL=os.getenv('CLOUD_DEDICATED_URL') +INFLUXDB_HOST=os.getenv('CLOUD_DEDICATED_HOST') + +def influxdb_v1_client(headers=None): + client = InfluxDBClient( + host=INFLUXDB_HOST, + port=443, + ssl=True, + database=DATABASE_NAME, + username='USERNAME', + password=DATABASE_TOKEN, + headers=headers + ) + print(vars(client)) + return client + +def query_influxql(): + client = influxdb_v1_client() + response = client.query('SHOW MEASUREMENTS') + print(response) + return response +``` + +{{% /code-tab-content %}} +{{< /code-tabs-wrapper >}} + +The response body contains query results in JSON format. + +### Query using Flight SQL + +Use Flight SQL clients with gRPC and SQL to query data stored in an InfluxDB Cloud Dedicated database. + +### Database management with InfluxQL (not supported) + +InfluxDB Cloud Dedicated doesn't allow InfluxQL commands for managing or modifying databases. +You can't use the following InfluxQL commands: + +```sql +SELECT INTO +CREATE +DELETE +DROP +GRANT +EXPLAIN +REVOKE +ALTER +SET +KILL +``` diff --git a/content/influxdb/cloud-dedicated/primers/api/v2/_index.md b/content/influxdb/cloud-dedicated/primers/api/v2/_index.md new file mode 100644 index 000000000..918d3c08d --- /dev/null +++ b/content/influxdb/cloud-dedicated/primers/api/v2/_index.md @@ -0,0 +1,338 @@ +--- +title: Use the InfluxDB v2 API with InfluxDB Cloud Dedicated +list_title: Use the InfluxDB v2 API +description: > + Use InfluxDB v2 API authentication, endpoints, and tools. + Learn how to use InfluxDB Cloud Dedicated v2 `/api/v2/write` and authentication + for new and existing workloads. +weight: 1 +menu: + influxdb_cloud_dedicated: + parent: API primers + name: v2 API primer +influxdb/cloud-dedicated/tags: [write, line protocol] +--- + +Use the InfluxDB v2 API for new workloads and existing v2 workloads that you bring to InfluxDB Cloud Dedicated. +The InfluxDB Cloud Dedicated v2 `/api/v2/write` endpoint works with token authentication +and existing InfluxDB 2.x tools and code. +For help finding the best workflow for your situation, [contact Support](mailto:support@influxdata.com). + + + + + +- [Authenticate API requests](#authenticate-api-requests) + - [Authenticate with a token](#authenticate-with-a-token) + - [Syntax](#syntax) + - [Examples](#examples) +- [Responses](#responses) + - [Errors](#errors) +- [Write data](#write-data) + - [Write using Telegraf](#write-using-telegraf) + - [Other Telegraf configuration options](#other-telegraf-configuration-options) + - [Write using client libraries](#write-using-client-libraries) + - [Write using HTTP clients](#write-using-http-clients) + - [v2 API /api/v2/write parameters](#v2-api-apiv2write-parameters) + - [Timestamp precision](#timestamp-precision) + - [Use clients for interactive testing](#use-clients-for-interactive-testing) + - [influx CLI not supported](#influx-cli-not-supported) +- [Query data](#query-data) + - [Query using Flight SQL](#query-using-flight-sql) + - [/api/v2/query not supported](#apiv2query-not-supported) + + + +## Authenticate API requests + +InfluxDB requires each write request to be authenticated with a +[database token](/influxdb/cloud-dedicated/admin/tokens/). + +### Authenticate with a token + +Use the `Authorization: Bearer` or the `Authorization: Token` scheme to pass a [database token](/influxdb/cloud-dedicated/admin/tokens/) that has _write_ permission to your database. +In the InfluxDB Cloud Dedicated HTTP API, the schemes are equivalent. +The `Token` scheme is used in the InfluxDB 2.x API. +The [`Bearer` scheme](https://www.rfc-editor.org/rfc/rfc6750#page-14) is more common. +Support for one or the other may vary across InfluxDB API clients. + +#### Syntax + +```http +Authorization: Bearer DATABASE_TOKEN +``` + +```http +Authorization: Token DATABASE_TOKEN +``` + +#### Examples + +Use `Bearer` to authenticate a write request: + +```sh +{{% get-shared-text "api/cloud-dedicated/bearer-auth-v2-write.sh" %}} +``` + +Use `Token` to authenticate a write request: + +```sh +{{% get-shared-text "api/cloud-dedicated/token-auth-v2-write.sh" %}} +``` + +Replace the following: + +- **`DATABASE_NAME`**: your InfluxDB Cloud Dedicated database +- **`DATABASE_TOKEN`**: a [database token](/influxdb/cloud-dedicated/admin/tokens/) with sufficient permissions to the database + +## Responses + +InfluxDB Cloud Dedicated API responses use standard HTTP status codes. +InfluxDB Cloud Dedicated API response body messages may differ from InfluxDB Cloud and InfluxDB OSS. + +### Errors + +```sh +Status code: 400 +Reason: Bad Request +HTTP response body: {"code":"invalid","message":"missing bucket value"} +``` + +The request is missing the `bucket` parameter value. +For `bucket`, provide the database name. + +## Write data + +Use the InfluxDB Cloud Dedicated v2 API `/api/v2/write` endpoint to write data to a database. +We recommend using the v2 API `/api/v2/write` endpoint +for new and existing workloads. + +See how to set parameters and configure the following tools for writing to InfluxDB Cloud Dedicated: + +- [Write using Telegraf](#write-using-telegraf) +- [Write using client libraries](#write-using-client-libraries) +- [Write using HTTP clients](#write-using-http-clients) + - [v2 API /api/v2/write parameters](#v2-api-apiv2write-parameters) + - [Use clients for interactive testing](#use-clients-for-interactive-testing) + +### Write using Telegraf + +Use the [InfluxDB v2.x `influxdb_v2` Telegraf output plugin](https://github.com/influxdata/telegraf/blob/master/plugins/outputs/influxdb_v2/README.md) to write data. + +The following table shows `outputs.influxdb` parameters and values for writing +to InfluxDB Cloud Dedicated: + +Parameter | Ignored | Value +-------------------------|--------------------------|--------------------------------------------------------------------------------------------------------------------------------| +`token` | Honored | [Database token](/influxdb/cloud-dedicated/admin/tokens/) with permission to write to the database | +`organization` | Ignored | | +`bucket` | Honored | Database name | +`content_encoding` | Honored | `gzip` (compressed data) or `identity` (uncompressed) | + +To configure the v2.x output plugin for writing to InfluxDB Cloud Dedicated, +add the following `outputs.influxdb_v2` configuration in your `telegraf.conf` file: + +```toml +[[outputs.influxdb_v2]] + urls = ["https://cluster-id.influxdb.io"] + token = "DATABASE_TOKEN" + organization = "" + bucket = "DATABASE_NAME" + content_encoding = "gzip" + influx_uint_support = false +``` + +Replace the following: + +- **`DATABASE_NAME`**: your InfluxDB Cloud Dedicated database +- **`DATABASE_TOKEN`**: a [database token](/influxdb/cloud-dedicated/admin/tokens/) with permission to write to the database + +#### Other Telegraf configuration options + +`influx_uint_support`: supported in InfluxDB IOx. + +For more plugin options, see [`influxdb_v2`](https://github.com/influxdata/telegraf/blob/master/plugins/outputs/influxdb_v2/README.md) on GitHub. + +### Write using client libraries + +Use language-specific [v2 client libraries](/influxdb/cloud/api-guide/client-libraries/) and your custom code to write data to InfluxDB Cloud Dedicated. +v2 client libraries send data in [line protocol](/influxdb/cloud-dedicated/reference/syntax/line-protocol/) syntax to the v2 API `/api/v2/write` endpoint. + +The following samples show how to configure **v2** client libraries for writing to InfluxDB Cloud Dedicated: + +{{< code-tabs-wrapper >}} +{{% code-tabs %}} +[Node.js](#nodejs) +[Python](#python) +{{% /code-tabs %}} +{{% code-tab-content %}} + + +Create a v2 API client using the [`influxdb-client-js`](https://github.com/influxdata/influxdb-client-js) JavaScript client library: + +1. Call the `InfluxDB({url, token})` constructor to instantiate an `InfluxDB` client. Provide the InfluxDB **URL** and a [database token](/influxdb/cloud-dedicated/admin/tokens/). + + ```js + import {InfluxDB, Point} from '@influxdata/influxdb-client' + + const influxDB = new InfluxDB({'https://cluster-id.influxdb.io', DATABASE_TOKEN}) + ``` + +2. Call the client's [`getWriteApi(org, bucket, precision, writeOptions)` method](https://influxdata.github.io/influxdb-client-js/influxdb-client.influxdb.getwriteapi.html) to instantiate a **write client** for writing data to the `/api/v2/write` endpoint. + + Provide the following parameter values: + + - `org`: an arbitrary string (the parameter is ignored by InfluxDB Cloud Dedicated, but required by the client) + - `bucket`: InfluxDB Cloud Dedicated database + - `precision`: a [timestamp precision](#timestamp-precision) (`ns`, `u`, `ms`, `s`, `m`, `h`) + + ```js + const writeApi = influxDB.getWriteApi('', DATABASE_NAME, 'ns') + ``` + + For more information about **write client** features in the InfluxDB 2.x JavaScript client library, see [`influxdb-client-js`](https://github.com/influxdata/influxdb-client-js) and the [`WriteAPI` interface](https://influxdata.github.io/influxdb-client-js/influxdb-client.writeapi.html) on GitHub. + + +{{% /code-tab-content %}} +{{% code-tab-content %}} + + +Create a v2 API client using the [influxdb-client-python](https://github.com/influxdata/influxdb-client-python) Python client library: + +1. Call the `InfluxDBClient(url, token, org)` constructor to instantiate an `InfluxDBClient`. + + Provide the following parameter values: + + - `url=`: InfluxDB Cloud Dedicated cluster URL + - `token=`: a [database token](/influxdb/cloud-dedicated/admin/tokens/) + - `org`: an arbitrary string (the parameter is ignored by InfluxDB Cloud Dedicated, but required by the client) + + ```py + influxdb_client = InfluxDBClient(url='https://cluster-id.influxdb.io', + token='DATABASE_TOKEN', + org='ignored') + ``` + +2. Call the `InfluxDBClient.write_api(write_options)` method to instantiate a **write client**. + + ```py + write_api = influxdb_client.write_api(write_options=SYNCHRONOUS) + ``` + + 3. To write data, call the `write_api.write()` method. + + Provide the following parameter values: + + - `bucket=`: InfluxDB Cloud Dedicated database + - `record=`: the point data to write + + The following sample constructs a `Data Point`, calls `write()` to add the point to a line protocol batch, + and then calls `write_api.close()` to write the batch: + + ```py + write_api.write(bucket='DATABASE_NAME', record="home,room=kitchen temp=72 1463683075") + write_api.close() + ``` + + For more information about the Python client library for the InfluxDB v2 API, see [`influxdb-client-python`](https://github.com/influxdata/influxdb-client-python) on GitHub. + +{{% /code-tab-content %}} +{{< /code-tabs-wrapper >}} + +Replace the following: + +- **`DATABASE_NAME`**: your InfluxDB Cloud Dedicated database +- **`DATABASE_TOKEN`**: a [database token](/influxdb/cloud-dedicated/admin/tokens/) with sufficient permissions to the database + +### Write using HTTP clients + +Use HTTP clients and your custom code to send write requests to the v2 API `/api/v2/write` endpoint. + +{{% api-endpoint endpoint="https://cluster-id.influxdb.io/api/v2/write" method="post"%}} + +Include the following in your request: + +- A `bucket` query string parameter with the name of the database to write to. +- A request body that contains a string of data in [line protocol](/influxdb/cloud-dedicated/reference/syntax/line-protocol/) syntax. +- A [database token](/influxdb/cloud-dedicated/admin/tokens/) in a [token authentication scheme](#authenticate-with-a-token). +- Optional [parameters](#v2-api-apiv2write-parameters). + +#### v2 API /api/v2/write parameters + +Parameter | Allowed in | Ignored | Value +-----------------|--------------|---------|------------------------- +org | Query string | Ignored | Non-zero-length string (ignored, but can't be empty) +orgID | Query string | Ignored | N/A +bucket {{% req " \*" %}} | Query string | Honored | Database name +precision | Query string | Honored | [Timestamp precision](#timestamp-precision): `ns`, `u`, `ms`, `s`, `m`, `h` +Accept | Header | Honored | User-defined +`Authorization` {{% req " \*" %}} | Header | Honored | `Token DATABASE_TOKEN` +`Content-Encoding` | Header | Honored | `gzip` (compressed data) or `identity` (uncompressed) +Content-Length | Header | Honored | User-defined +Content-Type | Header | Ignored | N/A (only supports line protocol) +Zap-Trace-Span | Header | Ignored | + +{{% caption %}}{{% req " \*" %}} = {{% req "Required" %}}{{% /caption %}} + +#### Timestamp precision + +Use one of the following `precision` values in v2 API `/api/v2/write` requests: + +- `ns`: nanoseconds +- `us`: microseconds +- `ms`: milliseconds +- `s`: seconds +- `m`: minutes +- `h`: hours + +#### Use clients for interactive testing + +To test interactively, use common HTTP clients such as cURL and Postman to send requests to the v2 API `/api/v2/write` endpoint. + +{{% warn %}} +While the `influx` CLI may coincidentally work with InfluxDB Cloud Dedicated, it isn't officially supported. +{{% /warn %}} + +The following example shows how to use the **cURL** command line tool and the InfluxDB Cloud Dedicated v2 API to write line protocol data to a database: + +```sh +curl --request POST \ +"https://cluster-id.influxdb.io/api/v2/write?bucket=DATABASE_NAME&precision=ns" \ + --header "Authorization: Token DATABASE_TOKEN" \ + --header "Content-Type: text/plain; charset=utf-8" \ + --header "Accept: application/json" \ + --data-binary ' + airSensors,sensor_id=TLM0201 temperature=73.97038159354763,humidity=35.23103248356096,co=0.48445310567793615 1630424257000000000 + airSensors,sensor_id=TLM0202 temperature=75.30007505999716,humidity=35.651929918691714,co=0.5141876544505826 1630424257000000000' +``` + +Replace the following: + +- **`DATABASE_NAME`**: your InfluxDB Cloud Dedicated database +- **`DATABASE_TOKEN`**: a [database token](/influxdb/cloud-dedicated/admin/tokens/) with sufficient permissions to the database + +### influx CLI not supported + +Don't use the `influx` CLI with {{% cloud-name %}}. +While it may coincidentally work, it isn't officially supported. + +If you need to test writes interactively, see how to [write using HTTP clients](#write-using-http-clients). + +## Query data + +Use Flight SQL clients with gRPC and SQL to query data stored in an InfluxDB Cloud Dedicated database. + +### Query using Flight SQL + +Choose from the following tools to query InfluxDB Cloud Dedicated: + +- [Flight SQL plugin]() for [Grafana]() +- [Superset]() +- [`pyinflux3` module](https://github.com/InfluxCommunity/pyinflux3) +- [`flightsql-dbapi`](https://github.com/influxdata/flightsql-dbapi) + +See how to [get started querying with SQL](/influxdb/cloud-dedicated/get-started/query/#sql-query-basics) + +### /api/v2/query not supported + +The `/api/v2/query` and associated tooling aren't supported in InfluxDB Cloud Dedicated. See how to [query using Flight SQL](#query-using-flight-sql). diff --git a/content/influxdb/cloud-iox/query-data/_index.md b/content/influxdb/cloud-dedicated/query-data/_index.md similarity index 86% rename from content/influxdb/cloud-iox/query-data/_index.md rename to content/influxdb/cloud-dedicated/query-data/_index.md index e776d71c4..7f0767595 100644 --- a/content/influxdb/cloud-iox/query-data/_index.md +++ b/content/influxdb/cloud-dedicated/query-data/_index.md @@ -5,10 +5,10 @@ description: > Learn to query data stored in InfluxDB using SQL, InfluxQL, and Flux using tools like the InfluxDB user interface and the 'influx' command line interface. menu: - influxdb_cloud_iox: + influxdb_cloud_dedicated: name: Query data weight: 4 -influxdb/cloud-iox/tags: [query, flux] +influxdb/cloud-dedicated/tags: [query, flux] --- Learn to query data stored in InfluxDB. diff --git a/content/influxdb/cloud-iox/query-data/execute-queries/_index.md b/content/influxdb/cloud-dedicated/query-data/execute-queries/_index.md similarity index 62% rename from content/influxdb/cloud-iox/query-data/execute-queries/_index.md rename to content/influxdb/cloud-dedicated/query-data/execute-queries/_index.md index 3ae23e8d3..1ca675a40 100644 --- a/content/influxdb/cloud-iox/query-data/execute-queries/_index.md +++ b/content/influxdb/cloud-dedicated/query-data/execute-queries/_index.md @@ -1,13 +1,13 @@ --- title: Execute queries -seotitle: Execute queries for data stored in an InfluxDB bucket powered by IOx -description: Use tools and libraries to query data stored in an InfluxDB bucket powered by IOx. +seotitle: Execute queries for data stored in an InfluxDB database +description: Use tools and libraries to query data stored in an InfluxDB database. weight: 103 menu: - influxdb_cloud_iox: + influxdb_cloud_dedicated: name: Execute queries parent: Query data -influxdb/cloud-iox/tags: [query] +influxdb/cloud-dedicated/tags: [query] --- There are multiple ways to execute queries with InfluxDB. Choose from the following options: diff --git a/content/influxdb/cloud-iox/query-data/execute-queries/flight-sql/_index.md b/content/influxdb/cloud-dedicated/query-data/execute-queries/flight-sql/_index.md similarity index 80% rename from content/influxdb/cloud-iox/query-data/execute-queries/flight-sql/_index.md rename to content/influxdb/cloud-dedicated/query-data/execute-queries/flight-sql/_index.md index 26e6695ce..1e53a6512 100644 --- a/content/influxdb/cloud-iox/query-data/execute-queries/flight-sql/_index.md +++ b/content/influxdb/cloud-dedicated/query-data/execute-queries/flight-sql/_index.md @@ -5,20 +5,20 @@ description: > Query your data using Apache Arrow Flight SQL protocol and clients. weight: 201 menu: - influxdb_cloud_iox: + influxdb_cloud_dedicated: name: Query with Flight SQL parent: Execute queries -influxdb/cloud-iox/tags: [query, flightsql] +influxdb/cloud-dedicated/tags: [query, flightsql] --- Use [Apache Arrow Flight SQL](https://arrow.apache.org/) to query data -stored in an InfluxDB bucket powered by InfluxDB IOx. +stored in an InfluxDB database. > Arrow Flight SQL is a protocol for interacting with SQL databases using the [Arrow in-memory format](https://arrow.apache.org/docs/format/Columnar.html) and the [Flight RPC](https://arrow.apache.org/docs/format/Flight.html) framework. > > {{% caption %}}[Apache Arrow Flight SQL documentation](https://arrow.apache.org/docs/format/FlightSql.html){{% /caption %}} -Data platforms and clients that support the Flight SQL protocol can query data stored in an InfluxDB bucket powered by IOx. +Data platforms and clients that support the Flight SQL protocol can query data stored in an InfluxDB database. Learn how to connect to InfluxDB and query your data using the following tools: {{< children >}} \ No newline at end of file diff --git a/content/influxdb/cloud-dedicated/query-data/execute-queries/flight-sql/python.md b/content/influxdb/cloud-dedicated/query-data/execute-queries/flight-sql/python.md new file mode 100644 index 000000000..aac69db72 --- /dev/null +++ b/content/influxdb/cloud-dedicated/query-data/execute-queries/flight-sql/python.md @@ -0,0 +1,302 @@ +--- +title: Use Python and the Flight SQL library to query data +description: > + Use Python and the `flightsql-dbapi` Flight SQL library to query data + stored in InfluxDB. +weight: 101 +menu: + influxdb_cloud_dedicated: + parent: Query with Flight SQL + name: Use Python + identifier: query_with_python +influxdb/cloud-dedicated/tags: [query, flightsql, python] +related: + - /influxdb/cloud-dedicated/query-data/tools/pandas/ + - /influxdb/cloud-dedicated/query-data/tools/pyarrow/ + - /influxdb/cloud-dedicated/query-data/sql/ +list_code_example: | + ```py + from flightsql import FlightSQLClient + + client = FlightSQLClient(host='cluster-id.influxdb.io', + token='INFLUX_READ_WRITE_TOKEN', + metadata={'iox-namespace-name': 'INFLUX_DATABASE'}, + features={'metadata-reflection': 'true'}) + + info = client.execute("SELECT * FROM home") + + ticket = info.endpoints[0].ticket + + reader = client.do_get(ticket) + ``` +--- + +Use Python and the Flight SQL library to query data stored in InfluxDB. + +- [Get started using Python to query InfluxDB](#get-started-using-python-to-query-influxdb) +- [Create a Python virtual environment](#create-a-python-virtual-environment) + - [Install Python](#install-python) + - [Create a project virtual environment](#venv-install) + - [Install Anaconda](#conda-install) +- [Query InfluxDB using Flight SQL](#query-influxdb-using-flight-sql) + - [Install the Flight SQL Python Library](#install-the-flight-sql-python-library) + - [Create a query client](#create-a-query-client) + - [Execute a query](#execute-a-query) + - [Retrieve data for Flight SQL query results](#retrieve-data-for-flight-sql-query-results) + +## Get started using Python to query InfluxDB + +This guide follows the recommended practice of using Python _virtual environments_. +If you don't want to use virtual environments and you have Python installed, +continue to [Query InfluxDB using Flight SQL](#query-influxdb-using-flight-sql). + +## Create a Python virtual environment + +Python [virtual environments](https://docs.python.org/3/library/venv.html) keep +the Python interpreter and dependencies for your project self-contained and isolated from other projects. + +To install Python and create a virtual environment, choose one of the following options: + +- [Python venv](?t=venv#venv-install): The [`venv` module](https://docs.python.org/3/library/venv.html) comes standard in Python as of version 3.5. +- [Anaconda® Distribution](?t=Anaconda#conda-install): A Python/R data science distribution that provides Python and the **conda** package and environment manager. + + {{< tabs-wrapper >}} +{{% tabs "small" %}} +[venv]() +[Anaconda]() +{{% /tabs %}} +{{% tab-content %}} + + +### Install Python + +1. Follow the [Python installation instructions](https://wiki.python.org/moin/BeginnersGuide/Download) +to install a recent version of the Python programming language for your system. +2. Check that you can run `python` and `pip` commands. +`pip` is a package manager included in most Python distributions. + + In your terminal, enter the following commands: + + ```sh + python --version + ``` + + ```sh + pip --version + ``` + + Depending on your system, you may need to use version-specific commands--for example. + + ```sh + python3 --version + ``` + + ```sh + pip3 --version + ``` + + If neither `pip` nor `pip` works, follow one of the [Pypa.io Pip installation](https://pip.pypa.io/en/stable/installation/) methods for your system. + +### Create a project virtual environment {#venv-install} + +1. Create a directory for your Python project and change to the new directory--for example: + + ```sh + mkdir ./PROJECT_DIRECTORY && cd $_ + ``` + +2. Use the Python `venv` module to create a virtual environment--for example: + + ```sh + python -m venv envs/virtualenv-1 + ``` + + `venv` creates the new virtual environment directory in your project. + +3. To activate the new virtual environment in your terminal, run the `source` command and pass the file path of the virtual environment `activate` script: + + ```sh + source envs/VIRTUAL_ENVIRONMENT_NAME/bin/activate + ``` + + For example: + + ```sh + source envs/virtualenv-1/bin/activate + ``` + +{{% /tab-content %}} +{{% tab-content %}} + + +### Install Anaconda {#conda-install} + +1. Follow the [Anaconda installation instructions](https://docs.continuum.io/anaconda/install/) for your system. +2. Check that you can run the `conda` command: + + ```sh + conda + ``` + +3. Use `conda` to create a virtual environment--for example: + + ```sh + conda create --prefix envs/virtualenv-1 + ``` + + `conda` creates a virtual environment in a directory named `./envs/virtualenv-1`. + +4. To activate the new virtual environment, use the `conda activate` command and pass the directory path of the virtual environment: + + ```sh + conda activate envs/VIRTUAL_ENVIRONMENT_NAME + ``` + + For example: + + ```sh + conda activate ./envs/virtualenv-1 + ``` + + +{{% /tab-content %}} + {{< /tabs-wrapper >}} + +When a virtual environment is activated, the name displays at the beginning of your terminal command line--for example: + +{{% code-callout "(virtualenv-1)"%}} +```sh +(virtualenv-1) $ PROJECT_DIRECTORY +``` +{{% /code-callout %}} + +## Query InfluxDB using Flight SQL + +1. [Install the Flight SQL Python Library](#install-the-flight-sql-python-library) +2. [Create a query client](#create-a-query-client) +3. [Execute a query](#execute-a-query) + +### Install the Flight SQL Python Library + +The [`flightsql-dbapi`](https://github.com/influxdata/flightsql-dbapi) Flight SQL library for Python provides a +[DB API 2](https://peps.python.org/pep-0249/) interface and +[SQLAlchemy](https://www.sqlalchemy.org/) dialect for +[Flight SQL](https://arrow.apache.org/docs/format/FlightSql.html). +Installing `flightsql-dbapi` also installs the [`pyarrow`](https://arrow.apache.org/docs/python/index.html) library that you'll use for working with Arrow data. + +In your terminal, use `pip` to install `flightsql-dbapi`: + +```sh +pip install flightsql-dbapi +``` + +With `flightsql-dbapi` and `pyarrow` installed, you're ready to query and analyze data stored in an InfluxDB database. + +### Create a query client + +The following example shows how to use Python with `flightsql-dbapi` +and the _DB API 2_ interface to instantiate a Flight SQL client configured for an InfluxDB database. + +1. In your editor, copy and paste the following sample code to a new file--for example, `query-example.py`: + + ```py + # query-example.py + + from flightsql import FlightSQLClient + + # Instantiate a FlightSQLClient configured for your database + client = FlightSQLClient(host='cluster-id.influxdb.io', + token='INFLUX_READ_WRITE_TOKEN', + metadata={'iox-namespace-name': 'INFLUX_DATABASE'}, + features={'metadata-reflection': 'true'}) + ``` + +2. Replace the following configuration values: + + - **`INFLUX_READ_WRITE_TOKEN`**: Your InfluxDB token with read permissions on the databases you want to query. + - **`INFLUX_DATABASE`**: The name of your InfluxDB database. + +### Execute a query + +To execute an SQL query, call the query client's `execute(query)` method and pass the query as a string. + +#### Syntax {#execute-query-syntax} + +```py +execute(query: str, call_options: Optional[FlightSQLCallOptions] = None) +``` + +#### Example {#execute-query-example} + +```py +# query-example.py + +from flightsql import FlightSQLClient + +client = FlightSQLClient(host='cluster-id.influxdb.io', + token='INFLUX_READ_WRITE_TOKEN', + metadata={'iox-namespace-name': 'INFLUX_DATABASE'}, + features={'metadata-reflection': 'true'}) + +# Execute the query +info = client.execute("SELECT * FROM home") +``` + +The response contains a `flight.FlightInfo` object that contains metadata and an `endpoints: [...]` list. Each endpoint contains the following: + +- A list of addresses where you can retrieve the data. +- A `ticket` value that identifies the data to retrieve. + +Next, use the ticket to [retrieve data for Flight SQL query results](#retrieve-data-for-flight-sql-query-results) + +### Retrieve data for Flight SQL query results + +To retrieve Arrow data for a query result, call the client's `do_get(ticket)` method. + +#### Syntax {#retrieve-data-syntax} + +```py + do_get(ticket, call_options: Optional[FlightSQLCallOptions] = None) +``` + +#### Example {#retrieve-data-example} + +The following sample shows how to use Python with `flightsql-dbapi` and `pyarrow` to query InfluxDB and retrieve data. + +```py +# query-example.py + +from flightsql import FlightSQLClient + +# Instantiate a FlightSQLClient configured for a database +client = FlightSQLClient(host='cluster-id.influxdb.io', + token='INFLUX_READ_WRITE_TOKEN', + metadata={'iox-namespace-name': 'INFLUX_DATABASE'}, + features={'metadata-reflection': 'true'}) + +# Execute the query to retrieve FlightInfo +info = client.execute("SELECT * FROM home") + +# Extract the token for retrieving data +ticket = info.endpoints[0].ticket + +# Use the ticket to request the Arrow data stream. +# Return a FlightStreamReader for streaming the results. +reader = client.do_get(ticket) + +# Read all data to a pyarrow.Table +table = reader.read_all() +``` + +`do_get(ticket)` returns a [`pyarrow.flight.FlightStreamReader`](https://arrow.apache.org/docs/python/generated/pyarrow.flight.FlightStreamReader.html) for streaming Arrow [record batches](https://arrow.apache.org/docs/python/data.html#record-batches). + +To read data from the stream, call one of the following `FlightStreamReader` methods: + +- `read_all()`: Read all record batches as a [`pyarrow.Table`](https://arrow.apache.org/docs/python/generated/pyarrow.Table.html). +- `read_chunk()`: Read the next RecordBatch and metadata. +- `read_pandas()`: Read all record batches and convert them to a [`pandas.DataFrame`](https://pandas.pydata.org/docs/reference/frame.html). + +Next, learn how to use Python tools to work with time series data: + +- [Use PyArrow](/influxdb/cloud-dedicated/query-data/tools/pyarrow/) +- [Use pandas](/influxdb/cloud-dedicated/query-data/tools/pandas/) diff --git a/content/influxdb/cloud-dedicated/query-data/execute-queries/flight-sql/superset.md b/content/influxdb/cloud-dedicated/query-data/execute-queries/flight-sql/superset.md new file mode 100644 index 000000000..1e59f0bd6 --- /dev/null +++ b/content/influxdb/cloud-dedicated/query-data/execute-queries/flight-sql/superset.md @@ -0,0 +1,258 @@ +--- +title: Use Superset to query data +seotitle: Use Apache Superset to query data stored in InfluxDB Cloud (IOx) +description: > + Install and run [Apache Superset](https://superset.apache.org/) + to query data stored in InfluxDB. +weight: 101 +menu: + influxdb_cloud_dedicated: + parent: Query with Flight SQL + name: Use Superset + identifier: query_with_superset +influxdb/cloud-dedicated/tags: [query, flightsql, superset] +related: + - /influxdb/cloud-dedicated/visualize-data/superset/ +--- + +Use [Apache Superset](https://superset.apache.org/) to query data +stored in an InfluxDB database. + +> Apache Superset is a modern, enterprise-ready business intelligence web application. +> It is fast, lightweight, intuitive, and loaded with options that make it easy for +> users of all skill sets to explore and visualize their data, from simple pie +> charts to highly detailed deck.gl geospatial charts. +> +> {{% cite %}}-- [Apache Superset documentation](https://superset.apache.org/docs/intro){{% /cite %}} + + + +- [Set up Docker for Superset and Flight SQL](#set-up-docker-for-superset-and-flight-sql) + - [Install prerequisites for Superset and Flight SQL](#install-prerequisites-for-superset-and-flight-sql) + - [Set up Docker for Superset](#set-up-docker-for-superset) +- [Start the Superset Docker containers](#start-the-superset-docker-containers) +- [Log in to Superset](#log-in-to-superset) +- [Create a database connection for InfluxDB](#create-a-database-connection-for-influxdb) +- [Query InfluxDB with Superset](#query-influxdb-with-superset) + + + +## Set up Docker for Superset and Flight SQL + +### Install prerequisites for Superset and Flight SQL + +We recommend using **Docker and docker-compose** to run Superset. +To set up Superset to run in Docker containers with Flight SQL, follow these steps: + +{{% warn %}} +**Superset** is not officially supported on Windows. For more information about running Superset with +Windows and Docker, see the +[Superset documentation](https://superset.apache.org/docs/installation/installing-superset-using-docker-compose#1-install-a-docker-engine-and-docker-compose). +{{% /warn %}} + +1. Follow the instructions to download and install Docker and docker-compose for your system: + + - **macOS**: [Install Docker for macOS](https://docs.docker.com/desktop/install/mac-install/) + - **Linux**: [Install Docker for Linux](https://docs.docker.com/desktop/install/linux-install/) + +2. Follow the [Python.org Downloading Python](https://wiki.python.org/moin/BeginnersGuide/Download) instructions for your system. + +3. Once you've installed Python, check that you can run Python and Pip. + Depending on your system, you may need to use the Python version 3 (`python3` and `pip3`) commands. + Enter the following commands into your terminal: + + {{< code-tabs-wrapper >}} +{{% code-tabs %}} +[python](#) +[python3](#) +{{% /code-tabs %}} +{{% code-tab-content %}} +```sh +python --version +``` +```sh +pip --version +``` +{{% /code-tab-content %}} +{{% code-tab-content %}} +```sh +python3 --version +``` +```sh +pip3 --version +``` +{{% /code-tab-content %}} + {{< /code-tabs-wrapper >}} + + If neither `pip` nor `pip3` works, follow one of the [Pypa.io Pip Installation](https://pip.pypa.io/en/stable/installation/) methods for your system. + +3. Use Pip to install the `flightsql-dbapi` library. + + {{< code-tabs-wrapper >}} +{{% code-tabs %}} +[pip](#) +[pip3](#) +{{% /code-tabs %}} +{{% code-tab-content %}} +```sh +pip install flightsql-dbapi +``` +{{% /code-tab-content %}} +{{% code-tab-content %}} +```sh +pip3 install flightsql-dbapi +``` +{{% /code-tab-content %}} + {{< /code-tabs-wrapper >}} + + The `flightsql-dbapi` library for Python provides a + [DB API 2](https://peps.python.org/pep-0249/) interface and + [SQLAlchemy](https://www.sqlalchemy.org/) dialect for + [Flight SQL](https://arrow.apache.org/docs/format/FlightSql.html). + Later, you'll add `flightsql-dbapi` to Superset's Docker configuration. + + {{% warn %}} +The `flightsql-dbapi` library is experimental and under active development. +The APIs it provides could change at any time. + {{% /warn %}} + +4. Use Git to clone the Apache Superset repository: + + ```sh + git clone https://github.com/apache/superset.git + ``` + + The repository contains Superset code and configuration files for running Superset in Docker containers. + +### Set up Docker for Superset + +1. Change to your **superset** repository directory: + + ```sh + cd ./superset + ``` + +2. In your text editor or terminal, create the file `./docker/requirements-local.txt` and append the line `flightsql-dbapi`--for example: + + ```sh + cat <./docker/requirements-local.txt + flightsql-dbapi + EOF + ``` + + The `./docker/requirements-local.txt` file is used to specify additional Python packages that Docker should include for Superset. + For more information about Superset's Docker configuration, see [Getting Started with Superset using Docker](https://github.com/apache/superset/tree/master/docker#readme). +3. Use the `docker-compose pull` command to fetch dependencies for the Docker containers. + + ```sh + docker-compose -f docker-compose-non-dev.yml pull + ``` + + The process might take several seconds to complete. + After it completes, you're ready to [Start the Superset Docker containers](#start-the-superset-docker-containers). + +## Start the Superset Docker containers + +To start the containers and run Superset, enter the `docker-compose up` command and pass the `-f` flag with the setup file name: + +```sh +docker-compose -f docker-compose-non-dev.yml up +``` + +This might take several seconds to complete. + +If successful, the terminal contains output similar to the following: + +```sh +superset_init | Init Step 4/4 [Complete] -- Loading examples +superset_init | +superset_init | +superset_init | ###################################################################### +superset_init | +superset_init exited with code 0 +superset_app | 127.0.0.1 - - [24/Mar/2023:15:14:11 +0000] "GET /health HTTP/1.1" 200 2 "-" "curl/7.74.0" +``` + +With Superset running, you're ready to [log in](#log-in-to-superset) and set up a database connection. + +## Log in to Superset + +1. In a browser, visit [localhost:8088](http://localhost:8088) to log in to the Superset user interface (UI). + If you configured Superset to use a custom domain, navigate to your custom domain. + +2. If this is your first time logging into Superset, use the following username + and password: + + - **Username**: admin + - **Password**: admin + +3. Optional: Create a new admin user with a unique password. + + 1. In the Superset UI, click **Settings** in the top right + and select **List Users**. + 2. Click **{{< icon "plus" >}}** in the top right. + 3. Select the **Admin** role and provide the remaining credentials for the new user. + 4. Click **Save**. + 5. Delete the default **admin** users. + +## Create a database connection for InfluxDB + +1. In the Superset UI, click **Settings** in the top right and select + **Database Connections**. +2. Click **+ Database** in the top right. +3. In the **Connect a Database** window, click on the **Supported Databases** + drop-down menu and select **Other**. + + {{< img-hd src="/img/influxdb/cloud-serverless-superset-connect.png" alt="Configure InfluxDB connection in Superset" />}} + +4. Enter a **Display Name** (for example, _InfluxDB Cloud IOx_) for the database connection. +5. Enter your **SQL Alchemy URI** comprised of the following: + + - **Protocol**: `datafusion+flightsql` + - **Domain**: InfluxDB Cloud dedicated cluster URL + - **Port**: 443 + + **Query parameters** + + - **`?iox-namespace-name`**: URL-encoded InfluxDB [database name](/influxdb/cloud-dedicated/admin/databases/list/) + - **`?token`**: InfluxDB [API token](/influxdb/cloud-dedicated/get-started/setup/) with `READ` access to the specified database + + {{< code-callout "<(domain|port|database-name|token)>" >}} +{{< code-callout "cluster-id\.influxdb\.io|443|example-database|example-token" >}} +```sh +# Syntax +datafusion+flightsql://:?iox-namespace-name=&token= + +# Example +datafusion+flightsql://cluster-id.influxdb.io:443?iox-namespace-name=example-database&token=example-token +``` +{{< /code-callout >}} + {{< /code-callout >}} + +6. Click **Test Connection** to ensure the connection works. +7. Click **Connect** to save the database connection. + +## Query InfluxDB with Superset + +With a connection to InfluxDB {{< current-version >}} established, you can begin +to query and visualize data from InfluxDB. + +1. In the Superset UI, click **SQL ▾** in the top navigation bar and select **SQL Lab**. +2. In the left pane: + + 1. Under **Database**, select your InfluxDB connection. + 2. Under **Schema**, select **iox**. + 3. Under **See table schema**, select the InfluxDB measurement to query. + + The measurement schema appears in the left pane: + + {{< img-hd src="/img/influxdb/cloud-serverless-superset-schema.png" alt="Select your InfluxDB schema in Superset" />}} + +3. Use the **query editor** to write an SQL query that queries data in your + InfluxDB database. +4. Click **Run** to execute the query. + +Query results appear below the query editor. + +With a connection to InfluxDB {{< current-version >}} established and a query +that returns results, you're ready to [visualize data using Superset](/influxdb/cloud-dedicated/visualize-data/superset/). diff --git a/content/influxdb/cloud-iox/query-data/sql/_index.md b/content/influxdb/cloud-dedicated/query-data/sql/_index.md similarity index 73% rename from content/influxdb/cloud-iox/query-data/sql/_index.md rename to content/influxdb/cloud-dedicated/query-data/sql/_index.md index 7ac80c53e..952d4ac31 100644 --- a/content/influxdb/cloud-iox/query-data/sql/_index.md +++ b/content/influxdb/cloud-dedicated/query-data/sql/_index.md @@ -4,11 +4,11 @@ seotitle: Query data with SQL description: > Learn to query data stored in InfluxDB Cloud using SQL. menu: - influxdb_cloud_iox: + influxdb_cloud_dedicated: name: Query with SQL parent: Query data weight: 101 -influxdb/cloud-iox/tags: [query, sql] +influxdb/cloud-dedicated/tags: [query, sql] --- Learn to query data stored in InfluxDB using SQL. diff --git a/content/influxdb/cloud-iox/query-data/sql/aggregate-select.md b/content/influxdb/cloud-dedicated/query-data/sql/aggregate-select.md similarity index 89% rename from content/influxdb/cloud-iox/query-data/sql/aggregate-select.md rename to content/influxdb/cloud-dedicated/query-data/sql/aggregate-select.md index 772f593d8..a934ad88a 100644 --- a/content/influxdb/cloud-iox/query-data/sql/aggregate-select.md +++ b/content/influxdb/cloud-dedicated/query-data/sql/aggregate-select.md @@ -5,15 +5,15 @@ description: > Use aggregate and selector functions to perform aggregate operations on your time series data. menu: - influxdb_cloud_iox: + influxdb_cloud_dedicated: name: Aggregate data parent: Query with SQL identifier: query-sql-aggregate weight: 203 -influxdb/cloud-iox/tags: [query, sql] +influxdb/cloud-dedicated/tags: [query, sql] related: - - /influxdb/cloud-iox/reference/sql/functions/aggregate/ - - /influxdb/cloud-iox/reference/sql/functions/selector/ + - /influxdb/cloud-dedicated/reference/sql/functions/aggregate/ + - /influxdb/cloud-dedicated/reference/sql/functions/selector/ list_code_example: | ##### Aggregate fields by groups ```sql @@ -75,7 +75,7 @@ value of `room`. Use **aggregate functions** to aggregate values in a specified column for each group and return a single row per group containing the aggregate value. -[View aggregate functions](/influxdb/cloud-iox/reference/sql/functions/aggregate/) +[View aggregate functions](/influxdb/cloud-dedicated/reference/sql/functions/aggregate/) ##### Basic aggregate query @@ -88,7 +88,7 @@ SELECT AVG(co) from home Use **selector functions** to "select" a value from a specified column. The available selector functions are designed to work with time series data. -[View selector functions](/influxdb/cloud-iox/reference/sql/functions/selector/) +[View selector functions](/influxdb/cloud-dedicated/reference/sql/functions/selector/) Each selector function returns a Rust _struct_ (similar to a JSON object) representing a single time and value from the specified column in the each group. @@ -138,10 +138,10 @@ GROUP BY room #### Sample data The following examples use the sample data written in the -[Get started writing data guide](/influxdb/cloud-iox/get-started/write/). +[Get started writing data guide](/influxdb/cloud-dedicated/get-started/write/). To run the example queries and return results, -[write the sample data](/influxdb/cloud-iox/get-started/write/#write-line-protocol-to-influxdb) -to your InfluxDB Cloud bucket before running the example queries. +[write the sample data](/influxdb/cloud-dedicated/get-started/write/#write-line-protocol-to-influxdb) +to your InfluxDB Cloud dedicated database before running the example queries. {{% /note %}} ### Perform an ungrouped aggregation @@ -201,7 +201,7 @@ groups: - In your `SELECT` clause: - - Use the [`DATE_BIN` function](/influxdb/cloud-iox/reference/sql/functions/time-and-date/#date_bin) + - Use the [`DATE_BIN` function](/influxdb/cloud-dedicated/reference/sql/functions/time-and-date/#date_bin) to calculate time intervals and output a column that contains the start of the interval nearest to the `time` timestamp in each row--for example, the following clause calculates two-hour intervals starting at `1970-01-01T00:00:00Z` and returns a new `time` column that contains the start of the interval nearest to `home.time`: @@ -216,11 +216,11 @@ groups: {{% influxdb/custom-timestamps-span %}}`2023-03-09T13:00:50.000Z`{{% /influxdb/custom-timestamps-span %}}, the output `time` column contains {{% influxdb/custom-timestamps-span %}}`2023-03-09T12:00:00.000Z`{{% /influxdb/custom-timestamps-span %}}. - - Use [aggregate](/influxdb/cloud-iox/reference/sql/functions/aggregate/) or [selector](/influxdb/cloud-iox/reference/sql/functions/selector/) functions on specified columns. + - Use [aggregate](/influxdb/cloud-dedicated/reference/sql/functions/aggregate/) or [selector](/influxdb/cloud-dedicated/reference/sql/functions/selector/) functions on specified columns. - In your `GROUP BY` clause: - - Use the [`DATE_BIN` function](/influxdb/cloud-iox/reference/sql/functions/time-and-date/#date_bin) with the same parameters used in the `SELECT` clause. + - Use the [`DATE_BIN` function](/influxdb/cloud-dedicated/reference/sql/functions/time-and-date/#date_bin) with the same parameters used in the `SELECT` clause. - Specify other columns (for example, `room`) that are specified in the `SELECT` clause and aren't used in a selector function. ```sql diff --git a/content/influxdb/cloud-dedicated/query-data/sql/basic-query.md b/content/influxdb/cloud-dedicated/query-data/sql/basic-query.md new file mode 100644 index 000000000..73aafc1ec --- /dev/null +++ b/content/influxdb/cloud-dedicated/query-data/sql/basic-query.md @@ -0,0 +1,194 @@ +--- +title: Perform a basic SQL query +seotitle: Perform a basic SQL query in InfluxDB Cloud +description: > + A basic SQL query that queries data from InfluxDB most commonly includes + `SELECT`, `FROM`, and `WHERE` clauses. +menu: + influxdb_cloud_dedicated: + name: Basic query + parent: Query with SQL + identifier: query-sql-basic +weight: 202 +influxdb/cloud-dedicated/tags: [query, sql] +list_code_example: | + ```sql + SELECT temp, room FROM home WHERE time >= now() - INTERVAL '1 day' + ``` +--- + +The InfluxDB SQL implementation is powered by the [Apache Arrow DataFusion](https://arrow.apache.org/datafusion/) +query engine which provides a SQL syntax similar to other relational query languages. + +A basic SQL query that queries data from InfluxDB most commonly includes the +following clauses: + +{{< req type="key" >}} + +- {{< req "\*">}} `SELECT`: Specify fields, tags, and calculations to output from a + measurement or use the wild card alias (`*`) to select all fields and tags + from a measurement. +- {{< req "\*">}} `FROM`: Specify the measurement to query data from. +- `WHERE`: Only return data that meets the specified conditions--for example, falls within + a time range, contains specific tag values, or contains a field value outside a specified range. + +{{% influxdb/custom-timestamps %}} +```sql +SELECT + temp, + hum, + room +FROM home +WHERE + time >= '2022-01-01T08:00:00Z' + AND time <= '2022-01-01T20:00:00Z' +``` +{{% /influxdb/custom-timestamps %}} + +## Basic query examples + +- [Query data within time boundaries](#query-data-within-time-boundaries) +- [Query data without time boundaries](#query-data-without-time-boundaries) +- [Query specific fields and tags](#query-specific-fields-and-tags) +- [Query fields based on tag values](#query-fields-based-on-tag-values) +- [Query points based on field values](#query-points-based-on-field-values) +- [Alias queried fields and tags](#alias-queried-fields-and-tags) + +{{% note %}} +#### Sample data + +The following examples use the sample data written in the +[Get started writing data guide](/influxdb/cloud-dedicated/get-started/write/). +To run the example queries and return results, +[write the sample data](/influxdb/cloud-dedicated/get-started/write/#write-line-protocol-to-influxdb) +to your InfluxDB Cloud dedicated database before running the example queries. +{{% /note %}} + +### Query data within time boundaries + +- Use the `SELECT` clause to specify what tags and fields to return. + To return all tags and fields, use the wildcard alias (`*`). +- Specify the measurement to query in the `FROM` clause. +- Specify time boundaries in the `WHERE` clause. + Include time-based predicates that compare the value of the `time` column to a timestamp. + Use the `AND` logical operator to chain multiple predicates together. + +{{% influxdb/custom-timestamps %}} +```sql +SELECT * +FROM home +WHERE + time >= '2022-01-01T08:00:00Z' + AND time <= '2022-01-01T12:00:00Z' +``` +{{% /influxdb/custom-timestamps %}} + +Query time boundaries can be relative or absolute. + +{{< expand-wrapper >}} +{{% expand "Query with relative time boundaries" %}} + +To query data from relative time boundaries, compare the value of the `time` +column to a timestamp calculated by subtracting an interval from a timestamp. +Use `now()` to return the timestamp for the current time (UTC). + +##### Query all data from the last month + +```sql +SELECT * FROM home WHERE time >= now() - INTERVAL '1 month' +``` + +##### Query one day of data data from a week ago +```sql +SELECT * +FROM home +WHERE + time >= now() - INTERVAL '7 days' + AND time <= now() - INTERVAL '6 days' +``` +{{% /expand %}} + +{{% expand "Query with absolute time boundaries" %}} + +To query data from absolute time boundaries, compare the value of the `time column +to a timestamp literals. +Use the `AND` logical operator to chain together multiple predicates and define +both start and stop boundaries for the query. + +{{% influxdb/custom-timestamps %}} +```sql +SELECT + * +FROM + home +WHERE + time >= '2022-01-01T08:00:00Z' + AND time <= '2022-01-01T20:00:00Z' +``` +{{% /influxdb/custom-timestamps %}} + +{{% /expand %}} +{{< /expand-wrapper >}} + +### Query data without time boundaries + +To query data without time boundaries, do not include any time-based predicates +in your `WHERE` clause. + +{{% warn %}} +Querying data _without time bounds_ can return an unexpected amount of data. +The query may take a long time to complete and results may be truncated. +{{% /warn %}} + +```sql +SELECT * FROM home +``` + +### Query specific fields and tags + +To query specific fields, include them in the `SELECT` clause. +If querying multiple fields or tags, comma-delimit each. +If the field or tag keys include special characters or spaces or are case-sensitive, +wrap the key in _double-quotes_. + +```sql +SELECT time, room, temp, hum FROM home +``` + +### Query fields based on tag values + +- Include the fields you want to query and the tags you want to base conditions + on in the `SELECT` clause. +- Include predicates in the `WHERE` clause that compare the tag identifier to + a string literal. + Use [logical operators](#) to chain multiple predicates together and apply + multiple conditions. + +```sql +SELECT * FROM home WHERE room = 'Kitchen' +``` + +### Query points based on field values + +- Include the fields you want to query in the `SELECT` clause. +- Include predicates in the `WHERE` clause that compare the field identifier to + another value. + Use [logical operators](#) (`AND`, `OR`) to chain multiple predicates together + and apply multiple conditions. + +```sql +SELECT co, time FROM home WHERE co >= 10 OR co <= -10 +``` + +### Alias queried fields and tags + +To alias or rename fields and tags that you query, pass a string literal after +the field or tag identifier in the `SELECT` clause. +You can use the `AS` clause to define the alias, but it isn't necessary. +The following queries are functionally the same: + +```sql +SELECT temp 'temperature', hum 'humidity' FROM home + +SELECT temp AS 'temperature', hum AS 'humidity' FROM home +``` diff --git a/content/influxdb/cloud-iox/query-data/sql/cast-types.md b/content/influxdb/cloud-dedicated/query-data/sql/cast-types.md similarity index 94% rename from content/influxdb/cloud-iox/query-data/sql/cast-types.md rename to content/influxdb/cloud-dedicated/query-data/sql/cast-types.md index 5dcc28218..0514ed9a6 100644 --- a/content/influxdb/cloud-iox/query-data/sql/cast-types.md +++ b/content/influxdb/cloud-dedicated/query-data/sql/cast-types.md @@ -5,14 +5,14 @@ description: > Use the `CAST` function or double-colon `::` casting shorthand syntax to cast a value to a specific type. menu: - influxdb_cloud_iox: + influxdb_cloud_dedicated: name: Cast types parent: Query with SQL identifier: query-sql-cast-types weight: 205 -influxdb/cloud-iox/tags: [query, sql] +influxdb/cloud-dedicated/tags: [query, sql] related: - - /influxdb/cloud-iox/reference/sql/data-types/ + - /influxdb/cloud-dedicated/reference/sql/data-types/ list_code_example: | ```sql -- CAST clause @@ -44,7 +44,7 @@ SELECT 1234.5::BIGINT Casting operations can be performed on a column expression or a literal value. For example, the following query uses the -[get started sample data](/influxdb/cloud-iox/get-started/write/#construct-line-protocol) +[get started sample data](/influxdb/cloud-dedicated/get-started/write/#construct-line-protocol) and: - Casts all values in the `time` column to integers (Unix nanosecond timestamps). @@ -193,7 +193,7 @@ SQL supports casting the following to an integer: - **Unsigned integers**: Returns the signed integer equivalent of the unsigned integer. - **Booleans**: Returns `1` for `true` and `0` for `false`. - **Timestamps**: Returns the equivalent - [nanosecond epoch timestamp](/influxdb/cloud-iox/reference/glossary/#unix-timestamp). + [nanosecond epoch timestamp](/influxdb/cloud-dedicated/reference/glossary/#unix-timestamp). ### Cast to an unsigned integer @@ -224,7 +224,7 @@ SQL supports casting the following to an unsigned integer: - **Integers**: Returns the unsigned integer equivalent of the signed integer. - **Booleans**: Returns `1` for `true` and `0` for `false`. - **Timestamps**: Returns the equivalent - [nanosecond epoch timestamp](/influxdb/cloud-iox/reference/glossary/#unix-timestamp). + [nanosecond epoch timestamp](/influxdb/cloud-dedicated/reference/glossary/#unix-timestamp). --- diff --git a/content/influxdb/cloud-dedicated/query-data/sql/explore-schema.md b/content/influxdb/cloud-dedicated/query-data/sql/explore-schema.md new file mode 100644 index 000000000..b1f805b1a --- /dev/null +++ b/content/influxdb/cloud-dedicated/query-data/sql/explore-schema.md @@ -0,0 +1,77 @@ +--- +title: Explore your schema with SQL +description: > + When working with InfluxDB's implementation of SQL, a **measurement** is + structured as a table, and **time**, **fields**, and **tags** are structured + as columns. +menu: + influxdb_cloud_dedicated: + name: Explore your schema + parent: Query with SQL + identifier: query-sql-schema +weight: 201 +influxdb/cloud-dedicated/tags: [query, sql] +list_code_example: | + ##### List measurements + ```sql + SHOW TABLES + ``` + + ##### List columns in a measurement + ```sql + SHOW COLUMNS IN measurement + ``` +--- + +{{% sql/sql-schema-intro %}} + +## List measurements in a database + +Use `SHOW TABLES` to list measurements in your InfluxDB database. + +```sql +SHOW TABLES +``` + +{{< expand-wrapper >}} +{{% expand "View example output" %}} + +Tables listed with the `table_schema` of `iox` are measurements. +Tables with `system` or `information_schema` table schemas are system tables that +store internal metadata. + +| table_catalog | table_schema | table_name | table_type | +| :------------ | :----------------- | :---------- | ---------: | +| public | iox | home | BASE TABLE | +| public | iox | noaa | BASE TABLE | +| public | system | queries | BASE TABLE | +| public | information_schema | tables | VIEW | +| public | information_schema | views | VIEW | +| public | information_schema | columns | VIEW | +| public | information_schema | df_settings | VIEW | + +{{% /expand %}} +{{< /expand-wrapper >}} + +## List columns in a measurement + +Use the `SHOW COLUMNS` statement to view what columns are in a measurement. +Use the `IN` clause to specify the measurement. + +```sql +SHOW COLUMNS IN home +``` + +{{< expand-wrapper >}} +{{% expand "View example output" %}} + +| table_catalog | table_schema | table_name | column_name | data_type | is_nullable | +| :------------ | :----------- | :--------- | :---------- | :-------------------------- | ----------: | +| public | iox | home | co | Int64 | YES | +| public | iox | home | hum | Float64 | YES | +| public | iox | home | room | Dictionary(Int32, Utf8) | YES | +| public | iox | home | temp | Float64 | YES | +| public | iox | home | time | Timestamp(Nanosecond, None) | NO | + +{{% /expand %}} +{{< /expand-wrapper >}} diff --git a/content/influxdb/cloud-dedicated/query-data/tools/_index.md b/content/influxdb/cloud-dedicated/query-data/tools/_index.md new file mode 100644 index 000000000..6d4d82461 --- /dev/null +++ b/content/influxdb/cloud-dedicated/query-data/tools/_index.md @@ -0,0 +1,16 @@ +--- +title: Use analysis and visualization tools with InfluxDB Cloud (IOx) APIs +description: > + Use popular tools to analyze and visualize time series data stored in an + InfluxDB database. +weight: 201 +menu: + influxdb_cloud_dedicated: + name: Analyze and visualize data + parent: Query data +influxdb/cloud-dedicated/tags: [analysis, visualization, tools] +aliases: + - /influxdb/cloud-dedicated/visualize-data/ +--- + +{{< children >}} diff --git a/content/influxdb/cloud-dedicated/query-data/tools/grafana.md b/content/influxdb/cloud-dedicated/query-data/tools/grafana.md new file mode 100644 index 000000000..1ba031245 --- /dev/null +++ b/content/influxdb/cloud-dedicated/query-data/tools/grafana.md @@ -0,0 +1,248 @@ +--- +title: Use Grafana to query and visualize data +seotitle: Use Grafana to query and visualize data stored in InfluxDB Cloud Dedicated +list_title: Use Grafana +description: > + Install and run [Grafana](https://grafana.com/) to query and visualize data stored in an + InfluxDB database. +weight: 101 +menu: + influxdb_cloud_dedicated: + name: Use Grafana + parent: Analyze and visualize data +influxdb/cloud-dedicated/tags: [query, visualization] +aliases: + - /influxdb/cloud-dedicated/query-data/tools/grafana/ +alt_engine: /influxdb/cloud/tools/grafana/ +--- + +Use [Grafana](https://grafana.com/) to query and visualize data stored in an +InfluxDB Cloud dedicated database. +InfluxDB Cloud Dedicated supports both **SQL** and **InfluxQL** query languages. +Install the [Grafana FlightSQL plugin](https://grafana.com/grafana/plugins/influxdata-flightsql-datasource/) +to query InfluxDB with **SQL** using the Flight SQL protocol. +Use the **InfluxDB** core Grafana plugin to query data with **InfluxQL**. + +> [Grafana] enables you to query, visualize, alert on, and explore your metrics, +> logs, and traces wherever they are stored. +> [Grafana] provides you with tools to turn your time-series database (TSDB) +> data into insightful graphs and visualizations. +> +> {{% caption %}}[Grafana documentation](https://grafana.com/docs/grafana/latest/introduction/){{% /caption %}} + + + +- [Install Grafana or login to Grafana Cloud](#install-grafana-or-login-to-grafana-cloud) +- [Install the FlightSQL plugin](#install-the-flightsql-plugin) +- [Create a datasource](#create-a-datasource) +- [Query InfluxDB with Grafana](#query-influxdb-with-grafana) +- [Build visualizations with Grafana](#build-visualizations-with-grafana) + + + +## Install Grafana or login to Grafana Cloud + +If using the open source version of **Grafana**, follow the +[Grafana installation instructions](https://grafana.com/docs/grafana/latest/setup-grafana/installation/) +to install Grafana for your operating system. +If using **Grafana Cloud**, login to your Grafana Cloud instance. + +## Install the FlightSQL plugin + +If you want to query InfluxDB Cloud Dedicated with **SQL**, install the +[Grafana FlightSQL plugin](https://grafana.com/grafana/plugins/influxdata-flightsql-datasource/). + +{{< tabs-wrapper >}} +{{% tabs %}} +[Local Grafana](#) +[Grafana Cloud](#) +{{% /tabs %}} +{{% tab-content %}} + + +When using the local version of Grafana, you can install the FlightSQL plugin +with the [`grafana-cli` CLI](https://grafana.com/docs/grafana/latest/cli/) or in +the Grafana user interface (UI). + +- [Use grafana-cli](#use-grafana-cli) +- [Use the Grafana UI](#use-the-grafana-ui) + +### Use grafana-cli + +Run the following command to install the FlightSQL plugin: + +```sh +grafana-cli plugins install influxdata-flightsql-datasource +``` + +After installing the plugin, you may need to restart your Grafana server. + +### Use the Grafana UI + +1. In the Grafana UI, navigate to **Configuration** > **Plugins**. +2. Search for and select the **FlightSQL** plugin. +3. Click **Install**. + + +{{% /tab-content %}} +{{% tab-content %}} + + +1. In your Grafana Cloud instance, navigate to **Administration** > **Plugins**. +2. Search for and select the **FlightSQL** plugin. +3. Click **Install via grafana.com** to navigate to the plugin page. +4. On the plugin page, click **Install plugin**. + +After a moment, Grafana Cloud completes the plugin installation in your +Grafana Cloud instance. + + +{{% /tab-content %}} +{{< /tabs-wrapper >}} + +## Create a datasource + +Which datasource you create depends on which query language you want to use to +query InfluxDB Cloud Dedicated: + +- To query with **SQL**, create a **FlightSQL** datasource. +- To query with **InfluxQL**, create an **InfluxDB** datasource. + +{{< tabs-wrapper >}} +{{% tabs %}} +[SQL](#) +[InfluxQL](#) +{{% /tabs %}} +{{% tab-content %}} + + +1. In your Grafana user interface (UI), navigate to **Data Sources**. +2. Click **Add new data source**. +3. Search for and select the **FlightSQL** plugin. +4. Provide a name for your datasource. +5. Add your connection credentials: + + - **Host**: Provide the host and port of your Flight SQL client. + For InfluxDB Cloud Dedicated, this is your cluster URL and port 443: + + ``` + cluster-id.influxdb.io:443 + ``` + + - **AuthType**: Select **token**. + - **Token**: Provide your InfluxDB API token with read access to the + databases you want to query. + - **Require TLS/SSL**: Enable this toggle. + +6. Add connection **MetaData**. + Provide key-value pairs to send to your Flight SQL client. + + InfluxDB Cloud Serverless requires your **database name**: + + - **Key**: `iox-namespace-name` + - **Value**: Database name + +7. Click **Save & test**. + + {{< img-hd src="/img/influxdb/cloud-dedicated-grafana-flightsql-datasource.png" alt="Grafana FlightSQL datasource for InfluxDB Cloud Dedicated" />}} + + If successful, click **Explore** to begin querying InfluxDB with Flight SQL and Grafana. + + +{{% /tab-content %}} +{{% tab-content %}} + + +1. In your Grafana user interface (UI), navigate to **Data Sources**. +2. Click **Add new data source**. +3. Search for and select the **InfluxDB** core plugin. +4. Provide a name for your datasource. +5. Under **Query Language**, select **InfluxQL**. + _InfluxDB Cloud Dedicated does not support Flux._ +6. Under **HTTP**: + + - **URL**: Provide your Influx Cloud Dedicated cluster URL using the HTTPS + protocol: + + ``` + https://cluster-id.influxdb.io + ``` + +7. Under **InfluxDB Details**: + + - **Database**: Provide a default database name to query. + - **User**: Provide an arbitrary string. + _This credential is ingored when querying InfluxDB Cloud Dedicated, but it cannot be empty._ + - **Password**: Provide an InfluxDB [database token](/influxdb/cloud-dedicated/admin/tokens/) + with read access to the databases you want to query. + +7. Click **Save & test**. + + {{< img-hd src="/img/influxdb/cloud-dedicated-grafana-influxdb-datasource.png" alt="Grafana InfluxDB datasource for InfluxDB Cloud Dedicated" />}} + + + +{{% /tab-content %}} +{{< /tabs-wrapper >}} + +## Query InfluxDB with Grafana + +After you [configure and save a FlightSQL or InfluxDB datasource](#create-a-datasource), +use Grafana to build, run, and inspect queries against InfluxDB database. + +{{< tabs-wrapper >}} +{{% tabs %}} +[SQL](#) +[InfluxQL](#) +{{% /tabs %}} +{{% tab-content %}} + + +{{% note %}} +{{% sql/sql-schema-intro %}} +To learn more, see [Query Data](/influxdb/cloud-dedicated/query-data/sql/). +{{% /note %}} + +1. Click **Explore**. +2. In the dropdown, select the **FlightSQL** data source that you want to query. +3. Use the SQL query form to build your query: + - **FROM**: Select the measurement that you want to query. + - **SELECT**: Select one or more fields and tags to return as columns in query results. + In Grafana, you must specify a **time** column in the `SELECT` list. + - **WHERE**: To filter the query results, enter a conditional expression. + - **GROUP BY**: To `GROUP BY` one or more fields or tags, enter them as a comma-delimited list. + If you include an aggregate function in the **SELECT** list, + then you must include one or more of the queried columns in + a `GROUP BY` or `PARTITION BY` clause. + SQL will return the aggregation for each group or partition. +4. Click **Run query** to execute the query. + + +{{% /tab-content %}} +{{% tab-content %}} + + +1. Click **Explore**. +2. In the dropdown, select the **InfluxDB** data source that you want to query. +3. Use the InfluxQL query form to build your query: + - **FROM**: Select the measurement that you want to query. + - **WHERE**: To filter the query results, enter a conditional expression. + - **SELECT**: Select fields to query and an aggregate function to apply to each. + The aggregate function is applied to each time interval defined in the + `GROUP BY` clause. + - **GROUP BY**: By default, Grafana groups data by time to downsample results + and improve query performance. + You can also add other tags to group by. +4. Click **Run query** to execute the query. + + +{{% /tab-content %}} +{{< /tabs-wrapper >}} + +To learn about query management and inspection in Grafana, see the +[Grafana Explore documentation](https://grafana.com/docs/grafana/latest/explore/). + +## Build visualizations with Grafana + +For a comprehensive walk-through of creating visualizations with +Grafana, see the [Grafana documentation](https://grafana.com/docs/grafana/latest/). diff --git a/content/influxdb/cloud-dedicated/query-data/tools/pandas.md b/content/influxdb/cloud-dedicated/query-data/tools/pandas.md new file mode 100644 index 000000000..3fd544a74 --- /dev/null +++ b/content/influxdb/cloud-dedicated/query-data/tools/pandas.md @@ -0,0 +1,200 @@ +--- +title: Use pandas to analyze and visualize data +seotitle: Use Python and pandas to analyze and visualize data +description: > + Use the [pandas](https://pandas.pydata.org/) Python data analysis library + to analyze and visualize data stored in InfluxDB. +weight: 101 +menu: + influxdb_cloud_dedicated: + parent: Analyze and visualize data + name: Use pandas +influxdb/cloud-dedicated/tags: [analysis, pandas, pyarrow, python, visualization] +related: + - /influxdb/cloud-dedicated/query-data/tools/python/ + - /influxdb/cloud-dedicated/query-data/tools/pyarrow/ + - /influxdb/cloud-dedicated/query-data/sql/ +list_code_example: | + ```py + ... + dataframe = reader.read_pandas() + dataframe = dataframe.set_index('time') + + print(dataframe.index) + + resample = dataframe.resample("1H") + + resample['temp'].mean() + ``` +--- + +Use [pandas](https://pandas.pydata.org/), the Python data analysis library, to process, analyze, and visualize data +stored in InfluxDB. + +> **pandas** is an open source, BSD-licensed library providing high-performance, +> easy-to-use data structures and data analysis tools for the Python programming language. +> +> {{% caption %}}[pandas documentation](https://pandas.pydata.org/docs/){{% /caption %}} + + + +- [Install prerequisites](#install-prerequisites) +- [Install pandas](#install-pandas) +- [Use PyArrow to convert query results to pandas](#use-pyarrow-to-convert-query-results-to-pandas) +- [Use pandas to analyze data](#use-pandas-to-analyze-data) + - [View data information and statistics](#view-data-information-and-statistics) + - [Downsample time series](#downsample-time-series) + + + +## Install prerequisites + +The examples in this guide assume using a Python virtual environment and the Flight SQL library for Python. +Installing `flightsql-dbapi` also installs the [`pyarrow`](https://arrow.apache.org/docs/python/index.html) library that provides Python bindings for Apache Arrow. + +For more information, see how to [get started querying InfluxDB with Python and flightsql-dbapi](/influxdb/cloud-dedicated/query-data/execute-queries/flight-sql/python/) + +## Install pandas + +To use pandas, you need to install and import the `pandas` library. + +In your terminal, use `pip` to install `pandas` in your active [Python virtual environment](/influxdb/cloud-dedicated/query-data/execute-queries/flight-sql/python/#venv-install): + +```sh +pip install pandas +``` + +## Use PyArrow to convert query results to pandas + +The following steps use Python, `flightsql-dbapi`, and `pyarrow` to query InfluxDB and stream Arrow data to a pandas `DataFrame`. + +1. In your editor, copy and paste the following code to a new file--for example, `pandas-example.py`: + + ```py + # pandas-example.py + + from flightsql import FlightSQLClient + import pandas + + client = FlightSQLClient(host='cluster-id.influxdb.io', + token='INFLUX_READ_WRITE_TOKEN', + metadata={'iox-namespace-name': 'INFLUX_DATABASE'}, + features={'metadata-reflection': 'true'}) + + info = client.execute("SELECT * FROM home") + + reader = client.do_get(info.endpoints[0].ticket) + + # Read all record batches in the stream to a pandas DataFrame + dataframe = reader.read_pandas() + + dataframe.info() + ``` + +2. Replace the following configuration values: + + - **`INFLUX_READ_WRITE_TOKEN`**: Your InfluxDB token with read permissions on the databases you want to query. + - **`INFLUX_DATABASE`**: The name of your InfluxDB database. + +3. In your terminal, use the Python interpreter to run the file: + + ```sh + python pandas-example.py + ``` + +The `pyarrow.flight.FlightStreamReader` [`read_pandas()`](https://arrow.apache.org/docs/python/generated/pyarrow.flight.FlightStreamReader.html#pyarrow.flight.FlightStreamReader.read_pandas) method: + +- Takes the same options as [`pyarrow.Table.to_pandas()`](https://arrow.apache.org/docs/python/generated/pyarrow.Table.html#pyarrow.Table.to_pandas). +- Reads all Arrow record batches in the stream to a `pyarrow.Table` and then converts the `Table` to a [`pandas.DataFrame`](https://pandas.pydata.org/docs/reference/api/pandas.DataFrame.html#pandas.DataFrame). + +Next, [use pandas to analyze data](#use-pandas-to-analyze-data). + +## Use pandas to analyze data + +- [View data information and statistics](#view-data-information-and-statistics) +- [Downsample time series](#downsample-time-series) + +### View data information and statistics + +The following example uses the DataFrame `info()` and `describe()` +methods to print information about the DataFrame. + +```py +# pandas-example.py + +from flightsql import FlightSQLClient +import pandas + +client = FlightSQLClient(host='cluster-id.influxdb.io', + token='INFLUX_READ_WRITE_TOKEN', + metadata={'iox-namespace-name': 'INFLUX_DATABASE'}, + features={'metadata-reflection': 'true'}) + +info = client.execute("SELECT * FROM home") + +reader = client.do_get(info.endpoints[0].ticket) + +dataframe = reader.read_pandas() + +# Print a summary of the DataFrame to stdout +dataframe.info() + +# Calculate summary statistics for the data +print(dataframe.describe()) +``` + +### Downsample time series + +The pandas library provides extensive features for working with time series data. + +The [`pandas.DataFrame.resample()` method](https://pandas.pydata.org/docs/reference/api/pandas.DataFrame.resample.html) downsamples and upsamples data to time-based groups--for example: + +```py +from flightsql import FlightSQLClient +import pandas + +client = FlightSQLClient(host='cluster-id.influxdb.io', + token='INFLUX_READ_WRITE_TOKEN', + metadata={'iox-namespace-name': 'INFLUX_DATABASE'}, + features={'metadata-reflection': 'true'}) + +info = client.execute("SELECT * FROM home") + +reader = client.do_get(info.endpoints[0].ticket) + +dataframe = reader.read_pandas() + +# Use the `time` column to generate a DatetimeIndex for the DataFrame +dataframe = dataframe.set_index('time') + +# Print information about the index +print(dataframe.index) + +# Downsample data into 1-hour groups based on the DatetimeIndex +resample = dataframe.resample("1H") + +# Print a summary that shows the start time and average temp for each group +print(resample['temp'].mean()) +``` + +{{< expand-wrapper >}} +{{% expand "View example results" %}} +```sh +time +1970-01-01 00:00:00 22.374138 +1970-01-01 01:00:00 NaN +1970-01-01 02:00:00 NaN +1970-01-01 03:00:00 NaN +1970-01-01 04:00:00 NaN + ... +2023-07-16 22:00:00 NaN +2023-07-16 23:00:00 22.600000 +2023-07-17 00:00:00 22.513889 +2023-07-17 01:00:00 22.208333 +2023-07-17 02:00:00 22.300000 +Freq: H, Name: temp, Length: 469323, dtype: float64 +``` +{{% /expand %}} +{{< /expand-wrapper >}} + +For more detail and examples, see the [pandas documentation](https://pandas.pydata.org/docs/index.html). diff --git a/content/influxdb/cloud-dedicated/query-data/tools/pyarrow.md b/content/influxdb/cloud-dedicated/query-data/tools/pyarrow.md new file mode 100644 index 000000000..f227c2fbb --- /dev/null +++ b/content/influxdb/cloud-dedicated/query-data/tools/pyarrow.md @@ -0,0 +1,136 @@ +--- +title: Use the PyArrow library to analyze data +description: > + Use [PyArrow](https://arrow.apache.org/docs/python/) to read and analyze InfluxDB query results. +weight: 101 +menu: + influxdb_cloud_dedicated: + parent: Analyze and visualize data + name: Use PyArrow +influxdb/cloud-dedicated/tags: [analysis, arrow, pyarrow, python] +related: + - /influxdb/cloud-dedicated/query-data/tools/pandas/ + - /influxdb/cloud-dedicated/query-data/tools/pyarrow/ + - /influxdb/cloud-dedicated/query-data/sql/ +list_code_example: | + ```py + ... + table = reader.read_all() + table.group_by('room').aggregate([('temp', 'mean')]) + ``` +--- + +Use [PyArrow](https://arrow.apache.org/docs/python/) to read and analyze query results +from InfluxDB Cloud Dedicated +The PyArrow library provides efficient computation, aggregation, serialization, and conversion of Arrow format data. + +> Apache Arrow is a development platform for in-memory analytics. It contains a set of technologies that enable +> big data systems to store, process and move data fast. +> +> The Arrow Python bindings (also named “PyArrow”) have first-class integration with NumPy, pandas, and built-in Python objects. They are based on the C++ implementation of Arrow. +> {{% caption %}}[PyArrow documentation](https://arrow.apache.org/docs/python/index.html){{% /caption %}} + + + +- [Install prerequisites](#install-prerequisites) +- [Use PyArrow to read query results](#use-pyarrow-to-read-query-results) +- [Use PyArrow to analyze data](#use-pyarrow-to-analyze-data) + - [Group and aggregate data](#group-and-aggregate-data) + + + +## Install prerequisites + +The examples in this guide assume using a Python virtual environment and the Flight SQL library for Python. +For more information, see how to [get started using Python to query InfluxDB](/influxdb/cloud-dedicated/query-data/execute-queries/flight-sql/python/) + +Installing `flightsql-dbapi` also installs the [`pyarrow`](https://arrow.apache.org/docs/python/index.html) library that provides Python bindings for Apache Arrow. + +## Use PyArrow to read query results + +The following example shows how to use Python with `flightsql-dbapi` and `pyarrow` to query InfluxDB and view Arrow data as a PyArrow `Table`. + +1. In your editor, copy and paste the following sample code to a new file--for example, `pyarrow-example.py`: + + ```py + # pyarrow-example.py + + from flightsql import FlightSQLClient + + # Instantiate a FlightSQLClient configured for a database + client = FlightSQLClient(host='cluster-id.influxdb.io', + token='INFLUX_READ_WRITE_TOKEN', + metadata={'iox-namespace-name': 'INFLUX_DATABASE'}, + features={'metadata-reflection': 'true'}) + + # Execute the query to retrieve FlightInfo + info = client.execute('SELECT * FROM home') + + # Use the ticket to request the Arrow data stream. + # Return a FlightStreamReader for streaming the results. + reader = client.do_get(info.endpoints[0].ticket) + + # Read all data to a pyarrow.Table + table = reader.read_all() + + print(table) + ``` + +2. Replace the following configuration values: + + - **`INFLUX_READ_WRITE_TOKEN`**: Your InfluxDB token with read permissions on the databases you want to query. + - **`INFLUX_DATABASE`**: The name of your InfluxDB database. + + +3. In your terminal, use the Python interpreter to run the file: + + ```sh + python pyarrow-example.py + ``` + +The `FlightStreamReader.read_all()` method reads all Arrow record batches in the stream as a [`pyarrow.Table`](https://arrow.apache.org/docs/python/generated/pyarrow.Table.html). + +Next, [use PyArrow to analyze data](#use-pyarrow-to-analyze-data). + +## Use PyArrow to analyze data + +### Group and aggregate data + +With a `pyarrow.Table`, you can use values in a column as _keys_ for grouping. + +The following example shows how to query InfluxDB, group the table data, and then calculate an aggregate value for each group: + +```py +# pyarrow-example.py + +from flightsql import FlightSQLClient + +client = FlightSQLClient(host='cluster-id.influxdb.io', + token='INFLUX_READ_WRITE_TOKEN', + metadata={'iox-namespace-name': 'INFLUX_DATABASE'}, + features={'metadata-reflection': 'true'}) + +info = client.execute('SELECT * FROM home') + +reader = client.do_get(info.endpoints[0].ticket) + +table = reader.read_all() + +# Use PyArrow to aggregate data +print(table.group_by('room').aggregate([('temp', 'mean')])) +``` + +{{< expand-wrapper >}} +{{% expand "View example results" %}} +```arrow +pyarrow.Table +temp_mean: double +room: string +---- +temp_mean: [[22.581987577639747,22.10807453416151]] +room: [["Kitchen","Living Room"]] +``` +{{% /expand %}} +{{< /expand-wrapper >}} + +For more detail and examples, see the [PyArrow documentation](https://arrow.apache.org/docs/python/getstarted.html) and the [Apache Arrow Python Cookbook](https://arrow.apache.org/cookbook/py/data.html). diff --git a/content/influxdb/cloud-dedicated/query-data/tools/superset.md b/content/influxdb/cloud-dedicated/query-data/tools/superset.md new file mode 100644 index 000000000..62cbe3765 --- /dev/null +++ b/content/influxdb/cloud-dedicated/query-data/tools/superset.md @@ -0,0 +1,38 @@ +--- +title: Use Superset to visualize data +seotitle: Use Apache Superset to visualize data stored in InfluxDB +list_title: Superset +description: > + Use [Apache Superset](https://superset.apache.org/) to query and visualize data + stored in an InfluxDB database. +weight: 101 +menu: + influxdb_cloud_dedicated: + parent: Analyze and visualize data + name: Use Superset + identifier: visualize_with_superset +influxdb/cloud-dedicated/tags: [query, visualization] +aliases: + - /influxdb/cloud-dedicated/visualize-data/superset/ +related: + - /influxdb/cloud-dedicated/query-data/execute-queries/flight-sql/superset/ +--- + +Use [Apache Superset](https://superset.apache.org/) to query and visualize data +stored in an InfluxDB database. + +> Apache Superset is a modern, enterprise-ready business intelligence web application. +> It is fast, lightweight, intuitive, and loaded with options that make it easy for +> users of all skill sets to explore and visualize their data, from simple pie +> charts to highly detailed deck.gl geospatial charts. +> +> {{% cite %}}-- [Apache Superset documentation](https://superset.apache.org/docs/intro){{% /cite %}} + +To get started with Superset and InfluxDB, see [Use Superset to query data](/influxdb/cloud-dedicated/query-data/execute-queries/flight-sql/superset/). +## Build visualizations with Superset + +Use Superset to create visualizations and dashboards for InfluxDB IOx queries. +For a comprehensive walk-through of creating visualizations with +Superset, see the [Creating Charts and Dashboards in Superset documentation](https://superset.apache.org/docs/creating-charts-dashboards/creating-your-first-dashboard). + +{{< img-hd src="/img/influxdb/cloud-serverless-superset-dashboard.png" alt="Build InfluxDB dashboards in Apache Superset" />}} diff --git a/content/influxdb/cloud-dedicated/reference/_index.md b/content/influxdb/cloud-dedicated/reference/_index.md new file mode 100644 index 000000000..e7a85d85a --- /dev/null +++ b/content/influxdb/cloud-dedicated/reference/_index.md @@ -0,0 +1,12 @@ +--- +title: InfluxDB Cloud Dedicated reference documentation +description: > + Reference documentation for InfluxDB Cloud Dedicated including updates, + API documentation, tools, syntaxes, and more. +menu: + influxdb_cloud_dedicated: + name: Reference +weight: 20 +--- + +{{< children >}} \ No newline at end of file diff --git a/content/influxdb/cloud-dedicated/reference/cli/_index.md b/content/influxdb/cloud-dedicated/reference/cli/_index.md new file mode 100644 index 000000000..924747c32 --- /dev/null +++ b/content/influxdb/cloud-dedicated/reference/cli/_index.md @@ -0,0 +1,19 @@ +--- +title: Command line tools +seotitle: Command line tools for managing InfluxDB Cloud Dedicated +description: > + InfluxDB provides command line tools designed to manage and work with your + InfluxDB Cloud Dedicated cluster from the command line. +influxdb/cloud-dedicated/tags: [cli] +menu: + influxdb_cloud_dedicated: + parent: Reference + name: CLIs +weight: 104 +--- + +InfluxDB provides command line tools designed to manage and work with your +InfluxDB Cloud Dedicated cluster from the command line. +The following command line interfaces (CLIs) are available: + +{{< children >}} diff --git a/content/influxdb/cloud-dedicated/reference/cli/influxctl/_index.md b/content/influxdb/cloud-dedicated/reference/cli/influxctl/_index.md new file mode 100644 index 000000000..2f07a4b9d --- /dev/null +++ b/content/influxdb/cloud-dedicated/reference/cli/influxctl/_index.md @@ -0,0 +1,92 @@ +--- +title: influxctl +list_title: influxctl +description: > + The `influxctl` command line interface (CLI) performs administrative tasks in + an InfluxDB Cloud Dedicated cluster. +menu: + influxdb_cloud_dedicated: + name: influxctl + parent: CLIs +weight: 101 +influxdb/cloud-dedicated/tags: [cli] +--- + +The `influxctl` command line interface (CLI) performs administrative tasks in +an InfluxDB Cloud Dedicated cluster. + +- [Usage](#usage) +- [Commands](#commands) +- [Flags](#command-flags) +- [Download and install influxctl](#download-and-install-influxctl) +- [Configure connection profiles](#configure-connection-profiles) +- [Authentication](#authentication) + +## Usage + +```sh +influxctl [flags] [command] +``` + +## Commands + +| Command | Description | +| :---------------------------------------------------------------------- | :------------------------------------- | +| [database](/influxdb/cloud-dedicated/reference/cli/influxctl/database/) | Manage InfluxDB databases | +| [token](/influxdb/cloud-dedicated/reference/cli/influxctl/token/) | Manage InfluxDB database tokens | +| [version](/influxdb/cloud-dedicated/reference/cli/influxctl/version/) | Output the current `influxctl` version | +| [help](/influxdb/cloud-dedicated/reference/cli/influxctl/help/) | Output `influxctl` help information | + +## Global flags + +| Flag | Description | +| :---------- | :--------------------------------------------------------- | +| `--debug` | Enable debug logging | +| `--profile` | Specify a connection profile to use (default is `default`) | + +--- + +## Download and install influxctl + +_Contact your InfluxData account representative for information about +downloading and installing the `influxctl` CLI._ + +## Configure connection profiles + +To connect with your InfluxDB Cloud Dedicated cluster, `influxctl` needs the +following credentials: + +- InfluxDB Cloud Dedicated account ID +- InfluxDB Cloud Dedicated cluster ID + +Use the [`influxctl init` command](/influxdb/cloud-dedicated/reference/cli/influxctl/init) +to start an interactive prompt that creates and stores the required credentials +as a **connection profile**. + +```sh +influxctl init +``` + +### Connection profile store location + +The `influxctl` CLI stores connection profiles in a `config.toml` file at a specific +location based on your operating system: + +#### Profile configuration file locations + +| Operating system | Profile configuration filepath | +| :--------------- | :---------------------------------------------------- | +| Linux | `~/.config/influxctl/config.toml` | +| macOS | `~/Library/Application Support/influxctl/config.toml` | +| Windows | `%APPDATA%\influxctl\config.toml` | + +## Authentication + +The `influxctl` CLI uses [Auth0](https://auth0.com/) to authenticate access to +your InfluxDB Cloud Dedicated cluster. +When you issue an `influxctl` command, the CLI checks for an active **Auth0** token. +If none exists, you are directed to login to **Auth0** via a browser using +credentials you should have created when setting up your InfluxDB Cloud +Dedicated cluster. +Auth0 issues a short-lived (1 hour) token that authenticates access to your +InfluxDB Cloud Dedicated cluster. diff --git a/content/influxdb/cloud-dedicated/reference/cli/influxctl/database/_index.md b/content/influxdb/cloud-dedicated/reference/cli/influxctl/database/_index.md new file mode 100644 index 000000000..bfab22f88 --- /dev/null +++ b/content/influxdb/cloud-dedicated/reference/cli/influxctl/database/_index.md @@ -0,0 +1,33 @@ +--- +title: influxctl database +description: > + The `influx database` command and its subcommands manage databases in an + InfluxDB Cloud Dedicated cluster. +menu: + influxdb_cloud_dedicated: + parent: influxctl +weight: 201 +--- + +The `influx database` command and its subcommands manage databases in an +InfluxDB Cloud Dedicated cluster. + +## Usage + +```sh +influxctl database [subcommand] [flags] +``` + +## Subcommands + +| Subcommand | Description | +| :--------------------------------------------------------------------------- | :---------------- | +| [create](/influxdb/cloud-dedicated/reference/cli/influxctl/database/create/) | Create a database | +| [list](/influxdb/cloud-dedicated/reference/cli/influxctl/database/list/) | List databases | +| [delete](/influxdb/cloud-dedicated/reference/cli/influxctl/database/delete/) | Delete a database | + +## Flags + +| Flag | | Description | +| :--- | :------- | :------------------ | +| `-h` | `--help` | Output command help | diff --git a/content/influxdb/cloud-dedicated/reference/cli/influxctl/database/create.md b/content/influxdb/cloud-dedicated/reference/cli/influxctl/database/create.md new file mode 100644 index 000000000..9dc8eac8c --- /dev/null +++ b/content/influxdb/cloud-dedicated/reference/cli/influxctl/database/create.md @@ -0,0 +1,86 @@ +--- +title: influxctl database create +description: > + The `influxctl database create` command creates a new database in an InfluxDB + Cloud Dedicated cluster. +menu: + influxdb_cloud_dedicated: + parent: influxctl database +weight: 301 +--- + +The `influxctl database create` command creates a new database with a specified +retention period in an InfluxDB Cloud Dedicated cluster. + +The retention period defines the maximum age of data retained in the database, +based on the timestamp of the data. +The retention period value is a time duration value made up of a numeric value +plus a duration unit. For example, `30d` means 30 days. +A zero duration retention period is infinite and data will not expire. +The retention period value cannot be negative or contain whitespace. + +{{< flex >}} +{{% flex-content %}} + +##### Valid durations units include + +- **m**: minute +- **h**: hour +- **d**: day +- **w**: week +- **mo**: month +- **y**: year + +{{% /flex-content %}} +{{% flex-content %}} + +##### Example retention period values + +- `0d`: infinite/none +- `3d`: 3 days +- `6w`: 6 weeks +- `1mo`: 1 month (30 days) +- `1y`: 1 year +- `30d30d`: 60 days +- `2.5d`: 60 hours + +{{% /flex-content %}} +{{< /flex >}} + +## Usage + +```sh +influxctl database create [--retention-period 0s] +``` + +## Arguments + +| Argument | Description | +| :---------------- | :--------------------- | +| **DATABASE_NAME** | InfluxDB database name | + +## Flags + +| Flag | | Description | +| :--- | :------------------- | :---------------------------------------------------- | +| `-h` | `--help` | Output command help | +| | `--retention-period` | Database retention period (default is 0s or infinite) | + +## Examples + +- [Create a database with an infinite retention period](#create-a-database-with-an-infinite-retention-period) +- [Create a database with a 30 day retention period](#create-a-database-with-a-30-day-retention-period) + +##### Create a database with an infinite retention period + +```sh +influxctl database create mydb +``` + +##### Create a database with a 30 day retention period + +```sh +influxctl database create \ + --retention-period 30d \ + mydb +``` \ No newline at end of file diff --git a/content/influxdb/cloud-dedicated/reference/cli/influxctl/database/delete.md b/content/influxdb/cloud-dedicated/reference/cli/influxctl/database/delete.md new file mode 100644 index 000000000..856a92100 --- /dev/null +++ b/content/influxdb/cloud-dedicated/reference/cli/influxctl/database/delete.md @@ -0,0 +1,50 @@ +--- +title: influxctl database delete +description: > + The `influxctl database delete` command deletes a database from an InfluxDB + Cloud Dedicated cluster. +menu: + influxdb_cloud_dedicated: + parent: influxctl database +weight: 302 +--- + +The `influxctl database delete` command deletes a database from an InfluxDB +Cloud Dedicated cluster. + +## Usage + +```sh +influxctl database delete +``` + +{{% warn %}} +#### Cannot be undone + +Deleting a database is a destructive action that cannot be undone. + +#### Cannot reuse deleted database names + +After deleting a database, you cannot reuse the name of the deleted database +when creating a new database. +{{% /warn %}} + +## Arguments + +| Argument | Description | +| :---------------- | :----------------------------- | +| **DATABASE_NAME** | Name of the database to delete | + +## Flags + +| Flag | | Description | +| :--- | :------- | :------------------ | +| `-h` | `--help` | Output command help | + +## Examples + +##### Delete a database named "mydb" + +```sh +influxctl database delete mydb +``` \ No newline at end of file diff --git a/content/influxdb/cloud-dedicated/reference/cli/influxctl/database/list.md b/content/influxdb/cloud-dedicated/reference/cli/influxctl/database/list.md new file mode 100644 index 000000000..beaf5384b --- /dev/null +++ b/content/influxdb/cloud-dedicated/reference/cli/influxctl/database/list.md @@ -0,0 +1,26 @@ +--- +title: influxctl database list +description: > + The `influxctl database list` command lists all databases in an InfluxDB Cloud + Dedicated cluster. +menu: + influxdb_cloud_dedicated: + parent: influxctl database +weight: 301 +--- + +The `influxctl database list` command lists all databases in an InfluxDB Cloud +Dedicated cluster. + +## Usage + +```sh +influxctl database list [--format=table|json] +``` + +## Flags + +| Flag | | Description | +| :--- | :--------- | :---------------------------------------------------- | +| | `--format` | Output format (`table` or `json`, default is `table`) | +| `-h` | `--help` | Output command help | diff --git a/content/influxdb/cloud-dedicated/reference/cli/influxctl/help.md b/content/influxdb/cloud-dedicated/reference/cli/influxctl/help.md new file mode 100644 index 000000000..5b3df6570 --- /dev/null +++ b/content/influxdb/cloud-dedicated/reference/cli/influxctl/help.md @@ -0,0 +1,19 @@ +--- +title: influxctl help +description: > + The `influxctl help` command outputs help information for the `influxctl` + command line interface. +menu: + influxdb_cloud_dedicated: + parent: influxctl +weight: 202 +--- + +The `influxctl help` command outputs help information for the `influxctl` +command line interface. + +## Usage + +```sh +influxctl help +``` \ No newline at end of file diff --git a/content/influxdb/cloud-dedicated/reference/cli/influxctl/init.md b/content/influxdb/cloud-dedicated/reference/cli/influxctl/init.md new file mode 100644 index 000000000..95f7fb56b --- /dev/null +++ b/content/influxdb/cloud-dedicated/reference/cli/influxctl/init.md @@ -0,0 +1,25 @@ +--- +title: influxctl init +description: > + The `influxctl init` command starts an interactive prompt to set up a + connection profile. +menu: + influxdb_cloud_dedicated: + parent: influxctl +weight: 202 +--- + +The `influxctl init` command starts an interactive prompt to set up a +[connection profile](/influxdb/cloud-dedicated/reference/cli/influxctl/#configure-connection-profiles). + +Provide the following for each profile: + +- Profile name +- Account ID +- Cluster ID + +## Usage + +```sh +influxctl init +``` diff --git a/content/influxdb/cloud-dedicated/reference/cli/influxctl/token/_index.md b/content/influxdb/cloud-dedicated/reference/cli/influxctl/token/_index.md new file mode 100644 index 000000000..2fb0eab5c --- /dev/null +++ b/content/influxdb/cloud-dedicated/reference/cli/influxctl/token/_index.md @@ -0,0 +1,33 @@ +--- +title: influxctl token +description: > + The `influx token` command and its subcommands manage database tokens in an + InfluxDB Cloud Dedicated cluster. +menu: + influxdb_cloud_dedicated: + parent: influxctl +weight: 201 +--- + +The `influx token` command and its subcommands manage database tokens in an +InfluxDB Cloud Dedicated cluster. + +## Usage + +```sh +influxctl token [subcommand] [flags] +``` + +## Subcommands + +| Subcommand | Description | +| :------------------------------------------------------------------------ | :---------------------- | +| [create](/influxdb/cloud-dedicated/reference/cli/influxctl/token/create/) | Create a database token | +| [list](/influxdb/cloud-dedicated/reference/cli/influxctl/token/list/) | List database tokens | +| [delete](/influxdb/cloud-dedicated/reference/cli/influxctl/token/delete/) | Delete a database token | + +## Flags + +| Flag | | Description | +| :--- | :------- | :------------------ | +| `-h` | `--help` | Output command help | diff --git a/content/influxdb/cloud-dedicated/reference/cli/influxctl/token/create.md b/content/influxdb/cloud-dedicated/reference/cli/influxctl/token/create.md new file mode 100644 index 000000000..71deb91f8 --- /dev/null +++ b/content/influxdb/cloud-dedicated/reference/cli/influxctl/token/create.md @@ -0,0 +1,87 @@ +--- +title: influxctl token create +description: > + The `influxctl token create` command creates a database token with specified + permissions to resources in an InfluxDB Cloud Dedicated cluster. +menu: + influxdb_cloud_dedicated: + parent: influxctl token +weight: 301 +--- + +The `influxctl token create` command creates a database token with specified +permissions to resources in an InfluxDB Cloud Dedicated cluster and outputs +the token string. + +{{% note %}} +#### Store secure tokens in a secret store + +Token strings are returned _only_ on token creation. +We recommend storing database tokens in a secure secret store. +{{% /note %}} + +## Usage + +```sh +influxctl token create \ + [--read-database=] \ + [--write-database=] \ + +``` + +## Arguments + +| Argument | Description | +| :-------------------- | :------------------------- | +| **TOKEN_DESCRIPTION** | Database token description | + +## Flags + +| Flag | | Description | +| :--- | :----------------- | :------------------------------------ | +| `-h` | `--help` | Output command help | +| | `--read-database` | Grant read permissions to a database | +| | `--write-database` | Grant write permissions to a database | + +## Examples + +- [Create a token with read and write access to a database](#create-a-token-with-read-and-write-access-to-a-database) +- [Create a token with read-only access to a database](#create-a-token-with-read-only-access-to-a-database) +- [Create a token with read-only access to multiple database](#create-a-token-with-read-only-access-to-multiple-database) +- [Create a token with mixed permissions on multiple database](#create-a-token-with-mixed-permissions-on-multiple-database) + +##### Create a token with read and write access to a database + +```sh +influxctl token create \ + --read-database mydb \ + --write-database mydb \ + "Read/write token for mydb" +``` + +##### Create a token with read-only access to a database + +```sh +influxctl token create \ + --read-database mydb \ + "Read-only token for mydb" +``` + +##### Create a token with read-only access to multiple database + +```sh +influxctl token create \ + --read-database mydb1 \ + --read-database mydb2 \ + "Read-only token for mydb1 and mydb2" +``` + +##### Create a token with mixed permissions on multiple database + +```sh +influxctl token create \ + --read-database mydb1 \ + --read-database mydb2 \ + --write-database mydb2 \ + "Read-only on mydb1, Read/write on mydb2" +``` diff --git a/content/influxdb/cloud-dedicated/reference/cli/influxctl/token/delete.md b/content/influxdb/cloud-dedicated/reference/cli/influxctl/token/delete.md new file mode 100644 index 000000000..ff89bef23 --- /dev/null +++ b/content/influxdb/cloud-dedicated/reference/cli/influxctl/token/delete.md @@ -0,0 +1,50 @@ +--- +title: influxctl token delete +description: > + The `influxctl token delete` command deletes a database token from an InfluxDB + Cloud Dedicated cluster and revokes all permissions associated with the token. +menu: + influxdb_cloud_dedicated: + parent: influxctl token +weight: 302 +--- + +The `influxctl token delete` command deletes a database token from an InfluxDB +Cloud Dedicated cluster and revokes all permissions associated with the token. + +## Usage + +```sh +influxctl token delete +``` + +{{% warn %}} +#### Deleting a token is immediate and cannot be undone + +Deleting a database token is a destructive action that takes place immediately +and cannot be undone. + +#### Rotate deleted tokens + +After deleting a database token, any clients using the deleted token need to be +updated with a new database token to continue to interact with your InfluxDB +Cloud Dedicated cluster. +{{% /warn %}} + +## Arguments + +| Argument | Description | +| :----------- | :-------------------------- | +| **TOKEN_ID** | Database token ID to delete | + +## Flags + +| Flag | | Description | +| :--- | :------- | :------------------ | +| `-h` | `--help` | Output command help | + +## Examples + +```sh +influxctl token delete 000xX0Xx00xX +``` diff --git a/content/influxdb/cloud-dedicated/reference/cli/influxctl/token/list.md b/content/influxdb/cloud-dedicated/reference/cli/influxctl/token/list.md new file mode 100644 index 000000000..cdbff6b7d --- /dev/null +++ b/content/influxdb/cloud-dedicated/reference/cli/influxctl/token/list.md @@ -0,0 +1,26 @@ +--- +title: influxctl token list +description: > + The `influxctl token list` command lists all database tokens in an InfluxDB + Cloud Dedicated cluster. +menu: + influxdb_cloud_dedicated: + parent: influxctl token +weight: 301 +--- + +The `influxctl token list` command lists all database tokens in an InfluxDB Cloud +Dedicated cluster. + +## Usage + +```sh +influxctl token list [--format=table|json] +``` + +## Flags + +| Flag | | Description | +| :--- | :--------- | :---------------------------------------------------- | +| | `--format` | Output format (`table` or `json`, default is `table`) | +| `-h` | `--help` | Output command help | diff --git a/content/influxdb/cloud-dedicated/reference/cli/influxctl/version.md b/content/influxdb/cloud-dedicated/reference/cli/influxctl/version.md new file mode 100644 index 000000000..1407e8697 --- /dev/null +++ b/content/influxdb/cloud-dedicated/reference/cli/influxctl/version.md @@ -0,0 +1,19 @@ +--- +title: influxctl version +description: > + The `influxctl version` command outputs the current version and architecture of + the `influxctl` command line interface. +menu: + influxdb_cloud_dedicated: + parent: influxctl +weight: 202 +--- + +The `influxctl version` command outputs the current version and architecture of +the `influxctl` command line interface. + +## Usage + +```sh +influxctl version +``` diff --git a/content/influxdb/cloud-dedicated/reference/glossary.md b/content/influxdb/cloud-dedicated/reference/glossary.md new file mode 100644 index 000000000..b3843de16 --- /dev/null +++ b/content/influxdb/cloud-dedicated/reference/glossary.md @@ -0,0 +1,1113 @@ +--- +title: Glossary +description: > + Terms related to InfluxData products and platforms. +weight: 109 +menu: + influxdb_cloud_dedicated: + parent: Reference +influxdb/cloud-dedicated/tags: [glossary] +--- + +[A](#a) | [B](#b) | [C](#c) | [D](#d) | [E](#e) | [F](#f) | [G](#g) | [H](#h) | [I](#i) | [J](#j) | [K](#k) | [L](#l) | [M](#m) | [N](#n) | [O](#o) | [P](#p) | [Q](#q) | [R](#r) | [S](#s) | [T](#t) | [U](#u) | [V](#v) | [W](#w) | X | Y | Z + +## A + +### abstract syntax tree (AST) + +Tree representation of source code that shows the structure, content, and rules +of programming statements and discards additional syntax elements. +The tree is hierarchical, with elements of program statements broken down into their parts. + +For more information about AST design, see [Abstract Syntax Tree on Wikipedia](https://en.wikipedia.org/wiki/Abstract_syntax_tree). + +### agent + +A background process started by (or on behalf of) a user that typically requires user input. + +[Telegraf]({{< latest "telegraf" >}}/) is an agent that requires user input +(a configuration file) to gather metrics from declared input plugins and sends +metrics to declared output plugins, based on the plugins enabled for a configuration. + +Related entries: +[input plugin](#input-plugin), +[output plugin](#output-plugin), +[daemon](#daemon) + +### aggregator plugin + +Receives metrics from input plugins, creates aggregate metrics, and then passes aggregate metrics to configured output plugins. + +Related entries: +[input plugin](#input-plugin), +[output plugin](#output-plugin), +[processor plugin](#processor-plugin) + +### aggregate + +A function that returns an aggregated value across a set of points. +For a list of available aggregation functions, see [SQL aggregate functions](/influxdb/cloud-dedicated/reference/sql/functions/aggregate/). + + + +Related entries: +[function](#function), +[selector](#selector) + +### API + +Application programming interface that facilitates and standardizes communication +between two or more computer programs. + +### argument + +A value passed to a function or command that determines how the process operates. + +Related entries: +[parameter](#parameter) + +## B + +### batch + +A collection of points in line protocol format, separated by newlines (`0x0A`). +Submitting a batch of points using a single HTTP request to the write endpoints +drastically increases performance by reducing the HTTP overhead. +InfluxData typically recommends batch sizes of 5,000-10,000 points. +In some use cases, performance may improve with significantly smaller or larger batches. + +Related entries: +[line protocol](#line-protocol), +[point](#point) + +### batch size + +The number of lines or individual data points in a line protocol batch. +The Telegraf agent sends metrics to output plugins in batches rather than individually. +Batch size controls the size of each write batch that Telegraf sends to the output plugins. + +Related entries: +[output plugin](#output-plugin) + +### bin + +In a cumulative histogram, a bin includes all data points less than or equal to a specified upper bound. +In a normal histogram, a bin includes all data points between the upper and lower bounds. +Histogram bins are also sometimes referred to as "buckets." + +### boolean + +A data type with two possible values: true or false. +By convention, you can express `true` as the integer `1` and false as the integer `0` (zero). + +### bucket + +"Bucket" is the term used in InfluxDB 2.x and _InfluxDB Cloud Serverless_ to refer +to named location where time series data is stored. +Bucket is synonymous with "database" when using InfluxDB Cloud Dedicated. + +Related entries: +[database](#database) + +## C + +### CSV + +Comma-separated values (CSV) delimits text between commas to separate values. +A CSV file stores tabular data (numbers and text) in plain text. +Each line of the file is a data row. +Each row consists of one or more columns, separated by commas. +CSV file format is not fully standardized. + +### cardinality + +Cardinality is the number of unique values in a set. +Series cardinality is the number of unique [series](#series) in a database as a whole. +With the IOx storage engine, high series cardinality _does not_ affect performance. + +### cluster + +A collection of servers or processes that work together as a single unit. +An InfluxDB Cloud Dedicated cluster is a collection of InfluxDB servers dedicated +to the workload of a single customer. + +### collect + +Collect and write time series data to InfluxDB using line protocol, Telegraf, +the InfluxDB v1 and v2 HTTP APIs, v1 and v2 `influx` command line interface (CLI), +and InfluxDB client libraries. + +### collection interval + +The default global interval for collecting data from each Telegraf input plugin. +The collection interval can be overridden by each individual input plugin's configuration. + +Related entries: +[input plugin](#input-plugin) + +### collection jitter + +Collection jitter prevents every input plugin from collecting metrics simultaneously, +which can have a measurable effect on the system. +For each collection interval, every Telegraf input plugin will sleep for a random +time between zero and the collection jitter before collecting the metrics. + +Related entries: +[collection interval](#collection-interval), +[input plugin](#input-plugin) + +### column + +InfluxDB data is stored in tables within rows and columns. +Columns store tag sets and fields sets, and time values. +The only required column is _time_, which stores timestamps and is included +in all InfluxDB tables. + +### common log format (CLF) + +A standardized text file format used by the InfluxDB server to create log +entries when generating server log files. + +### compaction + +Compressing time series data to optimize disk usage. + +### continuous query (CQ) + +Continuous queries are a feature of InfluxDB 1.x used to regularly downsample +or process time series data. + +## D + +### daemon + +A background process that runs without user input. + +### dashboard + +A collection of data visualizations used to query and display time series data. +There a many tools designed specifically to create dashboards including +[Grafana](https://grafana.com), [Apache Superset](https://superset.apache.org/), +[Tableau](https://www.tableau.com/), and others. + + + +### data model + +A data model organizes elements of data and standardizes how they relate to one +another and to properties of the real world entities. + +For information about the InfluxDB data model, see +[InfluxDB data organization](/influxdb/cloud-dedicated/get-started/#data-organization) + +### data service + +Stores time series data and handles writes and queries. + +### data source + +A source of data that InfluxDB collects or queries data from. + +Related entries: +[database](#database) + +### data type + +A data type is defined by the values it can take, the programming language used, +or the operations that can be performed on it. + +InfluxDB supports the following data types: + +- string +- boolean +- float (64-bit) +- integer (64-bit) +- unsigned integer (64-bit) +- time + +For more information about different data types, see: + +- [line protocol](/influxdb/v2.7/reference/syntax/line-protocol/#data-types-and-format) +- [InfluxQL](/influxdb/v1.8/query_language/spec/#literals) +- [InfluxDB](/influxdb/v2.7/reference/syntax/line-protocol/#data-types-and-format) + +#### database + +A named location where time series data is stored. + +In InfluxDB 1.x, a database represented a logical container for users, retention +policies, continuous queries, and time series data. +In InfluxDB 2.x, the equivalent of this concept is an InfluxDB [bucket](#bucket). + +Related entries: +[bucket](#bucket), +[retention policy](#retention-policy-rp) + +### date-time + +InfluxDB stores the date-time format for each data point in a timestamp with +nanosecond-precision Unix time. +Specifying a timestamp is optional. +If a timestamp isn't specified for a data point, InfluxDB uses the server’s +local nanosecond timestamp in UTC. + +### downsample + +Aggregating high resolution data into lower resolution data to preserve disk space. + +### duration + +A data type that represents a duration of time (1s, 1m, 1h, 1d). +Retention periods are set using durations. + +Related entries: +[retention period](#retention-period) + +## E + +### event + +Metrics gathered at irregular time intervals. + +### expression + +A combination of one or more constants, variables, operators, and functions. + +## F + +### field + +A key-value pair in InfluxDB's data structure that records a data value. +Generally, field values change over time. +Fields are required in InfluxDB's data structure. + +Related entries: +[field key](#field-key), +[field set](#field-set), +[field value](#field-value), +[tag](#tag) + +### field key + +The key of the key-value pair. +Field keys are strings. + +Related entries: +[field](#field), +[field set](#field-set), +[field value](#field-value), +[tag key](#tag-key) + +### field set + +The collection of field key-value pairs. + +Related entries: +[field](#field), +[field key](#field-key), +[field value](#field-value), +[point](#point) + +### field value + +The value of a key-value pair. +Field values are the actual data; they can be strings, floats, integers, unsigned integers or booleans. +A field value is always associated with a timestamp. + +Related entries: +[field](#field), +[field key](#field-key), +[field set](#field-set), +[tag value](#tag-value), +[timestamp](#timestamp) + +### file block + +A file block is a fixed-length chunk of data read into memory when requested by an application. + +Related entries: +[block](#block) + +### float + +A real number written with a decimal point dividing the integer and fractional parts (`1.0`, `3.14`, `-20.1`). +InfluxDB supports 64-bit float values. + +### flush interval + +The global interval for flushing data from each Telegraf output plugin to its destination. +This value should not be set lower than the collection interval. + +Related entries: +[collection interval](#collection-interval), +[flush jitter](#flush-jitter), +[output plugin](#output-plugin) + +### flush jitter + +Flush jitter prevents every Telegraf output plugin from sending writes +simultaneously, which can overwhelm some data sinks. +Each flush interval, every Telegraf output plugin will sleep for a random time +between zero and the flush jitter before emitting metrics. +Flush jitter smooths out write spikes when running a large number of Telegraf instances. + +Related entries: +[flush interval](#flush-interval), +[output plugin](#output-plugin) + +### function + +A function is an operation that performs a specific task. +Functions take input, operate on that input, and then return output. +For a complete list of available SQL functions, see +[SQL functions](/inflxudb/cloud-dedicated/reference/sql/functions/). + + + +Related entries: +[aggregate](#aggregate), +[selector](#selector) + +## G + +### group key + +In [Flux](/{{< latest "flux" >}}/), the group key determines the schema and +contents of tables in Flux output. +A group key is a list of columns for which every row in the table has the same value. +Columns with unique values in each row are not part of the group key. + +Related entries: +[primary key](#primary-key) + +### gzip + +gzip is a type of data compression that compress chunks of data, which is +restored by unzipping compressed gzip files. +The gzip file extension is `.gz`. + +## H + +### histogram + +A visual representation of statistical information that uses rectangles to show +the frequency of data items in successive, equal intervals or bins. + +## I + +### identifier + +Identifiers are tokens that refer to specific database objects such as database +names, field keys, measurement names, tag keys, etc. + +Related entries: +[database](#database) +[field key](#field-key), +[measurement](#measurement), +[tag key](#tag-key), + + +### influx + +`influx` is a command line interface (CLI) that interacts with the InfluxDB v1.x and v2.x server. + +### influxctl + +[`influxctl`](/influxdb/cloud-dedicated/reference/cli/influxctl/) is a CLI that +performs [administrative tasks](/influxdb/cloud-dedicated/admin/) for an +InfluxDB Cloud dedicated cluster. + +### influxd + +`influxd` is the InfluxDB OSS v1.x and v2.x daemon that runs the InfluxDB server +and other required processes. + +### InfluxDB + +An open-source time series database (TSDB) developed by InfluxData. +Written in Go and optimized for fast, high-availability storage and retrieval of +time series data in fields such as operations monitoring, application metrics, +Internet of Things sensor data, and real-time analytics. + + +### InfluxQL + +The SQL-like query language used to query data in InfluxDB. + +### input plugin + +Telegraf input plugins actively gather metrics and deliver them to the core agent, +where aggregator, processor, and output plugins can operate on the metrics. +In order to activate an input plugin, it needs to be enabled and configured in +Telegraf's configuration file. + +Related entries: +[aggregator plugin](#aggregator-plugin), +[collection interval](#collection-interval), +[output plugin](#output-plugin), +[processor plugin](#processor-plugin) + +### instance + +An entity comprising data on a server (or virtual server in cloud computing). + + +### integer + +A whole number that is positive, negative, or zero (`0`, `-5`, `143`). +InfluxDB supports 64-bit integers (minimum: `-9223372036854775808`, maximum: `9223372036854775807`). + +Related entries: +[unsigned integer](#unsigned-integer) + +### IOx + +The IOx storage engine is real-time, columnar database optimized for time series +data built in Rust on top of [Apache Arrow](https://arrow.apache.org/) and +[DataFusion](https://arrow.apache.org/datafusion/user-guide/introduction.html). +IOx replaces the [TSM](#tsm) storage engine. + +## J + +### JWT + +Typically, JSON web tokens (JWT) are used to authenticate users between an +identity provider and a service provider. +A server can generate a JWT to assert any business processes. +For example, an "admin" token sent to a client can prove the client is logged in as admin. +Tokens are signed by one party's private key (typically, the server). +Private keys are used by both parties to verify that a token is legitimate. + +JWT uses an open standard specified in [RFC 7519](https://tools.ietf.org/html/rfc7519). + +### Jaeger + +Open source tracing used in distributed systems to monitor and troubleshoot transactions. + +### JSON + +JavaScript Object Notation (JSON) is an open-standard file format that uses +human-readable text to transmit data objects consisting of attribute–value pairs +and array data types. + +## K + +### keyword + +A keyword is reserved by a program because it has special meaning. +Every programming language has a set of keywords (reserved names) that cannot be used as an identifier. + +See a list of [SQL keywords](/influxdb/cloud-dedicated/reference/sql/#keywords). + + + +## L + +### literal + +A literal is value in an expression, a number, character, string, function, record, or array. +Literal values are interpreted as defined. + +### load balancing + +Improves workload distribution across multiple computing resources in a network. +Load balancing optimizes resource use, maximizes throughput, minimizes response +time, and avoids overloading a single resource. +Using multiple components with load balancing instead of a single component may +increase reliability and availability. +If requests to any server in a network increase, requests are forwarded to +another server with more capacity. +Load balancing can also refer to the communications channels themselves. + +### logs + +Logs record information. +Event logs describe system events and activity that help to describe and diagnose problems. +Transaction logs describe changes to stored data that help recover data if a +database crashes or other errors occur. + +### line protocol (LP) + +The text based format for writing points to InfluxDB. +See [line protocol](/influxdb/cloud-dedicated/reference/syntax/line-protocol/). + +## M + +### measurement + +The part of InfluxDB's data structure that describes the data stored in associated fields. +Measurements are strings. + +Related entries: +[field](#field), [series](#series) + +### metric + +Data tracked over time. + +### metric buffer + +The metric buffer caches individual metrics when writes are failing for an Telegraf output plugin. +Telegraf will attempt to flush the buffer upon a successful write to the output. +The oldest metrics are dropped first when this buffer fills. + +Related entries: +[output plugin](#output-plugin) + +### missing values + +Denoted by a null value. +Identifies missing information, which may be useful to include in an error message. + +## N + +### node + +An independent process or server in a cluster. + +Related entries: +[cluster](#cluster), +[server](#server) + + +### now + +The local server's nanosecond timestamp. + +### null + +A data type that represents a missing or unknown value. +Denoted by the `null` value. + +## O + +### operator + +A symbol that usually represents an action or process. +For example: `+`, `-`, `>`. + +Related entries: +[operand](#operand) + +### operand + +The object or value on either side of an [operator](#operator). + +Related entries: +[operator](#operator) + +### organization + +An InfluxDB v2 concept that describes workspace for a group of users. +All InfluxDB v2 dashboards, tasks, buckets, members, and so on, belong to an organization. +Organizations are not part of InfluxDB Cloud Dedicated. + +### owner + +A type of role for a user. +Owners have read/write permissions. +Users can have owner roles for databases and other resources. + +Role permissions are separate from API token permissions. For additional +information on API tokens, see [token](#tokens). + +### output plugin + +Telegraf output plugins deliver metrics to their configured destination. +To activate an output plugin, enable and configure the plugin in Telegraf's configuration file. + +Related entries: +[aggregator plugin](#aggregator-plugin), +[flush interval](#flush-interval), +[input plugin](#input-plugin), +[processor plugin](#processor-plugin) + +## P + +### parameter + +A key-value pair used to pass information to a function that determines how the +function operates. + +Related entries: +[argument](#argument) + +### pipe + +Method for passing information from one process to another. +For example, an output parameter from one process is input to another process. +Information passed through a pipe is retained until the receiving process reads the information. + +### point + +Single data record identified by its _measurement_, _tag keys_, _tag values_, +_field key_, and _timestamp_. + +In a [series](#series), each point has a unique timestamp. +If you write a point to a series with a timestamp that matches an existing point, +the field set becomes a union of the old and new field set, where any ties go to +the new field set. + +Related entries: +[measurement](#measurement), +[tag set](#tag-set), +[field set](#field-set), +[timestamp](#timestamp) + +### primary key + +With the InfluxDB IOx storage engine, the primary key is the list of columns +used to uniquely identify each row in a table. +Rows are uniquely identified by their timestamp and tag set. + +### precision + +The precision configuration setting determines the timestamp precision retained +for input data points. +All incoming timestamps are truncated to the specified precision. +Valid precisions are `ns`, `us` or `µs`, `ms`, and `s`. + +In Telegraf, truncated timestamps are padded with zeros to create a nanosecond timestamp. +Telegraf output plugins emit timestamps in nanoseconds. +For example, if the precision is set to `ms`, the nanosecond epoch timestamp `1480000000123456789` is truncated to `1480000000123` in millisecond precision and padded with zeroes to make a new, less precise nanosecond timestamp of `1480000000123000000`. +Telegraf output plugins do not alter the timestamp further. +The precision setting is ignored for service input plugins. + +Related entries: +[aggregator plugin](#aggregator-plugin), +[input plugin](#input-plugin), +[output plugin](#output-plugin), +[processor plugin](#processor-plugin), +[service input plugin](#service-input-plugin) + +### predicate expression + +A predicate expression compares two values and returns `true` or `false` based on +the relationship between the two values. +A predicate expression is comprised of a left operand, a comparison operator, and a right operand. + +### process + +A set of predetermined rules. +A process can refer to instructions being executed by the computer processor or +refer to the act of manipulating data. + +### processor plugin + +Telegraf processor plugins transform, decorate, and filter metrics collected by +input plugins, passing the transformed metrics to the output plugins. + +Related entries: +[aggregator plugin](#aggregator-plugin), +[input plugin](#input-plugin), +[output plugin](#output-plugin) + +### Prometheus format + +A simple text-based format for exposing metrics and ingesting them into Prometheus. + +## Q + +### query + +A request for information. +An InfluxDB query returns time series data. + +See [Query data in InfluxDB](/influxdb/cloud-dedicated/query-data/). + +## R + +### REPL + +A Read-Eval-Print Loop (REPL) is an interactive programming environment where +you type a command and immediately see the result. + +### regular expressions + +Regular expressions (regex or regexp) are patterns used to match character +combinations in strings. + +### rejected points + +In a batch of data, points that InfluxDB couldn't write to a database. +Field type conflicts are a common cause of rejected points. + +### retention period + +The [duration](#duration) of time that a database retains data. +InfluxDB drops points with timestamps older than their database's retention period +relative to [now](#now). +The minimum retention period is **one hour**. + +Related entries: +[bucket](#bucket), +[shard group duration](#shard-group-duration) + +### retention policy (RP) + +Retention policy is an InfluxDB 1.x concept that represents the duration of time +that each data point in the retention policy persists. +The equivalent is [retention period](#retention-period) however retention periods +are not part of the InfluxDB Cloud Dedicated data model. +The retention period describes the behavior of a database. + +Related entries: +[retention period](#retention-period), + +### RFC3339 timestamp + +A timestamp that uses the human-readable DateTime format proposed in +[RFC 3339](https://tools.ietf.org/html/rfc3339) (for example: `2020-01-01T00:00:00.00Z`). + +Related entries: +[RFC3339Nano timestamp](#rfc3339nano-timestamp), +[timestamp](#timestamp), +[unix timestamp](#unix-timestamp) + +### RFC3339Nano timestamp + +A [Golang representation of the RFC 3339 DateTime format](https://go.dev/src/time/format.go) +that uses nanosecond resolution--for example: +`2006-01-02T15:04:05.999999999Z07:00`. + +InfluxDB clients can return RFC3339Nano timestamps in log events and CSV-formatted +query results. + +Related entries: +[RFC3339 timestamp](#rfc3339-timestamp), +[timestamp](#timestamp), +[unix timestamp](#unix-timestamp) + +## S + +### schema + +How data is organized in InfluxDB. +The fundamentals of the InfluxDB schema are databases, measurements, +tag keys, tag values, and field keys. + +Related entries: +[bucket](#bucket), +[field key](#field-key), +[measurement](#measurement), +[series](#series), +[tag key](#tag-key), +[tag value](#tag-value) + +### secret + +Secrets are key-value pairs that contain information you want to control access +o, such as API keys, passwords, or certificates. + +### selector + +A function that returns a single point from the range of specified points. +See [SQL selector functions](/influxdb/cloud-dedicated/reference/sql/functions/selectors/) +for a complete list of available SQL selector functions. + +Related entries: +[aggregate](#aggregate), +[function](#function), +[transformation](#transformation) + +### series + +A collection of data in the InfluxDB data structure that share a common +_measurement_, _tag set_, and _field key_. + +Related entries: +[field set](#field-set), +[measurement](#measurement), +[tag set](#tag-set) + +### series cardinality + +The number of unique measurement, tag set, and field key combinations in an InfluxDB database. + +For example, assume that an InfluxDB bucket has one measurement. +The single measurement has two tag keys: `email` and `status`. +If there are three different `email`s, and each email address is associated with two +different `status`es, the series cardinality for the measurement is 6 +(3 × 2 = 6): + +| email | status | +| :-------------------- | :----- | +| lorr@influxdata.com | start | +| lorr@influxdata.com | finish | +| marv@influxdata.com | start | +| marv@influxdata.com | finish | +| cliff@influxdata.com | start | +| cliff@influxdata.com | finish | + +In some cases, performing this multiplication may overestimate series cardinality +because of the presence of dependent tags. +Dependent tags are scoped by another tag and do not increase series cardinality. +If we add the tag `firstname` to the example above, the series cardinality +would not be 18 (3 × 2 × 3 = 18). +The series cardinality would remain unchanged at 6, as `firstname` is already scoped by the `email` tag: + +| email | status | firstname | +| :------------------- | :----- | :-------- | +| lorr@influxdata.com | start | lorraine | +| lorr@influxdata.com | finish | lorraine | +| marv@influxdata.com | start | marvin | +| marv@influxdata.com | finish | marvin | +| cliff@influxdata.com | start | clifford | +| cliff@influxdata.com | finish | clifford | + +Related entries: +[field key](#field-key), +[measurement](#measurement), +[tag key](#tag-key), +[tag set](#tag-set) + +### series key + +A series key identifies a particular series by measurement, tag set, and field key. + +For example: + +``` +# measurement, tag set, field key +h2o_level, location=santa_monica, h2o_feet +``` + +Related entries: +[series](#series) + +### server + +A computer, virtual or physical, running InfluxDB. + + +### service input plugin + +Telegraf input plugins that run in a passive collection mode while the Telegraf agent is running. +Service input plugins listen on a socket for known protocol inputs, or apply +their own logic to ingested metrics before delivering metrics to the Telegraf agent. + +Related entries: +[aggregator plugin](#aggregator-plugin), +[input plugin](#input-plugin), +[output plugin](#output-plugin), +[processor plugin](#processor-plugin) + +### string + +A data type used to represent text. + +## T + +### TCP + +Transmission Control Protocol. + +### table + +A collection of related data organized in a structured way with a predefined set +of columns and data types. +Each row in the table represents a specific record or instance of the data, and +each column represents a specific attribute or property of the data. + +In InfluxDB Cloud Dedicated, a table represents a measurement. + +Related entries: +[column](#column), +[measurement](#measurement), +[primary key](#primary-key), +[row](#row) + +### tag + +The key-value pair in InfluxDB's data structure that records metadata. +Tags are an optional part of InfluxDB's data structure but they are useful for +storing commonly-queried metadata. + +Related entries: +[field](#field), +[tag key](#tag-key), +[tag set](#tag-set), +[tag value](#tag-value) + +### tag key + +The key of a tag key-value pair. +Tag keys are strings and store metadata. + + +Related entries: +[field key](#field-key), +[tag](#tag), +[tag set](#tag-set), +[tag value](#tag-value) + +### tag set + +The collection of tag keys and tag values on a point. + +Related entries: +[point](#point), +[series](#series), +[tag](#tag), +[tag key](#tag-key), +[tag value](#tag-value) + +### tag value + +The value of a tag key-value pair. +Tag values are strings and they store metadata. + +Related entries: +[tag](#tag), +[tag key](#tag-key), +[tag set](#tag-set) + +### Telegraf + +A plugin-driven agent that collects, processes, aggregates, and writes metrics. + +Related entries: +[Telegraf plugins](/{{< latest "telegraf" >}}/plugins//), +[Use Telegraf to collect data](/influxdb/cloud-dedicated/write-data/telegraf/), + +### time (data type) + +A data type that represents a single point in time with nanosecond precision. + +### time series data + +Sequence of data points typically consisting of successive measurements made +from the same source over a time interval. +Time series data shows how data evolves over time. +On a time series data graph, one of the axes is always time. +Time series data may be regular or irregular. +Regular time series data changes in constant intervals. +Irregular time series data changes at non-constant intervals. + +### timestamp + +The date and time associated with a point. +Time in InfluxDB is in UTC. + +To specify time when writing data, see +[Elements of line protocol](/influxdb/cloud-dedicated/reference/syntax/line-protocol/#elements-of-line-protocol). + +Related entries: +[point](#point), +[unix timestamp](#unix-timestamp), +[RFC3339 timestamp](#rfc3339-timestamp) + +### token + +Tokens provide authorization to perform specific actions in InfluxDB. +There are different types of API tokens: + +- **Database token:** Grants read and write access to a database. +- **Management token:** A short-lived token that grants clients administrative + access to your InfluxDB Cloud Dedicated cluster. + +Related entries: +[Manage token](/influxdb/cloud-dedicated/admin/tokens/) + +### TSM (Time Structured Merge tree) + +The InfluxDB v1 and v2 data storage format that allows greater compaction and +higher write and read throughput than B+ or LSM tree implementations. +The TSM storage engine has been replace by [IOx](#iox). + +Related entries: +[IOx](#iox) + +## U + +### UDP + +User Datagram Protocol is a packet of information. +When a request is made, a UDP packet is sent to the recipient. +The sender doesn't verify the packet is received. +The sender continues to send the next packets. +This means computers can communicate more quickly. +This protocol is used when speed is desirable and error correction is not necessary. + +### unix timestamp + +Counts time since **Unix Epoch (1970-01-01T00:00:00Z UTC)** in specified units ([precision](#precision)). +Specify timestamp precision when [writing data to InfluxDB](/influxdb/cloud-dedicated/write-data/). +InfluxDB supports the following unix timestamp precisions: + +| Precision | Description | Example | +|:--------- |:----------- |:------- | +| `ns` | Nanoseconds | `1577836800000000000` | +| `us` | Microseconds | `1577836800000000` | +| `ms` | Milliseconds | `1577836800000` | +| `s` | Seconds | `1577836800` | + +

The examples above represent 2020-01-01T00:00:00Z UTC.

+ +Related entries: +[timestamp](#timestamp), +[RFC3339 timestamp](#rfc3339-timestamp) + +### unsigned integer + +A whole number that is positive or zero (`0`, `143`). Also known as a "uinteger." +InfluxDB supports 64-bit unsigned integers (minimum: `0`, maximum: `18446744073709551615`). + +Related entries: +[integer](#integer) + +### user + +InfluxDB users are granted permission to access to InfluxDB. + +## V + +### values per second + +The preferred measurement of the rate at which data are persisted to InfluxDB. +Write speeds are generally quoted in values per second. + +To calculate the values per second rate, multiply the number of points written +per second by the number of values stored per point. +For example, if the points have four fields each, and a batch of 5000 points is +written 10 times per second, the values per second rate is: + +**4 field values per point** × **5000 points per batch** × **10 batches per second** = **200,000 values per second** + +Related entries: +[batch](#batch), +[field](#field), +[point](#point) + +### variable + +A storage location (identified by a memory address) paired with an associated +symbolic name (an identifier). +A variable contains some known or unknown quantity of information referred to as a value. + +### variable assignment + +A statement that sets or updates the value stored in a variable. + +## W + +### WAL (Write Ahead Log) - enterprise + +The temporary cache for recently written points. +To reduce the frequency that permanent storage files are accessed, InfluxDB +caches new points in the WAL until their total size or age triggers a flush to +more permanent storage. This allows for efficient batching of the writes into the TSM. + +Points in the WAL can be queried and persist through a system reboot. +On process start, all points in the WAL must be flushed before the system accepts new writes. + +Related entries: +[tsm](#tsm-time-structured-merge-tree) + +### windowing + +Grouping data based on specified time intervals. +This is also referred to as "time binning" or "date binning." diff --git a/content/influxdb/cloud-dedicated/reference/internals/_index.md b/content/influxdb/cloud-dedicated/reference/internals/_index.md new file mode 100644 index 000000000..f59a65ae6 --- /dev/null +++ b/content/influxdb/cloud-dedicated/reference/internals/_index.md @@ -0,0 +1,11 @@ +--- +title: InfluxDB internals +description: > + Learn about internal systems and implementation details of InfluxDB Cloud Dedicated. +menu: + influxdb_cloud_dedicated: + parent: Reference +weight: 108 +--- + +{{< children >}} \ No newline at end of file diff --git a/content/influxdb/cloud-dedicated/reference/internals/arrow-flightsql.md b/content/influxdb/cloud-dedicated/reference/internals/arrow-flightsql.md new file mode 100644 index 000000000..cef488d42 --- /dev/null +++ b/content/influxdb/cloud-dedicated/reference/internals/arrow-flightsql.md @@ -0,0 +1,68 @@ +--- +title: Arrow Flight SQL +description: > + The InfluxDB SQL implementation uses **Arrow Flight SQL** to query InfluxDB + and return results. +menu: + influxdb_cloud_dedicated: + parent: InfluxDB internals +weight: 101 +related: + - /influxdb/cloud-dedicated/reference/sql/ +--- + +The InfluxDB SQL implementation uses [Arrow Flight SQL](https://arrow.apache.org/docs/format/FlightSql.html) +to query InfluxDB and return results. + +> Arrow Flight SQL is a protocol for interacting with SQL databases using the +> Arrow in-memory format and the [Flight RPC](https://arrow.apache.org/docs/format/Flight.html) +> framework. +> +> {{% cite %}}-- [Arrow Flight SQL documentation](https://arrow.apache.org/docs/format/FlightSql.html){{% /cite %}} + +Flight SQL uses the RPC methods defined in the in Flight RPC framework and provides +various commands that pair those methods with request and response messages. +The InfluxDB Flight SQL implementation supports the following Flight SQL commands: + +### Flight SQL metadata commands + +{{% caption %}} +_For command descriptions, see the +[Arrow Flight SQL RPC methods documentation](https://arrow.apache.org/docs/format/FlightSql.html#sql-metadata)_. +{{% /caption %}} + +| Message | Supported | +| :----------------------- | :----------------------: | +| CommandGetCatalogs | **{{% icon "check" %}}** | +| CommandGetDbSchemas | **{{% icon "check" %}}** | +| CommandGetTables | **{{% icon "check" %}}** | +| CommandGetTableTypes | **{{% icon "check" %}}** | +| CommandGetSqlInfo | **{{% icon "check" %}}** | +| CommandGetPrimaryKeys | **{{% icon "check" %}}** | +| CommandGetExportedKeys | **{{% icon "check" %}}** | +| CommandGetImportedKeys | **{{% icon "check" %}}** | +| CommandGetCrossReference | **{{% icon "check" %}}** | +| CommandGetXdbcTypeInfo | | + +### Flight SQL query execution commands + +{{% caption %}} +_For command descriptions, see the +[Arrow Flight SQL RPC methods documentation](https://arrow.apache.org/docs/format/FlightSql.html#query-execution)_. +{{% /caption %}} + +| Message | Supported | +| :--------------------------------------- | :----------------------: | +| ActionCreatePreparedStatementRequest | | +| ActionCreatePreparedSubstraitPlanRequest | | +| ActionClosePreparedStatementRequest | | +| ActionBeginTransactionRequest | | +| ActionBeginSavepointRequest | | +| ActionBeginSavepointResult | | +| ActionEndTransactionRequest | | +| ActionEndSavepointRequest | | +| CommandStatementQuery | **{{% icon "check" %}}** | +| CommandStatementSubstraitPlan | | +| CommandPreparedStatementQuery | **{{% icon "check" %}}** | +| CommandPreparedStatementUpdate | | +| ActionCancelQueryRequest | | diff --git a/content/influxdb/cloud-iox/reference/sql/_index.md b/content/influxdb/cloud-dedicated/reference/sql/_index.md similarity index 98% rename from content/influxdb/cloud-iox/reference/sql/_index.md rename to content/influxdb/cloud-dedicated/reference/sql/_index.md index 87644c252..cf6eac9de 100644 --- a/content/influxdb/cloud-iox/reference/sql/_index.md +++ b/content/influxdb/cloud-dedicated/reference/sql/_index.md @@ -3,13 +3,15 @@ title: SQL reference documentation description: > Learn the SQL syntax and structure used to query InfluxDB. menu: - influxdb_cloud_iox: + influxdb_cloud_dedicated: name: SQL reference parent: Reference weight: 101 +related: + - /influxdb/cloud-dedicated/reference/internals/arrow-flightsql/ --- -InfluxDB Cloud backed by InfluxDB IOx uses the [Apache Arrow DataFusion](https://arrow.apache.org/datafusion/) implementation of SQL. +InfluxDB Cloud Dedicated uses the [Apache Arrow DataFusion](https://arrow.apache.org/datafusion/) implementation of SQL. - [Identifiers](#identifiers) - [Quoting and case sensitivity](#quoting-and-case-sensitivity) diff --git a/content/influxdb/cloud-iox/reference/sql/data-types.md b/content/influxdb/cloud-dedicated/reference/sql/data-types.md similarity index 95% rename from content/influxdb/cloud-iox/reference/sql/data-types.md rename to content/influxdb/cloud-dedicated/reference/sql/data-types.md index 3968dd97d..a5cdbf833 100644 --- a/content/influxdb/cloud-iox/reference/sql/data-types.md +++ b/content/influxdb/cloud-dedicated/reference/sql/data-types.md @@ -5,15 +5,15 @@ description: > The InfluxDB SQL implementation supports a number of data types including 64-bit integers, double-precision floating point numbers, strings, and more. menu: - influxdb_cloud_iox: + influxdb_cloud_dedicated: name: Data types parent: SQL reference weight: 200 related: - - /influxdb/cloud-iox/query-data/sql/cast-types/ + - /influxdb/cloud-dedicated/query-data/sql/cast-types/ --- -InfluxDB Cloud backed by InfluxDB IOx uses the [Apache Arrow DataFusion](https://arrow.apache.org/datafusion/) implementation of SQL. +InfluxDB Cloud Dedicated uses the [Apache Arrow DataFusion](https://arrow.apache.org/datafusion/) implementation of SQL. Data types define the type of values that can be stored in table columns. In InfluxDB's SQL implementation, a **measurement** is structured as a table, and **tags**, **fields** and **timestamps** are exposed as columns. diff --git a/content/influxdb/cloud-iox/reference/sql/explain.md b/content/influxdb/cloud-dedicated/reference/sql/explain.md similarity index 99% rename from content/influxdb/cloud-iox/reference/sql/explain.md rename to content/influxdb/cloud-dedicated/reference/sql/explain.md index cc1d55c61..128717124 100644 --- a/content/influxdb/cloud-iox/reference/sql/explain.md +++ b/content/influxdb/cloud-dedicated/reference/sql/explain.md @@ -4,7 +4,7 @@ description: > The `EXPLAIN` command shows the logical and physical execution plan for the specified SQL statement. menu: - influxdb_cloud_iox: + influxdb_cloud_dedicated: name: EXPLAIN command parent: SQL reference weight: 207 diff --git a/content/influxdb/cloud-iox/reference/sql/functions/_index.md b/content/influxdb/cloud-dedicated/reference/sql/functions/_index.md similarity index 82% rename from content/influxdb/cloud-iox/reference/sql/functions/_index.md rename to content/influxdb/cloud-dedicated/reference/sql/functions/_index.md index aee11cc40..2140890fa 100644 --- a/content/influxdb/cloud-iox/reference/sql/functions/_index.md +++ b/content/influxdb/cloud-dedicated/reference/sql/functions/_index.md @@ -4,7 +4,7 @@ list_title: Functions description: > Use SQL functions to transform queried values. menu: - influxdb_cloud_iox: + influxdb_cloud_dedicated: name: Functions parent: SQL reference identifier: sql-functions diff --git a/content/influxdb/cloud-iox/reference/sql/functions/aggregate.md b/content/influxdb/cloud-dedicated/reference/sql/functions/aggregate.md similarity index 89% rename from content/influxdb/cloud-iox/reference/sql/functions/aggregate.md rename to content/influxdb/cloud-dedicated/reference/sql/functions/aggregate.md index 837dffe83..f09dfe32e 100644 --- a/content/influxdb/cloud-iox/reference/sql/functions/aggregate.md +++ b/content/influxdb/cloud-dedicated/reference/sql/functions/aggregate.md @@ -4,12 +4,12 @@ list_title: Aggregate functions description: > Aggregate data with SQL aggregate functions. menu: - influxdb_cloud_iox: + influxdb_cloud_dedicated: name: Aggregate parent: sql-functions weight: 301 related: - - /influxdb/cloud-iox/query-data/sql/aggregate-select/ + - /influxdb/cloud-dedicated/query-data/sql/aggregate-select/ --- SQL aggregate functions aggregate values in a specified column for each @@ -131,7 +131,7 @@ max(expression) ``` _To return both the maximum value and its associated timestamp, use -[`selector_max`](/influxdb/cloud-iox/reference/sql/functions/selector/#selector_max)._ +[`selector_max`](/influxdb/cloud-dedicated/reference/sql/functions/selector/#selector_max)._ ##### Arguments @@ -170,7 +170,7 @@ min(expression) ``` _To return both the minimum value and its associated timestamp, use -[`selector_max`](/influxdb/cloud-iox/reference/sql/functions/selector/#selector_min)._ +[`selector_max`](/influxdb/cloud-dedicated/reference/sql/functions/selector/#selector_min)._ ##### Arguments @@ -259,7 +259,7 @@ corr(expression1, expression2) {{% expand "View `corr` query example" %}} _The following example uses the sample data set provided in -[Get started with InfluxDB tutorial](/influxdb/cloud-iox/get-started/write/#construct-line-protocol)._ +[Get started with InfluxDB tutorial](/influxdb/cloud-dedicated/get-started/write/#construct-line-protocol)._ ```sql SELECT @@ -294,7 +294,7 @@ covar(expression1, expression2) {{% expand "View `covar` query example" %}} _The following example uses the sample data set provided in -[Get started with InfluxDB tutorial](/influxdb/cloud-iox/get-started/write/#construct-line-protocol)._ +[Get started with InfluxDB tutorial](/influxdb/cloud-dedicated/get-started/write/#construct-line-protocol)._ ```sql SELECT @@ -329,7 +329,7 @@ covar_pop(expression1, expression2) {{% expand "View `covar_pop` query example" %}} _The following example uses the sample data set provided in -[Get started with InfluxDB tutorial](/influxdb/cloud-iox/get-started/write/#construct-line-protocol)._ +[Get started with InfluxDB tutorial](/influxdb/cloud-dedicated/get-started/write/#construct-line-protocol)._ ```sql SELECT @@ -364,7 +364,7 @@ covar_samp(expression1, expression2) {{% expand "View `covar_samp` query example" %}} _The following example uses the sample data set provided in -[Get started with InfluxDB tutorial](/influxdb/cloud-iox/get-started/write/#construct-line-protocol)._ +[Get started with InfluxDB tutorial](/influxdb/cloud-dedicated/get-started/write/#construct-line-protocol)._ ```sql SELECT @@ -399,7 +399,7 @@ stddev(expression) {{% expand "View `stddev` query example" %}} _The following example uses the sample data set provided in -[Get started with InfluxDB tutorial](/influxdb/cloud-iox/get-started/write/#construct-line-protocol)._ +[Get started with InfluxDB tutorial](/influxdb/cloud-dedicated/get-started/write/#construct-line-protocol)._ ```sql SELECT @@ -434,7 +434,7 @@ stddev_pop(expression) {{% expand "View `stddev_pop` query example" %}} _The following example uses the sample data set provided in -[Get started with InfluxDB tutorial](/influxdb/cloud-iox/get-started/write/#construct-line-protocol)._ +[Get started with InfluxDB tutorial](/influxdb/cloud-dedicated/get-started/write/#construct-line-protocol)._ ```sql SELECT @@ -469,7 +469,7 @@ stddev_samp(expression) {{% expand "View `stddev_samp` query example" %}} _The following example uses the sample data set provided in -[Get started with InfluxDB tutorial](/influxdb/cloud-iox/get-started/write/#construct-line-protocol)._ +[Get started with InfluxDB tutorial](/influxdb/cloud-dedicated/get-started/write/#construct-line-protocol)._ ```sql SELECT @@ -504,7 +504,7 @@ var(expression) {{% expand "View `var` query example" %}} _The following example uses the sample data set provided in -[Get started with InfluxDB tutorial](/influxdb/cloud-iox/get-started/write/#construct-line-protocol)._ +[Get started with InfluxDB tutorial](/influxdb/cloud-dedicated/get-started/write/#construct-line-protocol)._ ```sql SELECT @@ -539,7 +539,7 @@ var_pop(expression) {{% expand "View `var_pop` query example" %}} _The following example uses the sample data set provided in -[Get started with InfluxDB tutorial](/influxdb/cloud-iox/get-started/write/#construct-line-protocol)._ +[Get started with InfluxDB tutorial](/influxdb/cloud-dedicated/get-started/write/#construct-line-protocol)._ ```sql SELECT @@ -574,7 +574,7 @@ var_samp(expression) {{% expand "View `var_samp` query example" %}} _The following example uses the sample data set provided in -[Get started with InfluxDB tutorial](/influxdb/cloud-iox/get-started/write/#construct-line-protocol)._ +[Get started with InfluxDB tutorial](/influxdb/cloud-dedicated/get-started/write/#construct-line-protocol)._ ```sql SELECT @@ -617,7 +617,7 @@ approx_distinct(expression) {{% expand "View `approx_distinct` query example" %}} _The following example uses the sample data set provided in -[Get started with InfluxDB tutorial](/influxdb/cloud-iox/get-started/write/#construct-line-protocol)._ +[Get started with InfluxDB tutorial](/influxdb/cloud-dedicated/get-started/write/#construct-line-protocol)._ ```sql SELECT @@ -653,7 +653,7 @@ approx_median(expression) {{% expand "View `approx_median` query example" %}} _The following example uses the sample data set provided in -[Get started with InfluxDB tutorial](/influxdb/cloud-iox/get-started/write/#construct-line-protocol)._ +[Get started with InfluxDB tutorial](/influxdb/cloud-dedicated/get-started/write/#construct-line-protocol)._ ```sql SELECT @@ -694,7 +694,7 @@ approx_percentile_cont(expression, percentile, centroids) {{% expand "View `approx_percentile_cont` query example" %}} _The following example uses the sample data set provided in -[Get started with InfluxDB tutorial](/influxdb/cloud-iox/get-started/write/#construct-line-protocol)._ +[Get started with InfluxDB tutorial](/influxdb/cloud-dedicated/get-started/write/#construct-line-protocol)._ ```sql SELECT @@ -733,7 +733,7 @@ approx_percentile_cont_with_weight(expression, weight, percentile) {{% expand "View `approx_percentile_cont_with_weight` query example" %}} _The following example uses the sample data set provided in -[Get started with InfluxDB tutorial](/influxdb/cloud-iox/get-started/write/#construct-line-protocol)._ +[Get started with InfluxDB tutorial](/influxdb/cloud-dedicated/get-started/write/#construct-line-protocol)._ ```sql SELECT diff --git a/content/influxdb/cloud-iox/reference/sql/functions/conditional.md b/content/influxdb/cloud-dedicated/reference/sql/functions/conditional.md similarity index 98% rename from content/influxdb/cloud-iox/reference/sql/functions/conditional.md rename to content/influxdb/cloud-dedicated/reference/sql/functions/conditional.md index 11a1294fb..83821a2c2 100644 --- a/content/influxdb/cloud-iox/reference/sql/functions/conditional.md +++ b/content/influxdb/cloud-dedicated/reference/sql/functions/conditional.md @@ -4,7 +4,7 @@ list_title: Conditional functions description: > Use conditional functions to conditionally handle null values in SQL queries. menu: - influxdb_cloud_iox: + influxdb_cloud_dedicated: name: Conditional parent: sql-functions weight: 306 diff --git a/content/influxdb/cloud-iox/reference/sql/functions/math.md b/content/influxdb/cloud-dedicated/reference/sql/functions/math.md similarity index 85% rename from content/influxdb/cloud-iox/reference/sql/functions/math.md rename to content/influxdb/cloud-dedicated/reference/sql/functions/math.md index f906add01..c95c290c1 100644 --- a/content/influxdb/cloud-iox/reference/sql/functions/math.md +++ b/content/influxdb/cloud-dedicated/reference/sql/functions/math.md @@ -4,7 +4,7 @@ list_title: Math functions description: > Use math functions to perform mathematical operations in SQL queries. menu: - influxdb_cloud_iox: + influxdb_cloud_dedicated: name: Math parent: sql-functions weight: 306 @@ -51,7 +51,7 @@ abs(numeric_expression) {{% expand "View `abs` query example" %}} _The following example uses the sample data set provided in -[Get started with InfluxDB tutorial](/influxdb/cloud-iox/get-started/write/#construct-line-protocol)._ +[Get started with InfluxDB tutorial](/influxdb/cloud-dedicated/get-started/write/#construct-line-protocol)._ ```sql SELECT abs(temp) AS abs FROM home LIMIT 3 @@ -83,7 +83,7 @@ acos(numeric_expression) {{% expand "View `acos` query example" %}} _The following example uses the sample data set provided in -[Get started with InfluxDB tutorial](/influxdb/cloud-iox/get-started/write/#construct-line-protocol)._ +[Get started with InfluxDB tutorial](/influxdb/cloud-dedicated/get-started/write/#construct-line-protocol)._ ```sql SELECT acos(temp * .01) AS acos FROM home LIMIT 3 @@ -115,7 +115,7 @@ asin(numeric_expression) {{% expand "View `asin` query example" %}} _The following example uses the sample data set provided in -[Get started with InfluxDB tutorial](/influxdb/cloud-iox/get-started/write/#construct-line-protocol)._ +[Get started with InfluxDB tutorial](/influxdb/cloud-dedicated/get-started/write/#construct-line-protocol)._ ```sql SELECT asin(temp * .01) AS asin FROM home LIMIT 3 @@ -147,7 +147,7 @@ atan(numeric_expression) {{% expand "View `atan` query example" %}} _The following example uses the sample data set provided in -[Get started with InfluxDB tutorial](/influxdb/cloud-iox/get-started/write/#construct-line-protocol)._ +[Get started with InfluxDB tutorial](/influxdb/cloud-dedicated/get-started/write/#construct-line-protocol)._ ```sql SELECT atan(temp * .01) AS atan FROM home LIMIT 3 @@ -181,7 +181,7 @@ atan2(expression_y, expression_x) {{% expand "View `atan2` query example" %}} _The following example uses the sample data set provided in -[Get started with InfluxDB tutorial](/influxdb/cloud-iox/get-started/write/#construct-line-protocol)._ +[Get started with InfluxDB tutorial](/influxdb/cloud-dedicated/get-started/write/#construct-line-protocol)._ ```sql SELECT atan2(temp, hum) AS atan2 FROM home LIMIT 3 @@ -213,7 +213,7 @@ ceil(numeric_expression) {{% expand "View `ceil` query example" %}} _The following example uses the sample data set provided in -[Get started with InfluxDB tutorial](/influxdb/cloud-iox/get-started/write/#construct-line-protocol)._ +[Get started with InfluxDB tutorial](/influxdb/cloud-dedicated/get-started/write/#construct-line-protocol)._ ```sql SELECT ceil(temp) AS ceil FROM home LIMIT 3 @@ -245,7 +245,7 @@ cos(numeric_expression) {{% expand "View `cos` query example" %}} _The following example uses the sample data set provided in -[Get started with InfluxDB tutorial](/influxdb/cloud-iox/get-started/write/#construct-line-protocol)._ +[Get started with InfluxDB tutorial](/influxdb/cloud-dedicated/get-started/write/#construct-line-protocol)._ ```sql SELECT cos(temp) AS cos FROM home LIMIT 3 @@ -277,7 +277,7 @@ exp(numeric_expression) {{% expand "View `exp` query example" %}} _The following example uses the sample data set provided in -[Get started with InfluxDB tutorial](/influxdb/cloud-iox/get-started/write/#construct-line-protocol)._ +[Get started with InfluxDB tutorial](/influxdb/cloud-dedicated/get-started/write/#construct-line-protocol)._ ```sql SELECT exp(temp) AS exp FROM home LIMIT 3 @@ -309,7 +309,7 @@ floor(numeric_expression) {{% expand "View `floor` query example" %}} _The following example uses the sample data set provided in -[Get started with InfluxDB tutorial](/influxdb/cloud-iox/get-started/write/#construct-line-protocol)._ +[Get started with InfluxDB tutorial](/influxdb/cloud-dedicated/get-started/write/#construct-line-protocol)._ ```sql SELECT floor(temp) AS floor FROM home LIMIT 3 @@ -341,7 +341,7 @@ ln(numeric_expression) {{% expand "View `ln` query example" %}} _The following example uses the sample data set provided in -[Get started with InfluxDB tutorial](/influxdb/cloud-iox/get-started/write/#construct-line-protocol)._ +[Get started with InfluxDB tutorial](/influxdb/cloud-dedicated/get-started/write/#construct-line-protocol)._ ```sql SELECT ln(temp) AS ln FROM home LIMIT 3 @@ -373,7 +373,7 @@ log10(numeric_expression) {{% expand "View `log10` query example" %}} _The following example uses the sample data set provided in -[Get started with InfluxDB tutorial](/influxdb/cloud-iox/get-started/write/#construct-line-protocol)._ +[Get started with InfluxDB tutorial](/influxdb/cloud-dedicated/get-started/write/#construct-line-protocol)._ ```sql SELECT log10(temp) AS log10 FROM home LIMIT 3 @@ -405,7 +405,7 @@ log2(numeric_expression) {{% expand "View `log2` query example" %}} _The following example uses the sample data set provided in -[Get started with InfluxDB tutorial](/influxdb/cloud-iox/get-started/write/#construct-line-protocol)._ +[Get started with InfluxDB tutorial](/influxdb/cloud-dedicated/get-started/write/#construct-line-protocol)._ ```sql SELECT log2(temp) AS log2 FROM home LIMIT 3 @@ -439,7 +439,7 @@ power(base, exponent) {{% expand "View `power` query example" %}} _The following example uses the sample data set provided in -[Get started with InfluxDB tutorial](/influxdb/cloud-iox/get-started/write/#construct-line-protocol)._ +[Get started with InfluxDB tutorial](/influxdb/cloud-dedicated/get-started/write/#construct-line-protocol)._ ```sql SELECT power(temp, hum * .1) AS power FROM home LIMIT 3 @@ -467,7 +467,7 @@ random() {{% expand "View `random` query example" %}} _The following example uses the sample data set provided in -[Get started with InfluxDB tutorial](/influxdb/cloud-iox/get-started/write/#construct-line-protocol)._ +[Get started with InfluxDB tutorial](/influxdb/cloud-dedicated/get-started/write/#construct-line-protocol)._ ```sql SELECT temp * random() AS random FROM home LIMIT 3 @@ -503,7 +503,7 @@ round(numeric_expression) {{% expand "View `round` query example" %}} _The following example uses the sample data set provided in -[Get started with InfluxDB tutorial](/influxdb/cloud-iox/get-started/write/#construct-line-protocol)._ +[Get started with InfluxDB tutorial](/influxdb/cloud-dedicated/get-started/write/#construct-line-protocol)._ ```sql SELECT round(temp) AS round FROM home LIMIT 3 @@ -537,7 +537,7 @@ signum(numeric_expression) {{% expand "View `signum` query example" %}} _The following example uses the sample data set provided in -[Get started with InfluxDB tutorial](/influxdb/cloud-iox/get-started/write/#construct-line-protocol)._ +[Get started with InfluxDB tutorial](/influxdb/cloud-dedicated/get-started/write/#construct-line-protocol)._ ```sql SELECT signum(temp - 23) AS signum FROM home LIMIT 3 @@ -569,7 +569,7 @@ sin(numeric_expression) {{% expand "View `sin` query example" %}} _The following example uses the sample data set provided in -[Get started with InfluxDB tutorial](/influxdb/cloud-iox/get-started/write/#construct-line-protocol)._ +[Get started with InfluxDB tutorial](/influxdb/cloud-dedicated/get-started/write/#construct-line-protocol)._ ```sql SELECT sin(temp) AS sin FROM home LIMIT 3 @@ -601,7 +601,7 @@ sqrt(numeric_expression) {{% expand "View `sqrt` query example" %}} _The following example uses the sample data set provided in -[Get started with InfluxDB tutorial](/influxdb/cloud-iox/get-started/write/#construct-line-protocol)._ +[Get started with InfluxDB tutorial](/influxdb/cloud-dedicated/get-started/write/#construct-line-protocol)._ ```sql SELECT sqrt(temp) AS sqrt FROM home LIMIT 3 @@ -633,7 +633,7 @@ tan(numeric_expression) {{% expand "View `tan` query example" %}} _The following example uses the sample data set provided in -[Get started with InfluxDB tutorial](/influxdb/cloud-iox/get-started/write/#construct-line-protocol)._ +[Get started with InfluxDB tutorial](/influxdb/cloud-dedicated/get-started/write/#construct-line-protocol)._ ```sql SELECT tan(temp) AS tan FROM home LIMIT 3 @@ -665,7 +665,7 @@ trunc(numeric_expression) {{% expand "View `trunc` query example" %}} _The following example uses the sample data set provided in -[Get started with InfluxDB tutorial](/influxdb/cloud-iox/get-started/write/#construct-line-protocol)._ +[Get started with InfluxDB tutorial](/influxdb/cloud-dedicated/get-started/write/#construct-line-protocol)._ ```sql SELECT trunc(temp) AS trunc FROM home LIMIT 3 diff --git a/content/influxdb/cloud-iox/reference/sql/functions/misc.md b/content/influxdb/cloud-dedicated/reference/sql/functions/misc.md similarity index 91% rename from content/influxdb/cloud-iox/reference/sql/functions/misc.md rename to content/influxdb/cloud-dedicated/reference/sql/functions/misc.md index cd2603277..9c7818fea 100644 --- a/content/influxdb/cloud-iox/reference/sql/functions/misc.md +++ b/content/influxdb/cloud-dedicated/reference/sql/functions/misc.md @@ -4,7 +4,7 @@ list_title: Miscellaneous functions description: > Use miscellaneous SQL functions to perform a variety of operations in SQL queries. menu: - influxdb_cloud_iox: + influxdb_cloud_dedicated: name: Miscellaneous parent: sql-functions weight: 310 @@ -37,7 +37,7 @@ arrow_cast(expression, datatype) {{% expand "View `arrow_cast` query example" %}} _The following example uses the sample data set provided in -[Get started with InfluxDB tutorial](/influxdb/cloud-iox/get-started/write/#construct-line-protocol)._ +[Get started with InfluxDB tutorial](/influxdb/cloud-dedicated/get-started/write/#construct-line-protocol)._ ```sql SELECT @@ -74,7 +74,7 @@ arrow_typeof(expression) {{% expand "View `arrow_typeof` query example" %}} _The following example uses the sample data set provided in -[Get started with InfluxDB tutorial](/influxdb/cloud-iox/get-started/write/#construct-line-protocol)._ +[Get started with InfluxDB tutorial](/influxdb/cloud-dedicated/get-started/write/#construct-line-protocol)._ ```sql SELECT diff --git a/content/influxdb/cloud-iox/reference/sql/functions/regular-expression.md b/content/influxdb/cloud-dedicated/reference/sql/functions/regular-expression.md similarity index 90% rename from content/influxdb/cloud-iox/reference/sql/functions/regular-expression.md rename to content/influxdb/cloud-dedicated/reference/sql/functions/regular-expression.md index d99e627a3..fce2928e7 100644 --- a/content/influxdb/cloud-iox/reference/sql/functions/regular-expression.md +++ b/content/influxdb/cloud-dedicated/reference/sql/functions/regular-expression.md @@ -4,11 +4,11 @@ list_title: Regular expression functions description: > Use regular expression functions to operate on data in SQL queries. menu: - influxdb_cloud_iox: + influxdb_cloud_dedicated: name: Regular expression parent: sql-functions weight: 308 -influxdb/cloud-iox/tags: [regular expressions, sql] +influxdb/cloud-dedicated/tags: [regular expressions, sql] --- The InfluxDB SQL implementation uses the POSIX regular expression syntax and @@ -39,7 +39,7 @@ regexp_match(str, regexp, flags) {{% expand "View `regexp_replace` query example" %}} _The following example uses the sample data set provided in -[Get started with InfluxDB tutorial](/influxdb/cloud-iox/get-started/write/#construct-line-protocol)._ +[Get started with InfluxDB tutorial](/influxdb/cloud-dedicated/get-started/write/#construct-line-protocol)._ {{% note %}} `regexp_match` returns a _list_ Arrow type, which is not supported by InfluxDB. @@ -87,7 +87,7 @@ regexp_replace(str, regexp, replacement, flags) {{% expand "View `regexp_replace` query example" %}} _The following example uses the sample data set provided in -[Get started with InfluxDB tutorial](/influxdb/cloud-iox/get-started/write/#construct-line-protocol)._ +[Get started with InfluxDB tutorial](/influxdb/cloud-dedicated/get-started/write/#construct-line-protocol)._ ```sql SELECT DISTINCT diff --git a/content/influxdb/cloud-iox/reference/sql/functions/selector.md b/content/influxdb/cloud-dedicated/reference/sql/functions/selector.md similarity index 98% rename from content/influxdb/cloud-iox/reference/sql/functions/selector.md rename to content/influxdb/cloud-dedicated/reference/sql/functions/selector.md index d41082b54..855f18c17 100644 --- a/content/influxdb/cloud-iox/reference/sql/functions/selector.md +++ b/content/influxdb/cloud-dedicated/reference/sql/functions/selector.md @@ -4,12 +4,12 @@ list_title: Selector functions description: > Select data with SQL selector functions. menu: - influxdb_cloud_iox: + influxdb_cloud_dedicated: name: Selector parent: sql-functions weight: 302 related: - - /influxdb/cloud-iox/query-data/sql/aggregate-select/ + - /influxdb/cloud-dedicated/query-data/sql/aggregate-select/ --- SQL selector functions are designed to work with time series data. diff --git a/content/influxdb/cloud-iox/reference/sql/functions/string.md b/content/influxdb/cloud-dedicated/reference/sql/functions/string.md similarity index 90% rename from content/influxdb/cloud-iox/reference/sql/functions/string.md rename to content/influxdb/cloud-dedicated/reference/sql/functions/string.md index 329052b55..e3a7eb07d 100644 --- a/content/influxdb/cloud-iox/reference/sql/functions/string.md +++ b/content/influxdb/cloud-dedicated/reference/sql/functions/string.md @@ -4,7 +4,7 @@ list_title: String functions description: > Use string functions to operate on string values in SQL queries. menu: - influxdb_cloud_iox: + influxdb_cloud_dedicated: name: String parent: sql-functions weight: 307 @@ -50,7 +50,7 @@ Returns the ASCII value of the first character in a string. {{% note %}} `ascii` returns a 32-bit integer. -To use with InfluxDB, [cast the return value to 64-bit integer](/influxdb/cloud-iox/query-data/sql/cast-types/#cast-to-an-integer). +To use with InfluxDB, [cast the return value to 64-bit integer](/influxdb/cloud-dedicated/query-data/sql/cast-types/#cast-to-an-integer). {{% /note %}} ```sql @@ -70,7 +70,7 @@ ascii(str) {{% expand "View `ascii` query example" %}} _The following example uses the sample data set provided in -[Get started with InfluxDB tutorial](/influxdb/cloud-iox/get-started/write/#construct-line-protocol)._ +[Get started with InfluxDB tutorial](/influxdb/cloud-dedicated/get-started/write/#construct-line-protocol)._ ```sql SELECT DISTINCT @@ -93,7 +93,7 @@ Returns the bit length of a string. {{% note %}} `bit_length` returns a 32-bit integer. -To use with InfluxDB, [cast the return value to 64-bit integer](/influxdb/cloud-iox/query-data/sql/cast-types/#cast-to-an-integer). +To use with InfluxDB, [cast the return value to 64-bit integer](/influxdb/cloud-dedicated/query-data/sql/cast-types/#cast-to-an-integer). {{% /note %}} ```sql @@ -113,7 +113,7 @@ bit_length(str) {{% expand "View `bit_length` query example" %}} _The following example uses the sample data set provided in -[Get started with InfluxDB tutorial](/influxdb/cloud-iox/get-started/write/#construct-line-protocol)._ +[Get started with InfluxDB tutorial](/influxdb/cloud-dedicated/get-started/write/#construct-line-protocol)._ ```sql SELECT DISTINCT @@ -158,7 +158,7 @@ btrim(str[, trim_str]) {{% expand "View `btrim` query example" %}} _The following example uses the sample data set provided in -[Get started with InfluxDB tutorial](/influxdb/cloud-iox/get-started/write/#construct-line-protocol)._ +[Get started with InfluxDB tutorial](/influxdb/cloud-dedicated/get-started/write/#construct-line-protocol)._ ```sql SELECT DISTINCT @@ -205,7 +205,7 @@ concat(str[, ..., str_n]) {{% expand "View `concat` query example" %}} _The following example uses the sample data set provided in -[Get started with InfluxDB tutorial](/influxdb/cloud-iox/get-started/write/#construct-line-protocol)._ +[Get started with InfluxDB tutorial](/influxdb/cloud-dedicated/get-started/write/#construct-line-protocol)._ ```sql SELECT @@ -251,7 +251,7 @@ concat(separator, str[, ..., str_n]) {{% expand "View `concat_ws` query example" %}} _The following example uses the sample data set provided in -[Get started with InfluxDB tutorial](/influxdb/cloud-iox/get-started/write/#construct-line-protocol)._ +[Get started with InfluxDB tutorial](/influxdb/cloud-dedicated/get-started/write/#construct-line-protocol)._ ```sql SELECT @@ -378,7 +378,7 @@ left(str, n) {{% expand "View `left` query example" %}} _The following example uses the sample data set provided in -[Get started with InfluxDB tutorial](/influxdb/cloud-iox/get-started/write/#construct-line-protocol)._ +[Get started with InfluxDB tutorial](/influxdb/cloud-dedicated/get-started/write/#construct-line-protocol)._ ```sql SELECT DISTINCT @@ -401,7 +401,7 @@ Returns the number of characters in a string. {{% note %}} `char_length` returns a 32-bit integer. -To use with InfluxDB, [cast the return value to 64-bit integer](/influxdb/cloud-iox/query-data/sql/cast-types/#cast-to-an-integer). +To use with InfluxDB, [cast the return value to 64-bit integer](/influxdb/cloud-dedicated/query-data/sql/cast-types/#cast-to-an-integer). {{% /note %}} ```sql @@ -427,7 +427,7 @@ length(str) {{% expand "View `length` query example" %}} _The following example uses the sample data set provided in -[Get started with InfluxDB tutorial](/influxdb/cloud-iox/get-started/write/#construct-line-protocol)._ +[Get started with InfluxDB tutorial](/influxdb/cloud-dedicated/get-started/write/#construct-line-protocol)._ ```sql SELECT DISTINCT @@ -466,7 +466,7 @@ lower(str) {{% expand "View `lower` query example" %}} _The following example uses the sample data set provided in -[Get started with InfluxDB tutorial](/influxdb/cloud-iox/get-started/write/#construct-line-protocol)._ +[Get started with InfluxDB tutorial](/influxdb/cloud-dedicated/get-started/write/#construct-line-protocol)._ ```sql SELECT DISTINCT @@ -508,7 +508,7 @@ lpad(str, n[, padding_str]) {{% expand "View `lpad` query example" %}} _The following example uses the sample data set provided in -[Get started with InfluxDB tutorial](/influxdb/cloud-iox/get-started/write/#construct-line-protocol)._ +[Get started with InfluxDB tutorial](/influxdb/cloud-dedicated/get-started/write/#construct-line-protocol)._ ```sql SELECT DISTINCT @@ -584,7 +584,7 @@ md5(str) {{% expand "View `md5` query example" %}} _The following example uses the sample data set provided in -[Get started with InfluxDB tutorial](/influxdb/cloud-iox/get-started/write/#construct-line-protocol)._ +[Get started with InfluxDB tutorial](/influxdb/cloud-dedicated/get-started/write/#construct-line-protocol)._ ```sql SELECT DISTINCT @@ -607,7 +607,7 @@ Returns the length of a string in bytes. {{% note %}} `length` returns a 32-bit integer. -To use with InfluxDB, [cast the return value to 64-bit integer](/influxdb/cloud-iox/query-data/sql/cast-types/#cast-to-an-integer). +To use with InfluxDB, [cast the return value to 64-bit integer](/influxdb/cloud-dedicated/query-data/sql/cast-types/#cast-to-an-integer). {{% /note %}} ```sql @@ -628,7 +628,7 @@ octet_length(str) {{% expand "View `octet_length` query example" %}} _The following example uses the sample data set provided in -[Get started with InfluxDB tutorial](/influxdb/cloud-iox/get-started/write/#construct-line-protocol)._ +[Get started with InfluxDB tutorial](/influxdb/cloud-dedicated/get-started/write/#construct-line-protocol)._ ```sql SELECT DISTINCT @@ -703,7 +703,7 @@ replace(str, substr, replacement) {{% expand "View `replace` query example" %}} _The following example uses the sample data set provided in -[Get started with InfluxDB tutorial](/influxdb/cloud-iox/get-started/write/#construct-line-protocol)._ +[Get started with InfluxDB tutorial](/influxdb/cloud-dedicated/get-started/write/#construct-line-protocol)._ ```sql SELECT DISTINCT @@ -737,7 +737,7 @@ reverse(str) {{% expand "View `reverse` query example" %}} _The following example uses the sample data set provided in -[Get started with InfluxDB tutorial](/influxdb/cloud-iox/get-started/write/#construct-line-protocol)._ +[Get started with InfluxDB tutorial](/influxdb/cloud-dedicated/get-started/write/#construct-line-protocol)._ ```sql SELECT DISTINCT @@ -776,7 +776,7 @@ right(str, n) {{% expand "View `right` query example" %}} _The following example uses the sample data set provided in -[Get started with InfluxDB tutorial](/influxdb/cloud-iox/get-started/write/#construct-line-protocol)._ +[Get started with InfluxDB tutorial](/influxdb/cloud-dedicated/get-started/write/#construct-line-protocol)._ ```sql SELECT DISTINCT @@ -817,7 +817,7 @@ rpad(str, n[, padding_str]) {{% expand "View `rpad` query example" %}} _The following example uses the sample data set provided in -[Get started with InfluxDB tutorial](/influxdb/cloud-iox/get-started/write/#construct-line-protocol)._ +[Get started with InfluxDB tutorial](/influxdb/cloud-dedicated/get-started/write/#construct-line-protocol)._ ```sql SELECT DISTINCT @@ -933,7 +933,7 @@ starts_with(str, substr) {{% expand "View `starts_with` query example" %}} _The following example uses the sample data set provided in -[Get started with InfluxDB tutorial](/influxdb/cloud-iox/get-started/write/#construct-line-protocol)._ +[Get started with InfluxDB tutorial](/influxdb/cloud-dedicated/get-started/write/#construct-line-protocol)._ ```sql SELECT DISTINCT @@ -958,7 +958,7 @@ If the substring does not exist in the string, the function returns 0. {{% note %}} `strpos` returns a 32-bit integer. -To use with InfluxDB, [cast the return value to 64-bit integer](/influxdb/cloud-iox/query-data/sql/cast-types/#cast-to-an-integer). +To use with InfluxDB, [cast the return value to 64-bit integer](/influxdb/cloud-dedicated/query-data/sql/cast-types/#cast-to-an-integer). {{% /note %}} ```sql @@ -976,7 +976,7 @@ strpos(str, substr) {{% expand "View `strpos` query example" %}} _The following example uses the sample data set provided in -[Get started with InfluxDB tutorial](/influxdb/cloud-iox/get-started/write/#construct-line-protocol)._ +[Get started with InfluxDB tutorial](/influxdb/cloud-dedicated/get-started/write/#construct-line-protocol)._ ```sql SELECT DISTINCT @@ -1015,7 +1015,7 @@ substr(str, start_pos[, length]) {{% expand "View `substr` query example" %}} _The following example uses the sample data set provided in -[Get started with InfluxDB tutorial](/influxdb/cloud-iox/get-started/write/#construct-line-protocol)._ +[Get started with InfluxDB tutorial](/influxdb/cloud-dedicated/get-started/write/#construct-line-protocol)._ ```sql SELECT DISTINCT @@ -1050,7 +1050,7 @@ translate(str, chars, translation) {{% expand "View `translate` query example" %}} _The following example uses the sample data set provided in -[Get started with InfluxDB tutorial](/influxdb/cloud-iox/get-started/write/#construct-line-protocol)._ +[Get started with InfluxDB tutorial](/influxdb/cloud-dedicated/get-started/write/#construct-line-protocol)._ ```sql SELECT DISTINCT @@ -1167,7 +1167,7 @@ upper(str) {{% expand "View `upper` query example" %}} _The following example uses the sample data set provided in -[Get started with InfluxDB tutorial](/influxdb/cloud-iox/get-started/write/#construct-line-protocol)._ +[Get started with InfluxDB tutorial](/influxdb/cloud-dedicated/get-started/write/#construct-line-protocol)._ ```sql SELECT DISTINCT diff --git a/content/influxdb/cloud-iox/reference/sql/functions/time-and-date.md b/content/influxdb/cloud-dedicated/reference/sql/functions/time-and-date.md similarity index 96% rename from content/influxdb/cloud-iox/reference/sql/functions/time-and-date.md rename to content/influxdb/cloud-dedicated/reference/sql/functions/time-and-date.md index bc7e2ba93..5c76638ab 100644 --- a/content/influxdb/cloud-iox/reference/sql/functions/time-and-date.md +++ b/content/influxdb/cloud-dedicated/reference/sql/functions/time-and-date.md @@ -4,7 +4,7 @@ list_title: Time and date functions description: > Use time and date functions to work with time values and time series data. menu: - influxdb_cloud_iox: + influxdb_cloud_dedicated: name: Time and date parent: sql-functions weight: 305 @@ -298,7 +298,7 @@ LIMIT 1 Converts a value to RFC3339 nanosecond timestamp format (`YYYY-MM-DDT00:00:00.000000000Z`). Supports timestamp, integer, and unsigned integer types as input. -Integers and unsigned integers are parsed as [Unix nanosecond timestamps](/influxdb/cloud-iox/reference/glossary/#unix-timestamp) +Integers and unsigned integers are parsed as [Unix nanosecond timestamps](/influxdb/cloud-dedicated/reference/glossary/#unix-timestamp) and return the corresponding RFC3339 nanosecond timestamp. ```sql @@ -330,7 +330,7 @@ LIMIT 1 Converts a value to RFC3339 millisecond timestamp format (`YYYY-MM-DDT00:00:00.000Z`). Supports timestamp, integer, and unsigned integer types as input. -Integers and unsigned integers are parsed as [Unix nanosecond timestamps](/influxdb/cloud-iox/reference/glossary/#unix-timestamp) +Integers and unsigned integers are parsed as [Unix nanosecond timestamps](/influxdb/cloud-dedicated/reference/glossary/#unix-timestamp) and return the corresponding RFC3339 timestamp. ```sql @@ -365,7 +365,7 @@ Results Converts a value to RFC3339 microsecond timestamp format (`YYYY-MM-DDT00:00:00.000000Z`). Supports timestamp, integer, and unsigned integer types as input. -Integers and unsigned integers are parsed as [Unix nanosecond timestamps](/influxdb/cloud-iox/reference/glossary/#unix-timestamp) +Integers and unsigned integers are parsed as [Unix nanosecond timestamps](/influxdb/cloud-dedicated/reference/glossary/#unix-timestamp) and return the corresponding RFC3339 timestamp. ```sql @@ -398,7 +398,7 @@ LIMIT 1 Converts a value to RFC3339 second timestamp format (`YYYY-MM-DDT00:00:00Z`). Supports timestamp, integer, and unsigned integer types as input. -Integers and unsigned integers are parsed as [Unix nanosecond timestamps](/influxdb/cloud-iox/reference/glossary/#unix-timestamp) +Integers and unsigned integers are parsed as [Unix nanosecond timestamps](/influxdb/cloud-dedicated/reference/glossary/#unix-timestamp) and return the corresponding RFC3339 timestamp. ```sql @@ -432,7 +432,7 @@ LIMIT 1; ### from_unixtime Converts an integer to RFC3339 timestamp format (`YYYY-MM-DDT00:00:00.000000000Z`). -Input is parsed as a [Unix nanosecond timestamp](/influxdb/cloud-iox/reference/glossary/#unix-timestamp) +Input is parsed as a [Unix nanosecond timestamp](/influxdb/cloud-dedicated/reference/glossary/#unix-timestamp) and returns the corresponding RFC3339 timestamp. ```sql diff --git a/content/influxdb/cloud-iox/reference/sql/group-by.md b/content/influxdb/cloud-dedicated/reference/sql/group-by.md similarity index 98% rename from content/influxdb/cloud-iox/reference/sql/group-by.md rename to content/influxdb/cloud-dedicated/reference/sql/group-by.md index 7e75d420d..ad33c7295 100644 --- a/content/influxdb/cloud-iox/reference/sql/group-by.md +++ b/content/influxdb/cloud-dedicated/reference/sql/group-by.md @@ -3,7 +3,7 @@ title: GROUP BY clause description: > Use the `GROUP BY` clause to group query data by column values. menu: - influxdb_cloud_iox: + influxdb_cloud_dedicated: name: GROUP BY clause parent: SQL reference weight: 203 diff --git a/content/influxdb/cloud-iox/reference/sql/having.md b/content/influxdb/cloud-dedicated/reference/sql/having.md similarity index 97% rename from content/influxdb/cloud-iox/reference/sql/having.md rename to content/influxdb/cloud-dedicated/reference/sql/having.md index 8500099f8..fe7363fff 100644 --- a/content/influxdb/cloud-iox/reference/sql/having.md +++ b/content/influxdb/cloud-dedicated/reference/sql/having.md @@ -4,7 +4,7 @@ description: > Use the `HAVING` clause to filter query results based on values returned from an aggregate operation. menu: - influxdb_cloud_iox: + influxdb_cloud_dedicated: name: HAVING clause parent: SQL reference weight: 205 diff --git a/content/influxdb/cloud-iox/reference/sql/information-schema.md b/content/influxdb/cloud-dedicated/reference/sql/information-schema.md similarity index 94% rename from content/influxdb/cloud-iox/reference/sql/information-schema.md rename to content/influxdb/cloud-dedicated/reference/sql/information-schema.md index 6938251a5..3457859ff 100644 --- a/content/influxdb/cloud-iox/reference/sql/information-schema.md +++ b/content/influxdb/cloud-dedicated/reference/sql/information-schema.md @@ -4,7 +4,7 @@ description: > The `SHOW TABLES`, `SHOW COLUMNS`, and `SHOW ALL` commands return metadata related to your data schema. menu: - influxdb_cloud_iox: + influxdb_cloud_dedicated: parent: SQL reference weight: 210 --- @@ -16,9 +16,9 @@ To access this information, use the `SHOW TABLES`, `SHOW COLUMNS`, and `SHOW ALL` commands or query views in the [ISO](https://www.iso.org/) SQL `information_schema` schema. -In the context of InfluxDB, a [measurement](/influxdb/cloud-iox/reference/glossary/#measurement) -is represented as a table. Time, [tags](/influxdb/cloud-iox/reference/glossary/#tag), -and [fields](/influxdb/cloud-iox/reference/glossary/#field) are each represented +In the context of InfluxDB, a [measurement](/influxdb/cloud-dedicated/reference/glossary/#measurement) +is represented as a table. Time, [tags](/influxdb/cloud-dedicated/reference/glossary/#tag), +and [fields](/influxdb/cloud-dedicated/reference/glossary/#field) are each represented by columns in a table. - [SHOW TABLES](#show-tables) diff --git a/content/influxdb/cloud-iox/reference/sql/limit.md b/content/influxdb/cloud-dedicated/reference/sql/limit.md similarity index 98% rename from content/influxdb/cloud-iox/reference/sql/limit.md rename to content/influxdb/cloud-dedicated/reference/sql/limit.md index bfdaee0f9..8ae057222 100644 --- a/content/influxdb/cloud-iox/reference/sql/limit.md +++ b/content/influxdb/cloud-dedicated/reference/sql/limit.md @@ -3,7 +3,7 @@ title: LIMIT clause description: > Use the `LIMIT` clause to limit the number of results returned by a query. menu: - influxdb_cloud_iox: + influxdb_cloud_dedicated: name: LIMIT clause parent: SQL reference weight: 206 diff --git a/content/influxdb/cloud-iox/reference/sql/order-by.md b/content/influxdb/cloud-dedicated/reference/sql/order-by.md similarity index 97% rename from content/influxdb/cloud-iox/reference/sql/order-by.md rename to content/influxdb/cloud-dedicated/reference/sql/order-by.md index d02489b12..4251df4fc 100644 --- a/content/influxdb/cloud-iox/reference/sql/order-by.md +++ b/content/influxdb/cloud-dedicated/reference/sql/order-by.md @@ -4,7 +4,7 @@ list_title: ORDER BY clause description: > Use the `ORDER BY` clause to sort results by specified columns and order. menu: - influxdb_cloud_iox: + influxdb_cloud_dedicated: name: ORDER BY clause parent: SQL reference weight: 204 @@ -94,3 +94,5 @@ first by `location` (1), and second by `water_level` (2). | coyote_creek | 2019-08-29T15:24:00.000Z | -0.571 | | coyote_creek | 2019-08-27T13:42:00.000Z | -0.561 | +{{% /expand %}} +{{< /expand-wrapper >}} diff --git a/content/influxdb/cloud-iox/reference/sql/select.md b/content/influxdb/cloud-dedicated/reference/sql/select.md similarity index 99% rename from content/influxdb/cloud-iox/reference/sql/select.md rename to content/influxdb/cloud-dedicated/reference/sql/select.md index 21a0dcfb3..2352bcd50 100644 --- a/content/influxdb/cloud-iox/reference/sql/select.md +++ b/content/influxdb/cloud-dedicated/reference/sql/select.md @@ -3,7 +3,7 @@ title: SELECT statement description: > Use the SQL `SELECT` statement to query data from a measurement. menu: - influxdb_cloud_iox: + influxdb_cloud_dedicated: name: SELECT statement parent: SQL reference weight: 201 diff --git a/content/influxdb/cloud-iox/reference/sql/table-value-constructor.md b/content/influxdb/cloud-dedicated/reference/sql/table-value-constructor.md similarity index 96% rename from content/influxdb/cloud-iox/reference/sql/table-value-constructor.md rename to content/influxdb/cloud-dedicated/reference/sql/table-value-constructor.md index 797664566..f01f26250 100644 --- a/content/influxdb/cloud-iox/reference/sql/table-value-constructor.md +++ b/content/influxdb/cloud-dedicated/reference/sql/table-value-constructor.md @@ -4,7 +4,7 @@ description: > The table value constructor (TVC) uses the `VALUES` keyword to specify a set of row value expressions to construct into a table. menu: - influxdb_cloud_iox: + influxdb_cloud_dedicated: parent: SQL reference weight: 220 --- @@ -66,7 +66,7 @@ FROM + +- [InfluxDB data structure](#influxdb-data-structure) + - [Primary keys](#primary-keys) + - [Tags versus fields](#tags-versus-fields) +- [Schema restrictions](#schema-restrictions) + - [Do not use duplicate names for tags and fields](#do-not-use-duplicate-names-for-tags-and-fields) + - [Measurements can contain up to 200 columns](#measurements-can-contain-up-to-200-columns) +- [Design for performance](#design-for-performance) + - [Avoid wide schemas](#avoid-wide-schemas) + - [Avoid too many tags](#avoid-too-many-tags) + - [Avoid sparse schemas](#avoid-sparse-schemas) + - [Writing individual fields with different timestamps](#writing-individual-fields-with-different-timestamps) + - [Measurement schemas should be homogenous](#measurement-schemas-should-be-homogenous) +- [Design for query simplicity](#design-for-query-simplicity) + - [Keep measurement names, tag keys, and field keys simple](#keep-measurement-names-tag-keys-and-field-keys-simple) + - [Avoid keywords and special characters](#avoid-keywords-and-special-characters) + +## InfluxDB data structure + +The InfluxDB data model organizes time series data into buckets and measurements. +A bucket can contain multiple measurements. Measurements contain multiple +tags and fields. + +- **Bucket**: Named location where time series data is stored. + In the InfluxDB SQL implementation, a bucket is synonymous with a _database_. + A bucket can contain multiple _measurements_. + - **Measurement**: Logical grouping for time series data. + In the InfluxDB SQL implementation, a measurement is synonymous with a _table_. + All _points_ in a given measurement should have the same _tags_. + A measurement contains multiple _tags_ and _fields_. + - **Tags**: Key-value pairs that store metadata string values for each point--for example, + a value that identifies or differentiates the data source or context--for example, host, + location, station, etc. + - **Fields**: Key-value pairs that store data for each point--for example, + temperature, pressure, stock price, etc. + - **Timestamp**: Timestamp associated with the data. + When stored on disk and queried, all data is ordered by time. + In InfluxDB, a timestamp is a nanosecond-scale [unix timestamp](#unix-timestamp) in UTC. + +### Primary keys + +In time series data, the primary key for a row of data is typically a combination of timestamp and other attributes that uniquely identify each data point. +In InfluxDB, the primary key for a row is the combination of the point's timestamp and _tag set_ - the collection of [tag keys](/influxdb/cloud-dedicated/reference/glossary/#tag-key) and [tag values](/influxdb/cloud-dedicated/reference/glossary/#tag-value) on the point. + +### Tags versus fields + +When designing your schema for InfluxDB, a common question is, "what should be a +tag and what should be a field?" The following guidelines should help answer that +question as you design your schema. + +- Use tags to store identifying information about the source or context of the data. +- Use fields to store measured values. +- Tag values can only be strings. +- Field values can be any of the following data types: + - Integer + - Unsigned integer + - Float + - String + - Boolean + +{{% note %}} +The InfluxDB IOx engine supports infinite tag value and series cardinality. +Unlike InfluxDB backed by the TSM storage engine, **tag value** +cardinality doesn't affect the overall performance of your database. +{{% /note %}} + +--- + +## Schema restrictions + +### Do not use duplicate names for tags and fields + +Tags and fields within the same measurement can't be named the same. +All tags and fields are stored as unique columns in a table representing the +measurement on disk. +If you attempt to write a measurement that contains tags or fields with the same name, +the write fails due to a column conflict. + +### Measurements can contain up to 200 columns + +A measurement can contain **up to 200 columns**. Each row requires a time column, +but the rest represent tags and fields stored in the measurement. +Therefore, a measurement can contain one time column and 199 total field and tag columns. +If you attempt to write to a measurement and exceed the 200 column limit, the +write request fails and InfluxDB returns an error. + +--- + +## Design for performance + +How you structure your schema within a measurement can affect the overall +performance of queries against that measurement. +The following guidelines help to optimize query performance: + +- [Avoid wide schemas](#avoid-wide-schemas) +- [Avoid sparse schemas](#avoid-sparse-schemas) +- [Measurement schemas should be homogenous](#measurement-schemas-should-be-homogenous) + + +### Avoid wide schemas + +A wide schema is one with many tags and fields and corresponding columns for each. +With the InfluxDB IOx storage engine, wide schemas don't impact query execution performance. +Because IOx is a columnar database, it executes queries only against columns selected in the query. + +Although a wide schema won't affect query performance, it can lead to the following: + +- More resources required for persisting and compacting data during ingestion. +- Decreased sorting performance due to complex primary keys with [too many tags](#avoid-too-many-tags). + +The InfluxDB IOx storage engine has a +[limit of 200 columns per measurement](#measurements-can-contain-up-to-200-columns). + +To avoid a wide schema, limit the number of tags and fields stored in a measurement. +If you need to store more than 199 total tags and fields, consider segmenting +your fields into a separate measurement. + +#### Avoid too many tags + +In InfluxDB, the primary key for a row is the combination of the point's timestamp and _tag set_ - the collection of [tag keys](/influxdb/cloud-dedicated/reference/glossary/#tag-key) and [tag values](/influxdb/cloud-dedicated/reference/glossary/#tag-value) on the point. +A point that contains more tags has a more complex primary key, which could impact sorting performance if you sort using all parts of the key. + +### Avoid sparse schemas + +A sparse schema is one where, for many rows, columns contain null values. + + These generally stem from the following: +- [non-homogenous measurement schemas](#measurement-schemas-should-be-homogenous) +- [writing individual fields with different timestamps](#writing-individual-fields-with-different-timestamps) + +Sparse schemas require the InfluxDB query engine to evaluate many +null columns, adding unnecessary overhead to storing and querying data. + +_For an example of a sparse schema, +[view the non-homogenous schema example below](#view-example-of-a-sparse-non-homogenous-schema)._ + +#### Writing individual fields with different timestamps + +Reporting fields at different times with different timestamps creates distinct rows that contain null values--for example: + +You report `fieldA` with `tagset`, and then report `field B` with the same `tagset`, but with a different timestamp. +The result is two rows: one row has a _null_ value for **field A** and the other has a _null_ value for **field B**. + +In contrast, if you report fields at different times while using the same tagset and timestamp, the existing row is updated. +This requires slightly more resources at ingestion time, but then gets resolved at persistence time or compaction time +and avoids a sparse schema. + +### Measurement schemas should be homogenous + +Data stored within a measurement should be "homogenous," meaning each row should +have the same tag and field keys. +All rows stored in a measurement share the same columns, but if a point doesn't +include a value for a column, the column value is null. +A measurement full of null values has a ["sparse" schema](#avoid-sparse-schemas). + +{{< expand-wrapper >}} +{{% expand "View example of a sparse, non-homogenous schema" %}} + +Non-homogenous schemas are often caused by writing points to a measurement with +inconsistent tag or field sets. +In the following example, data is collected from two +different sources and each source returns data with different tag and field sets. + +{{< flex >}} +{{% flex-content %}} +##### Source 1 tags and fields: +- tags: + - source + - code + - crypto +- fields: + - price +{{% /flex-content %}} +{{% flex-content %}} +##### Source 2 tags and fields: +- tags: + - src + - currency + - crypto +- fields: + - cost + - volume +{{% /flex-content %}} +{{< /flex >}} + +These sets of data written to the same measurement will result in a measurement +full of null values (also known as a _sparse schema_): + +| time | source | src | code | currency | crypto | price | cost | volume | +| :------------------- | :----- | --: | :--- | :------- | :------ | ----------: | ---------: | ----------: | +| 2023-01-01T12:00:00Z | src1 | | USD | | bitcoin | 16588.45865 | | | +| 2023-01-01T12:00:00Z | | 2 | | EUR | bitcoin | | 16159.5806 | 16749450200 | +| 2023-01-01T13:00:00Z | src1 | | USD | | bitcoin | 16559.49871 | | | +| 2023-01-01T13:00:00Z | | 2 | | EUR | bitcoin | | 16131.3694 | 16829683245 | +| 2023-01-01T14:00:00Z | src1 | | USD | | bitcoin | 16577.46667 | | | +| 2023-01-01T14:00:00Z | | 2 | | EUR | bitcoin | | 16148.8727 | 17151722208 | +| 2023-01-01T15:00:00Z | src1 | | USD | | bitcoin | 16591.36998 | | | +| 2023-01-01T15:00:00Z | | 2 | | EUR | bitcoin | | 16162.4167 | 17311854919 | + +{{% /expand %}} +{{< /expand-wrapper >}} + +## Design for query simplicity + +Naming conventions for measurements, tag keys, and field keys can simplify or +complicate the process of writing queries for your data. +The following guidelines help to ensure writing queries for your data is as +simple as possible. + +- [Keep measurement names, tag keys, and field keys simple](#keep-measurement-names-tag-keys-and-field-keys-simple) +- [Avoid keywords and special characters](#avoid-keywords-and-special-characters) + +### Keep measurement names, tag keys, and field keys simple + +Measurement names, tag keys, and field keys should be simple and accurately +describe what each contains. + +The most common cause of a complex naming convention is when you try to "embed" +data attributes into a measurement name, tag key, or field key. + +#### Not recommended {.orange} + +As a basic example, consider the following [line protocol](/influxdb/cloud-dedicated/reference/syntax/line-protocol/) +that embeds sensor metadata (location, model, and ID) into a tag key: + +``` +home,sensor=loc-kitchen.model-A612.id-1726ZA temp=72.1 +home,sensor=loc-bath.model-A612.id-2635YB temp=71.8 +``` + +{{< expand-wrapper >}} +{{% expand "View written data" %}} + +{{% influxql/table-meta %}} +**name**: home +{{% /influxql/table-meta %}} + +| time | sensor | temp | +| :------------------- | :------------------------------- | ---: | +| 2023-01-01T00:00:00Z | loc-kitchen.model-A612.id-1726ZA | 72.1 | +| 2023-01-01T00:00:00Z | loc-bath.model-A612.id-2635YB | 71.8 | + +{{% /expand %}} +{{< /expand-wrapper >}} + +To query data from the sensor with ID `1726ZA`, you have to use either SQL pattern +matching or regular expressions to evaluate the `sensor` tag: + +{{< code-tabs-wrapper >}} +{{% code-tabs %}} +[SQL](#) +[InfluxQL](#) +[Flux](#) +{{% /code-tabs %}} +{{% code-tab-content %}} + +```sql +SELECT * FROM home WHERE sensor LIKE '%id-1726ZA%' +``` + +{{% /code-tab-content %}} +{{% code-tab-content %}} + +```sql +SELECT * FROM home WHERE sensor =~ /id-1726ZA/ +``` + +{{% /code-tab-content %}} +{{% code-tab-content %}} + +```js +import "experimental/iox" + +iox.from(bucket: "example-bucket") + |> range(start: -1y) + |> filter(fn: (r) => r._measurement == "home") + |> filter(fn: (r) => r.sensor =~ /id-1726ZA/) +``` + +{{% /code-tab-content %}} +{{< /code-tabs-wrapper >}} + +SQL pattern matching and regular expressions both complicate the query and +are less performant than simple equality expressions. + +#### Recommended {.green} + +The better approach would be to write each sensor attribute as an individual tag: + +``` +home,location=kitchen,sensor_model=A612,sensor_id=1726ZA temp=72.1 +home,location=bath,sensor_model=A612,sensor_id=2635YB temp=71.8 +``` + +{{< expand-wrapper >}} +{{% expand "View written data" %}} + +{{% influxql/table-meta %}} +**name**: home +{{% /influxql/table-meta %}} + +| time | location | sensor_model | sensor_id | temp | +| :------------------- | :------- | :----------- | :-------- | ---: | +| 2023-01-01T00:00:00Z | kitchen | A612 | 1726ZA | 72.1 | +| 2023-01-01T00:00:00Z | bath | A612 | 2635YB | 71.8 | + +{{% /expand %}} +{{< /expand-wrapper >}} + +To query data from the sensor with ID `1726ZA` using this schema, you can use a +simple equality expression: + +{{< code-tabs-wrapper >}} +{{% code-tabs %}} +[SQL & InfluxQL](#) +[Flux](#) +{{% /code-tabs %}} +{{% code-tab-content %}} + +```sql +SELECT * FROM home WHERE sensor_id = '1726ZA' +``` + +{{% /code-tab-content %}} +{{% code-tab-content %}} + +```js +import "experimental/iox" + +iox.from(bucket: "example-bucket") + |> range(start: -1y) + |> filter(fn: (r) => r._measurement == "home") + |> filter(fn: (r) => r.sensor_id == "1726ZA") +``` + +{{% /code-tab-content %}} +{{< /code-tabs-wrapper >}} + +This query is easier to write and is more performant than using pattern matching +or regular expressions. + +### Avoid keywords and special characters + +To simplify query writing, avoid using reserved keywords or special characters +in measurement names, tag keys, and field keys. + +- [SQL keywords](/influxdb/cloud-dedicated/reference/sql/#keywords) +- [InfluxQL keywords](/influxdb/cloud-dedicated/reference/syntax/influxql/spec/#keywords) + +When using SQL or InfluxQL to query measurements, tags, and fields with special +characters or keywords, you have to wrap these keys in **double quotes**. + +```sql +SELECT + "example-field", "tag@1-23" +FROM + "example-measurement" +WHERE + "tag@1-23" = 'ABC' +``` diff --git a/content/influxdb/cloud-dedicated/write-data/csv/_index.md b/content/influxdb/cloud-dedicated/write-data/csv/_index.md new file mode 100644 index 000000000..1908aab4e --- /dev/null +++ b/content/influxdb/cloud-dedicated/write-data/csv/_index.md @@ -0,0 +1,18 @@ +--- +title: Write CSV data to InfluxDB Cloud Dedicated +description: > + Use Telegraf or the HTTP API to write CSV data + to InfluxDB Cloud Dedicated. +menu: + influxdb_cloud_dedicated: + name: Write CSV data + parent: Write data +weight: 103 +related: + - /influxdb/cloud-dedicated/reference/syntax/line-protocol/ + - /influxdb/cloud-dedicated/reference/syntax/annotated-csv/ + - /influxdb/cloud-dedicated/reference/cli/influx/write/ +alt_engine: /influxdb/cloud/write-data/developer-tools/csv/ +--- + +{{< children >}} diff --git a/content/influxdb/cloud-dedicated/write-data/csv/telegraf.md b/content/influxdb/cloud-dedicated/write-data/csv/telegraf.md new file mode 100644 index 000000000..303734759 --- /dev/null +++ b/content/influxdb/cloud-dedicated/write-data/csv/telegraf.md @@ -0,0 +1,152 @@ +--- +title: Use Telegraf to write CSV data to InfluxDB Cloud Dedicated +description: > + Use the Telegraf `file` input plugin to read and parse CSV data into + [line protocol](/influxdb/cloud-dedicated/reference/syntax/line-protocol/) + and write it to InfluxDB. +menu: + influxdb_cloud_dedicated: + name: Use Telegraf + identifier: write-csv-telegraf + parent: Write CSV data +weight: 203 +related: + - /{{< latest "telegraf" >}}/data_formats/input/csv/ + - /influxdb/cloud-dedicated/write-data/use-telegraf/ +--- + +Use the Telegraf `file` input plugin to read and parse CSV data into +[line protocol](/influxdb/cloud-dedicated/reference/syntax/line-protocol/) +and write it to InfluxDB. +[Telegraf](/{{< latest "telegraf" >}}/) is a plugin-based agent that collects +metrics from different sources and writes them to specified destinations. + + + +- [Configure Telegraf to read CSV files](#configure-telegraf-to-read-csv-files) +- [Configure Telegraf to write to InfluxDB](#configure-telegraf-to-write-to-influxdb) + - [Other Telegraf configuration options](#other-telegraf-configuration-options) + + + +## Configure Telegraf to read CSV files + +1. Add and enable the [`inputs.file` plugin](/{{< latest "telegraf" >}}/plugins/#input-file) + in your Telegraf configuration file. +2. Use the `files` option to specify the list of CSV files to read. + CSV files must be accessible by the Telegraf agent. +3. Set the `data_format` option to `csv`. +4. Define all other `csv_` configuration options specific to the CSV data you + want to write to InfluxDB. + _For detailed information about each of the CSV format configuration options, + see [CSV input data format](/{{< latest "telegraf" >}}/data_formats/input/csv/)._ + +```toml +[[inputs.file]] + files = ["/path/to/example.csv"] + data_format = "csv" + csv_header_row_count = 0 + csv_column_names = [] + csv_column_types = [] + csv_skip_rows = 0 + csv_metadata_rows = 0 + csv_metadata_separators = [":", "="] + csv_metadata_trim_set = "" + csv_skip_columns = 0 + csv_delimiter = "," + csv_comment = "" + csv_trim_space = false + csv_tag_columns = [] + csv_measurement_column = "" + csv_timestamp_column = "" + csv_timestamp_format = "" + csv_timezone = "" + csv_skip_values = [] + csv_skip_errors = false + csv_reset_mode = "none" +``` + +## Configure Telegraf to write to InfluxDB + +1. Add and enable the [`outputs.influxdb_v2`](/{{< latest "telegraf" >}}/plugins/#output-influxdb_v2) + plugin in your Telegraf configuration file. +2. Include the following options: + + - **url**: a list containing your Influx Cloud Dedicated cluster URL using the HTTPS + protocol: + + ``` + https://cluster-id.influxdb.io + ``` + - **token**: a [database token](/influxdb/cloud-dedicated/admin/tokens/) with permission to write to the database. + - **organization**: an empty string (`''`) (InfluxDB Cloud Dedicated ignores this parameter). + - **bucket**: the name of the [database](/influxdb/cloud-dedicated/admin/databases/) to write to. + +The following example shows a minimal [`outputs.influxdb_v2`](/{{< latest "telegraf" >}}/plugins/#output-influxdb_v2) configuration for writing data to InfluxDB Cloud Dedicated: + +```toml +[[outputs.influxdb_v2]] + urls = ["https://cluster-id.influxdb.io"] + token = "DATABASE_TOKEN" + organization = "" + bucket = "DATABASE_NAME" +``` + +Replace the following: + +- **`DATABASE_NAME`**: your InfluxDB Cloud Dedicated database +- **`DATABASE_TOKEN`**: a [database token](/influxdb/cloud-dedicated/admin/tokens/) with sufficient permissions to the database + +{{< expand-wrapper >}} +{{% expand "View full example Telegraf configuration file" %}} + +In the following example: + +- **`$INFLUX_TOKEN`** is an environment variable assigned to a [database token](/influxdb/cloud-dedicated/admin/tokens/) value. +- **`DATABASE_NAME`** is the InfluxDB Cloud Dedicated database to write to. + +```toml +[[inputs.file]] + files = ["/path/to/example.csv"] + data_format = "csv" + csv_header_row_count = 0 + csv_column_names = [] + csv_column_types = [] + csv_skip_rows = 0 + csv_metadata_rows = 0 + csv_metadata_separators = [":", "="] + csv_metadata_trim_set = "" + csv_skip_columns = 0 + csv_delimiter = "," + csv_comment = "" + csv_trim_space = false + csv_tag_columns = [] + csv_measurement_column = "" + csv_timestamp_column = "" + csv_timestamp_format = "" + csv_timezone = "" + csv_skip_values = [] + csv_skip_errors = false + csv_reset_mode = "none" + +[[outputs.influxdb_v2]] + urls = ["https://cluster-id.influxdb.io"] + token = "$INFLUX_TOKEN" + organization = "" + bucket = "DATABASE_NAME" + content_encoding = "gzip" +``` + +{{% /expand %}} +{{< /expand-wrapper >}} + +**Restart the Telegraf agent** to apply the configuration change and write the CSV +data to InfluxDB. + +#### Other Telegraf configuration options + +The preceding examples describe Telegraf configurations necessary for writing to InfluxDB Cloud Dedicated. +The output plugin provides several other options for configuring the Telegraf client: + +- `influx_uint_support`: supported by the InfluxDB IOx storage engine. +- See [`influxdb_v2` plugin options](https://github.com/influxdata/telegraf/blob/master/plugins/outputs/influxdb_v2/README.md) on GitHub. diff --git a/content/influxdb/cloud-dedicated/write-data/migrate-data/_index.md b/content/influxdb/cloud-dedicated/write-data/migrate-data/_index.md new file mode 100644 index 000000000..94db6c7f4 --- /dev/null +++ b/content/influxdb/cloud-dedicated/write-data/migrate-data/_index.md @@ -0,0 +1,74 @@ +--- +title: Migrate data to InfluxDB Cloud Dedicated +description: > + Migrate data from InfluxDB powered by TSM (OSS, Enterprise, or Cloud) to + InfluxDB Cloud Dedicated. +menu: + influxdb_cloud_dedicated: + name: Migrate data + parent: Write data +weight: 104 +alt_engine: /influxdb/cloud/migrate-data/ +--- + +Migrate data to InfluxDB Cloud Dedicated powered by InfluxDB IOx from other +InfluxDB instances powered by TSM including InfluxDB OSS 1.x, 2.x, +InfluxDB Enterprise, and InfluxDB Cloud (TSM). + +- [Should you migrate?](#should-you-migrate) + - [Are you currently limited by series cardinality?](#are-you-currently-limited-by-series-cardinality) + - [Do you want to use SQL to query your data?](#do-you-want-to-use-sql-to-query-your-data) + - [Do you want better InfluxQL performance?](#do-you-want-better-influxql-performance) + - [Do you depend on a specific cloud provider or region?](#do-you-depend-on-a-specific-cloud-provider-or-region) + - [Are you reliant on Flux queries and Flux tasks?](#are-you-reliant-on-flux-queries-and-flux-tasks) +- [Data migration guides](#data-migration-guides) + +## Should you migrate? + +There are important things to consider with migrating to InfluxDB Cloud Dedicated. +The following questions will help guide your decision to migrate. + +#### Are you currently limited by series cardinality? + +**Yes, you should migrate**. Series cardinality is a major limiting factor with +the InfluxDB TSM storage engine. The more unique series in your data, the less +performant your database. +The IOx storage engine supports near limitless series cardinality and is, without +question, the better solution for high series cardinality workloads. + +#### Do you want to use SQL to query your data? + +**Yes, you should migrate**. InfluxDB Cloud Dedicated lets you query your time +series data with SQL. For more information about querying your data with SQL, see: + +- [Query data with SQL](/influxdb/cloud-dedicated/query-data/sql/) +- [InfluxDB SQL reference](/influxdb/cloud-dedicated/reference/sql/) + +#### Do you want better InfluxQL performance? + +**Yes, you should migrate**. One of the primary goals when designing the InfluxDB +IOx storage engine was to enable performant implementations of both SQL and InfluxQL. +When compared to querying InfluxDB powered by TSM (InfluxDB OSS 1.x, 2.x, and Enterprise), +InfluxQL queries are more performant when querying InfluxDB powered by InfluxDB IOx. + +#### Do you depend on a specific cloud provider or region? + +**You should maybe migrate**. InfluxDB Cloud Dedicated instances are available +from the following providers: + +{{< cloud_regions type=iox-list >}} + +If your deployment requires other cloud providers or regions, you may need to +wait until the IOx storage engine is available in a region that meets your requirements. +We are currently working to make InfluxDB IOx available on more providers and +in more regions around the world. + +#### Are you reliant on Flux queries and Flux tasks? + +**You should not migrate**. InfluxDB Cloud Dedicated does not support Flux. + +--- + +## Data migration guides + +{{< children >}} diff --git a/content/influxdb/cloud-dedicated/write-data/migrate-data/migrate-1x-to-cloud-dedicated.md b/content/influxdb/cloud-dedicated/write-data/migrate-data/migrate-1x-to-cloud-dedicated.md new file mode 100644 index 000000000..0d4803381 --- /dev/null +++ b/content/influxdb/cloud-dedicated/write-data/migrate-data/migrate-1x-to-cloud-dedicated.md @@ -0,0 +1,238 @@ +--- +title: Migrate data from InfluxDB 1.x to InfluxDB Cloud Dedicated +description: > + To migrate data from a TSM-powered InfluxDB 1.x (OSS or Enterprise) to an + InfluxDB Cloud Dedicated cluster, export the data as line protocol and + write the exported data to your InfluxDB Cloud Dedicated database. +menu: + influxdb_cloud_dedicated: + name: Migrate from 1.x to Dedicated + parent: Migrate data +weight: 103 +aliases: + - /influxdb/cloud-dedicated/write-data/migrate-data/migrate-1x-to-iox/ +related: + - /influxdb/cloud-dedicated/admin/databases/ + - /influxdb/cloud-dedicated/admin/tokens/ + - /influxdb/cloud-dedicated/primers/api/v1/ + - /influxdb/cloud-dedicated/primers/api/v2/ +--- + +To migrate data from an InfluxDB 1.x OSS or Enterprise instance to InfluxDB Cloud +Dedicated, export the data as line protocol and write +the exported data to an InfluxDB Cloud Dedicated database. + +## Tools to use +The migration process uses the following tools: + +- **`influx_inspect` utility**: + The [`influx_inspect` utility](/{{< latest "influxdb" "v1" >}}/tools/influx_inspect/#export) + is packaged with InfluxDB 1.x OSS and Enterprise. +- **[`influxctl` admin CLI](/influxdb/cloud-dedicated/reference/cli/influxctl/)**. +- [v1 API `/write` endpoint](/influxdb/cloud-dedicated/primers/api/v1/) or [v2 API `/api/v2/write` endpoint](/influxdb/cloud-dedicated/primers/api/v2/) and API client libraries. + + +## Migrate data + +1. **Export data from your InfluxDB 1.x instance as line protocol.** + + Use the **InfluxDB 1.x `influx_inspect export` utility** to export data as + line protocol and store it in a file. + Include the following: + + - ({{< req "Required" >}}) `-lponly` flag to export line protocol without InfluxQL DDL or DML. + - ({{< req "Required" >}}) `-out` flag with a path to an output file. + Default is `~/.influxdb/export`. _Any subsequent export commands without + the output file defined will overwrite the existing export file._ + - `-compress` flag to use gzip to compress the output. + - `-datadir` flag with the path to your InfluxDB 1.x `data` directory. + Only required if the `data` directory is at a non-default location. + For information about default locations, see + [InfluxDB OSS 1.x file system layout](/{{< latest "influxdb" "v1" >}}/concepts/file-system-layout/#file-system-layout) + or [InfluxDB Enterprise 1.x file system layout](/{{< latest "enterprise_influxdb" >}}/concepts/file-system-layout/#file-system-layout). + - `-waldir` flag with the path to your InfluxDB 1.x `wal` directory. + Only required if the `wal` directory is at a non-default location. + For information about default locations, see + [InfluxDB OSS 1.x file system layout](/{{< latest "influxdb" "v1" >}}/concepts/file-system-layout/#file-system-layout) + or [InfluxDB Enterprise 1.x file system layout](/{{< latest "enterprise_influxdb" >}}/concepts/file-system-layout/#file-system-layout). + - `-database` flag with a specific database name to export. + By default, all databases are exported. + - `-retention` flag with a specific retention policy to export. + By default, all retention policies are exported. + - `-start` flag with an RFC3339 timestamp that defines the earliest time to export. + Default is `1677-09-20T16:27:54-07:44`. + - `-end` flag with an RFC3339 timestamp that defines the latest time to export. + Default is `2262-04-11T16:47:16-07:00`. + + {{% note %}} +We recommend exporting each database and retention policy combination separately +to easily write the exported data into corresponding InfluxDB Cloud Dedicated +databases. + {{% /note %}} + + ##### Export all data in a database and retention policy to a file + ```sh + influx_inspect export \ + -lponly \ + -database example-db \ + -retention example-rp \ + -out path/to/export-file.lp + ``` + + ##### View more export command examples: + {{< expand-wrapper >}} +{{% expand "Export all data to a file" %}} + +```sh +influx_inspect export \ + -lponly \ + -out path/to/export-file.lp.gzip +``` + +{{% /expand %}} + +{{% expand "Export all data to a compressed file" %}} + +```sh +influx_inspect export \ + -lponly \ + -compress \ + -out path/to/export-file.lp.gzip +``` + +{{% /expand %}} + +{{% expand "Export data within time bounds to a file" %}} + +```sh +influx_inspect export \ + -lponly \ + -start 2020-01-01T00:00:00Z \ + -end 2023-01-01T00:00:00Z \ + -out path/to/export-file.lp +``` + +{{% /expand %}} + +{{% expand "Export a database and all its retention policies to a file" %}} + +```sh +influx_inspect export \ + -lponly \ + -database example-db \ + -out path/to/export-file.lp +``` + +{{% /expand %}} + +{{% expand "Export a specific database and retention policy to a file" %}} + +```sh +influx_inspect export \ + -lponly \ + -database example-db \ + -retention example-rp \ + -out path/to/export-file.lp +``` + +{{% /expand %}} + +{{% expand "Export all data from _non-default_ `data` and `wal` directories" %}} + +```sh +influx_inspect export \ + -lponly \ + -datadir path/to/influxdb/data/ \ + -waldir path/to/influxdb/wal/ \ + -out path/to/export-file.lp +``` + +{{% /expand %}} + {{< /expand-wrapper >}} + +2. Create InfluxDB Cloud Dedicated databases for each InfluxDB 1.x database and retention policy combination. + + {{% note %}} +**If coming from InfluxDB v1**, the concepts of databases and retention policies +have been combined into a single concept--database. Retention policies are no +longer part of the InfluxDB data model. However, InfluxDB Cloud Dedicated does +support InfluxQL, which requires databases and retention policies. +See [InfluxQL DBRP naming convention](/influxdb/cloud-dedicated/admin/databases/create/#influxql-dbrp-naming-convention). + +**If coming from InfluxDB v2 or InfluxDB Cloud**, _database_ and _bucket_ are synonymous. + {{% /note %}} + + {{< expand-wrapper >}} +{{% expand "View example 1.x databases and retention policies as InfluxDB Cloud Dedicated databases" %}} +If you have the following InfluxDB 1.x data structure: + +- example-db _(database)_ + - autogen _(retention policy)_ + - historical-1mo _(retention policy)_ + - historical-6mo _(retention policy)_ + - historical-1y _(retention policy)_ + +You would create the following InfluxDB {{< current-version >}} databases: + +- example-db/autogen +- example-db/historical-1mo +- example-db/historical-6mo +- example-db/historical-1y + +{{% /expand %}} + {{< /expand-wrapper >}} + + Use the [`influxctl database create` command](/influxdb/cloud-dedicated/reference/cli/influxctl/database/create/) + to [create a database](/influxdb/cloud-dedicated/admin/databases/create/) in your InfluxDB Cloud Dedicated cluster. + + Provide the following arguments: + + - _(Optional)_ Database [retention period](/influxdb/cloud-dedicated/admin/databases/#retention-periods) + (default is infinite) + - Database name _(see [Database naming restrictions](#database-naming-restrictions))_ + + ```sh + influxctl database create --retention-period 30d + ``` + + To learn more about databases in InfluxDB Cloud Dedicated, see [Manage databases](/influxdb/cloud-dedicated/admin/databases/). + +3. **Create a database token for writing to your InfluxDB Cloud Dedicated database.** + + Use the [`influxctl token create` command](/influxdb/cloud-dedicated/admin/tokens/create/) + to [create a database token](/influxdb/cloud-dedicated/admin/tokens/create/) with + _write_ permission to your database. + + Provide the following: + + - Permission grants + - `--read-database`: Grants read access to a database + - `--write-database` Grants write access to a database + - Token description + + ```sh + influxctl token create \ + --read-database example-db \ + --write-database example-db \ + "Read/write token for example-db database" + ``` + +4. **Write the exported line protocol to your InfluxDB Cloud Dedicated cluster.** + + Use the v1 API or v2 API endpoints to write data to your InfluxDB Cloud Dedicated cluster. + + Choose from the following options: + + - The [v1 API `/write` endpoint](/influxdb/cloud-dedicated/primers/api/v1/) with v1 client libraries or HTTP clients. + - The [v2 API `/api/v2/write` endpoint](/influxdb/cloud-dedicated/primers/api/v2/) with v2 client libraries or HTTP clients. + + Write each export file to the target database. + + {{% warn %}} + #### v2.x influx CLI not supported + + Don't use the `influx` CLI with InfluxDB Cloud Dedicated. + While it may coincidentally work, it isn't officially supported. + + For help finding the best workflow for your situation, [contact Support](https://support.influxdata.com/). + {{% /warn %}} diff --git a/content/influxdb/cloud-iox/admin/accounts/_index.md b/content/influxdb/cloud-iox/admin/accounts/_index.md deleted file mode 100644 index 70e40275c..000000000 --- a/content/influxdb/cloud-iox/admin/accounts/_index.md +++ /dev/null @@ -1,14 +0,0 @@ ---- -title: Manage your InfluxDB Cloud (IOx) Account -description: > - View and manage information related to your InfluxDB Cloud (IOx) account such as - pricing plans, data usage, account cancellation, etc. -weight: 10 -menu: - influxdb_cloud_iox: - parent: Administer InfluxDB Cloud - name: Manage accounts -alt_engine: /influxdb/cloud/account-management/ ---- - -{{< children >}} diff --git a/content/influxdb/cloud-iox/admin/accounts/data-usage.md b/content/influxdb/cloud-iox/admin/accounts/data-usage.md deleted file mode 100644 index 0c8763ab7..000000000 --- a/content/influxdb/cloud-iox/admin/accounts/data-usage.md +++ /dev/null @@ -1,30 +0,0 @@ ---- -title: View InfluxDB Cloud (IOx) data usage -list_title: View data usage -description: > - View your InfluxDB Cloud (IOx) data usage and rate limit notifications. -weight: 103 -menu: - influxdb_cloud_iox: - parent: Manage accounts - name: View data usage -related: - - /flux/v0.x/stdlib/experimental/usage/from/ - - /flux/v0.x/stdlib/experimental/usage/limits/ -alt_engine: /influxdb/cloud/account-management/data-usage/ ---- - -View the statistics of your data usage and rate limits (reads, writes, and delete limits) on the InfluxDB Cloud UI **Usage** page. Some usage data affects monthly costs and other usage data (for example, delete limits), does not affect pricing. For more information, see [limits and adjustable quotas](/influxdb/cloud-iox/admin/accounts/limits/). - -To view your {{< cloud-name >}} data usage, do the following: - -1. Click on your organization in the header near the top of the page. -2. Select **Usage** from the dropdown menu. -3. Select a time range to review data usage (by default, `Past 24h`), and then select one of the following: - - - **Data In:** Total data in MB written to your {{< cloud-name "short" >}} instance. Data in and write requests do not count towards your query count. - - **Query Count:** Total number of individual query operations, which include queries, tasks (alerts, notifications) and Data Explorer activity. Note, a script that includes multiple requests (for example, has multiple `from()...` lines) counts as one query. - - **Storage:** Total disk usage in gigabytes. - - **Data Out:** Total data in MB sent as responses to queries from your {{< cloud-name "short" >}} instance. - -A line graph displays usage for the selected vector for the specified time period. diff --git a/content/influxdb/cloud-iox/reference/_index.md b/content/influxdb/cloud-iox/reference/_index.md deleted file mode 100644 index cc9432ee1..000000000 --- a/content/influxdb/cloud-iox/reference/_index.md +++ /dev/null @@ -1,12 +0,0 @@ ---- -title: InfluxDB Cloud reference documentation -description: > - Reference documentation for InfluxDB Cloud including updates, API documentation, - tools, syntaxes, and more. -menu: - influxdb_cloud_iox: - name: Reference -weight: 20 ---- - -{{< children >}} \ No newline at end of file diff --git a/content/influxdb/cloud-iox/reference/cli/influx/apply/_index.md b/content/influxdb/cloud-iox/reference/cli/influx/apply/_index.md deleted file mode 100644 index 07c933727..000000000 --- a/content/influxdb/cloud-iox/reference/cli/influx/apply/_index.md +++ /dev/null @@ -1,26 +0,0 @@ ---- -title: influx apply -description: The `influx apply` command applies InfluxDB templates. -menu: - influxdb_cloud_iox: - name: influx apply - parent: influx -weight: 101 -aliases: - - /influxdb/cloud-iox/reference/cli/influx/pkg/ -influxdb/cloud-iox/tags: [templates] -related: - - /influxdb/cloud-iox/reference/cli/influx/#provide-required-authentication-credentials, influx CLI—Provide required authentication credentials - - /influxdb/cloud-iox/reference/cli/influx/#flag-patterns-and-conventions, influx CLI—Flag patterns and conventions -metadata: [influx CLI 2.0.0+] ---- - -{{% warn %}} -#### Not supported in InfluxDB IOx-powered organizations - -While this command is included in the `influx` CLI {{< latest-cli >}}, this -functionality is not available in InfluxDB Cloud organizations powered by the -InfluxDB IOx storage engine. -{{% /warn %}} - -{{< duplicate-oss >}} \ No newline at end of file diff --git a/content/influxdb/cloud-iox/reference/cli/influx/auth/_index.md b/content/influxdb/cloud-iox/reference/cli/influx/auth/_index.md deleted file mode 100644 index 28f33b1b7..000000000 --- a/content/influxdb/cloud-iox/reference/cli/influx/auth/_index.md +++ /dev/null @@ -1,17 +0,0 @@ ---- -title: influx auth -description: The `influx auth` command and its subcommands manage API tokens in InfluxDB. -menu: - influxdb_cloud_iox: - name: influx auth - parent: influx -weight: 101 -influxdb/cloud-iox/tags: [authentication] -cascade: - related: - - /influxdb/cloud-iox/reference/cli/influx/#provide-required-authentication-credentials, influx CLI—Provide required authentication credentials - - /influxdb/cloud-iox/reference/cli/influx/#flag-patterns-and-conventions, influx CLI—Flag patterns and conventions - metadata: [influx CLI 2.0.0+] ---- - -{{< duplicate-oss >}} diff --git a/content/influxdb/cloud-iox/reference/cli/influx/bucket-schema/_index.md b/content/influxdb/cloud-iox/reference/cli/influx/bucket-schema/_index.md deleted file mode 100644 index 11ddec73a..000000000 --- a/content/influxdb/cloud-iox/reference/cli/influx/bucket-schema/_index.md +++ /dev/null @@ -1,19 +0,0 @@ ---- -title: influx bucket-schema -description: The `influx bucket-schema` command and its subcommands manage schemas of buckets in InfluxDB. -menu: - influxdb_cloud_iox: - name: influx bucket-schema - parent: influx -weight: 101 -influxdb/cloud-iox/tags: [buckets, bucket-schema] -cascade: - related: - - /influxdb/cloud/organizations/buckets/bucket-schema - - /influxdb/cloud/organizations/buckets/ - - /influxdb/cloud-iox/reference/cli/influx/#provide-required-authentication-credentials, influx CLI—Provide required authentication credentials - - /influxdb/cloud-iox/reference/cli/influx/#provide-required-authentication-credentials, influx CLI—Provide required authentication credentials - metadata: [influx CLI 2.1.0+] ---- - -{{< duplicate-oss >}} diff --git a/content/influxdb/cloud-iox/reference/cli/influx/bucket/_index.md b/content/influxdb/cloud-iox/reference/cli/influx/bucket/_index.md deleted file mode 100644 index de984b981..000000000 --- a/content/influxdb/cloud-iox/reference/cli/influx/bucket/_index.md +++ /dev/null @@ -1,18 +0,0 @@ ---- -title: influx bucket -description: The `influx bucket` command and its subcommands manage buckets in InfluxDB. -menu: - influxdb_cloud_iox: - name: influx bucket - parent: influx -weight: 101 -influxdb/cloud-iox/tags: [buckets] -cascade: - related: - - /influxdb/cloud-iox/organizations/buckets/ - - /influxdb/cloud-iox/reference/cli/influx/#provide-required-authentication-credentials, influx CLI—Provide required authentication credentials - - /influxdb/cloud-iox/reference/cli/influx/#flag-patterns-and-conventions, influx CLI—Flag patterns and conventions - metadata: [influx CLI 2.0.0+] ---- - -{{< duplicate-oss >}} diff --git a/content/influxdb/cloud-iox/reference/cli/influx/bucket/delete.md b/content/influxdb/cloud-iox/reference/cli/influx/bucket/delete.md deleted file mode 100644 index e0ac46a9e..000000000 --- a/content/influxdb/cloud-iox/reference/cli/influx/bucket/delete.md +++ /dev/null @@ -1,15 +0,0 @@ ---- -title: influx bucket delete -description: The `influx bucket delete` command deletes a bucket from InfluxDB and all the data it contains. -menu: - influxdb_cloud_iox: - name: influx bucket delete - parent: influx bucket -weight: 201 -related: - - /influxdb/cloud/organizations/buckets/delete-bucket/ - - /influxdb/cloud-iox/reference/cli/influx/#provide-required-authentication-credentials, influx CLI—Provide required authentication credentials - - /influxdb/cloud-iox/reference/cli/influx/#provide-required-authentication-credentials, influx CLI—Provide required authentication credentials ---- - -{{< duplicate-oss >}} diff --git a/content/influxdb/cloud-iox/reference/cli/influx/completion/_index.md b/content/influxdb/cloud-iox/reference/cli/influx/completion/_index.md deleted file mode 100644 index fed5b00c7..000000000 --- a/content/influxdb/cloud-iox/reference/cli/influx/completion/_index.md +++ /dev/null @@ -1,18 +0,0 @@ ---- -title: influx completion -description: > - The `influx completion` command outputs `influx` shell completion scripts for a - specified shell (`bash` or `zsh`). -menu: - influxdb_cloud_iox: - name: influx completion - parent: influx -weight: 101 -influxdb/cloud-iox/tags: [cli, tools] -related: - - /influxdb/cloud-iox/reference/cli/influx/#provide-required-authentication-credentials, influx CLI—Provide required authentication credentials - - /influxdb/cloud-iox/reference/cli/influx/#provide-required-authentication-credentials, influx CLI—Provide required authentication credentials -metadata: [influx CLI 2.0.0+] ---- - -{{< duplicate-oss >}} diff --git a/content/influxdb/cloud-iox/reference/cli/influx/config/_index.md b/content/influxdb/cloud-iox/reference/cli/influx/config/_index.md deleted file mode 100644 index 14517e998..000000000 --- a/content/influxdb/cloud-iox/reference/cli/influx/config/_index.md +++ /dev/null @@ -1,17 +0,0 @@ ---- -title: influx config -description: The `influx config` command and subcommands manage multiple InfluxDB connection configurations. -menu: - influxdb_cloud_iox: - name: influx config - parent: influx -weight: 101 -influxdb/cloud-iox/tags: [config] -cascade: - related: - - /influxdb/cloud-iox/reference/cli/influx/#provide-required-authentication-credentials, influx CLI—Provide required authentication credentials - - /influxdb/cloud-iox/reference/cli/influx/#provide-required-authentication-credentials, influx CLI—Provide required authentication credentials - metadata: [influx CLI 2.0.0+] ---- - -{{< duplicate-oss >}} diff --git a/content/influxdb/cloud-iox/reference/cli/influx/dashboards/_index.md b/content/influxdb/cloud-iox/reference/cli/influx/dashboards/_index.md deleted file mode 100644 index dfd84e3c4..000000000 --- a/content/influxdb/cloud-iox/reference/cli/influx/dashboards/_index.md +++ /dev/null @@ -1,25 +0,0 @@ ---- -title: influx dashboards -description: > - The `influx dashboards` command lists existing InfluxDB dashboards. -menu: - influxdb_cloud_iox: - name: influx dashboards - parent: influx -weight: 101 -influxdb/cloud-iox/tags: [telegraf] -related: - - /influxdb/cloud-iox/reference/cli/influx/#provide-required-authentication-credentials, influx CLI—Provide required authentication credentials - - /influxdb/cloud-iox/reference/cli/influx/#provide-required-authentication-credentials, influx CLI—Provide required authentication credentials -metadata: [influx CLI 2.0.0+] ---- - -{{% warn %}} -#### Not supported in InfluxDB IOx-powered organizations - -While this command is included in the `influx` CLI {{< latest-cli >}}, this -functionality is not available in InfluxDB Cloud organizations powered by the -InfluxDB IOx storage engine. -{{% /warn %}} - -{{< duplicate-oss >}} diff --git a/content/influxdb/cloud-iox/reference/cli/influx/delete/_index.md b/content/influxdb/cloud-iox/reference/cli/influx/delete/_index.md deleted file mode 100644 index 991ef4646..000000000 --- a/content/influxdb/cloud-iox/reference/cli/influx/delete/_index.md +++ /dev/null @@ -1,19 +0,0 @@ ---- -title: influx delete -description: The `influx delete` command deletes points from an InfluxDB bucket. -menu: - influxdb_cloud_iox: - name: influx delete - parent: influx -weight: 101 -influxdb/cloud-iox/tags: [delete] -related: - - /influxdb/cloud/write-data/delete-data - - /influxdb/cloud/reference/syntax/delete-predicate - - /influxdb/cloud-iox/reference/cli/influx/#provide-required-authentication-credentials, influx CLI—Provide required authentication credentials - - /influxdb/cloud-iox/reference/cli/influx/#provide-required-authentication-credentials, influx CLI—Provide required authentication credentials -metadata: [influx CLI 2.0.3+] -updated_in: CLI v2.2.0 ---- - -{{< duplicate-oss >}} diff --git a/content/influxdb/cloud-iox/reference/cli/influx/export/_index.md b/content/influxdb/cloud-iox/reference/cli/influx/export/_index.md deleted file mode 100644 index 912e9a63d..000000000 --- a/content/influxdb/cloud-iox/reference/cli/influx/export/_index.md +++ /dev/null @@ -1,24 +0,0 @@ ---- -title: influx export -description: The `influx export` command exports existing resources as an InfluxDB template. -menu: - influxdb_cloud_iox: - parent: influx -weight: 101 -cascade: - related: - - /influxdb/cloud/influxdb-templates/create/ - - /influxdb/cloud-iox/reference/cli/influx/#provide-required-authentication-credentials, influx CLI—Provide required authentication credentials - - /influxdb/cloud-iox/reference/cli/influx/#provide-required-authentication-credentials, influx CLI—Provide required authentication credentials - metadata: [influx CLI 2.0.0+] - prepend: - block: warn - content: | - #### Not supported in InfluxDB IOx-powered organizations - - While this command is included in the `influx` CLI, this functionality is - not available in InfluxDB Cloud organizations powered by the InfluxDB IOx - storage engine. ---- - -{{< duplicate-oss >}} diff --git a/content/influxdb/cloud-iox/reference/cli/influx/export/all.md b/content/influxdb/cloud-iox/reference/cli/influx/export/all.md deleted file mode 100644 index 5b720f3c2..000000000 --- a/content/influxdb/cloud-iox/reference/cli/influx/export/all.md +++ /dev/null @@ -1,15 +0,0 @@ ---- -title: influx export all -description: > - The `influx export all` command exports all resources in an organization as an InfluxDB template. -menu: - influxdb_cloud_iox: - parent: influx export -weight: 201 -related: - - /influxdb/cloud/influxdb-templates/create/ - - /influxdb/cloud-iox/reference/cli/influx/#provide-required-authentication-credentials, influx CLI—Provide required authentication credentials - - /influxdb/cloud-iox/reference/cli/influx/#provide-required-authentication-credentials, influx CLI—Provide required authentication credentials ---- - -{{< duplicate-oss >}} diff --git a/content/influxdb/cloud-iox/reference/cli/influx/help/_index.md b/content/influxdb/cloud-iox/reference/cli/influx/help/_index.md deleted file mode 100644 index fe6014e5e..000000000 --- a/content/influxdb/cloud-iox/reference/cli/influx/help/_index.md +++ /dev/null @@ -1,15 +0,0 @@ ---- -title: influx help -description: The `influx help` command provides help for any command in the `influx` command line interface. -menu: - influxdb_cloud_iox: - name: influx help - parent: influx -weight: 101 -related: - - /influxdb/cloud-iox/reference/cli/influx/#provide-required-authentication-credentials, influx CLI—Provide required authentication credentials - - /influxdb/cloud-iox/reference/cli/influx/#provide-required-authentication-credentials, influx CLI—Provide required authentication credentials -metadata: [influx CLI 2.0.0+] ---- - -{{< duplicate-oss >}} diff --git a/content/influxdb/cloud-iox/reference/cli/influx/org/_index.md b/content/influxdb/cloud-iox/reference/cli/influx/org/_index.md deleted file mode 100644 index 7346b2d37..000000000 --- a/content/influxdb/cloud-iox/reference/cli/influx/org/_index.md +++ /dev/null @@ -1,17 +0,0 @@ ---- -title: influx org -description: The `influx org` command and its subcommands manage organization information in InfluxDB. -menu: - influxdb_cloud_iox: - name: influx org - parent: influx -weight: 101 -influxdb/cloud-iox/tags: [organizations] -cascade: - related: - - /influxdb/cloud-iox/reference/cli/influx/#provide-required-authentication-credentials, influx CLI—Provide required authentication credentials - - /influxdb/cloud-iox/reference/cli/influx/#provide-required-authentication-credentials, influx CLI—Provide required authentication credentials - metadata: [influx CLI 2.0.0+] ---- - -{{< duplicate-oss >}} diff --git a/content/influxdb/cloud-iox/reference/cli/influx/query/_index.md b/content/influxdb/cloud-iox/reference/cli/influx/query/_index.md deleted file mode 100644 index c09997c6f..000000000 --- a/content/influxdb/cloud-iox/reference/cli/influx/query/_index.md +++ /dev/null @@ -1,30 +0,0 @@ ---- -title: influx query -description: > - The `influx query` command executes a literal Flux query provided as a string - or a literal Flux query contained in a file by specifying the file prefixed with an '@' sign. -menu: - influxdb_cloud_iox: - name: influx query - parent: influx -weight: 101 -influxdb/cloud-iox/tags: [query] -related: - - /influxdb/cloud/query-data/ - - /influxdb/cloud/query-data/execute-queries/influx-query/ - - /influxdb/cloud-iox/reference/cli/influx/#provide-required-authentication-credentials, influx CLI—Provide required authentication credentials - - /influxdb/cloud-iox/reference/cli/influx/#provide-required-authentication-credentials, influx CLI—Provide required authentication credentials -metadata: [influx CLI 2.0.0+] -updated_in: CLI v2.0.5 ---- - -{{% note %}} -#### Use SQL and Flux together - -The `influx query` command and the InfluxDB `/api/v2/query` API endpoint it uses -only support Flux queries. To query an InfluxDB bucket powered by IOx with SQL, -Use the `iox.sql()` Flux function. For more information, see -[Use Flux and SQL to query data](/influxdb/cloud-iox/query-data/flux-sql/). -{{% /note %}} - -{{< duplicate-oss >}} diff --git a/content/influxdb/cloud-iox/reference/cli/influx/scripts/_index.md b/content/influxdb/cloud-iox/reference/cli/influx/scripts/_index.md deleted file mode 100644 index a0373c451..000000000 --- a/content/influxdb/cloud-iox/reference/cli/influx/scripts/_index.md +++ /dev/null @@ -1,18 +0,0 @@ ---- -title: influx scripts -description: The `influx scripts` command and its subcommands manage invokable scripts in InfluxDB. -menu: - influxdb_cloud_iox: - name: influx scripts - parent: influx -weight: 101 -influxdb/cloud-iox/tags: [scripts] -cascade: - related: - - /influxdb/cloud-iox/reference/cli/influx/#provide-required-authentication-credentials, influx CLI—Provide required authentication credentials - - /influxdb/cloud-iox/reference/cli/influx/#provide-required-authentication-credentials, influx CLI—Provide required authentication credentials - - /influxdb/cloud/api-guide/api-invokable-scripts/ - metadata: [influx CLI 2.4.0+, InfluxDB Cloud only] ---- - -{{< duplicate-oss >}} diff --git a/content/influxdb/cloud-iox/reference/cli/influx/secret/_index.md b/content/influxdb/cloud-iox/reference/cli/influx/secret/_index.md deleted file mode 100644 index a8d0590bc..000000000 --- a/content/influxdb/cloud-iox/reference/cli/influx/secret/_index.md +++ /dev/null @@ -1,18 +0,0 @@ ---- -title: influx secret -description: The `influx secret` command manages secrets. -menu: - influxdb_cloud_iox: - name: influx secret - parent: influx -weight: 101 -cascade: - influxdb/cloud-iox/tags: [secrets] - related: - - /influxdb/cloud/security/secrets/ - - /influxdb/cloud-iox/reference/cli/influx/#provide-required-authentication-credentials, influx CLI—Provide required authentication credentials - - /influxdb/cloud-iox/reference/cli/influx/#provide-required-authentication-credentials, influx CLI—Provide required authentication credentials - metadata: [influx CLI 2.0.0+] ---- - -{{< duplicate-oss >}} diff --git a/content/influxdb/cloud-iox/reference/cli/influx/stacks/_index.md b/content/influxdb/cloud-iox/reference/cli/influx/stacks/_index.md deleted file mode 100644 index 42b2bd21d..000000000 --- a/content/influxdb/cloud-iox/reference/cli/influx/stacks/_index.md +++ /dev/null @@ -1,20 +0,0 @@ ---- -title: influx stacks -description: > - The `influx stacks` command and its subcommands list and manage InfluxDB stacks - and associated resources. -menu: - influxdb_cloud_iox: - name: influx stacks - parent: influx -weight: 101 -influxdb/cloud-iox/tags: [templates] -cascade: - related: - - /influxdb/cloud/influxdb-templates/stacks/ - - /influxdb/cloud-iox/reference/cli/influx/#provide-required-authentication-credentials, influx CLI—Provide required authentication credentials - - /influxdb/cloud-iox/reference/cli/influx/#provide-required-authentication-credentials, influx CLI—Provide required authentication credentials - metadata: [influx CLI 2.0.1+] ---- - -{{< duplicate-oss >}} diff --git a/content/influxdb/cloud-iox/reference/cli/influx/task/_index.md b/content/influxdb/cloud-iox/reference/cli/influx/task/_index.md deleted file mode 100644 index b77b1fa06..000000000 --- a/content/influxdb/cloud-iox/reference/cli/influx/task/_index.md +++ /dev/null @@ -1,18 +0,0 @@ ---- -title: influx task -description: The `influx task` command and its subcommands manage tasks in InfluxDB. -menu: - influxdb_cloud_iox: - name: influx task - parent: influx -weight: 101 -influxdb/cloud-iox/tags: [tasks] -cascade: - related: - - /influxdb/cloud/process-data/ - - /influxdb/cloud-iox/reference/cli/influx/#provide-required-authentication-credentials, influx CLI—Provide required authentication credentials - - /influxdb/cloud-iox/reference/cli/influx/#provide-required-authentication-credentials, influx CLI—Provide required authentication credentials - metadata: [influx CLI 2.0.0+] ---- - -{{< duplicate-oss >}} diff --git a/content/influxdb/cloud-iox/reference/cli/influx/telegrafs/_index.md b/content/influxdb/cloud-iox/reference/cli/influx/telegrafs/_index.md deleted file mode 100644 index a0e6cae33..000000000 --- a/content/influxdb/cloud-iox/reference/cli/influx/telegrafs/_index.md +++ /dev/null @@ -1,20 +0,0 @@ ---- -title: influx telegrafs -description: > - The `influx telegrafs` command lists Telegraf configurations. - Subcommands manage Telegraf configurations. -menu: - influxdb_cloud_iox: - name: influx telegrafs - parent: influx -weight: 101 -influxdb/cloud-iox/tags: [telegraf] -cascade: - related: - - /influxdb/cloud/telegraf-configs/ - - /influxdb/cloud-iox/reference/cli/influx/#provide-required-authentication-credentials, influx CLI—Provide required authentication credentials - - /influxdb/cloud-iox/reference/cli/influx/#provide-required-authentication-credentials, influx CLI—Provide required authentication credentials - metadata: [influx CLI 2.0.0+] ---- - -{{< duplicate-oss >}} diff --git a/content/influxdb/cloud-iox/reference/cli/influx/template/_index.md b/content/influxdb/cloud-iox/reference/cli/influx/template/_index.md deleted file mode 100644 index 7b38bf46f..000000000 --- a/content/influxdb/cloud-iox/reference/cli/influx/template/_index.md +++ /dev/null @@ -1,18 +0,0 @@ ---- -title: influx template -description: The `influx template` command summarizes the specified InfluxDB template. -menu: - influxdb_cloud_iox: - name: influx template - parent: influx -weight: 101 -influxdb/cloud-iox/tags: [templates] -cascade: - related: - - /influxdb/cloud/influxdb-templates/ - - /influxdb/cloud-iox/reference/cli/influx/#provide-required-authentication-credentials, influx CLI—Provide required authentication credentials - - /influxdb/cloud-iox/reference/cli/influx/#provide-required-authentication-credentials, influx CLI—Provide required authentication credentials - metadata: [influx CLI 2.0.1+] ---- - -{{< duplicate-oss >}} diff --git a/content/influxdb/cloud-iox/reference/cli/influx/user/password.md b/content/influxdb/cloud-iox/reference/cli/influx/user/password.md deleted file mode 100644 index 0e4f29f90..000000000 --- a/content/influxdb/cloud-iox/reference/cli/influx/user/password.md +++ /dev/null @@ -1,16 +0,0 @@ ---- -title: influx user password -description: The `influx user password` command updates the password for a user in InfluxDB. -menu: - influxdb_cloud_iox: - name: influx user password - parent: influx user -weight: 201 -related: - - /influxdb/cloud-iox/admin/accounts/change-password/ - - /influxdb/cloud-iox/reference/cli/influx/#provide-required-authentication-credentials, influx CLI—Provide required authentication credentials - - /influxdb/cloud-iox/reference/cli/influx/#provide-required-authentication-credentials, influx CLI—Provide required authentication credentials -canonical: /{{< latest "influxdb" "v2" >}}/reference/cli/influx/user/password/ ---- - -{{< duplicate-oss >}} diff --git a/content/influxdb/cloud-iox/reference/cli/influx/v1/_index.md b/content/influxdb/cloud-iox/reference/cli/influx/v1/_index.md deleted file mode 100644 index 78c99bb8f..000000000 --- a/content/influxdb/cloud-iox/reference/cli/influx/v1/_index.md +++ /dev/null @@ -1,17 +0,0 @@ ---- -title: influx v1 -description: > - The `influx v1` command provides commands for working with the InfluxDB 1.x API in InfluxDB 2.0. -menu: - influxdb_cloud_iox: - name: influx v1 - parent: influx -weight: 101 -cascade: - related: - - /influxdb/cloud-iox/reference/cli/influx/#provide-required-authentication-credentials, influx CLI—Provide required authentication credentials - - /influxdb/cloud-iox/reference/cli/influx/#provide-required-authentication-credentials, influx CLI—Provide required authentication credentials - metadata: [influx CLI 2.0.0+] ---- - -{{< duplicate-oss >}} diff --git a/content/influxdb/cloud-iox/reference/cli/influx/v1/shell.md b/content/influxdb/cloud-iox/reference/cli/influx/v1/shell.md deleted file mode 100644 index 4dc08a67f..000000000 --- a/content/influxdb/cloud-iox/reference/cli/influx/v1/shell.md +++ /dev/null @@ -1,19 +0,0 @@ ---- -title: influx v1 shell -description: > - The `influx v1 shell` subcommand starts an InfluxQL shell (REPL). -menu: - influxdb_cloud_iox: - name: influx v1 shell - parent: influx v1 -weight: 101 -influxdb/cloud-iox/tags: [InfluxQL] -related: - - /influxdb/cloud-iox/reference/cli/influx/#provide-required-authentication-credentials, influx CLI—Provide required authentication credentials - - /influxdb/cloud-iox/reference/cli/influx/#provide-required-authentication-credentials, influx CLI—Provide required authentication credentials - - /influxdb/cloud/query-data/influxql/ - - /influxdb/v2.4/tools/influxql-shell/ -metadata: [influx CLI 2.4.0+, InfluxDB Cloud] ---- - -{{< duplicate-oss >}} diff --git a/content/influxdb/cloud-iox/reference/cli/influx/write/_index.md b/content/influxdb/cloud-iox/reference/cli/influx/write/_index.md deleted file mode 100644 index 14a9e0802..000000000 --- a/content/influxdb/cloud-iox/reference/cli/influx/write/_index.md +++ /dev/null @@ -1,24 +0,0 @@ ---- -title: influx write -description: > - The `influx write` command writes data to InfluxDB via stdin or from a specified file. - Write data using line protocol, annotated CSV, or extended annotated CSV. -menu: - influxdb_cloud_iox: - name: influx write - parent: influx -weight: 101 -influxdb/cloud-iox/tags: [write] -cascade: - related: - - /influxdb/cloud-iox/write-data/ - - /influxdb/cloud-iox/reference/syntax/line-protocol/ - - /influxdb/cloud-iox/reference/syntax/annotated-csv/ - - /influxdb/cloud-iox/reference/syntax/annotated-csv/extended/ - - /influxdb/cloud-iox/reference/cli/influx/#provide-required-authentication-credentials, influx CLI—Provide required authentication credentials - - /influxdb/cloud-iox/reference/cli/influx/#provide-required-authentication-credentials, influx CLI—Provide required authentication credentials - metadata: [influx CLI 2.0.0+] -updated_in: CLI v2.0.5 ---- - -{{< duplicate-oss >}} diff --git a/content/influxdb/cloud-iox/reference/internals/_index.md b/content/influxdb/cloud-iox/reference/internals/_index.md deleted file mode 100644 index 033bacac6..000000000 --- a/content/influxdb/cloud-iox/reference/internals/_index.md +++ /dev/null @@ -1,12 +0,0 @@ ---- -title: InfluxDB Cloud internals -description: > - Learn about InfluxDB Cloud internal systems and mechanisms. -menu: - influxdb_cloud_iox: - name: InfluxDB Cloud internals - parent: Reference -weight: 107 ---- - -{{< children >}} diff --git a/content/influxdb/cloud-iox/reference/regions.md b/content/influxdb/cloud-iox/reference/regions.md deleted file mode 100644 index ceeff5935..000000000 --- a/content/influxdb/cloud-iox/reference/regions.md +++ /dev/null @@ -1,47 +0,0 @@ ---- -title: InfluxDB Cloud regions -description: > - InfluxDB Cloud is available on multiple cloud providers and in multiple regions. - Each region has a unique InfluxDB Cloud URL and API endpoint. -aliases: - - /influxdb/cloud-iox/reference/urls/ -weight: 106 -menu: - influxdb_cloud_iox: - name: InfluxDB Cloud regions - parent: Reference ---- - -InfluxDB Cloud backed by InfluxDB IOx is available on on the following cloud providers and regions. -Each region has a unique InfluxDB Cloud URL and API endpoint. -Use the URLs below to interact with your InfluxDB Cloud instances with the -[InfluxDB API](/influxdb/cloud-iox/reference/api/), [InfluxDB client libraries](/influxdb/cloud/api-guide/client-libraries/), -[`influx` CLI](/influxdb/cloud-iox/reference/cli/influx/), or [Telegraf](/influxdb/cloud-iox/write-data/use-telegraf/). - -{{% note %}} -#### InfluxDB IOx-enabled cloud regions - -We are in the process of deploying and enabling the InfluxDB IOx storage engine -on other cloud providers and regions. -{{% /note %}} - -Request a cloud region - - - -{{< cloud_regions type="iox-table" >}} diff --git a/content/influxdb/cloud-iox/write-data/delete-data.md b/content/influxdb/cloud-iox/write-data/delete-data.md deleted file mode 100644 index 8c12b6141..000000000 --- a/content/influxdb/cloud-iox/write-data/delete-data.md +++ /dev/null @@ -1,21 +0,0 @@ ---- -title: Delete data -description: > - To delete data from and IOx-backed InfluxDB Cloud bucket, please contact - [InfluxData support](https://support.influxdata.com). -menu: - influxdb_cloud_iox: - name: Delete data - parent: Write data -weight: 107 -influxdb/cloud-iox/tags: [delete] -# related: -# - /influxdb/cloud-iox/reference/syntax/delete-predicate/ -# - /influxdb/cloud-iox/reference/cli/influx/delete/ ---- - -The InfluxDB `/api/v2/delete` API endpoint has been disabled for InfluxDB -IOx-backed organizations. To delete data from an IOx-backed bucket, please -contact InfluxData Support. - -Contact InfluxData Support \ No newline at end of file diff --git a/content/influxdb/cloud-iox/write-data/use-telegraf/telegraf-configs/_index.md b/content/influxdb/cloud-iox/write-data/use-telegraf/telegraf-configs/_index.md deleted file mode 100644 index 34504c433..000000000 --- a/content/influxdb/cloud-iox/write-data/use-telegraf/telegraf-configs/_index.md +++ /dev/null @@ -1,18 +0,0 @@ ---- -title: Manage Telegraf configurations -description: > - InfluxDB Cloud lets you automatically generate Telegraf configurations or upload customized - Telegraf configurations that collect metrics and write them to InfluxDB Cloud. -weight: 102 -menu: - influxdb_cloud_iox: - name: Manage Telegraf configs - parent: Use Telegraf -influxdb/cloud-iox/tags: [telegraf] -related: - - /influxdb/cloud-iox/write-data/use-telegraf/manual-config/ - - /influxdb/cloud-iox/write-data/use-telegraf/auto-config/ -alt_engine: /influxdb/cloud/telegraf-configs/ ---- - -{{< duplicate-oss "/telegraf-configs/" >}} diff --git a/content/influxdb/cloud-iox/_index.md b/content/influxdb/cloud-serverless/_index.md similarity index 66% rename from content/influxdb/cloud-iox/_index.md rename to content/influxdb/cloud-serverless/_index.md index 3dbc68b03..a024f764c 100644 --- a/content/influxdb/cloud-iox/_index.md +++ b/content/influxdb/cloud-serverless/_index.md @@ -1,13 +1,13 @@ --- -title: InfluxDB Cloud backed by InfluxDB IOx documentation +title: InfluxDB Cloud Serverless documentation description: > - InfluxDB Cloud is a hosted and managed version of InfluxDB backed by InfluxDB IOx, - the time series platform designed to handle high write and query loads. - Learn how to use and leverage InfluxDB Cloud in use cases such as monitoring - metrics, IoT data, and events. + InfluxDB Cloud Serverless is a hosted and managed version of InfluxDB backed + by InfluxDB IOx, the time series platform designed to handle high write and query loads. + Learn how to use and leverage InfluxDB Cloud Serverless in use cases such as + monitoring metrics, IoT data, and events. menu: - influxdb_cloud_iox: - name: InfluxDB Cloud (IOx) + influxdb_cloud_serverless: + name: InfluxDB Cloud Serverless weight: 1 --- @@ -16,7 +16,7 @@ This InfluxDB Cloud documentation applies to all organizations created through **cloud2.influxdata.com** on or after **January 31, 2023** that are powered by the InfluxDB IOx storage engine. If your organization was created before this date or through the Google Cloud Platform (GCP) or Azure marketplaces, see the -[TSM-based InfluxDB Cloud documentation](/influxdb/cloud/). +[InfluxDB Cloud (TSM) documentation](/influxdb/cloud/). To see which storage engine your organization is using, find the **InfluxDB Cloud powered by** link in your @@ -25,12 +25,12 @@ If your organization is using IOx, you'll see **InfluxDB Cloud powered by IOx** followed by the version number. {{% /note %}} -InfluxDB Cloud is a hosted and managed version of InfluxDB backed by InfluxDB IOx, -the time series platform designed to handle high write and query loads. -Learn how to use and leverage InfluxDB Cloud in use cases such as monitoring +InfluxDB Cloud Serverless is a hosted and managed version of InfluxDB backed +by InfluxDB IOx, the time series platform designed to handle high write and query loads. +Learn how to use and leverage InfluxDB Cloud Serverless in use cases such as monitoring metrics, IoT data, and event monitoring. -Get started with InfluxDB Cloud (IOx) +Get started with InfluxDB Cloud Serverless ## The InfluxDB IOx storage engine @@ -48,7 +48,7 @@ View the following video for more information about InfluxDB IOx: All InfluxDB Cloud accounts and organizations created through [cloud2.influxdata.com](https://cloud2.influxdata.com) on or after **January 31, 2023** -are backed by the InfluxDB IOx storage engine. +are powered by the InfluxDB IOx storage engine. To see which storage engine your organization is using, find the **InfluxDB Cloud powered by** link in your diff --git a/content/influxdb/cloud-iox/admin/_index.md b/content/influxdb/cloud-serverless/admin/_index.md similarity index 55% rename from content/influxdb/cloud-iox/admin/_index.md rename to content/influxdb/cloud-serverless/admin/_index.md index 714bf4fd2..df0d1bf4c 100644 --- a/content/influxdb/cloud-iox/admin/_index.md +++ b/content/influxdb/cloud-serverless/admin/_index.md @@ -1,15 +1,16 @@ --- title: Administer InfluxDB Cloud seotitle: Administer InfluxDB Cloud -description: View and manage InfluxDB resources related to your InfluxDB Cloud account such as - accounts, organizations, buckets, API tokens, and secrets. +description: View and manage InfluxDB resources related to your InfluxDB Cloud + Serverless account such as accounts, organizations, buckets, API tokens, and secrets. menu: - influxdb_cloud_iox: + influxdb_cloud_serverless: name: Administer InfluxDB Cloud weight: 10 -influxdb/cloud-iox/tags: [admin, administer] +influxdb/cloud-serverless/tags: [admin, administer] --- -The following articles provide information about managing your InfluxDB Cloud resources: +The following articles provide information about managing your InfluxDB Cloud +Serverless resources: {{< children >}} diff --git a/content/influxdb/cloud-serverless/admin/accounts/_index.md b/content/influxdb/cloud-serverless/admin/accounts/_index.md new file mode 100644 index 000000000..27b7715d1 --- /dev/null +++ b/content/influxdb/cloud-serverless/admin/accounts/_index.md @@ -0,0 +1,14 @@ +--- +title: Manage your InfluxDB Cloud Serverless account +description: > + View and manage information related to your InfluxDB Cloud Serverless account + such as pricing plans, data usage, account cancellation, etc. +weight: 10 +menu: + influxdb_cloud_serverless: + parent: Administer InfluxDB Cloud + name: Manage accounts +alt_engine: /influxdb/cloud/account-management/ +--- + +{{< children >}} diff --git a/content/influxdb/cloud-serverless/admin/accounts/data-usage.md b/content/influxdb/cloud-serverless/admin/accounts/data-usage.md new file mode 100644 index 000000000..70de03739 --- /dev/null +++ b/content/influxdb/cloud-serverless/admin/accounts/data-usage.md @@ -0,0 +1,39 @@ +--- +title: View InfluxDB Cloud Serverless data usage +list_title: View data usage +description: > + View your InfluxDB Cloud Serverless data usage and rate limit notifications. +weight: 103 +menu: + influxdb_cloud_serverless: + parent: Manage accounts + name: View data usage +related: + - /flux/v0.x/stdlib/experimental/usage/from/ + - /flux/v0.x/stdlib/experimental/usage/limits/ +alt_engine: /influxdb/cloud/account-management/data-usage/ +--- + +View the statistics of your data usage and rate limits (reads, writes, and +delete limits) on the InfluxDB Cloud Serverless UI **Usage** page. +Some usage data affects monthly costs and other usage data (for example, delete +limits), does not affect pricing. For more information, see +[limits and adjustable quotas](/influxdb/cloud-serverless/admin/accounts/limits/). + +To view your {{< cloud-name >}} data usage, do the following: + +1. Click on your organization in the header near the top of the page. +2. Select **Usage** from the dropdown menu. +3. Select a time range to review data usage (by default, `Past 24h`), and then select one of the following: + + - **Data In:** Total data in MB written to your {{< cloud-name "short" >}} instance. + Data in and write requests do not count towards your query count. + - **Query Count:** Total number of individual query operations, which include + queries, tasks (alerts, notifications) and Data Explorer activity. + Note, a script that includes multiple requests (for example, has multiple + `from()...` lines) counts as one query. + - **Storage:** Total disk usage in gigabytes. + - **Data Out:** Total data in MB sent as responses to queries from your + InfluxDB Cloud Serverless instance. + +A line graph displays usage for the selected vector for the specified time period. diff --git a/content/influxdb/cloud-iox/admin/accounts/limits.md b/content/influxdb/cloud-serverless/admin/accounts/limits.md similarity index 73% rename from content/influxdb/cloud-iox/admin/accounts/limits.md rename to content/influxdb/cloud-serverless/admin/accounts/limits.md index 7c324214c..479c46e40 100644 --- a/content/influxdb/cloud-iox/admin/accounts/limits.md +++ b/content/influxdb/cloud-serverless/admin/accounts/limits.md @@ -1,11 +1,11 @@ --- -title: InfluxDB Cloud (IOx) limits and adjustable quotas +title: InfluxDB Cloud Serverless limits and adjustable quotas list_title: Limits and adjustable quotas description: > - InfluxDB Cloud (IOx) has adjustable service quotas and global (non-adjustable) system limits. + InfluxDB Cloud Serverless has adjustable service quotas and global (non-adjustable) system limits. weight: 110 menu: - influxdb_cloud_iox: + influxdb_cloud_serverless: parent: Manage accounts name: Adjustable quotas and limits related: @@ -14,7 +14,8 @@ related: alt_engine: /influxdb/cloud/account-management/limits/ --- -InfluxDB Cloud applies (non-adjustable) global system limits and adjustable service quotas on a per organization basis. +InfluxDB Cloud Serverless applies (non-adjustable) global system limits and +adjustable service quotas on a per organization basis. {{% warn %}} All __rates__ (data-in (writes), queries (reads), and deletes) are accrued within a fixed five-minute window. @@ -30,14 +31,15 @@ Review adjustable service quotas and global limits to plan for your bandwidth ne ## Adjustable service quotas -To reduce the chance of unexpected charges and protect the service for all users, InfluxDB Cloud has adjustable service quotas applied per account. +To reduce the chance of unexpected charges and protect the service for all users, +InfluxDB Cloud Serverless has adjustable service quotas applied per account. _To request higher service quotas, reach out to [InfluxData Support](https://support.influxdata.com/)._ ### Free Plan - **Data-in**: Rate of 5 MB per 5 minutes (average of 17 kb/s) - - Uncompressed bytes of normalized [line protocol](/influxdb/cloud-iox/reference/syntax/line-protocol/) + - Uncompressed bytes of normalized [line protocol](/influxdb/cloud-serverless/reference/syntax/line-protocol/) - **Read**: Rate of 300 MB per 5 minutes (average of 1000 kb/s) - Bytes in HTTP in response payload - **Available resources**: @@ -48,16 +50,16 @@ _To request higher service quotas, reach out to [InfluxData Support](https://sup - 2 checks - 2 notification rules - Unlimited Slack notification endpoints -- **Storage**: 30 days of data retention (see [retention period](/influxdb/cloud-iox/reference/glossary/#retention-period)) +- **Storage**: 30 days of data retention (see [retention period](/influxdb/cloud-serverless/reference/glossary/#retention-period)) {{% note %}} -To write historical data older than 30 days, retain data for more than 30 days, increase rate limits, or create additional organizations, upgrade to the Cloud [Usage-Based Plan](/influxdb/cloud-iox/admin/accounts/pricing-plans/#usage-based-plan). +To write historical data older than 30 days, retain data for more than 30 days, increase rate limits, or create additional organizations, upgrade to the Cloud [Usage-Based Plan](/influxdb/cloud-serverless/admin/accounts/pricing-plans/#usage-based-plan). {{% /note %}} ### Usage-Based Plan - **Data-in**: Rate of 300 MB per 5 minutes - - Uncompressed bytes of normalized [line protocol](/influxdb/cloud-iox/reference/syntax/line-protocol/) + - Uncompressed bytes of normalized [line protocol](/influxdb/cloud-serverless/reference/syntax/line-protocol/) - **Read**: Rate of 3 GB data per 5 minutes - Bytes in HTTP in response payload - **Unlimited resources** @@ -69,11 +71,14 @@ To write historical data older than 30 days, retain data for more than 30 days, - Unlimited checks - Unlimited notification rules - Unlimited notification endpoints for [all endpoints](/flux/v0.x/tags/notification-endpoints/) -- **Storage**: Set your retention period to unlimited or up to 1 year by [updating a bucket’s retention period in the InfluxDB UI](/influxdb/cloud-iox/admin/buckets/update-bucket/#update-a-buckets-retention-period-in-the-influxdb-ui), or set a custom retention period using the [`influx bucket update command`](/influxdb/cloud-iox/reference/cli/influx/bucket/update/) with the [`influx` CLI](influxdb/cloud/reference/cli/influx/). +- **Storage**: Set your retention period to unlimited or up to 1 year by [updating a bucket’s retention period in the InfluxDB UI](/influxdb/cloud-serverless/admin/buckets/update-bucket/#update-a-buckets-retention-period-in-the-influxdb-ui), or set a custom retention period using the [`influx bucket update command`](/influxdb/cloud-serverless/reference/cli/influx/bucket/update/) with the [`influx` CLI](influxdb/cloud/reference/cli/influx/). ## Global limits -InfluxDB Cloud applies global (non-adjustable) system limits to all accounts, which protects the InfluxDB Cloud infrastructure for all users. As the service continues to evolve, we'll continue to review these global limits and adjust them as appropriate. +InfluxDB Cloud Serverless applies global (non-adjustable) system limits to all accounts, +which protects the InfluxDB Cloud infrastructure for all users. +As the service continues to evolve, we'll continue to review these global limits +and adjust them as appropriate. Limits include: @@ -95,7 +100,7 @@ Combine delete predicate expressions (if possible) into a single request. Influx The {{< cloud-name >}} UI displays a notification message when service quotas or limits are exceeded. The error messages correspond with the relevant [API error responses](#api-error-responses). -Errors can also be viewed in the [Usage page](/influxdb/cloud-iox/admin/accounts/data-usage/) under **Limit Events**, e.g. `event_type_limited_query`, `event_type_limited_write`,`event_type_limited_cardinality`, or `event_type_limited_delete_rate`. +Errors can also be viewed in the [Usage page](/influxdb/cloud-serverless/admin/accounts/data-usage/) under **Limit Events**, e.g. `event_type_limited_query`, `event_type_limited_write`,`event_type_limited_cardinality`, or `event_type_limited_delete_rate`. ## API error responses diff --git a/content/influxdb/cloud-iox/admin/accounts/switch-account.md b/content/influxdb/cloud-serverless/admin/accounts/switch-account.md similarity index 90% rename from content/influxdb/cloud-iox/admin/accounts/switch-account.md rename to content/influxdb/cloud-serverless/admin/accounts/switch-account.md index 5af49f37a..e3bbd3b67 100644 --- a/content/influxdb/cloud-iox/admin/accounts/switch-account.md +++ b/content/influxdb/cloud-serverless/admin/accounts/switch-account.md @@ -4,12 +4,12 @@ seotitle: Switch between InfluxDB Cloud accounts description: > Switch from one InfluxDB Cloud account to another and set a default account. menu: - influxdb_cloud_iox: + influxdb_cloud_serverless: name: Switch InfluxDB accounts parent: Manage accounts weight: 105 aliases: - - /influxdb/cloud-iox/account-management/switch-account/ + - /influxdb/cloud-serverless/account-management/switch-account/ alt_engine: /influxdb/cloud/account-management/switch-account/ --- diff --git a/content/influxdb/cloud-iox/admin/buckets/_index.md b/content/influxdb/cloud-serverless/admin/buckets/_index.md similarity index 64% rename from content/influxdb/cloud-iox/admin/buckets/_index.md rename to content/influxdb/cloud-serverless/admin/buckets/_index.md index 0006fbae2..5eedd1ef4 100644 --- a/content/influxdb/cloud-iox/admin/buckets/_index.md +++ b/content/influxdb/cloud-serverless/admin/buckets/_index.md @@ -1,15 +1,17 @@ --- title: Manage buckets -seotitle: Manage buckets in InfluxDB Cloud -description: Manage buckets in InfluxDB Cloud using the InfluxDB UI, influx CLI, or InfluxDB HTTP API. +seotitle: Manage buckets in InfluxDB Cloud Serverless +description: > + Manage buckets in InfluxDB Cloud Serverless using the InfluxDB UI, influx CLI, + or InfluxDB HTTP API. menu: - influxdb_cloud_iox: + influxdb_cloud_serverless: name: Manage buckets parent: Administer InfluxDB Cloud weight: 105 -influxdb/cloud-iox/tags: [buckets] +influxdb/cloud-serverless/tags: [buckets] aliases: - - /influxdb/cloud-iox/organizations/buckets/ + - /influxdb/cloud-serverless/organizations/buckets/ alt_engine: /influxdb/cloud/organizations/buckets/ --- diff --git a/content/influxdb/cloud-iox/admin/buckets/create-bucket.md b/content/influxdb/cloud-serverless/admin/buckets/create-bucket.md similarity index 83% rename from content/influxdb/cloud-iox/admin/buckets/create-bucket.md rename to content/influxdb/cloud-serverless/admin/buckets/create-bucket.md index 233ae515e..2e9df0e50 100644 --- a/content/influxdb/cloud-iox/admin/buckets/create-bucket.md +++ b/content/influxdb/cloud-serverless/admin/buckets/create-bucket.md @@ -1,16 +1,18 @@ --- title: Create a bucket -seotitle: Create a bucket in InfluxDB Cloud -description: Create buckets to store time series data in InfluxDB Cloud using the InfluxDB UI, influx CLI, or InfluxDB HTTP API. +seotitle: Create a bucket in InfluxDB Cloud Serverless +description: > + Create buckets to store time series data in InfluxDB Cloud Serverless + using the InfluxDB UI, influx CLI, or InfluxDB HTTP API. menu: - influxdb_cloud_iox: + influxdb_cloud_serverless: name: Create a bucket parent: Manage buckets weight: 201 related: - - /influxdb/cloud-iox/admin/buckets/manage-explicit-bucket-schemas/ + - /influxdb/cloud-serverless/admin/buckets/manage-explicit-bucket-schemas/ aliases: - - /influxdb/cloud-iox/organizations/buckets/create-bucket/ + - /influxdb/cloud-serverless/organizations/buckets/create-bucket/ alt_engine: /influxdb/cloud/organizations/buckets/create-bucket/ --- @@ -74,7 +76,7 @@ There are two places you can create a bucket in the UI. {{% tab-content %}} -To create a bucket with the `influx` CLI, use the [`influx bucket create` command](/influxdb/cloud-iox/reference/cli/influx/bucket/create) +To create a bucket with the `influx` CLI, use the [`influx bucket create` command](/influxdb/cloud-serverless/reference/cli/influx/bucket/create) and specify values for the following flags: - `-o`, `--org`: Organization name @@ -98,7 +100,7 @@ influx bucket create \ To create a bucket with the InfluxDB HTTP API, send a request to the following endpoint: -{{< api-endpoint method="post" endpoint="https://cloud2.influxdata.com/api/v2/buckets" api-ref="/influxdb/cloud-iox/api/#operation/PostBuckets" >}} +{{< api-endpoint method="post" endpoint="https://cloud2.influxdata.com/api/v2/buckets" api-ref="/influxdb/cloud-serverless/api/#operation/PostBuckets" >}} Include the following in your request: @@ -123,14 +125,15 @@ The following example creates a bucket with a retention period of `86,400` secon ``` _For information about **InfluxDB API options and response codes**, see -[InfluxDB API Buckets reference documentation](/influxdb/cloud-iox/api/#operation/PostBuckets)._ +[InfluxDB API Buckets reference documentation](/influxdb/cloud-serverless/api/#operation/PostBuckets)._ {{% /tab-content %}} +{{< /tabs-wrapper >}} ## Create a bucket that enforces explicit schemas -A bucket with the `explicit` schema-type enforces [measurement schemas that you define for the bucket](/influxdb/cloud-iox/admin/buckets/bucket-schema/) and rejects writes that don't conform to any of the schemas. +A bucket with the `explicit` schema-type enforces [measurement schemas that you define for the bucket](/influxdb/cloud-serverless/admin/buckets/bucket-schema/) and rejects writes that don't conform to any of the schemas. Use the **`influx` CLI** or **InfluxDB HTTP API** to create a bucket with the `explicit` schema-type. @@ -154,10 +157,10 @@ Use the `influx bucket create` command and specify the `--schema-type=explicit` -Use the HTTP API [`/api/v2/buckets`](/influxdb/cloud-iox/api/#operation/PostBuckets) +Use the HTTP API [`/api/v2/buckets`](/influxdb/cloud-serverless/api/#operation/PostBuckets) endpoint and set the `schemaType` property value to `explicit` in the request body--for example: -{{< api-endpoint method="post" endpoint="https://cloud2.influxdata.com/api/v2/buckets" api-ref="/influxdb/cloud-iox/api/#operation/PostBuckets" >}} +{{< api-endpoint method="post" endpoint="https://cloud2.influxdata.com/api/v2/buckets" api-ref="/influxdb/cloud-serverless/api/#operation/PostBuckets" >}} ```js { @@ -178,4 +181,4 @@ endpoint and set the `schemaType` property value to `explicit` in the request bo {{% /tab-content %}} {{< /tabs-wrapper >}} -Next, see how to [create an explicit bucket schema](/influxdb/cloud-iox/admin/buckets/bucket-schema/) for a measurement. +Next, see how to [create an explicit bucket schema](/influxdb/cloud-serverless/admin/buckets/bucket-schema/) for a measurement. diff --git a/content/influxdb/cloud-iox/admin/buckets/manage-explicit-bucket-schemas.md b/content/influxdb/cloud-serverless/admin/buckets/manage-explicit-bucket-schemas.md similarity index 74% rename from content/influxdb/cloud-iox/admin/buckets/manage-explicit-bucket-schemas.md rename to content/influxdb/cloud-serverless/admin/buckets/manage-explicit-bucket-schemas.md index 39280eb04..9834c9d01 100644 --- a/content/influxdb/cloud-iox/admin/buckets/manage-explicit-bucket-schemas.md +++ b/content/influxdb/cloud-serverless/admin/buckets/manage-explicit-bucket-schemas.md @@ -3,30 +3,30 @@ title: Manage explicit bucket schemas seotitle: Manage explicit bucket schemas in InfluxDB Cloud description: Manage explicit bucket schemas using the influx CLI or InfluxDB HTTP API. Optionally, ensure data you write follows a specific schema. menu: - influxdb_cloud_iox: + influxdb_cloud_serverless: name: Manage explicit bucket schemas parent: Manage buckets weight: 250 -influxdb/cloud-iox/tags: [buckets, bucket-schema, bucket schemas, explicit bucket schemas, explicit measurement schema, schema] +influxdb/cloud-serverless/tags: [buckets, bucket-schema, bucket schemas, explicit bucket schemas, explicit measurement schema, schema] related: - - /influxdb/cloud-iox/write-data/best-practices/schema-design/ - - /influxdb/cloud-iox/reference/cli/influx/bucket-schema/ - - /influxdb/cloud-iox/admin/buckets/create-bucket/ - - /influxdb/cloud-iox/reference/cli/influx/ + - /influxdb/cloud-serverless/write-data/best-practices/schema-design/ + - /influxdb/cloud-serverless/reference/cli/influx/bucket-schema/ + - /influxdb/cloud-serverless/admin/buckets/create-bucket/ + - /influxdb/cloud-serverless/reference/cli/influx/ alt_engine: /influxdb/cloud/organizations/buckets/bucket-schema/ --- -Use [**explicit bucket schemas**](/influxdb/cloud-iox/reference/glossary/#bucket-schema) to enforce [column names](/influxdb/cloud-iox/reference/glossary/#column), [tags](/influxdb/cloud-iox/reference/glossary/#tag), [fields](/influxdb/cloud-iox/reference/glossary/#field), and -[data types](/influxdb/cloud-iox/reference/glossary/#data-type) for your data. +Use [**explicit bucket schemas**](/influxdb/cloud-serverless/reference/glossary/#bucket-schema) to enforce [column names](/influxdb/cloud-serverless/reference/glossary/#column), [tags](/influxdb/cloud-serverless/reference/glossary/#tag), [fields](/influxdb/cloud-serverless/reference/glossary/#field), and +[data types](/influxdb/cloud-serverless/reference/glossary/#data-type) for your data. Buckets with the `explicit` schema-type, use explicit bucket schemas to ensure measurements have specific columns and data types and to prevent non-conforming writes. -After you create a bucket schema, you're ready to [write data](/influxdb/cloud-iox/write-data/) to your bucket. +After you create a bucket schema, you're ready to [write data](/influxdb/cloud-serverless/write-data/) to your bucket. {{% note %}} #### Before you begin -The examples below reference **InfluxDB data elements**. We recommend reviewing [schema design best practices](/influxdb/cloud-iox/write-data/best-practices/schema-design/) and [**elements of line protocol**](/influxdb/cloud-iox/reference/syntax/line-protocol/#elements-of-line-protocol) if you aren't familiar with these concepts. +The examples below reference **InfluxDB data elements**. We recommend reviewing [schema design best practices](/influxdb/cloud-serverless/write-data/best-practices/schema-design/) and [**elements of line protocol**](/influxdb/cloud-serverless/reference/syntax/line-protocol/#elements-of-line-protocol) if you aren't familiar with these concepts. {{% /note %}} - [Create an explicit bucket and schema](#create-an-explicit-bucket-and-schema) @@ -47,7 +47,7 @@ The examples below reference **InfluxDB data elements**. We recommend reviewing To create an explicit bucket and schemas for your data, do the following: - 1. If you haven't already, [create a bucket that enforces explicit schemas](/influxdb/cloud-iox/admin/buckets/create-bucket/#create-a-bucket-that-enforces-explicit-schemas). + 1. If you haven't already, [create a bucket that enforces explicit schemas](/influxdb/cloud-serverless/admin/buckets/create-bucket/#create-a-bucket-that-enforces-explicit-schemas). 2. [Create a bucket schema](#create-a-bucket-schema). ### Create a bucket schema @@ -55,12 +55,12 @@ To create an explicit bucket and schemas for your data, do the following: With an `explicit` bucket, you predefine *measurement schemas* with column names, tags, fields, and data types for measurements. A measurement schema has the following properties: -- `name`: the measurement name. The name must match the [measurement column](/influxdb/cloud-iox/reference/glossary/#measurement) in your data, obey [naming rules](#write-valid-schemas), and be unique within the bucket. +- `name`: the measurement name. The name must match the [measurement column](/influxdb/cloud-serverless/reference/glossary/#measurement) in your data, obey [naming rules](#write-valid-schemas), and be unique within the bucket. - `columns`: a list of *column definitions* for the measurement. To learn more about rules for measurement _names_ and _columns_, see how to [write valid schemas](#write-valid-schemas). -Use the [**`influx` CLI**](/influxdb/cloud-iox/reference/cli/influx/) or [**InfluxDB HTTP API**](/influxdb/cloud-iox/api) to create an explicit bucket schema for a measurement. +Use the [**`influx` CLI**](/influxdb/cloud-serverless/reference/cli/influx/) or [**InfluxDB HTTP API**](/influxdb/cloud-serverless/api) to create an explicit bucket schema for a measurement. - [Create a bucket schema using the influx CLI](#create-a-bucket-schema-using-the-influx-cli) - [Create a bucket schema using the InfluxDB HTTP API](#create-a-bucket-schema-using-the-influxdb-http-api) @@ -92,7 +92,7 @@ Use the [**`influx` CLI**](/influxdb/cloud-iox/reference/cli/influx/) or [**Infl {{% /code-tab-content %}} {{< /code-tabs-wrapper >}} - 2. Use the [`influx bucket-schema create` command](/influxdb/cloud-iox/reference/cli/influx/bucket-schema/create) to define an _explicit_ bucket measurement schema. In your command, specify values for the following flags: + 2. Use the [`influx bucket-schema create` command](/influxdb/cloud-serverless/reference/cli/influx/bucket-schema/create) to define an _explicit_ bucket measurement schema. In your command, specify values for the following flags: - `--name`: the measurement name. - `--columns-file`: the location of the file that contains *column definitions* for your measurement. @@ -117,7 +117,7 @@ Use the [**`influx` CLI**](/influxdb/cloud-iox/reference/cli/influx/) or [**Infl ``` #### Create a bucket schema using the InfluxDB HTTP API -Send a request to the HTTP API [`/api/v2/buckets/{BUCKET_ID}/schema/measurements` endpoint](/influxdb/cloud-iox/api/#operation/createMeasurementSchema) +Send a request to the HTTP API [`/api/v2/buckets/{BUCKET_ID}/schema/measurements` endpoint](/influxdb/cloud-serverless/api/#operation/createMeasurementSchema) and set the following properties in the request body: - `name`: the measurement name. @@ -125,7 +125,7 @@ and set the following properties in the request body: For example, the following request defines the _explicit_ bucket measurement schema for `airSensors` measurements: -{{< api-endpoint method="post" endpoint="https://cloud2.influxdata.com/api/v2/buckets/{BUCKET_ID}/schema/measurements" api-ref="/influxdb/cloud-iox/api/#operation/createMeasurementSchema" >}} +{{< api-endpoint method="post" endpoint="https://cloud2.influxdata.com/api/v2/buckets/{BUCKET_ID}/schema/measurements" api-ref="/influxdb/cloud-serverless/api/#operation/createMeasurementSchema" >}} ```js { @@ -145,13 +145,13 @@ For example, the following request defines the _explicit_ bucket measurement sch After you create an explicit schema, test that it works as you expect. To start, we recommend trying to write data that doesn't conform to the schema and that the bucket should reject. {{% /note %}} ### Write valid schemas -To ensure your schema is valid, review [schema design best practices](/influxdb/cloud-iox/write-data/best-practices/schema-design/). +To ensure your schema is valid, review [schema design best practices](/influxdb/cloud-serverless/write-data/best-practices/schema-design/). Follow these rules when creating your schema columns file: 1. Use valid measurement and column names that: - Are unique within the schema @@ -160,8 +160,8 @@ Follow these rules when creating your schema columns file: - Don't start with underscore `_` - Don't start with a number `0-9` - Don't contain single quote `'` or double quote `"` - 2. Include a column with the [`timestamp`](/influxdb/cloud-iox/reference/glossary/#timestamp) type. - 3. Include at least one column with the [`field`](/influxdb/cloud-iox/reference/glossary/#field) type (without a field, there is no time-series data), as in the following example: + 2. Include a column with the [`timestamp`](/influxdb/cloud-serverless/reference/glossary/#timestamp) type. + 3. Include at least one column with the [`field`](/influxdb/cloud-serverless/reference/glossary/#field) type (without a field, there is no time-series data), as in the following example: **Valid**: a schema with [`timestamp`]() and [`field`]() columns. ```json @@ -179,9 +179,9 @@ Follow these rules when creating your schema columns file: ] ``` -The default [field data type](/influxdb/cloud-iox/reference/glossary/#field-value) is `string`. +The default [field data type](/influxdb/cloud-serverless/reference/glossary/#field-value) is `string`. To set the data type of a field column, provide the `dataType` property and a valid -[field data type](/influxdb/cloud-iox/reference/glossary/#field-value) (`string`, `float`, `integer`, or `boolean`), +[field data type](/influxdb/cloud-serverless/reference/glossary/#field-value) (`string`, `float`, `integer`, or `boolean`), as in the following example: ```json @@ -193,24 +193,24 @@ as in the following example: ## View bucket schema type and schemas -Use the **InfluxDB UI**, [**`influx` CLI**](/influxdb/cloud-iox/reference/cli/influx/), or [**InfluxDB HTTP API**](/influxdb/cloud-iox/api) to view schema type and schemas for buckets. +Use the **InfluxDB UI**, [**`influx` CLI**](/influxdb/cloud-serverless/reference/cli/influx/), or [**InfluxDB HTTP API**](/influxdb/cloud-serverless/api) to view schema type and schemas for buckets. ### View schema type and schemas in the InfluxDB UI - 1. [View buckets](/influxdb/cloud-iox/admin/buckets/view-buckets/). + 1. [View buckets](/influxdb/cloud-serverless/admin/buckets/view-buckets/). 2. In the list of buckets, see the **Schema Type** in the metadata that follows each bucket name. 3. Buckets with **Schema Type: Explicit** display the {{< caps >}}Show Schema{{< /caps>}} button. Click {{< caps >}}Show Schema{{< /caps>}} to view measurement schemas for the bucket. ### View schema type and schemas using the influx CLI -To list schemas for a bucket, use the [`influx bucket-schema list` command](/influxdb/cloud-iox/reference/cli/influx/bucket-schema/list/). +To list schemas for a bucket, use the [`influx bucket-schema list` command](/influxdb/cloud-serverless/reference/cli/influx/bucket-schema/list/). To view schema column definitions and metadata, specify the `--json` flag. ### View schema type and schemas using the InfluxDB HTTP API -To list schemas for a bucket, send a request to the InfluxDB HTTP [`/api/v2/buckets/{BUCKET_ID}/schema/measurements` endpoint](/influxdb/cloud-iox/api/#operation/getMeasurementSchemas): +To list schemas for a bucket, send a request to the InfluxDB HTTP [`/api/v2/buckets/{BUCKET_ID}/schema/measurements` endpoint](/influxdb/cloud-serverless/api/#operation/getMeasurementSchemas): -{{% api-endpoint method="get" endpoint="https://cloud2.influxdata.com/api/v2/buckets/{BUCKET_ID}/schema/measurements" api-ref="/influxdb/cloud-iox/api/#operation/getMeasurementSchemas" %}} +{{% api-endpoint method="get" endpoint="https://cloud2.influxdata.com/api/v2/buckets/{BUCKET_ID}/schema/measurements" api-ref="/influxdb/cloud-serverless/api/#operation/getMeasurementSchemas" %}} ## Update a bucket schema @@ -236,7 +236,7 @@ You can't modify or delete columns in bucket schemas. echo '{"name": "CO2", "type": "field", "dataType": "float"}' >> sensor.ndjson ``` -3. To update the bucket schema, use the [`influx bucket-schema update` command](/influxdb/cloud-iox/reference/cli/influx/bucket-schema/update) and specify the columns file with the `--columns-file` flag. +3. To update the bucket schema, use the [`influx bucket-schema update` command](/influxdb/cloud-serverless/reference/cli/influx/bucket-schema/update) and specify the columns file with the `--columns-file` flag. ```sh influx bucket-schema update \ @@ -249,11 +249,11 @@ You can't modify or delete columns in bucket schemas. 1. [View the existing measurement schema](#view-schema-type-and-schemas-using-the-influxdb-http-api) and copy the `columns` list. -2. Send a request to the HTTP API [`/api/v2/buckets/{BUCKET_ID}/schema/measurements/{MEASUREMENT_ID}` endpoint](/influxdb/cloud-iox/api/#operation/updateMeasurementSchema). +2. Send a request to the HTTP API [`/api/v2/buckets/{BUCKET_ID}/schema/measurements/{MEASUREMENT_ID}` endpoint](/influxdb/cloud-serverless/api/#operation/updateMeasurementSchema). In the request body, set the `columns` property to a list of old and new column definitions for the measurement schema--for example, the following request appends the new column `CO2` to `columns` retrieved in the previous step: - {{< api-endpoint method="patch" endpoint="https://cloud2.influxdata.com/api/v2/buckets/{BUCKET_ID}/schema/measurements/{MEASUREMENT_ID}" api-ref="/influxdb/cloud-iox/api/#operation/updateMeasurementSchema" >}} + {{< api-endpoint method="patch" endpoint="https://cloud2.influxdata.com/api/v2/buckets/{BUCKET_ID}/schema/measurements/{MEASUREMENT_ID}" api-ref="/influxdb/cloud-serverless/api/#operation/updateMeasurementSchema" >}} ```js { @@ -272,7 +272,7 @@ You can't modify or delete columns in bucket schemas. ### Bucket not found Creating and updating bucket schema requires `WRITE` permission for the bucket. -If your [API token](/influxdb/cloud-iox/reference/glossary/#token) doesn't have `WRITE` permission for the bucket, InfluxDB returns the following error: +If your [API token](/influxdb/cloud-serverless/reference/glossary/#token) doesn't have `WRITE` permission for the bucket, InfluxDB returns the following error: ```sh Error: bucket "my_explicit_bucket" not found @@ -295,5 +295,5 @@ InfluxDB returns an error for the following reasons: - data in the write request has invalid syntax. \ No newline at end of file diff --git a/content/influxdb/cloud-iox/admin/buckets/update-bucket.md b/content/influxdb/cloud-serverless/admin/buckets/update-bucket.md similarity index 83% rename from content/influxdb/cloud-iox/admin/buckets/update-bucket.md rename to content/influxdb/cloud-serverless/admin/buckets/update-bucket.md index dcae52e89..5c0b4b0cb 100644 --- a/content/influxdb/cloud-iox/admin/buckets/update-bucket.md +++ b/content/influxdb/cloud-serverless/admin/buckets/update-bucket.md @@ -3,12 +3,12 @@ title: Update a bucket seotitle: Update a bucket in InfluxDB description: Update a bucket's name or retention period in InfluxDB using the InfluxDB UI or the influx CLI. menu: - influxdb_cloud_iox: + influxdb_cloud_serverless: name: Update a bucket parent: Manage buckets weight: 202 aliases: - - /influxdb/cloud-iox/organizations/buckets/update-bucket/ + - /influxdb/cloud-serverless/organizations/buckets/update-bucket/ alt_engine: /influxdb/cloud/organizations/buckets/update-bucket/ --- @@ -49,13 +49,13 @@ If you change a bucket name, be sure to update the bucket name in the above plac {{% note %}} Use the [`influx bucket update` command](#update-a-buckets-retention-period) -or the [InfluxDB HTTP API `PATCH /api/v2/buckets` endpoint](/influxdb/cloud-iox/api/#operation/PatchBucketsID) to set a custom retention period. +or the [InfluxDB HTTP API `PATCH /api/v2/buckets` endpoint](/influxdb/cloud-serverless/api/#operation/PatchBucketsID) to set a custom retention period. {{% /note %}} 5. Click **{{< caps >}}Save Changes{{< /caps >}}**. ## Update a bucket using the influx CLI -Use the [`influx bucket update` command](/influxdb/cloud-iox/reference/cli/influx/bucket/update) +Use the [`influx bucket update` command](/influxdb/cloud-serverless/reference/cli/influx/bucket/update) to update a bucket. Updating a bucket requires the following: @@ -100,7 +100,7 @@ influx bucket update -i 034ad714fdd6f000 -r 1209600000000000ns ## Update a bucket using the HTTP API -Use the InfluxDB HTTP API [`PATCH /api/v2/buckets` endpoint](/influxdb/cloud-iox/api/#operation/PatchBucketsID) +Use the InfluxDB HTTP API [`PATCH /api/v2/buckets` endpoint](/influxdb/cloud-serverless/api/#operation/PatchBucketsID) to update a bucket. Updating a bucket requires the following: @@ -112,16 +112,16 @@ You can update the following bucket properties: - description - retention rules -1. To find the bucket ID, send a request to the HTTP API [`GET /api/v2/buckets/` endpoint](/influxdb/cloud-iox/api/#operation/GetBuckets) to retrieve the list of buckets. +1. To find the bucket ID, send a request to the HTTP API [`GET /api/v2/buckets/` endpoint](/influxdb/cloud-serverless/api/#operation/GetBuckets) to retrieve the list of buckets. - {{< api-endpoint method="get" endpoint="https://cloud2.influxdata.com/api/v2/buckets" api-ref="/influxdb/cloud-iox/api/#operation/GetBuckets" >}} + {{< api-endpoint method="get" endpoint="https://cloud2.influxdata.com/api/v2/buckets" api-ref="/influxdb/cloud-serverless/api/#operation/GetBuckets" >}} -2. Send a request to the HTTP API [PATCH `/api/v2/buckets/{BUCKET_ID}` endpoint](/influxdb/cloud-iox/api/#operation/PatchBucketsID). +2. Send a request to the HTTP API [PATCH `/api/v2/buckets/{BUCKET_ID}` endpoint](/influxdb/cloud-serverless/api/#operation/PatchBucketsID). In the URL path, specify the ID of the bucket from the previous step that you want to update. In the request body, set the properties that you want to update--for example: - {{< api-endpoint method="patch" endpoint="https://cloud2.influxdata.com/api/v2/buckets/{BUCKET_ID}" api-ref="/influxdb/cloud-iox/api/#operation/PatchBucketsID" >}} + {{< api-endpoint method="patch" endpoint="https://cloud2.influxdata.com/api/v2/buckets/{BUCKET_ID}" api-ref="/influxdb/cloud-serverless/api/#operation/PatchBucketsID" >}} ```js { diff --git a/content/influxdb/cloud-iox/admin/buckets/view-buckets.md b/content/influxdb/cloud-serverless/admin/buckets/view-buckets.md similarity index 56% rename from content/influxdb/cloud-iox/admin/buckets/view-buckets.md rename to content/influxdb/cloud-serverless/admin/buckets/view-buckets.md index 725327169..ae7ad2f63 100644 --- a/content/influxdb/cloud-iox/admin/buckets/view-buckets.md +++ b/content/influxdb/cloud-serverless/admin/buckets/view-buckets.md @@ -1,14 +1,16 @@ --- title: View buckets -seotitle: View buckets in InfluxDB Cloud -description: View a list of all the buckets for an organization in InfluxDB Cloud using the InfluxDB UI, influx CLI, or InfluxDB HTTP API. +seotitle: View buckets in InfluxDB Cloud Serverless +description: > + View a list of all the buckets for an organization in InfluxDB Cloud Serverless + using the InfluxDB UI, influx CLI, or InfluxDB HTTP API. menu: - influxdb_cloud_iox: + influxdb_cloud_serverless: name: View buckets parent: Manage buckets weight: 202 aliases: - - /influxdb/cloud-iox/organizations/buckets/view-buckets/ + - /influxdb/cloud-serverless/organizations/buckets/view-buckets/ alt_engine: /influxdb/cloud/organizations/buckets/view-buckets/ --- @@ -25,7 +27,7 @@ alt_engine: /influxdb/cloud/organizations/buckets/view-buckets/ ## View buckets using the influx CLI -Use the [`influx bucket list` command](/influxdb/cloud-iox/reference/cli/influx/bucket/list) +Use the [`influx bucket list` command](/influxdb/cloud-serverless/reference/cli/influx/bucket/list) to view buckets in an organization. ```sh @@ -33,13 +35,13 @@ influx bucket list ``` Other filtering options such as filtering by a name or ID are available. -See the [`influx bucket list` documentation](/influxdb/cloud-iox/reference/cli/influx/bucket/list) +See the [`influx bucket list` documentation](/influxdb/cloud-serverless/reference/cli/influx/bucket/list) for information about other available flags. ## View buckets using the InfluxDB HTTP API -Send a request to the InfluxDB HTTP API [`/api/v2/buckets` endpoint](/influxdb/cloud-iox/api/#operation/GetBuckets) to view buckets in an organization. +Send a request to the InfluxDB HTTP API [`/api/v2/buckets` endpoint](/influxdb/cloud-serverless/api/#operation/GetBuckets) to view buckets in an organization. -{{% api-endpoint method="get" endpoint="https://cloud2.influxdata.com/api/v2/buckets" api-ref="/influxdb/cloud-iox/api/#operation/GetBuckets" %}} +{{% api-endpoint method="get" endpoint="https://cloud2.influxdata.com/api/v2/buckets" api-ref="/influxdb/cloud-serverless/api/#operation/GetBuckets" %}} diff --git a/content/influxdb/cloud-iox/admin/organizations/_index.md b/content/influxdb/cloud-serverless/admin/organizations/_index.md similarity index 80% rename from content/influxdb/cloud-iox/admin/organizations/_index.md rename to content/influxdb/cloud-serverless/admin/organizations/_index.md index 04b0a15a1..604ae81a9 100644 --- a/content/influxdb/cloud-iox/admin/organizations/_index.md +++ b/content/influxdb/cloud-serverless/admin/organizations/_index.md @@ -3,15 +3,15 @@ title: Manage organizations seotitle: Manage organizations in InfluxDB description: Manage organizations in InfluxDB using the InfluxDB UI or the influx CLI. menu: - influxdb_cloud_iox: + influxdb_cloud_serverless: parent: Administer InfluxDB Cloud name: Manage organizations weight: 10 -influxdb/cloud-iox/tags: [organizations] +influxdb/cloud-serverless/tags: [organizations] related: - - /influxdb/cloud-iox/admin/accounts/ + - /influxdb/cloud-serverless/admin/accounts/ aliases: - - /influxdb/cloud-iox/organizations/ + - /influxdb/cloud-serverless/organizations/ alt_engine: /influxdb/cloud/organizations/ --- diff --git a/content/influxdb/cloud-iox/admin/organizations/switch-org.md b/content/influxdb/cloud-serverless/admin/organizations/switch-org.md similarity index 81% rename from content/influxdb/cloud-iox/admin/organizations/switch-org.md rename to content/influxdb/cloud-serverless/admin/organizations/switch-org.md index f4395245f..85c4dc478 100644 --- a/content/influxdb/cloud-iox/admin/organizations/switch-org.md +++ b/content/influxdb/cloud-serverless/admin/organizations/switch-org.md @@ -4,20 +4,20 @@ seotitle: Switch between InfluxDB Cloud organizations description: > Switch from one InfluxDB Cloud organization to another. menu: - influxdb_cloud_iox: + influxdb_cloud_serverless: name: Switch InfluxDB organizations parent: Manage organizations weight: 105 aliases: - - /influxdb/cloud-iox/account-management/switch-org/ + - /influxdb/cloud-serverless/account-management/switch-org/ related: - - /influxdb/cloud-iox/admin/accounts/switch-account/ + - /influxdb/cloud-serverless/admin/accounts/switch-account/ alt_engine: /influxdb/cloud/account-management/switch-org/ --- If you belong to more than one {{< cloud-name >}} organization with the same email address, you can switch from one organization to another while staying logged in. -To switch {{< cloud-name "short" >}} organizations: +To switch InfluxDB Cloud organizations: 1. (Optional) To switch to an organization in a different account, [switch accounts](/influxdb/cloud/account-management/switch-account/). 2. In the {{< cloud-name "short" >}} UI, click the organization name in the header and select **Switch Organizations**. diff --git a/content/influxdb/cloud-iox/get-started/_index.md b/content/influxdb/cloud-serverless/get-started/_index.md similarity index 84% rename from content/influxdb/cloud-iox/get-started/_index.md rename to content/influxdb/cloud-serverless/get-started/_index.md index cb5cc7550..e7e6aa5f3 100644 --- a/content/influxdb/cloud-iox/get-started/_index.md +++ b/content/influxdb/cloud-serverless/get-started/_index.md @@ -1,13 +1,13 @@ --- -title: Get started with InfluxDB Cloud +title: Get started with InfluxDB Cloud Serverless list_title: Get started description: > - Start collecting, querying, processing, and visualizing data in InfluxDB Cloud backed by IOx. + Start collecting, querying, processing, and visualizing data in InfluxDB Cloud Serverless. menu: - influxdb_cloud_iox: + influxdb_cloud_serverless: name: Get started weight: 3 -influxdb/cloud-iox/tags: [get-started] +influxdb/cloud-serverless/tags: [get-started] --- InfluxDB {{< current-version >}} is the platform purpose-built to collect, store, @@ -95,15 +95,13 @@ InfluxDB {{< current-version >}}. Examples are provided for each of the followin ### InfluxDB user interface The InfluxDB user interface (UI) provides a web-based visual interface for interacting with and managing InfluxDB. -{{% oss-only %}}The InfluxDB UI is packaged with InfluxDB and runs as part of the InfluxDB service. To access the UI, with InfluxDB running, visit [localhost:8086](http://localhost:8086) in your browser.{{% /oss-only %}} -{{% cloud-only %}}To access the InfluxDB Cloud UI, [log into your InfluxDB Cloud account](https://cloud2.influxdata.com).{{% /cloud-only %}} +To access the InfluxDB Cloud Serverless UI, [log into your InfluxDB Cloud account](https://cloud2.influxdata.com). ### `influx` CLI -The `influx` CLI lets you interact with and manage InfluxDB {{< current-version >}} from a command line. -{{% oss-only %}}The CLI is packaged separately from InfluxDB and must be downloaded and installed separately.{{% /oss-only %}} +The `influx` CLI lets you interact with and manage InfluxDB Cloud Serverless from a command line. For detailed CLI installation instructions, see -[Use the influx CLI](/influxdb/v2.5/tools/influx-cli/). +[Use the influx CLI](/{{< latest "influxdb" >}}/tools/influx-cli/). ### InfluxDB HTTP API @@ -125,4 +123,4 @@ be used to perform all the actions outlined in this tutorial. **InfluxDB {{< current-version >}} requires authentication** using [API tokens](/influxdb/v2.5/security/tokens/). Each API token is associated with a user and a specific set of permissions for InfluxDB resources. -{{< page-nav next="/influxdb/cloud-iox/get-started/setup/" >}} +{{< page-nav next="/influxdb/cloud-serverless/get-started/setup/" >}} diff --git a/content/influxdb/cloud-iox/get-started/process.md b/content/influxdb/cloud-serverless/get-started/process.md similarity index 92% rename from content/influxdb/cloud-iox/get-started/process.md rename to content/influxdb/cloud-serverless/get-started/process.md index ee29ccb1b..dd035cc0c 100644 --- a/content/influxdb/cloud-iox/get-started/process.md +++ b/content/influxdb/cloud-serverless/get-started/process.md @@ -6,7 +6,7 @@ description: > Learn how to process time series data to do things like downsample and alert on data. menu: - influxdb_cloud_iox: + influxdb_cloud_serverless: name: Process data parent: Get started identifier: get-started-process-data diff --git a/content/influxdb/cloud-iox/get-started/query.md b/content/influxdb/cloud-serverless/get-started/query.md similarity index 86% rename from content/influxdb/cloud-iox/get-started/query.md rename to content/influxdb/cloud-serverless/get-started/query.md index 8c6333da9..75ac19124 100644 --- a/content/influxdb/cloud-iox/get-started/query.md +++ b/content/influxdb/cloud-serverless/get-started/query.md @@ -6,19 +6,19 @@ description: > Get started querying data in InfluxDB by learning about Flux and InfluxQL and using tools like the InfluxDB UI, `influx` CLI, and InfluxDB API. menu: - influxdb_cloud_iox: + influxdb_cloud_serverless: name: Query data parent: Get started identifier: get-started-query-data weight: 102 metadata: [3 / 3] related: - - /influxdb/cloud-iox/query-data/ - - /influxdb/cloud-iox/query-data/sql/ - - /influxdb/cloud-iox/query-data/execute-queries/ + - /influxdb/cloud-serverless/query-data/ + - /influxdb/cloud-serverless/query-data/sql/ + - /influxdb/cloud-serverless/query-data/execute-queries/ --- -InfluxDB Cloud backed by InfluxDB IOx supports multiple query languages: +InfluxDB Cloud Serverless supports multiple query languages: - **SQL**: Traditional SQL powered by the [Apache Arrow DataFusion](https://arrow.apache.org/datafusion/) query engine. The supported SQL syntax is similar to PostgreSQL. @@ -30,11 +30,11 @@ InfluxDB Cloud backed by InfluxDB IOx supports multiple query languages: This tutorial walks you through the fundamentals of querying data in InfluxDB and **focuses on using SQL** to query your time series data. +[Query data in InfluxDB](/influxdb/cloud-serverless/query-data/). --> {{% note %}} -The examples in this section of the tutorial query the [**get-started** bucket](/influxdb/cloud-iox/get-started/setup/) for data written in the -[Get started writing data](/influxdb/cloud-iox/get-started/write/#write-line-protocol-to-influxdb) section. +The examples in this section of the tutorial query the [**get-started** bucket](/influxdb/cloud-serverless/get-started/setup/) for data written in the +[Get started writing data](/influxdb/cloud-serverless/get-started/write/#write-line-protocol-to-influxdb) section. {{% /note %}} ## Tools to execute queries @@ -47,18 +47,18 @@ InfluxDB supports many different tools for querying data, including: - [InfluxDB HTTP API](?t=InfluxDB+API#execute-a-sql-query){{< req "\* " >}} - [`influx` CLI](?t=influx+CLI#execute-a-sql-query){{< req "\* " >}} - [Superset](https://superset.apache.org/) -- [Grafana](/influxdb/cloud-iox/tools/grafana/) +- [Grafana](/influxdb/cloud-serverless/tools/grafana/) - [Chronograf](/{{< latest "Chronograf" >}}/) - InfluxDB client libraries ## SQL query basics -InfluxDB Cloud's SQL implementation is powered by the [Apache Arrow DataFusion](https://arrow.apache.org/datafusion/) +The InfluxDB SQL implementation is powered by the [Apache Arrow DataFusion](https://arrow.apache.org/datafusion/) query engine which provides a SQL syntax similar to PostgreSQL. {{% note %}} This is a brief introduction to writing SQL queries for InfluxDB. -For more in-depth details, see [Query data with SQL](/influxdb/cloud-iox/query-data/sql/). +For more in-depth details, see [Query data with SQL](/influxdb/cloud-serverless/query-data/sql/). {{% /note %}} InfluxDB SQL queries most commonly include the following clauses: @@ -148,15 +148,16 @@ WHERE {{% expand "Downsample data by applying interval-based aggregates" %}} ```sql SELECT - DATE_BIN(INTERVAL '1 hour', time, '2022-01-01T00:00:00Z'::TIMESTAMP) as time, - selector_max(temp, DATE_BIN(INTERVAL '1 hour', time, '2022-01-01T00:00:00Z'::TIMESTAMP))['value'] AS 'max temp', + DATE_BIN(INTERVAL '1 hour', time, '2022-01-01T00:00:00Z'::TIMESTAMP) as _time, room + selector_max(temp, time)['value'] AS 'max temp', FROM home GROUP BY - DATE_BIN(INTERVAL '1 hour', time, '2022-01-01T00:00:00Z'::TIMESTAMP), + _time, 'max temp', room +ORDER BY room, _time ``` {{% /expand %}} {{< /expand-wrapper >}} @@ -213,14 +214,14 @@ WHERE Results are displayed under the text editor. -See [Query in the Data Explorer](/influxdb/cloud-iox/query-data/execute-queries/data-explorer/) to learn more. +See [Query in the Data Explorer](/influxdb/cloud-serverless/query-data/execute-queries/data-explorer/) to learn more. {{% /tab-content %}} {{% tab-content %}} -The [`influx query` command](/influxdb/cloud-iox/reference/cli/influx/query/) +The [`influx query` command](/influxdb/cloud-serverless/reference/cli/influx/query/) uses the InfluxDB `/api/v2/query` endpoint to query InfluxDB. This endpoint only accepts Flux queries. To use SQL with the `influx` CLI, wrap your SQL query in Flux and use [`iox.sql()`](/flux/v0.x/stdlib/experimental/iox/) @@ -243,15 +244,15 @@ iox.sql( {{% /expand %}} {{< /expand-wrapper >}} -1. If you haven't already, [download, install, and configure the `influx` CLI](/influxdb/cloud-iox/tools/influx-cli/). -2. Use the [`influx query` command](/influxdb/cloud-iox/reference/cli/influx/query/) +1. If you haven't already, [download, install, and configure the `influx` CLI](/influxdb/cloud-serverless/tools/influx-cli/). +2. Use the [`influx query` command](/influxdb/cloud-serverless/reference/cli/influx/query/) to query InfluxDB using Flux. **Provide the following**: - String-encoded Flux query that uses `iox.sql()` to query the InfluxDB IOx storage engine with SQL. - - [Connection and authentication credentials](/influxdb/cloud-iox/get-started/setup/?t=influx+CLI#configure-authentication-credentials) + - [Connection and authentication credentials](/influxdb/cloud-serverless/get-started/setup/?t=influx+CLI#configure-authentication-credentials) {{% influxdb/custom-timestamps %}} ```sh @@ -279,10 +280,10 @@ iox.sql( To query data from InfluxDB using SQL and the InfluxDB HTTP API, send a request -to the InfluxDB API [`/api/v2/query` endpoint](/influxdb/cloud-iox/api/#operation/PostQuery) +to the InfluxDB API [`/api/v2/query` endpoint](/influxdb/cloud-serverless/api/#operation/PostQuery) using the `POST` request method. -{{< api-endpoint endpoint="http://localhost:8086/api/v2/query" method="post" api-ref="/influxdb/cloud-iox/api/#operation/PostQuery" >}} +{{< api-endpoint endpoint="http://localhost:8086/api/v2/query" method="post" api-ref="/influxdb/cloud-serverless/api/#operation/PostQuery" >}} The `/api/v2/query` endpoint only accepts Flux queries. To query data with SQL, wrap your SQL query in Flux and use [`iox.sql()`](/flux/v0.x/stdlib/experimental/iox/) @@ -346,7 +347,7 @@ curl --request POST \ {{% note %}} The InfluxDB `/api/v2/query` endpoint returns query results in -[annotated CSV](/influxdb/cloud-iox/reference/syntax/annotated-csv/). +[annotated CSV](/influxdb/cloud-serverless/reference/syntax/annotated-csv/). {{% /note %}} @@ -393,6 +394,6 @@ The InfluxDB `/api/v2/query` endpoint returns query results in **Congratulations!** You've learned the basics of querying data in InfluxDB with SQL. For a deep dive into all the ways you can query InfluxDB, see the -[Query data in InfluxDB](/influxdb/cloud-iox/query-data/) section of documentation. +[Query data in InfluxDB](/influxdb/cloud-serverless/query-data/) section of documentation. -{{< page-nav prev="/influxdb/cloud-iox/get-started/write/" keepTab=true >}} +{{< page-nav prev="/influxdb/cloud-serverless/get-started/write/" keepTab=true >}} diff --git a/content/influxdb/cloud-iox/get-started/setup.md b/content/influxdb/cloud-serverless/get-started/setup.md similarity index 80% rename from content/influxdb/cloud-iox/get-started/setup.md rename to content/influxdb/cloud-serverless/get-started/setup.md index 78699fa33..3eb25ad55 100644 --- a/content/influxdb/cloud-iox/get-started/setup.md +++ b/content/influxdb/cloud-serverless/get-started/setup.md @@ -5,22 +5,22 @@ list_title: Set up InfluxDB description: > Learn how to set up InfluxDB for the "Get started with InfluxDB" tutorial. menu: - influxdb_cloud_iox: + influxdb_cloud_serverless: name: Set up InfluxDB parent: Get started identifier: get-started-set-up weight: 101 metadata: [1 / 3] related: - - /influxdb/cloud-iox/security/tokens/ - - /influxdb/cloud-iox/security/tokens/create-token/ - - /influxdb/cloud-iox/security/tokens/view-tokens/ - - /influxdb/cloud-iox/admin/buckets/ - - /influxdb/cloud-iox/reference/cli/influx/ - - /influxdb/cloud-iox/reference/api/ + - /influxdb/cloud-serverless/security/tokens/ + - /influxdb/cloud-serverless/security/tokens/create-token/ + - /influxdb/cloud-serverless/security/tokens/view-tokens/ + - /influxdb/cloud-serverless/admin/buckets/ + - /influxdb/cloud-serverless/reference/cli/influx/ + - /influxdb/cloud-serverless/reference/api/ aliases: - - /influxdb/cloud-iox/security/tokens/create-token/ - - /influxdb/cloud-iox/security/tokens/view-tokens/ + - /influxdb/cloud-serverless/security/tokens/create-token/ + - /influxdb/cloud-serverless/security/tokens/view-tokens/ --- As you get started with this tutorial, do the following to make sure everything @@ -30,7 +30,7 @@ you need is in place. The `influx` CLI provides a simple way to interact with InfluxDB from a command line. For detailed installation and setup instructions, - see [Use the influx CLI](/influxdb/cloud-iox/tools/influx-cli/). + see [Use the influx CLI](/influxdb/cloud-serverless/tools/influx-cli/). 2. **Create an All Access API token.** @@ -92,11 +92,11 @@ There are three ways to provided authentication credentials to the `influx` CLI: The `influx` CLI lets you specify connection configuration presets that let you store and quickly switch between multiple sets of InfluxDB connection -credentials. Use the [`influx config create` command](/influxdb/cloud-iox/reference/cli/influx/config/create/) +credentials. Use the [`influx config create` command](/influxdb/cloud-serverless/reference/cli/influx/config/create/) to create a new CLI connection configuration. Include the following flags: - `-n, --config-name`: Connection configuration name. This examples uses `get-started`. -- `-u, --host-url`: [InfluxDB Cloud region URL](/influxdb/cloud-iox/reference/regions/). +- `-u, --host-url`: [InfluxDB Cloud Serverless region URL](/influxdb/cloud-serverless/reference/regions/). - `-o, --org`: InfluxDB organization name. - `-t, --token`: InfluxDB API token. @@ -109,7 +109,7 @@ influx config create \ ``` _For more information about CLI connection configurations, see -[Install and use the `influx` CLI](/influxdb/cloud-iox/tools/influx-cli/#set-up-the-influx-cli)._ +[Install and use the `influx` CLI](/influxdb/cloud-serverless/tools/influx-cli/#set-up-the-influx-cli)._ {{% /expand %}} @@ -119,9 +119,9 @@ The `influx` CLI checks for specific environment variables and, if present, uses those environment variables to populate authentication credentials. Set the following environment variables in your command line session: -- `INFLUX_HOST`: [InfluxDB Cloud region URL](/influxdb/cloud-iox/reference/regions/). +- `INFLUX_HOST`: [InfluxDB Cloud Serverless region URL](/influxdb/cloud-serverless/reference/regions/). - `INFLUX_ORG`: InfluxDB organization name. -- `INFLUX_ORG_ID`: InfluxDB [organization ID](/influxdb/cloud-iox/organizations/view-orgs/#view-your-organization-id). +- `INFLUX_ORG_ID`: InfluxDB [organization ID](/influxdb/cloud-serverless/organizations/view-orgs/#view-your-organization-id). - `INFLUX_TOKEN`: InfluxDB API token. ```sh @@ -137,9 +137,9 @@ export INFLUX_TOKEN= Use the following `influx` CLI flags to provide required credentials to commands: -- `--host`: [InfluxDB Cloud region URL](/influxdb/cloud-iox/reference/regions/). +- `--host`: [InfluxDB Cloud Serverless region URL](/influxdb/cloud-serverless/reference/regions/). - `-o`, `--org` or `--org-id`: InfluxDB organization name or - [ID](/influxdb/cloud-iox/organizations/view-orgs/#view-your-organization-id). + [ID](/influxdb/cloud-serverless/organizations/view-orgs/#view-your-organization-id). - `-t`, `--token`: InfluxDB API token. {{% /expand %}} @@ -148,7 +148,7 @@ Use the following `influx` CLI flags to provide required credentials to commands {{% note %}} All `influx` CLI examples in this getting started tutorial assume your InfluxDB **host**, **organization**, and **token** are provided by either the -[active `influx` CLI configuration](/influxdb/cloud-iox/reference/cli/influx/#provide-required-authentication-credentials) +[active `influx` CLI configuration](/influxdb/cloud-serverless/reference/cli/influx/#provide-required-authentication-credentials) or by environment variables. {{% /note %}} @@ -160,7 +160,7 @@ or by environment variables. When using the InfluxDB API, provide the required connection credentials in the following ways: -- **InfluxDB host**: [InfluxDB Cloud region URL](/influxdb/cloud-iox/reference/regions/) +- **InfluxDB host**: [InfluxDB Cloud Serverless region URL](/influxdb/cloud-serverless/reference/regions/) - **InfluxDB API Token**: Include an `Authorization` header that uses either `Bearer` or `Token` scheme and your InfluxDB API token. For example: `Authorization: Bearer 0xxx0o0XxXxx00Xxxx000xXXxoo0==`. @@ -188,7 +188,7 @@ export INFLUX_TOKEN= **"get-started"**. Use the **InfluxDB UI**, **`influx` CLI**, or **InfluxDB API** to [create a - bucket](/influxdb/cloud-iox/admin/buckets/create-bucket/). + bucket](/influxdb/cloud-serverless/admin/buckets/create-bucket/). {{< tabs-wrapper >}} {{% tabs %}} @@ -211,8 +211,8 @@ export INFLUX_TOKEN= 3. Click **+ {{< caps >}}Create bucket{{< /caps >}}**. 4. Provide a bucket name (get-started) and select a - [retention period](/influxdb/cloud-iox/reference/glossary/#retention-period). - Supported retention periods depend on your InfluxDB Cloud plan. + [retention period](/influxdb/cloud-serverless/reference/glossary/#retention-period). + Supported retention periods depend on your InfluxDB Cloud Serverless plan. 5. Click **{{< caps >}}Create{{< /caps >}}**. @@ -221,15 +221,15 @@ export INFLUX_TOKEN= {{% tab-content %}} -1. If you haven't already, [download, install, and configure the `influx` CLI](/influxdb/cloud-iox/tools/influx-cli/). -2. Use the [`influx bucket create` command](/influxdb/cloud-iox/reference/cli/influx/bucket/create/) +1. If you haven't already, [download, install, and configure the `influx` CLI](/influxdb/cloud-serverless/tools/influx-cli/). +2. Use the [`influx bucket create` command](/influxdb/cloud-serverless/reference/cli/influx/bucket/create/) to create a new bucket. **Provide the following**: - `-n, --name` flag with the bucket name. - `-r, --retention` flag with the bucket's retention period duration. - Supported retention periods depend on your InfluxDB Cloud plan. + Supported retention periods depend on your InfluxDB Cloud Serverless plan. - [Connection and authentication credentials](#configure-authentication-credentials) ```sh @@ -246,7 +246,7 @@ export INFLUX_TOKEN= To create a bucket using the InfluxDB HTTP API, send a request to the InfluxDB API `/api/v2/buckets` endpoint using the `POST` request method. -{{< api-endpoint endpoint="https://cloud2.influxdata.com/api/v2/buckets" method="post" api-ref="/influxdb/cloud-iox/api/#operation/PostBuckets" >}} +{{< api-endpoint endpoint="https://cloud2.influxdata.com/api/v2/buckets" method="post" api-ref="/influxdb/cloud-serverless/api/#operation/PostBuckets" >}} Include the following with your request: @@ -260,8 +260,7 @@ Include the following with your request: Each retention rule object has the following properties: - **type**: `"expire"` - **everySeconds**: Retention period duration in seconds. - {{% cloud-only %}}Supported retention periods depend on your InfluxDB Cloud plan.{{% /cloud-only %}} - {{% oss-only %}}`0` indicates the retention period is infinite.{{% /oss-only %}} + Supported retention periods depend on your InfluxDB Cloud Serverless plan. ```sh export INFLUX_HOST=https://cloud2.influxdata.com @@ -287,4 +286,4 @@ curl --request POST \ {{% /tab-content %}} {{< /tabs-wrapper >}} -{{< page-nav prev="/influxdb/cloud-iox/get-started/" next="/influxdb/cloud-iox/get-started/write/" keepTab=true >}} +{{< page-nav prev="/influxdb/cloud-serverless/get-started/" next="/influxdb/cloud-serverless/get-started/write/" keepTab=true >}} diff --git a/content/influxdb/cloud-iox/get-started/visualize.md b/content/influxdb/cloud-serverless/get-started/visualize.md similarity index 91% rename from content/influxdb/cloud-iox/get-started/visualize.md rename to content/influxdb/cloud-serverless/get-started/visualize.md index b9c0ed2b7..1fc3ca1e2 100644 --- a/content/influxdb/cloud-iox/get-started/visualize.md +++ b/content/influxdb/cloud-serverless/get-started/visualize.md @@ -5,7 +5,7 @@ list_title: Visualize data description: > ... menu: - influxdb_cloud_iox: + influxdb_cloud_serverless: name: Visualize data parent: Get started identifier: get-started-visualize-data diff --git a/content/influxdb/cloud-iox/get-started/write.md b/content/influxdb/cloud-serverless/get-started/write.md similarity index 89% rename from content/influxdb/cloud-iox/get-started/write.md rename to content/influxdb/cloud-serverless/get-started/write.md index 1304349aa..d12085fb4 100644 --- a/content/influxdb/cloud-iox/get-started/write.md +++ b/content/influxdb/cloud-serverless/get-started/write.md @@ -6,16 +6,16 @@ description: > Get started writing data to InfluxDB by learning about line protocol and using tools like the InfluxDB UI, `influx` CLI, and InfluxDB API. menu: - influxdb_cloud_iox: + influxdb_cloud_serverless: name: Write data parent: Get started identifier: get-started-write-data weight: 101 metadata: [2 / 3] related: - - /influxdb/cloud-iox/write-data/ - - /influxdb/cloud-iox/write-data/best-practices/ - - /influxdb/cloud-iox/reference/syntax/line-protocol/ + - /influxdb/cloud-serverless/write-data/ + - /influxdb/cloud-serverless/write-data/best-practices/ + - /influxdb/cloud-serverless/reference/syntax/line-protocol/ - /{{< latest "telegraf" >}}/ --- @@ -23,10 +23,10 @@ InfluxDB provides many different options for ingesting or writing data, includin the following: - Influx user interface (UI) -- [InfluxDB HTTP API](/influxdb/cloud-iox/reference/api/) -- [`influx` CLI](/influxdb/cloud-iox/tools/influx-cli/) +- [InfluxDB HTTP API](/influxdb/cloud-serverless/reference/api/) +- [`influx` CLI](/influxdb/cloud-serverless/tools/influx-cli/) - [Telegraf](/{{< latest "telegraf" >}}/) -- [InfluxDB client libraries](/influxdb/cloud-iox/api-guide/client-libraries/) +- [InfluxDB client libraries](/influxdb/cloud-serverless/api-guide/client-libraries/) This tutorial walks you through the fundamental of using **line protocol** to write data to InfluxDB. If using tools like Telegraf or InfluxDB client libraries, they will @@ -37,7 +37,7 @@ build the line protocol for you, but it's good to understand how line protocol w All data written to InfluxDB is written using **line protocol**, a text-based format that lets you provide the necessary information to write a data point to InfluxDB. _This tutorial covers the basics of line protocol, but for detailed information, -see the [Line protocol reference](/influxdb/cloud-iox/reference/syntax/line-protocol/)._ +see the [Line protocol reference](/influxdb/cloud-serverless/reference/syntax/line-protocol/)._ ### Line protocol elements @@ -50,12 +50,12 @@ Each line of line protocol contains the following elements: Tag keys and values are unquoted strings. _Spaces, commas, and equal characters must be escaped._ - {{< req "\*" >}} **field set**: Comma-delimited list of key value pairs, each representing a field. Field keys are unquoted strings. _Spaces and commas must be escaped._ - Field values can be [strings](/influxdb/cloud-iox/reference/syntax/line-protocol/#string) (quoted), - [floats](/influxdb/cloud-iox/reference/syntax/line-protocol/#float), - [integers](/influxdb/cloud-iox/reference/syntax/line-protocol/#integer), - [unsigned integers](/influxdb/cloud-iox/reference/syntax/line-protocol/#uinteger), - or [booleans](/influxdb/cloud-iox/reference/syntax/line-protocol/#boolean). -- **timestamp**: [Unix timestamp](/influxdb/cloud-iox/reference/syntax/line-protocol/#unix-timestamp) + Field values can be [strings](/influxdb/cloud-serverless/reference/syntax/line-protocol/#string) (quoted), + [floats](/influxdb/cloud-serverless/reference/syntax/line-protocol/#float), + [integers](/influxdb/cloud-serverless/reference/syntax/line-protocol/#integer), + [unsigned integers](/influxdb/cloud-serverless/reference/syntax/line-protocol/#uinteger), + or [booleans](/influxdb/cloud-serverless/reference/syntax/line-protocol/#boolean). +- **timestamp**: [Unix timestamp](/influxdb/cloud-serverless/reference/syntax/line-protocol/#unix-timestamp) associated with the data. InfluxDB supports up to nanosecond precision. _If the precision of the timestamp is not in nanoseconds, you must specify the precision when writing the data to InfluxDB._ @@ -75,7 +75,7 @@ Each line of line protocol contains the following elements: --- -_For schema design recommendations, see [InfluxDB schema design](/influxdb/cloud-iox/write-data/best-practices/schema-design/)._ +_For schema design recommendations, see [InfluxDB schema design](/influxdb/cloud-serverless/write-data/best-practices/schema-design/)._ ## Construct line protocol @@ -174,8 +174,8 @@ The UI will confirm that the data has been written successfully. {{% tab-content %}} -1. If you haven't already, [download, install, and configure the `influx` CLI](/influxdb/cloud-iox/tools/influx-cli/). -2. Use the [`influx write` command](/influxdb/cloud-iox/reference/cli/influx/write/) +1. If you haven't already, [download, install, and configure the `influx` CLI](/influxdb/cloud-serverless/tools/influx-cli/). +2. Use the [`influx write` command](/influxdb/cloud-serverless/reference/cli/influx/write/) to write the [line protocol above](#home-sensor-data-line-protocol) to InfluxDB. **Provide the following**: @@ -183,7 +183,7 @@ The UI will confirm that the data has been written successfully. - `-b, --bucket` or `--bucket-id` flag with the bucket name or ID to write do. - `-p, --precision` flag with the timestamp precision (`s`). - String-encoded line protocol. - - [Connection and authentication credentials](/influxdb/cloud-iox/get-started/setup/?t=influx+CLI#configure-authentication-credentials) + - [Connection and authentication credentials](/influxdb/cloud-serverless/get-started/setup/?t=influx+CLI#configure-authentication-credentials) {{% influxdb/custom-timestamps %}} @@ -229,7 +229,7 @@ home,room=Kitchen temp=22.7,hum=36.5,co=26i 1641067200 To write data to InfluxDB using the InfluxDB HTTP API, send a request to the InfluxDB API `/api/v2/write` endpoint using the `POST` request method. -{{< api-endpoint endpoint="http://localhost:8086/api/v2/write" method="post" api-ref="/influxdb/cloud-iox/api/#operation/PostWrite" >}} +{{< api-endpoint endpoint="http://localhost:8086/api/v2/write" method="post" api-ref="/influxdb/cloud-serverless/api/#operation/PostWrite" >}} Include the following with your request: @@ -334,7 +334,7 @@ With data now stored in InfluxDB, let's query it. +- [Write data to InfluxDB using no-code solutions](/influxdb/cloud-serverless/write-data/no-code/) +- [Write data to InfluxDB using developer tools](/influxdb/cloud-serverless/write-data/developer-tools/) --> -{{< page-nav prev="/influxdb/cloud-iox/get-started/setup/" next="/influxdb/cloud-iox/get-started/query/" keepTab=true >}} +{{< page-nav prev="/influxdb/cloud-serverless/get-started/setup/" next="/influxdb/cloud-serverless/get-started/query/" keepTab=true >}} diff --git a/content/influxdb/cloud-serverless/query-data/_index.md b/content/influxdb/cloud-serverless/query-data/_index.md new file mode 100644 index 000000000..abbe155d5 --- /dev/null +++ b/content/influxdb/cloud-serverless/query-data/_index.md @@ -0,0 +1,19 @@ +--- +title: Query data in InfluxDB Cloud +seotitle: Query data stored in InfluxDB Cloud +description: > + Learn to query data stored in InfluxDB using SQL, InfluxQL, and Flux using tools + like the InfluxDB user interface and the 'influx' command line interface. +menu: + influxdb_cloud_serverless: + name: Query data +weight: 4 +influxdb/cloud-serverless/tags: [query, flux] +--- + +Learn to query data stored in InfluxDB. + + + +{{< children >}} diff --git a/content/influxdb/cloud-serverless/query-data/execute-queries/_index.md b/content/influxdb/cloud-serverless/query-data/execute-queries/_index.md new file mode 100644 index 000000000..bbdb72f2c --- /dev/null +++ b/content/influxdb/cloud-serverless/query-data/execute-queries/_index.md @@ -0,0 +1,15 @@ +--- +title: Execute queries +seotitle: Execute queries for data in InfluxDB Cloud Serverless +description: Use tools and libraries to query data stored in InfluxDB Cloud Serverless +weight: 103 +menu: + influxdb_cloud_serverless: + name: Execute queries + parent: Query data +influxdb/cloud-serverless/tags: [query] +--- + +There are multiple ways to execute queries with InfluxDB. Choose from the following options: + +{{< children >}} diff --git a/content/influxdb/cloud-iox/query-data/execute-queries/data-explorer/_index.md b/content/influxdb/cloud-serverless/query-data/execute-queries/data-explorer/_index.md similarity index 88% rename from content/influxdb/cloud-iox/query-data/execute-queries/data-explorer/_index.md rename to content/influxdb/cloud-serverless/query-data/execute-queries/data-explorer/_index.md index c4882ae25..806e84144 100644 --- a/content/influxdb/cloud-iox/query-data/execute-queries/data-explorer/_index.md +++ b/content/influxdb/cloud-serverless/query-data/execute-queries/data-explorer/_index.md @@ -4,13 +4,13 @@ description: > Query your data in the InfluxDB user interface (UI) Data Explorer. weight: 201 menu: - influxdb_cloud_iox: + influxdb_cloud_serverless: name: Query with Data Explorer parent: Execute queries -influxdb/cloud-iox/tags: [query] +influxdb/cloud-serverless/tags: [query] related: - - /influxdb/cloud-iox/query-data/sql/ - - /influxdb/cloud-iox/query-data/flux-sql/ + - /influxdb/cloud-serverless/query-data/sql/ + - /influxdb/cloud-serverless/query-data/flux-sql/ --- Build, execute, and visualize your queries in InfluxDB UI's **Data Explorer**. @@ -26,7 +26,7 @@ Choose between **visualization types** for your query. {{< nav-icon "data-explorer" >}} -2. Activate the **SQL Sync** toggle in the **Schema Browser** pane to build your SQL query as you select [fields and tag values](/influxdb/cloud-iox/write-data/best-practices/schema-design/#influxdb-data-structure). +2. Activate the **SQL Sync** toggle in the **Schema Browser** pane to build your SQL query as you select [fields and tag values](/influxdb/cloud-serverless/write-data/best-practices/schema-design/#influxdb-data-structure). - Typing within the script editor disables **SQL Sync**. - If you reenable **SQL Sync**, any selection changes you made in the **Schema Browser** are copied to the script editor. 3. Select a **Bucket** to define your data source. @@ -40,7 +40,7 @@ Choose between **visualization types** for your query. 5. To add filter conditions to your query, select from the **Fields** and **Tag Keys** lists. - **Fields**: filters for rows that have a non-null value for at least one of the selected field columns. - **Tag Keys**: filters for rows that have all the selected tag values. - To learn more, see [Query specific fields and tags](/influxdb/cloud-iox/query-data/sql/basic-query/#query-specific-fields-and-tags). + To learn more, see [Query specific fields and tags](/influxdb/cloud-serverless/query-data/sql/basic-query/#query-specific-fields-and-tags). 6. Use the [time range dropdown](#select-time-range) to edit the time range for your query. 7. Use the script editor to customize your query--for example, to specify what tags and fields to retrieve: @@ -50,7 +50,7 @@ Choose between **visualization types** for your query. ``` 7. Click the **Run** button (or press `Control+Enter`) to run your query and [view the results](#view-sql-query-results). -See [Query data](/influxdb/cloud-iox/query-data/sql/) to learn more about building SQL queries. +See [Query data](/influxdb/cloud-serverless/query-data/sql/) to learn more about building SQL queries. {{% note %}} @@ -74,7 +74,7 @@ After you **Run** your query, Data Explorer displays the results. Flux is a functional data scripting language designed for querying, analyzing, and acting on time series data. -See [how to use Flux and SQL to query data](/influxdb/cloud-iox/query-data/flux-sql/). +See [how to use Flux and SQL to query data](/influxdb/cloud-serverless/query-data/flux-sql/). 1. In the navigation menu on the left, click **Data Explorer**. @@ -112,7 +112,7 @@ To open the cell editor overlay, click the gear icon in the upper right of a cel ### View raw data -Toggle the **View Raw Data** {{< icon "toggle" >}} option to see your data in table format instead of a graph. Scroll through raw data using arrows, or click page numbers to find specific tables. [Group keys](/influxdb/cloud-iox/reference/glossary/#group-key) and [data types](/influxdb/cloud-iox/reference/glossary/#data-type) are easily identifiable at the top of each column underneath the headings. Use this option when data can't be visualized using a visualization type. +Toggle the **View Raw Data** {{< icon "toggle" >}} option to see your data in table format instead of a graph. Scroll through raw data using arrows, or click page numbers to find specific tables. [Group keys](/influxdb/cloud-serverless/reference/glossary/#group-key) and [data types](/influxdb/cloud-serverless/reference/glossary/#data-type) are easily identifiable at the top of each column underneath the headings. Use this option when data can't be visualized using a visualization type. {{< img-hd src="/img/influxdb/cloud-controls-view-raw-data.png" alt="View raw data" />}} diff --git a/content/influxdb/cloud-serverless/query-data/execute-queries/flight-sql/_index.md b/content/influxdb/cloud-serverless/query-data/execute-queries/flight-sql/_index.md new file mode 100644 index 000000000..59fe0451b --- /dev/null +++ b/content/influxdb/cloud-serverless/query-data/execute-queries/flight-sql/_index.md @@ -0,0 +1,27 @@ +--- +title: Query with Flight SQL +seotitle: Query InfluxDB with Arrow Flight SQL +description: > + Query your data using Apache Arrow Flight SQL protocol and clients. +weight: 201 +menu: + influxdb_cloud_serverless: + name: Query with Flight SQL + parent: Execute queries +influxdb/cloud-serverless/tags: [query, flightsql] +--- + +Use [Apache Arrow Flight SQL](https://arrow.apache.org/) to query data +stored in an InfluxDB Cloud Serverless bucket. + +> Arrow Flight SQL is a protocol for interacting with SQL databases using the +> [Arrow in-memory format](https://arrow.apache.org/docs/format/Columnar.html) +> and the [Flight RPC](https://arrow.apache.org/docs/format/Flight.html) framework. +> +> {{% cite %}}-- [Apache Arrow Flight SQL documentation](https://arrow.apache.org/docs/format/FlightSql.html){{% /cite %}} + +Data platforms and clients that support the Flight SQL protocol can query data +stored in an InfluxDB Cloud Serverless bucket. +Learn how to connect to InfluxDB and query your data using the following tools: + +{{< children >}} \ No newline at end of file diff --git a/content/influxdb/cloud-iox/query-data/execute-queries/flight-sql/python.md b/content/influxdb/cloud-serverless/query-data/execute-queries/flight-sql/python.md similarity index 94% rename from content/influxdb/cloud-iox/query-data/execute-queries/flight-sql/python.md rename to content/influxdb/cloud-serverless/query-data/execute-queries/flight-sql/python.md index 169ad884b..ad034d1fe 100644 --- a/content/influxdb/cloud-iox/query-data/execute-queries/flight-sql/python.md +++ b/content/influxdb/cloud-serverless/query-data/execute-queries/flight-sql/python.md @@ -2,18 +2,18 @@ title: Use Python and the Flight SQL library to query data description: > Use Python and the `flightsql-dbapi` Flight SQL library to query data - stored in a bucket powered by InfluxDB IOx. + stored in an InfluxDB Cloud Serverless bucket. weight: 101 menu: - influxdb_cloud_iox: + influxdb_cloud_serverless: parent: Query with Flight SQL name: Use Python identifier: query_with_python -influxdb/cloud-iox/tags: [query, flightsql, python] +influxdb/cloud-serverless/tags: [query, flightsql, python] related: - - /influxdb/cloud-iox/query-data/tools/pandas/ - - /influxdb/cloud-iox/query-data/tools/pyarrow/ - - /influxdb/cloud-iox/query-data/sql/ + - /influxdb/cloud-serverless/query-data/tools/pandas/ + - /influxdb/cloud-serverless/query-data/tools/pyarrow/ + - /influxdb/cloud-serverless/query-data/sql/ list_code_example: | ```py from flightsql import FlightSQLClient @@ -31,7 +31,8 @@ list_code_example: | ``` --- -Use Python and the Flight SQL library to query data stored in a bucket powered by InfluxDB IOx. +Use Python and the Flight SQL library to query data stored in an InfluxDB Cloud +Serverless bucket. - [Get started using Python to query InfluxDB](#get-started-using-python-to-query-influxdb) - [Create a Python virtual environment](#create-a-python-virtual-environment) @@ -294,5 +295,5 @@ To read data from the stream, call one of the following `FlightStreamReader` met Next, learn how to use Python tools to work with time series data: -- [Use PyArrow](/influxdb/cloud-iox/query-data/tools/pyarrow/) -- [Use pandas](/influxdb/cloud-iox/query-data/tools/pandas/) +- [Use PyArrow](/influxdb/cloud-serverless/query-data/tools/pyarrow/) +- [Use pandas](/influxdb/cloud-serverless/query-data/tools/pandas/) diff --git a/content/influxdb/cloud-iox/query-data/execute-queries/flight-sql/superset.md b/content/influxdb/cloud-serverless/query-data/execute-queries/flight-sql/superset.md similarity index 88% rename from content/influxdb/cloud-iox/query-data/execute-queries/flight-sql/superset.md rename to content/influxdb/cloud-serverless/query-data/execute-queries/flight-sql/superset.md index c2a47d160..fc33aecea 100644 --- a/content/influxdb/cloud-iox/query-data/execute-queries/flight-sql/superset.md +++ b/content/influxdb/cloud-serverless/query-data/execute-queries/flight-sql/superset.md @@ -1,22 +1,22 @@ --- title: Use Superset to query data -seotitle: Use Apache Superset to query data stored in InfluxDB Cloud (IOx) +seotitle: Use Apache Superset to query data stored in InfluxDB Cloud Serverless description: > Install and run [Apache Superset](https://superset.apache.org/) - to query data stored in a bucket powered by InfluxDB IOx. + to query data stored in an InfluxDB Cloud Serverless bucket. weight: 101 menu: - influxdb_cloud_iox: + influxdb_cloud_serverless: parent: Query with Flight SQL name: Use Superset identifier: query_with_superset -influxdb/cloud-iox/tags: [query, flightsql, superset] +influxdb/cloud-serverless/tags: [query, flightsql, superset] related: - - /influxdb/cloud-iox/visualize-data/superset/ + - /influxdb/cloud-serverless/visualize-data/superset/ --- Use [Apache Superset](https://superset.apache.org/) to query data -stored in an InfluxDB bucket powered by InfluxDB IOx. +stored in an InfluxDB Cloud Serverless bucket. > Apache Superset is a modern, enterprise-ready business intelligence web application. > It is fast, lightweight, intuitive, and loaded with options that make it easy for @@ -203,23 +203,19 @@ With Superset running, you're ready to [log in](#log-in-to-superset) and set up 3. In the **Connect a Database** window, click on the **Supported Databases** drop-down menu and select **Other**. - {{< img-hd src="/img/influxdb/cloud-iox-superset-connect.png" alt="Configure InfluxDB connection in Superset" />}} + {{< img-hd src="/img/influxdb/cloud-serverless-superset-connect.png" alt="Configure InfluxDB connection in Superset" />}} -4. Enter a **Display Name** (for example, _InfluxDB Cloud IOx_) for the database connection. +4. Enter a **Display Name** (for example, _InfluxDB Cloud Serverless_) for the database connection. 5. Enter your **SQL Alchemy URI** comprised of the following: - **Protocol**: `datafusion+flightsql` - - **Domain**: - {{% cloud-only %}}[InfluxDB Cloud region domain](/influxdb/cloud-iox/reference/regions/){{% /cloud-only %}} - {{% oss-only %}}localhost{{% /oss-only %}} - - **Port**: - {{% cloud-only %}}443{{% /cloud-only %}} - {{% oss-only %}}8086 or your custom-configured bind address{{% /oss-only %}} + - **Domain**: [InfluxDB Cloud Serverless region domain](/influxdb/cloud-serverless/reference/regions/) + - **Port**: 443 **Query parameters** - - **`?bucket-name`**: URL-encoded InfluxDB [bucket name](influxdb/cloud-iox/admin/buckets/view-buckets/) - - **`?token`**: InfluxDB [API token](/influxdb/cloud-iox/get-started/setup/) with `READ` access to the specified bucket + - **`?bucket-name`**: URL-encoded InfluxDB [bucket name](influxdb/cloud-serverless/admin/buckets/view-buckets/) + - **`?token`**: InfluxDB [API token](/influxdb/cloud-serverless/get-started/setup/) with `READ` access to the specified bucket {{< code-callout "<(domain|port|bucket-name|token)>" >}} {{< code-callout "us-east-1-1\.aws\.cloud2\.influxdata\.com|443|example-bucket|example-token" >}} @@ -250,7 +246,7 @@ to query and visualize data from InfluxDB. The measurement schema appears in the left pane: - {{< img-hd src="/img/influxdb/cloud-iox-superset-schema.png" alt="Select your InfluxDB schema in Superset" />}} + {{< img-hd src="/img/influxdb/cloud-serverless-superset-schema.png" alt="Select your InfluxDB schema in Superset" />}} 3. Use the **query editor** to write an SQL query that queries data in your InfluxDB bucket. @@ -259,4 +255,4 @@ to query and visualize data from InfluxDB. Query results appear below the query editor. With a connection to InfluxDB {{< current-version >}} established and a query -that returns results, you're ready to [visualize data using Superset](/influxdb/cloud-iox/visualize-data/superset/). +that returns results, you're ready to [visualize data using Superset](/influxdb/cloud-serverless/visualize-data/superset/). diff --git a/content/influxdb/cloud-iox/query-data/flux-sql.md b/content/influxdb/cloud-serverless/query-data/flux-sql.md similarity index 96% rename from content/influxdb/cloud-iox/query-data/flux-sql.md rename to content/influxdb/cloud-serverless/query-data/flux-sql.md index 548d1782d..b7b6f32ae 100644 --- a/content/influxdb/cloud-iox/query-data/flux-sql.md +++ b/content/influxdb/cloud-serverless/query-data/flux-sql.md @@ -4,18 +4,18 @@ description: > Leverage both the performance of SQL and the flexibility of Flux to query and process your time series data. menu: - influxdb_cloud_iox: + influxdb_cloud_serverless: name: Use Flux & SQL parent: Query data weight: 204 related: - - /influxdb/cloud-iox/get-started/query/ - - /influxdb/cloud-iox/query-data/sql/ -influxdb/cloud-iox/tags: [sql, flux, query] + - /influxdb/cloud-serverless/get-started/query/ + - /influxdb/cloud-serverless/query-data/sql/ +influxdb/cloud-serverless/tags: [sql, flux, query] --- -InfluxDB Cloud powered by [InfluxDB IOx](/influxdb/cloud-iox/#the-influxdb-iox-storage-engine) -supports both [Flux](/flux/v0.x/) and [SQL](/influxdb/cloud-iox/reference/sql/) query languages. +InfluxDB Cloud Serverless supports both [Flux](/flux/v0.x/) and +[SQL](/influxdb/cloud-serverless/reference/sql/) query languages. Flux is a full-featured data scripting language that provides a wide range of functionality and flexibility. SQL is a proven and performant relational query language. @@ -26,7 +26,7 @@ Flux when querying your time series data. #### Sample data The query examples below use the -[Get started sample data](/influxdb/cloud-iox/get-started/write/#write-line-protocol-to-influxdb). +[Get started sample data](/influxdb/cloud-serverless/get-started/write/#write-line-protocol-to-influxdb). {{% /note %}} - [Performance and flexibility](#performance-and-flexibility) @@ -111,7 +111,7 @@ WHERE time >= '2022-01-01T08:00:00Z' AND time < '2022-01-01T20:00:00Z' {{% /influxdb/custom-timestamps %}} _For more information about performing basic queries with SQL, see -[Perform a basic SQL query](/influxdb/cloud-iox/query-data/sql/basic-query/)._ +[Perform a basic SQL query](/influxdb/cloud-serverless/query-data/sql/basic-query/)._ {{% /expand %}} @@ -144,7 +144,7 @@ ORDER BY _time {{% /influxdb/custom-timestamps %}} _For more information about performing aggregate queries with SQL, see -[Aggregate data with SQL](/influxdb/cloud-iox/query-data/sql/aggregate-select/)._ +[Aggregate data with SQL](/influxdb/cloud-serverless/query-data/sql/aggregate-select/)._ {{% /expand %}} {{< /expand-wrapper >}} diff --git a/content/influxdb/cloud-serverless/query-data/sql/_index.md b/content/influxdb/cloud-serverless/query-data/sql/_index.md new file mode 100644 index 000000000..2faa1ecc6 --- /dev/null +++ b/content/influxdb/cloud-serverless/query-data/sql/_index.md @@ -0,0 +1,20 @@ +--- +title: Query data with SQL +seotitle: Query data with SQL +description: > + Learn to query data stored in InfluxDB Cloud Serverless using SQL. +menu: + influxdb_cloud_serverless: + name: Query with SQL + parent: Query data +weight: 101 +influxdb/cloud-serverless/tags: [query, sql] +--- + +Use SQL to query data stored in an InfluxDB Cloud Serverless bucket. + +{{< children type="anchored-list" >}} + +--- + +{{< children readmore=true hr=true >}} \ No newline at end of file diff --git a/content/influxdb/cloud-serverless/query-data/sql/aggregate-select.md b/content/influxdb/cloud-serverless/query-data/sql/aggregate-select.md new file mode 100644 index 000000000..925fd9a21 --- /dev/null +++ b/content/influxdb/cloud-serverless/query-data/sql/aggregate-select.md @@ -0,0 +1,295 @@ +--- +title: Aggregate or apply selector functions to data +seotitle: Perform a basic SQL query in InfluxDB Cloud +description: > + Use aggregate and selector functions to perform aggregate operations on your + time series data. +menu: + influxdb_cloud_serverless: + name: Aggregate data + parent: Query with SQL + identifier: query-sql-aggregate +weight: 203 +influxdb/cloud-serverless/tags: [query, sql] +related: + - /influxdb/cloud-serverless/reference/sql/functions/aggregate/ + - /influxdb/cloud-serverless/reference/sql/functions/selector/ +list_code_example: | + ##### Aggregate fields by groups + ```sql + SELECT + mean(field1) AS mean, + selector_first(field2)['value'] as first, + tag1 + FROM home + GROUP BY tag + ``` + + ##### Aggregate by time-based intervals + ```sql + SELECT + DATE_BIN(INTERVAL '1 hour', time, '2022-01-01T00:00:00Z'::TIMESTAMP) AS time, + mean(field1), + sum(field2), + tag1 + FROM home + GROUP BY + DATE_BIN(INTERVAL '1 hour', time, '2022-01-01T00:00:00Z'::TIMESTAMP), + tag1 + ``` +--- + +A SQL query that aggregates data includes the following clauses: + +{{< req type="key" >}} + +- {{< req "\*">}} `SELECT`: Specify fields, tags, and calculations to output from a + measurement or use the wild card alias (`*`) to select all fields and tags + from a measurement. +- {{< req "\*">}} `FROM`: Specify the measurement to query data from. +- `WHERE`: Only return data that meets the specified conditions--for example, falls within + a time range, contains specific tag values, or contains a field value outside a specified range. +- `GROUP BY`: Group data that have the same values for specified columns and expressions (for example, an aggregate function result). + +{{% note %}} +For simplicity, the term **"aggregate"** in this guide refers to applying +both aggregate and selector functions to a dataset. +{{% /note %}} + +Learn how to apply aggregate operations to your queried data: + +- [Aggregate and selector functions](#aggregate-and-selector-functions) + - [Aggregate functions](#aggregate-functions) + - [Selector functions](#selector-functions) +- [Example aggregate queries](#example-aggregate-queries) + +## Aggregate and selector functions + +Both aggregate and selector functions return a single row from each SQL partition +or group. For example, if you `GROUP BY room` and perform an aggregate operation +in your `SELECT` clause, results include an aggregate value for each unique +value of `room`. + +### Aggregate functions + +Use **aggregate functions** to aggregate values in a specified column for each +group and return a single row per group containing the aggregate value. + +[View aggregate functions](/influxdb/cloud-serverless/reference/sql/functions/aggregate/) + +##### Basic aggregate query + +```sql +SELECT AVG(co) from home +``` + +### Selector functions + +Use **selector functions** to "select" a value from a specified column. +The available selector functions are designed to work with time series data. + +[View selector functions](/influxdb/cloud-serverless/reference/sql/functions/selector/) + +Each selector function returns a Rust _struct_ (similar to a JSON object) +representing a single time and value from the specified column in the each group. +What time and value get returned depend on the logic in the selector function. +For example, `selector_first` returns the value of specified column in the first row of the group. +`selector_max` returns the maximum value of the specified column in the group. + +#### Selector struct schema + +The struct returned from a selector function has two properties: + +- **time**: `time` value in the selected row +- **value**: value of the specified column in the selected row + +```js +{time: 2023-01-01T00:00:00Z, value: 72.1} +``` + +#### Use selector functions + +Each selector function has two arguments: + +- The first is the column to operate on. +- The second is the time column to use in the selection logic. + +In your `SELECT` statement, execute a selector function and use bracket notation +to reference properties of the [returned struct](#selector-struct-schema) to +populate the column value: + +```sql +SELECT + selector_first(temp, time)['time'] AS time, + selector_first(temp, time)['value'] AS temp, + room +FROM home +GROUP BY room +``` + +## Example aggregate queries + +- [Perform an ungrouped aggregation](#perform-an-ungrouped-aggregation) +- [Group and aggregate data](#group-and-aggregate-data) + - [Downsample data by applying interval-based aggregates](#downsample-data-by-applying-interval-based-aggregates) +- [Query rows based on aggregate values](#query-rows-based-on-aggregate-values) + +{{% note %}} +#### Sample data + +The following examples use the sample data written in the +[Get started writing data guide](/influxdb/cloud-serverless/get-started/write/). +To run the example queries and return results, +[write the sample data](/influxdb/cloud-serverless/get-started/write/#write-line-protocol-to-influxdb) +to your InfluxDB Cloud Serverless bucket before running the example queries. +{{% /note %}} + +### Perform an ungrouped aggregation + +To aggregate _all_ queried values in a specified column: + +- Use aggregate or selector functions in your `SELECT` statement. +- Do not include a `GROUP BY` clause to leave your data ungrouped. + +```sql +SELECT avg(co) AS 'average co' from home +``` + +{{< expand-wrapper >}} +{{% expand "View example results" %}} +| average co | +| :---------------: | +| 5.269230769230769 | +{{% /expand %}} +{{< /expand-wrapper >}} + +### Group and aggregate data + +To apply aggregate or selector functions to grouped data: + +- Use aggregate or selector functions in your `SELECT` statement. +- Include columns to group by in your `SELECT` statement. +- Include a `GROUP BY` clause with a comma-delimited list of columns and expressions to group by. + +Keep the following in mind when using `GROUP BY`: + +- `GROUP BY` can use column aliases that are defined in the `SELECT` clause. +- `GROUP BY` can't use an alias named `time`. If you include `time` in `GROUP BY`, it always uses the measurement `time` column. + +```sql +SELECT + room, + avg(temp) AS 'average temp' +FROM home +GROUP BY room +``` + +{{< expand-wrapper >}} +{{% expand "View example results" %}} +| room | average temp | +| :---------- | -----------------: | +| Living Room | 22.16923076923077 | +| Kitchen | 22.623076923076926 | +{{% /expand %}} +{{< /expand-wrapper >}} + +#### Downsample data by applying interval-based aggregates + +A common use case when querying time series is downsampling data by applying +aggregates to time-based groups. To group and aggregate data into time-based +groups: + +- In your `SELECT` clause: + + - Use the [`DATE_BIN` function](/influxdb/cloud-serverless/reference/sql/functions/time-and-date/#date_bin) + to calculate time intervals and output a column that contains the start of the interval nearest to the `time` timestamp in each row--for example, + the following clause calculates two-hour intervals starting at `1970-01-01T00:00:00Z` and returns a new `time` column that contains the start of the interval + nearest to `home.time`: + + ```sql + SELECT DATE_BIN(INTERVAL '2 hours', time, '1970-01-01T00:00:00Z'::TIMESTAMP) AS time + from home + ... + ``` + + Given a `time` value + {{% influxdb/custom-timestamps-span %}}`2023-03-09T13:00:50.000Z`{{% /influxdb/custom-timestamps-span %}}, + the output `time` column contains + {{% influxdb/custom-timestamps-span %}}`2023-03-09T12:00:00.000Z`{{% /influxdb/custom-timestamps-span %}}. + - Use [aggregate](/influxdb/cloud-serverless/reference/sql/functions/aggregate/) or [selector](/influxdb/cloud-serverless/reference/sql/functions/selector/) functions on specified columns. + +- In your `GROUP BY` clause: + + - Use the [`DATE_BIN` function](/influxdb/cloud-serverless/reference/sql/functions/time-and-date/#date_bin) with the same parameters used in the `SELECT` clause. + - Specify other columns (for example, `room`) that are specified in the `SELECT` clause and aren't used in a selector function. + + ```sql + SELECT DATE_BIN(INTERVAL '2 hours', time, '1970-01-01T00:00:00Z'::TIMESTAMP) AS time + ... + GROUP BY DATE_BIN(INTERVAL '2 hours', time, '1970-01-01T00:00:00Z'::TIMESTAMP), room + ... + ``` + +- Include an `ORDER BY` clause with columns to sort by. + +The following example retrieves unique combinations of time intervals and rooms with their minimum, maximum, and average temperatures. + +```sql +SELECT + DATE_BIN(INTERVAL '2 hours', time, '1970-01-01T00:00:00Z'::TIMESTAMP) AS time, + room, + selector_max(temp, time)['value'] AS 'max temp', + selector_min(temp, time)['value'] AS 'min temp', + avg(temp) AS 'average temp' +FROM home +GROUP BY DATE_BIN(INTERVAL '2 hours', time, '1970-01-01T00:00:00Z'::TIMESTAMP), room +ORDER BY room, time +``` + +{{< expand-wrapper >}} +{{% expand "View example results" %}} +{{% influxdb/custom-timestamps %}} +| time | room | max temp | min temp | average temp | +| :------------------- | :---------- | -------: | -------: | -----------------: | +| 2022-01-01T08:00:00Z | Kitchen | 23 | 21 | 22 | +| 2022-01-01T10:00:00Z | Kitchen | 22.7 | 22.4 | 22.549999999999997 | +| 2022-01-01T12:00:00Z | Kitchen | 22.8 | 22.5 | 22.65 | +| 2022-01-01T14:00:00Z | Kitchen | 22.8 | 22.7 | 22.75 | +| 2022-01-01T16:00:00Z | Kitchen | 22.7 | 22.4 | 22.549999999999997 | +| 2022-01-01T18:00:00Z | Kitchen | 23.3 | 23.1 | 23.200000000000003 | +| 2022-01-01T20:00:00Z | Kitchen | 22.7 | 22.7 | 22.7 | +| 2022-01-01T08:00:00Z | Living Room | 21.4 | 21.1 | 21.25 | +| 2022-01-01T10:00:00Z | Living Room | 22.2 | 21.8 | 22 | +| 2022-01-01T12:00:00Z | Living Room | 22.4 | 22.2 | 22.299999999999997 | +| 2022-01-01T14:00:00Z | Living Room | 22.3 | 22.3 | 22.3 | +| 2022-01-01T16:00:00Z | Living Room | 22.6 | 22.4 | 22.5 | +| 2022-01-01T18:00:00Z | Living Room | 22.8 | 22.5 | 22.65 | +| 2022-01-01T20:00:00Z | Living Room | 22.2 | 22.2 | 22.2 | +{{% /influxdb/custom-timestamps %}} +{{% /expand %}} +{{< /expand-wrapper >}} + + +### Query rows based on aggregate values + +To query data based on values after an aggregate operation, include a `HAVING` +clause with defined predicate conditions such as a value threshold. +Predicates in the `WHERE` clause are applied _before_ data is aggregated. +Predicates in the `HAVING` clause are applied _after_ data is aggregated. + +```sql +SELECT + room, + avg(co) AS 'average co' +FROM home +GROUP BY room +HAVING "average co" > 5 +``` + +{{< expand-wrapper >}} +{{% expand "View example results" %}} +| room | average co | +| :------ | -----------------: | +| Kitchen | 6.6923076923076925 | +{{% /expand %}} +{{< /expand-wrapper >}} diff --git a/content/influxdb/cloud-iox/query-data/sql/basic-query.md b/content/influxdb/cloud-serverless/query-data/sql/basic-query.md similarity index 92% rename from content/influxdb/cloud-iox/query-data/sql/basic-query.md rename to content/influxdb/cloud-serverless/query-data/sql/basic-query.md index fe8eb4a4a..1c22f24df 100644 --- a/content/influxdb/cloud-iox/query-data/sql/basic-query.md +++ b/content/influxdb/cloud-serverless/query-data/sql/basic-query.md @@ -5,19 +5,19 @@ description: > A basic SQL query that queries data from InfluxDB most commonly includes `SELECT`, `FROM`, and `WHERE` clauses. menu: - influxdb_cloud_iox: + influxdb_cloud_serverless: name: Basic query parent: Query with SQL identifier: query-sql-basic weight: 202 -influxdb/cloud-iox/tags: [query, sql] +influxdb/cloud-serverless/tags: [query, sql] list_code_example: | ```sql SELECT temp, room FROM home WHERE time >= now() - INTERVAL '1 day' ``` --- -InfluxDB Cloud's SQL implementation is powered by the [Apache Arrow DataFusion](https://arrow.apache.org/datafusion/) +The InfluxDB SQL implementation is powered by the [Apache Arrow DataFusion](https://arrow.apache.org/datafusion/) query engine which provides a SQL syntax similar to other relational query languages. A basic SQL query that queries data from InfluxDB most commonly includes the @@ -58,10 +58,10 @@ WHERE #### Sample data The following examples use the sample data written in the -[Get started writing data guide](/influxdb/cloud-iox/get-started/write/). +[Get started writing data guide](/influxdb/cloud-serverless/get-started/write/). To run the example queries and return results, -[write the sample data](/influxdb/cloud-iox/get-started/write/#write-line-protocol-to-influxdb) -to your InfluxDB Cloud bucket before running the example queries. +[write the sample data](/influxdb/cloud-serverless/get-started/write/#write-line-protocol-to-influxdb) +to your InfluxDB Cloud Serverless bucket before running the example queries. {{% /note %}} ### Query data within time boundaries diff --git a/content/influxdb/cloud-serverless/query-data/sql/cast-types.md b/content/influxdb/cloud-serverless/query-data/sql/cast-types.md new file mode 100644 index 000000000..43eb5b443 --- /dev/null +++ b/content/influxdb/cloud-serverless/query-data/sql/cast-types.md @@ -0,0 +1,309 @@ +--- +title: Cast values to different types +seotitle: Cast values to different data types in SQL +description: > + Use the `CAST` function or double-colon `::` casting shorthand syntax to cast + a value to a specific type. +menu: + influxdb_cloud_serverless: + name: Cast types + parent: Query with SQL + identifier: query-sql-cast-types +weight: 205 +influxdb/cloud-serverless/tags: [query, sql] +related: + - /influxdb/cloud-serverless/reference/sql/data-types/ +list_code_example: | + ```sql + -- CAST clause + SELECT CAST(1234.5 AS BIGINT) + + -- Double-colon casting shorthand + SELECT 1234.5::BIGINT + ``` +--- + +Use the `CAST` function or double-colon `::` casting shorthand syntax to cast a +value to a specific type. + +```sql +-- CAST function +SELECT CAST(1234.5 AS BIGINT) + +-- Double-colon casting shorthand +SELECT 1234.5::BIGINT +``` + +- [Cast to a string type](#cast-to-a-string-type) +- [Cast to numeric types](#cast-to-numeric-types) + - [Float](#cast-to-a-float) + - [Integer](#cast-to-an-integer) + - [Unsigned integer](#cast-to-an-unsigned-integer) +- [Cast to a boolean type](#cast-to-a-boolean-type) +- [Cast to a timestamp type](#cast-to-a-timestamp-type) + +Casting operations can be performed on a column expression or a literal value. +For example, the following query uses the +[get started sample data](/influxdb/cloud-serverless/get-started/write/#construct-line-protocol) +and: + +- Casts all values in the `time` column to integers (Unix nanosecond timestamps). +- Casts the literal string value `'1234'` to a 64-bit float for each row. + +{{< code-tabs-wrapper >}} +{{% code-tabs %}} +[:: shorthand](#) +[CAST()](#) +{{% /code-tabs %}} +{{% code-tab-content %}} +```sql +SELECT + time::BIGINT AS unix_time, + '1234'::DOUBLE AS string_to_float +FROM home +LIMIT 5 +``` +{{% /code-tab-content %}} +{{% code-tab-content %}} +```sql +SELECT + CAST(time AS BIGINT) AS unix_time, + CAST('1234' AS DOUBLE) AS string_to_float +FROM home +LIMIT 5 +``` +{{% /code-tab-content %}} +{{< /code-tabs-wrapper >}} + +{{% influxdb/custom-timestamps %}} + +| unix_time | string_to_float | +| :------------------ | --------------: | +| 1641024000000000000 | 1234 | +| 1641027600000000000 | 1234 | +| 1641031200000000000 | 1234 | +| 1641034800000000000 | 1234 | +| 1641038400000000000 | 1234 | + +{{% /influxdb/custom-timestamps %}} + +--- + +## Cast to a string type + +Use the `STRING`, `CHAR`, `VARCHAR`, or `TEXT` type in a casting operation to +cast a value to a string. + +{{< code-tabs-wrapper >}} +{{% code-tabs %}} +[:: shorthand](#) +[CAST()](#) +{{% /code-tabs %}} +{{% code-tab-content %}} +```sql +value::STRING +value::CHAR +value::VARCHAR +value::TEXT +``` +{{% /code-tab-content %}} +{{% code-tab-content %}} +```sql +CAST(value AS STRING) +CAST(value AS CHAR) +CAST(value AS VARCHAR) +CAST(value AS TEXT) +``` +{{% /code-tab-content %}} +{{< /code-tabs-wrapper >}} + +SQL supports casting the following to a string value: + +- **Floats** +- **Integers** +- **Unsigned integers** +- **Booleans** +- **Timestamps** + +--- + +## Cast to numeric types + +The InfluxDB SQL implementation supports 64-bit floats (`DOUBLE`), +integers (`BIGINT`), and unsigned integers (`BIGINT UNSIGNED`). + +### Cast to a float + +Use the `DOUBLE` type in a casting operation to cast a value to a 64-bit float. + +{{< code-tabs-wrapper >}} +{{% code-tabs %}} +[:: shorthand](#) +[CAST()](#) +{{% /code-tabs %}} +{{% code-tab-content %}} +```sql +value::DOUBLE +``` +{{% /code-tab-content %}} +{{% code-tab-content %}} +```sql +CAST(value AS DOUBLE) +``` +{{% /code-tab-content %}} +{{< /code-tabs-wrapper >}} + +SQL supports casting the following to a float value: + +- **Strings**: Returns the float equivalent of the numeric string (`[0-9]`). + The following string patterns are also supported: + + - Scientific notation (`'123.4E+10'`) + - Infinity (`'±Inf'`) + - NaN (`'NaN'`) + +- **Integers** +- **Unsigned integers** + +### Cast to an integer + +Use the `BIGINT` type in a casting operation to cast a value to a 64-bit signed integer. + +{{< code-tabs-wrapper >}} +{{% code-tabs %}} +[:: shorthand](#) +[CAST()](#) +{{% /code-tabs %}} +{{% code-tab-content %}} +```sql +value::BIGINT +``` +{{% /code-tab-content %}} +{{% code-tab-content %}} +```sql +CAST(value AS BIGINT) +``` +{{% /code-tab-content %}} +{{< /code-tabs-wrapper >}} + +SQL supports casting the following to an integer: + +- **Strings**: Returns the integer equivalent of the numeric string (`[0-9]`). +- **Floats**: Truncates the float value at the decimal. +- **Unsigned integers**: Returns the signed integer equivalent of the unsigned integer. +- **Booleans**: Returns `1` for `true` and `0` for `false`. +- **Timestamps**: Returns the equivalent + [nanosecond epoch timestamp](/influxdb/cloud-serverless/reference/glossary/#unix-timestamp). + +### Cast to an unsigned integer + +Use the `BIGINT UNSIGNED` type in a casting operation to cast a value to a +64-bit unsigned integer. + +{{< code-tabs-wrapper >}} +{{% code-tabs %}} +[:: shorthand](#) +[CAST()](#) +{{% /code-tabs %}} +{{% code-tab-content %}} +```sql +value::BIGINT UNSIGNED +``` +{{% /code-tab-content %}} +{{% code-tab-content %}} +```sql +CAST(value AS BIGINT UNSIGNED) +``` +{{% /code-tab-content %}} +{{< /code-tabs-wrapper >}} + +SQL supports casting the following to an unsigned integer: + +- **Strings**: Returns the unsigned integer equivalent of the numeric string (`[0-9]`). +- **Floats**: Truncates the float value at the decimal. +- **Integers**: Returns the unsigned integer equivalent of the signed integer. +- **Booleans**: Returns `1` for `true` and `0` for `false`. +- **Timestamps**: Returns the equivalent + [nanosecond epoch timestamp](/influxdb/cloud-serverless/reference/glossary/#unix-timestamp). + +--- + +## Cast to a boolean type + +Use the `BOOLEAN` type in a casting operation to cast a value to a boolean. + +{{< code-tabs-wrapper >}} +{{% code-tabs %}} +[:: shorthand](#) +[CAST()](#) +{{% /code-tabs %}} +{{% code-tab-content %}} +```sql +value::BOOLEAN +``` +{{% /code-tab-content %}} +{{% code-tab-content %}} +```sql +CAST(value AS BOOLEAN) +``` +{{% /code-tab-content %}} +{{< /code-tabs-wrapper >}} + +SQL supports casting the following to a boolean: + +- **Strings** + - Return `true`: + - `'true'` _(case-insensitive)_ + - `'t'`, _(case-insensitive)_ + - `'1'` + - Return `false`: + - `'false'` _(case-insensitive)_ + - `'f'` _(case-insensitive)_ + - `'0'` +- **Integers** + - Returns `true`: positive non-zero integer + - Returns `false`: `0` +- **Unsigned integers** + - Returns `true`: non-zero unsigned integer + - Returns `false`: `0` + +--- + +## Cast to a timestamp type + +Use the `TIMESTAMP` type in a casting operation to cast a value to a timestamp. + +{{< code-tabs-wrapper >}} +{{% code-tabs %}} +[:: shorthand](#) +[CAST()](#) +{{% /code-tabs %}} +{{% code-tab-content %}} +```sql +value::TIMESTAMP +``` +{{% /code-tab-content %}} +{{% code-tab-content %}} +```sql +CAST(value AS TIMESTAMP) +``` +{{% /code-tab-content %}} +{{< /code-tabs-wrapper >}} + +SQL supports casting the following to a boolean: + +- **Strings**: Returns the timestamp equivalent of the string value. + The following RFC3339 and RFC339-like string patterns are supported: + + - `YYYY-MM-DDT00:00:00.000Z` + - `YYYY-MM-DDT00:00:00.000-00:00` + - `YYYY-MM-DD 00:00:00.000-00:00` + - `YYYY-MM-DDT00:00:00Z` + - `YYYY-MM-DD 00:00:00.000` + - `YYYY-MM-DD 00:00:00` + - `YYYY-MM-DD` + +- **Integers**: Parses the integer as a Unix nanosecond timestamp and returns + the equivalent timestamp. +- **Unsigned integers**: Parses the unsigned integer as a Unix nanosecond timestamp + and returns the equivalent timestamp. diff --git a/content/influxdb/cloud-iox/query-data/sql/explore-schema.md b/content/influxdb/cloud-serverless/query-data/sql/explore-schema.md similarity index 97% rename from content/influxdb/cloud-iox/query-data/sql/explore-schema.md rename to content/influxdb/cloud-serverless/query-data/sql/explore-schema.md index 442775bcc..83db8ab6c 100644 --- a/content/influxdb/cloud-iox/query-data/sql/explore-schema.md +++ b/content/influxdb/cloud-serverless/query-data/sql/explore-schema.md @@ -5,12 +5,12 @@ description: > to a database, a **measurement** is structured as a table, and **time**, **fields**, and **tags** are structured as columns. menu: - influxdb_cloud_iox: + influxdb_cloud_serverless: name: Explore your schema parent: Query with SQL identifier: query-sql-schema weight: 201 -influxdb/cloud-iox/tags: [query, sql] +influxdb/cloud-serverless/tags: [query, sql] list_code_example: | ##### List measurements ```sql diff --git a/content/influxdb/cloud-iox/query-data/tools/_index.md b/content/influxdb/cloud-serverless/query-data/tools/_index.md similarity index 53% rename from content/influxdb/cloud-iox/query-data/tools/_index.md rename to content/influxdb/cloud-serverless/query-data/tools/_index.md index 6cc763d41..e86d66ab8 100644 --- a/content/influxdb/cloud-iox/query-data/tools/_index.md +++ b/content/influxdb/cloud-serverless/query-data/tools/_index.md @@ -1,14 +1,14 @@ --- -title: Use analysis and visualization tools with InfluxDB Cloud (IOx) APIs -description: Use popular tools to analyze and visualize time series data stored in an InfluxDB bucket powered by IOx. +title: Use analysis and visualization tools with InfluxDB Cloud Serverless APIs +description: Use popular tools to analyze and visualize time series data stored in an InfluxDB Cloud Serverless bucket. weight: 201 menu: - influxdb_cloud_iox: + influxdb_cloud_serverless: name: Analyze and visualize data parent: Query data -influxdb/cloud-iox/tags: [analysis, visualization, tools] +influxdb/cloud-serverless/tags: [analysis, visualization, tools] aliases: - - /influxdb/cloud-iox/visualize-data/ + - /influxdb/cloud-serverless/visualize-data/ --- {{< children >}} diff --git a/content/influxdb/cloud-iox/query-data/tools/grafana.md b/content/influxdb/cloud-serverless/query-data/tools/grafana.md similarity index 87% rename from content/influxdb/cloud-iox/query-data/tools/grafana.md rename to content/influxdb/cloud-serverless/query-data/tools/grafana.md index eda007093..0996cfa21 100644 --- a/content/influxdb/cloud-iox/query-data/tools/grafana.md +++ b/content/influxdb/cloud-serverless/query-data/tools/grafana.md @@ -1,23 +1,23 @@ --- title: Use Grafana to query and visualize data -seotitle: Use Grafana to query and visualize data stored in InfluxDB Cloud (IOx) +seotitle: Use Grafana to query and visualize data stored in InfluxDB Cloud Serverless list_title: Use Grafana description: > - Install and run [Grafana](https://grafana.com/) to query and visualize data stored in an - InfluxDB bucket powered by InfluxDB IOx. + Install and run [Grafana](https://grafana.com/) to query and visualize data + stored in InfluxDB Cloud Serverless. weight: 101 menu: - influxdb_cloud_iox: + influxdb_cloud_serverless: name: Use Grafana parent: Analyze and visualize data -influxdb/cloud-iox/tags: [query, visualization] +influxdb/cloud-serverless/tags: [query, visualization] aliases: - - /influxdb/cloud-iox/query-data/tools/grafana/ + - /influxdb/cloud-serverless/query-data/tools/grafana/ alt_engine: /influxdb/cloud/tools/grafana/ --- -Use [Grafana](https://grafana.com/) to query and visualize data stored in an -InfluxDB bucket powered by InfluxDB IOx. +Use [Grafana](https://grafana.com/) to query and visualize data stored in +InfluxDB Cloud Serverless. Install the [grafana-flight-sql-plugin](https://github.com/influxdata/grafana-flightsql-datasource) to query InfluxDB with the Flight SQL protocol. @@ -26,7 +26,7 @@ to query InfluxDB with the Flight SQL protocol. > [Grafana] provides you with tools to turn your time-series database (TSDB) > data into insightful graphs and visualizations. > -> {{% caption %}}[Grafana documentation](https://grafana.com/docs/grafana/latest/introduction/){{% /caption %}} +> {{% cite %}}-- [Grafana documentation](https://grafana.com/docs/grafana/latest/introduction/){{% /cite %}} @@ -105,7 +105,7 @@ Grafana Cloud instance. - **Host**: Provide the host and port of your Flight SQL client. For InfluxDB Cloud Serverless, this is your - [InfluxDB Cloud region domain](/influxdb/cloud-iox/reference/regions/) + [InfluxDB Cloud Serverless region domain](/influxdb/cloud-serverless/reference/regions/) and port 443. For example: ``` @@ -127,7 +127,7 @@ Grafana Cloud instance. 7. Click **Save & test**. - {{< img-hd src="/img/influxdb/cloud-iox-grafana-flightsql-datasource.png" alt="Grafana Flight SQL datasource" />}} + {{< img-hd src="/img/influxdb/cloud-serverless-grafana-flightsql-datasource.png" alt="Grafana Flight SQL datasource" />}} If successful, click **Explore** to begin querying InfluxDB with Flight SQL and Grafana. @@ -138,7 +138,7 @@ use Grafana to build, run, and inspect queries against InfluxDB buckets. {{% note %}} {{% sql/sql-schema-intro %}} -To learn more, see [Query Data](/influxdb/cloud-iox/query-data/sql/). +To learn more, see [Query Data](/influxdb/cloud-serverless/query-data/sql/). {{% /note %}} 1. Click **Explore**. @@ -154,7 +154,7 @@ To learn more, see [Query Data](/influxdb/cloud-iox/query-data/sql/). SQL will return the aggregation for each group or partition. 4. Click **Run query** to execute the query. -{{< img-hd src="/img/influxdb/cloud-iox-grafana-flightsql-explore-query-1.png" alt="Grafana Flight SQL datasource query" />}} +{{< img-hd src="/img/influxdb/cloud-serverless-grafana-flightsql-explore-query-1.png" alt="Grafana Flight SQL datasource query" />}} To learn about query management and inspection in Grafana, see the [Grafana Explore documentation](https://grafana.com/docs/grafana/latest/explore/). diff --git a/content/influxdb/cloud-iox/query-data/tools/pandas.md b/content/influxdb/cloud-serverless/query-data/tools/pandas.md similarity index 90% rename from content/influxdb/cloud-iox/query-data/tools/pandas.md rename to content/influxdb/cloud-serverless/query-data/tools/pandas.md index ee1c59eb4..19fb13fef 100644 --- a/content/influxdb/cloud-iox/query-data/tools/pandas.md +++ b/content/influxdb/cloud-serverless/query-data/tools/pandas.md @@ -3,17 +3,17 @@ title: Use pandas to analyze and visualize data seotitle: Use Python and pandas to analyze and visualize data description: > Use the [pandas](https://pandas.pydata.org/) Python data analysis library - to analyze and visualize data stored in a bucket powered by InfluxDB IOx. + to analyze and visualize data stored in InfluxDB Cloud Serverless. weight: 101 menu: - influxdb_cloud_iox: + influxdb_cloud_serverless: parent: Analyze and visualize data name: Use pandas -influxdb/cloud-iox/tags: [analysis, pandas, pyarrow, python, visualization] +influxdb/cloud-serverless/tags: [analysis, pandas, pyarrow, python, visualization] related: - - /influxdb/cloud-iox/query-data/tools/python/ - - /influxdb/cloud-iox/query-data/tools/pyarrow/ - - /influxdb/cloud-iox/query-data/sql/ + - /influxdb/cloud-serverless/query-data/tools/python/ + - /influxdb/cloud-serverless/query-data/tools/pyarrow/ + - /influxdb/cloud-serverless/query-data/sql/ list_code_example: | ```py ... @@ -29,7 +29,7 @@ list_code_example: | --- Use [pandas](https://pandas.pydata.org/), the Python data analysis library, to process, analyze, and visualize data -stored in an InfluxDB bucket powered by InfluxDB IOx. +stored in an InfluxDB Cloud Serverless bucket. > **pandas** is an open source, BSD-licensed library providing high-performance, > easy-to-use data structures and data analysis tools for the Python programming language. @@ -52,13 +52,13 @@ stored in an InfluxDB bucket powered by InfluxDB IOx. The examples in this guide assume using a Python virtual environment and the Flight SQL library for Python. Installing `flightsql-dbapi` also installs the [`pyarrow`](https://arrow.apache.org/docs/python/index.html) library that provides Python bindings for Apache Arrow. -For more information, see how to [get started querying InfluxDB with Python and flightsql-dbapi](/influxdb/cloud-iox/query-data/execute-queries/flight-sql/python/) +For more information, see how to [get started querying InfluxDB with Python and flightsql-dbapi](/influxdb/cloud-serverless/query-data/execute-queries/flight-sql/python/) ## Install pandas To use pandas, you need to install and import the `pandas` library. -In your terminal, use `pip` to install `pandas` in your active [Python virtual environment](/influxdb/cloud-iox/query-data/execute-queries/flight-sql/python/#create-a-project-virtual-environment): +In your terminal, use `pip` to install `pandas` in your active [Python virtual environment](/influxdb/cloud-serverless/query-data/execute-queries/flight-sql/python/#create-a-project-virtual-environment): ```sh pip install pandas diff --git a/content/influxdb/cloud-iox/query-data/tools/pyarrow.md b/content/influxdb/cloud-serverless/query-data/tools/pyarrow.md similarity index 90% rename from content/influxdb/cloud-iox/query-data/tools/pyarrow.md rename to content/influxdb/cloud-serverless/query-data/tools/pyarrow.md index b0d54a427..edb12933a 100644 --- a/content/influxdb/cloud-iox/query-data/tools/pyarrow.md +++ b/content/influxdb/cloud-serverless/query-data/tools/pyarrow.md @@ -1,17 +1,18 @@ --- title: Use the PyArrow library to analyze data description: > - Use [PyArrow](https://arrow.apache.org/docs/python/) to read and analyze InfluxDB query results from a bucket powered by InfluxDB IOx. + Use [PyArrow](https://arrow.apache.org/docs/python/) to read and analyze + InfluxDB query results from InfluxDB Cloud Serverless. weight: 101 menu: - influxdb_cloud_iox: + influxdb_cloud_serverless: parent: Analyze and visualize data name: Use PyArrow -influxdb/cloud-iox/tags: [analysis, arrow, pyarrow, python] +influxdb/cloud-serverless/tags: [analysis, arrow, pyarrow, python] related: - - /influxdb/cloud-iox/query-data/tools/pandas/ - - /influxdb/cloud-iox/query-data/tools/pyarrow/ - - /influxdb/cloud-iox/query-data/sql/ + - /influxdb/cloud-serverless/query-data/tools/pandas/ + - /influxdb/cloud-serverless/query-data/tools/pyarrow/ + - /influxdb/cloud-serverless/query-data/sql/ list_code_example: | ```py ... @@ -21,7 +22,7 @@ list_code_example: | --- Use [PyArrow](https://arrow.apache.org/docs/python/) to read and analyze query results -from an InfluxDB bucket powered by InfluxDB IOx. +from a InfluxDB Cloud Serverless. The PyArrow library provides efficient computation, aggregation, serialization, and conversion of Arrow format data. > Apache Arrow is a development platform for in-memory analytics. It contains a set of technologies that enable @@ -42,7 +43,7 @@ The PyArrow library provides efficient computation, aggregation, serialization, ## Install prerequisites The examples in this guide assume using a Python virtual environment and the Flight SQL library for Python. -For more information, see how to [get started using Python to query InfluxDB](/influxdb/cloud-iox/query-data/execute-queries/flight-sql/python/) +For more information, see how to [get started using Python to query InfluxDB](/influxdb/cloud-serverless/query-data/execute-queries/flight-sql/python/) Installing `flightsql-dbapi` also installs the [`pyarrow`](https://arrow.apache.org/docs/python/index.html) library that provides Python bindings for Apache Arrow. diff --git a/content/influxdb/cloud-iox/query-data/tools/superset.md b/content/influxdb/cloud-serverless/query-data/tools/superset.md similarity index 71% rename from content/influxdb/cloud-iox/query-data/tools/superset.md rename to content/influxdb/cloud-serverless/query-data/tools/superset.md index de85afad4..d4625651e 100644 --- a/content/influxdb/cloud-iox/query-data/tools/superset.md +++ b/content/influxdb/cloud-serverless/query-data/tools/superset.md @@ -4,22 +4,22 @@ seotitle: Use Apache Superset to visualize data stored in InfluxDB list_title: Superset description: > Use [Apache Superset](https://superset.apache.org/) to query and visualize data - stored in an InfluxDB bucket backed by InfluxDB IOx. + stored in InfluxDB Cloud Serverless. weight: 101 menu: - influxdb_cloud_iox: + influxdb_cloud_serverless: parent: Analyze and visualize data name: Use Superset identifier: visualize_with_superset -influxdb/cloud-iox/tags: [query, visualization] +influxdb/cloud-serverless/tags: [query, visualization] aliases: - - /influxdb/cloud-iox/visualize-data/superset/ + - /influxdb/cloud-serverless/visualize-data/superset/ related: - - /influxdb/cloud-iox/query-data/execute-queries/flight-sql/superset/ + - /influxdb/cloud-serverless/query-data/execute-queries/flight-sql/superset/ --- Use [Apache Superset](https://superset.apache.org/) to query and visualize data -stored in an InfluxDB bucket backed by InfluxDB IOx. +stored in an InfluxDB Cloud Serverless bucket. > Apache Superset is a modern, enterprise-ready business intelligence web application. > It is fast, lightweight, intuitive, and loaded with options that make it easy for @@ -28,11 +28,11 @@ stored in an InfluxDB bucket backed by InfluxDB IOx. > > {{% caption %}}[Apache Superset documentation](https://superset.apache.org/docs/intro){{% /caption %}} -To get started with Superset and InfluxDB, see [Use Superset to query data](/influxdb/cloud-iox/query-data/execute-queries/flight-sql/superset/). +To get started with Superset and InfluxDB, see [Use Superset to query data](/influxdb/cloud-serverless/query-data/execute-queries/flight-sql/superset/). ## Build visualizations with Superset Use Superset to create visualizations and dashboards for InfluxDB IOx queries. For a comprehensive walk-through of creating visualizations with Superset, see the [Creating Charts and Dashboards in Superset documentation](https://superset.apache.org/docs/creating-charts-dashboards/creating-your-first-dashboard). -{{< img-hd src="/img/influxdb/cloud-iox-superset-dashboard.png" alt="Build InfluxDB dashboards in Apache Superset" />}} +{{< img-hd src="/img/influxdb/cloud-serverless-superset-dashboard.png" alt="Build InfluxDB dashboards in Apache Superset" />}} diff --git a/content/influxdb/cloud-serverless/reference/_index.md b/content/influxdb/cloud-serverless/reference/_index.md new file mode 100644 index 000000000..cc715d1e1 --- /dev/null +++ b/content/influxdb/cloud-serverless/reference/_index.md @@ -0,0 +1,12 @@ +--- +title: InfluxDB Cloud Serverless reference documentation +description: > + Reference documentation for InfluxDB Cloud Serverless including updates, + API documentation, tools, syntaxes, and more. +menu: + influxdb_cloud_serverless: + name: Reference +weight: 20 +--- + +{{< children >}} \ No newline at end of file diff --git a/content/influxdb/cloud-iox/reference/api/_index.md b/content/influxdb/cloud-serverless/reference/api/_index.md similarity index 68% rename from content/influxdb/cloud-iox/reference/api/_index.md rename to content/influxdb/cloud-serverless/reference/api/_index.md index 337764ecf..f77db082a 100644 --- a/content/influxdb/cloud-iox/reference/api/_index.md +++ b/content/influxdb/cloud-serverless/reference/api/_index.md @@ -4,22 +4,22 @@ description: > The InfluxDB HTTP API provides a programmatic interface for interactions with InfluxDB. Access the InfluxDB API using the `/api/v2/` endpoint. menu: - influxdb_cloud_iox: + influxdb_cloud_serverless: parent: Reference name: InfluxDB HTTP API weight: 104 -influxdb/cloud-iox/tags: [api] +influxdb/cloud-serverless/tags: [api] --- The InfluxDB HTTP API provides a programmatic interface for interactions with InfluxDB. Access the InfluxDB HTTP API using the `/api/v2/` endpoint. ## InfluxDB HTTP API documentation -InfluxDB {{< current-version >}} (IOx) HTTP API documentation +InfluxDB Cloud Serverless HTTP API documentation ## InfluxDB v1 compatibility API documentation The InfluxDB HTTP API includes InfluxDB 1.x compatibility endpoints that work with InfluxDB 1.x client libraries and third-party integrations like [Grafana](https://grafana.com) and others. -InfluxDB Cloud (IOx) v1 compatibility HTTP API documentation +InfluxDB Cloud Serverless v1 compatibility HTTP API documentation diff --git a/content/influxdb/cloud-iox/reference/cli/_index.md b/content/influxdb/cloud-serverless/reference/cli/_index.md similarity index 87% rename from content/influxdb/cloud-iox/reference/cli/_index.md rename to content/influxdb/cloud-serverless/reference/cli/_index.md index 000314f6f..d48759193 100644 --- a/content/influxdb/cloud-iox/reference/cli/_index.md +++ b/content/influxdb/cloud-serverless/reference/cli/_index.md @@ -4,9 +4,9 @@ seotitle: Command line tools for managing InfluxDB description: > InfluxDB provides command line tools designed to aid in managing and working with InfluxDB from the command line. -influxdb/cloud-iox/tags: [cli] +influxdb/cloud-serverless/tags: [cli] menu: - influxdb_cloud_iox: + influxdb_cloud_serverless: parent: Reference name: CLIs weight: 104 diff --git a/content/influxdb/cloud-iox/reference/cli/influx/_index.md b/content/influxdb/cloud-serverless/reference/cli/influx/_index.md similarity index 84% rename from content/influxdb/cloud-iox/reference/cli/influx/_index.md rename to content/influxdb/cloud-serverless/reference/cli/influx/_index.md index 07079613e..b2862c8b5 100644 --- a/content/influxdb/cloud-iox/reference/cli/influx/_index.md +++ b/content/influxdb/cloud-serverless/reference/cli/influx/_index.md @@ -5,11 +5,11 @@ description: > The `influx` CLI includes commands to manage many aspects of InfluxDB, including buckets, organizations, users, tasks, etc. menu: - influxdb_cloud_iox: + influxdb_cloud_serverless: name: influx parent: CLIs weight: 101 -influxdb/cloud-iox/tags: [cli] +influxdb/cloud-serverless/tags: [cli] related: - /influxdb/cloud/tools/clis/ --- diff --git a/content/influxdb/cloud-serverless/reference/cli/influx/apply/_index.md b/content/influxdb/cloud-serverless/reference/cli/influx/apply/_index.md new file mode 100644 index 000000000..bd57f7930 --- /dev/null +++ b/content/influxdb/cloud-serverless/reference/cli/influx/apply/_index.md @@ -0,0 +1,26 @@ +--- +title: influx apply +description: The `influx apply` command applies InfluxDB templates. +menu: + influxdb_cloud_serverless: + name: influx apply + parent: influx +weight: 101 +aliases: + - /influxdb/cloud-serverless/reference/cli/influx/pkg/ +influxdb/cloud-serverless/tags: [templates] +related: + - /influxdb/cloud-serverless/reference/cli/influx/#provide-required-authentication-credentials, influx CLI—Provide required authentication credentials + - /influxdb/cloud-serverless/reference/cli/influx/#flag-patterns-and-conventions, influx CLI—Flag patterns and conventions +metadata: [influx CLI 2.0.0+] +--- + +{{% warn %}} +#### Not supported in InfluxDB Cloud Serverless + +While this command is included in the `influx` CLI {{< latest-cli >}}, this +functionality is not available in InfluxDB Cloud Serverless organizations +powered by the InfluxDB IOx storage engine. +{{% /warn %}} + +{{< duplicate-oss >}} \ No newline at end of file diff --git a/content/influxdb/cloud-serverless/reference/cli/influx/auth/_index.md b/content/influxdb/cloud-serverless/reference/cli/influx/auth/_index.md new file mode 100644 index 000000000..c49ac6511 --- /dev/null +++ b/content/influxdb/cloud-serverless/reference/cli/influx/auth/_index.md @@ -0,0 +1,17 @@ +--- +title: influx auth +description: The `influx auth` command and its subcommands manage API tokens in InfluxDB. +menu: + influxdb_cloud_serverless: + name: influx auth + parent: influx +weight: 101 +influxdb/cloud-serverless/tags: [authentication] +cascade: + related: + - /influxdb/cloud-serverless/reference/cli/influx/#provide-required-authentication-credentials, influx CLI—Provide required authentication credentials + - /influxdb/cloud-serverless/reference/cli/influx/#flag-patterns-and-conventions, influx CLI—Flag patterns and conventions + metadata: [influx CLI 2.0.0+] +--- + +{{< duplicate-oss >}} diff --git a/content/influxdb/cloud-iox/reference/cli/influx/auth/active.md b/content/influxdb/cloud-serverless/reference/cli/influx/auth/active.md similarity index 88% rename from content/influxdb/cloud-iox/reference/cli/influx/auth/active.md rename to content/influxdb/cloud-serverless/reference/cli/influx/auth/active.md index b933afbb0..d190f6d20 100644 --- a/content/influxdb/cloud-iox/reference/cli/influx/auth/active.md +++ b/content/influxdb/cloud-serverless/reference/cli/influx/auth/active.md @@ -3,7 +3,7 @@ title: influx auth active description: > The `influx auth active` command activates an API token in InfluxDB. menu: - influxdb_cloud_iox: + influxdb_cloud_serverless: name: influx auth active parent: influx auth weight: 201 diff --git a/content/influxdb/cloud-iox/reference/cli/influx/auth/create.md b/content/influxdb/cloud-serverless/reference/cli/influx/auth/create.md similarity index 88% rename from content/influxdb/cloud-iox/reference/cli/influx/auth/create.md rename to content/influxdb/cloud-serverless/reference/cli/influx/auth/create.md index c3d6770ec..e5719105c 100644 --- a/content/influxdb/cloud-iox/reference/cli/influx/auth/create.md +++ b/content/influxdb/cloud-serverless/reference/cli/influx/auth/create.md @@ -2,7 +2,7 @@ title: influx auth create description: The `influx auth create` creates an API token in InfluxDB. menu: - influxdb_cloud_iox: + influxdb_cloud_serverless: name: influx auth create parent: influx auth weight: 201 diff --git a/content/influxdb/cloud-iox/reference/cli/influx/auth/delete.md b/content/influxdb/cloud-serverless/reference/cli/influx/auth/delete.md similarity index 87% rename from content/influxdb/cloud-iox/reference/cli/influx/auth/delete.md rename to content/influxdb/cloud-serverless/reference/cli/influx/auth/delete.md index c087dd33c..002f70dc6 100644 --- a/content/influxdb/cloud-iox/reference/cli/influx/auth/delete.md +++ b/content/influxdb/cloud-serverless/reference/cli/influx/auth/delete.md @@ -2,7 +2,7 @@ title: influx auth delete description: The `influx auth delete` command deletes an API token from InfluxDB. menu: - influxdb_cloud_iox: + influxdb_cloud_serverless: name: influx auth delete parent: influx auth weight: 201 diff --git a/content/influxdb/cloud-iox/reference/cli/influx/auth/inactive.md b/content/influxdb/cloud-serverless/reference/cli/influx/auth/inactive.md similarity index 88% rename from content/influxdb/cloud-iox/reference/cli/influx/auth/inactive.md rename to content/influxdb/cloud-serverless/reference/cli/influx/auth/inactive.md index bf69737ff..58258573d 100644 --- a/content/influxdb/cloud-iox/reference/cli/influx/auth/inactive.md +++ b/content/influxdb/cloud-serverless/reference/cli/influx/auth/inactive.md @@ -2,7 +2,7 @@ title: influx auth inactive description: The `influx auth inactive` command inactivates an API token in InfluxDB. menu: - influxdb_cloud_iox: + influxdb_cloud_serverless: name: influx auth inactive parent: influx auth weight: 201 diff --git a/content/influxdb/cloud-iox/reference/cli/influx/auth/list.md b/content/influxdb/cloud-serverless/reference/cli/influx/auth/list.md similarity index 87% rename from content/influxdb/cloud-iox/reference/cli/influx/auth/list.md rename to content/influxdb/cloud-serverless/reference/cli/influx/auth/list.md index 1ad64c3ea..3561837e8 100644 --- a/content/influxdb/cloud-iox/reference/cli/influx/auth/list.md +++ b/content/influxdb/cloud-serverless/reference/cli/influx/auth/list.md @@ -2,7 +2,7 @@ title: influx auth list description: The `influx auth list` command lists API tokens in InfluxDB. menu: - influxdb_cloud_iox: + influxdb_cloud_serverless: name: influx auth list parent: influx auth weight: 201 diff --git a/content/influxdb/cloud-iox/reference/cli/influx/backup/_index.md b/content/influxdb/cloud-serverless/reference/cli/influx/backup/_index.md similarity index 55% rename from content/influxdb/cloud-iox/reference/cli/influx/backup/_index.md rename to content/influxdb/cloud-serverless/reference/cli/influx/backup/_index.md index 2a946c671..2ba67ef3a 100644 --- a/content/influxdb/cloud-iox/reference/cli/influx/backup/_index.md +++ b/content/influxdb/cloud-serverless/reference/cli/influx/backup/_index.md @@ -2,14 +2,14 @@ title: influx backup description: The `influx backup` command backs up data stored in InfluxDB. menu: - influxdb_cloud_iox: + influxdb_cloud_serverless: name: influx backup parent: influx weight: 101 -influxdb/cloud-iox/tags: [backup] +influxdb/cloud-serverless/tags: [backup] related: - - /influxdb/cloud-iox/reference/cli/influx/#provide-required-authentication-credentials, influx CLI—Provide required authentication credentials - - /influxdb/cloud-iox/reference/cli/influx/#flag-patterns-and-conventions, influx CLI—Flag patterns and conventions + - /influxdb/cloud-serverless/reference/cli/influx/#provide-required-authentication-credentials, influx CLI—Provide required authentication credentials + - /influxdb/cloud-serverless/reference/cli/influx/#flag-patterns-and-conventions, influx CLI—Flag patterns and conventions metadata: [influx CLI 2.0.0+, InfluxDB OSS only] updated_in: CLI v2.0.2 --- @@ -19,7 +19,7 @@ updated_in: CLI v2.0.2 The `influx backup` command works with **InfluxDB OSS 2.x**, but does not work with **InfluxDB Cloud**. For information about backing up data in InfluxDB Cloud, see -[InfluxDB Cloud durability](/influxdb/cloud/reference/internals/durability/) or +[InfluxDB Cloud Serverless durability](/influxdb/cloud/reference/internals/durability/) or [contact InfluxData Support](mailto:support@influxdata.com). {{% /note %}} diff --git a/content/influxdb/cloud-serverless/reference/cli/influx/bucket-schema/_index.md b/content/influxdb/cloud-serverless/reference/cli/influx/bucket-schema/_index.md new file mode 100644 index 000000000..0e7ea7c67 --- /dev/null +++ b/content/influxdb/cloud-serverless/reference/cli/influx/bucket-schema/_index.md @@ -0,0 +1,19 @@ +--- +title: influx bucket-schema +description: The `influx bucket-schema` command and its subcommands manage schemas of buckets in InfluxDB. +menu: + influxdb_cloud_serverless: + name: influx bucket-schema + parent: influx +weight: 101 +influxdb/cloud-serverless/tags: [buckets, bucket-schema] +cascade: + related: + - /influxdb/cloud/organizations/buckets/bucket-schema + - /influxdb/cloud/organizations/buckets/ + - /influxdb/cloud-serverless/reference/cli/influx/#provide-required-authentication-credentials, influx CLI—Provide required authentication credentials + - /influxdb/cloud-serverless/reference/cli/influx/#provide-required-authentication-credentials, influx CLI—Provide required authentication credentials + metadata: [influx CLI 2.1.0+] +--- + +{{< duplicate-oss >}} diff --git a/content/influxdb/cloud-iox/reference/cli/influx/bucket-schema/create.md b/content/influxdb/cloud-serverless/reference/cli/influx/bucket-schema/create.md similarity index 92% rename from content/influxdb/cloud-iox/reference/cli/influx/bucket-schema/create.md rename to content/influxdb/cloud-serverless/reference/cli/influx/bucket-schema/create.md index 2e9d80aec..0134e78ea 100644 --- a/content/influxdb/cloud-iox/reference/cli/influx/bucket-schema/create.md +++ b/content/influxdb/cloud-serverless/reference/cli/influx/bucket-schema/create.md @@ -2,7 +2,7 @@ title: influx bucket-schema create description: The `influx bucket-schema create` command sets the schema for a measurement in an InfluxDB bucket that has the `explicit` schema-type. menu: - influxdb_cloud_iox: + influxdb_cloud_serverless: name: influx bucket-schema create parent: influx bucket-schema weight: 201 diff --git a/content/influxdb/cloud-iox/reference/cli/influx/bucket-schema/list.md b/content/influxdb/cloud-serverless/reference/cli/influx/bucket-schema/list.md similarity index 92% rename from content/influxdb/cloud-iox/reference/cli/influx/bucket-schema/list.md rename to content/influxdb/cloud-serverless/reference/cli/influx/bucket-schema/list.md index fe9b9bddc..87ed65a83 100644 --- a/content/influxdb/cloud-iox/reference/cli/influx/bucket-schema/list.md +++ b/content/influxdb/cloud-serverless/reference/cli/influx/bucket-schema/list.md @@ -2,7 +2,7 @@ title: influx bucket-schema list description: The `influx bucket-schema list` command lists the schemas of an InfluxDB bucket that has the `explicit` schema-type. menu: - influxdb_cloud_iox: + influxdb_cloud_serverless: name: influx bucket-schema list parent: influx bucket-schema weight: 201 diff --git a/content/influxdb/cloud-iox/reference/cli/influx/bucket-schema/update.md b/content/influxdb/cloud-serverless/reference/cli/influx/bucket-schema/update.md similarity index 92% rename from content/influxdb/cloud-iox/reference/cli/influx/bucket-schema/update.md rename to content/influxdb/cloud-serverless/reference/cli/influx/bucket-schema/update.md index ae0ce020c..7dc867736 100644 --- a/content/influxdb/cloud-iox/reference/cli/influx/bucket-schema/update.md +++ b/content/influxdb/cloud-serverless/reference/cli/influx/bucket-schema/update.md @@ -2,7 +2,7 @@ title: influx bucket-schema update description: The `influx bucket-schema update` command updates the schema of an InfluxDB bucket that has the `explicit` schema-type. menu: - influxdb_cloud_iox: + influxdb_cloud_serverless: name: influx bucket-schema update parent: influx bucket-schema weight: 201 diff --git a/content/influxdb/cloud-serverless/reference/cli/influx/bucket/_index.md b/content/influxdb/cloud-serverless/reference/cli/influx/bucket/_index.md new file mode 100644 index 000000000..973fe8727 --- /dev/null +++ b/content/influxdb/cloud-serverless/reference/cli/influx/bucket/_index.md @@ -0,0 +1,18 @@ +--- +title: influx bucket +description: The `influx bucket` command and its subcommands manage buckets in InfluxDB. +menu: + influxdb_cloud_serverless: + name: influx bucket + parent: influx +weight: 101 +influxdb/cloud-serverless/tags: [buckets] +cascade: + related: + - /influxdb/cloud-serverless/organizations/buckets/ + - /influxdb/cloud-serverless/reference/cli/influx/#provide-required-authentication-credentials, influx CLI—Provide required authentication credentials + - /influxdb/cloud-serverless/reference/cli/influx/#flag-patterns-and-conventions, influx CLI—Flag patterns and conventions + metadata: [influx CLI 2.0.0+] +--- + +{{< duplicate-oss >}} diff --git a/content/influxdb/cloud-iox/reference/cli/influx/bucket/create.md b/content/influxdb/cloud-serverless/reference/cli/influx/bucket/create.md similarity index 52% rename from content/influxdb/cloud-iox/reference/cli/influx/bucket/create.md rename to content/influxdb/cloud-serverless/reference/cli/influx/bucket/create.md index 980a44831..c6d3c0896 100644 --- a/content/influxdb/cloud-iox/reference/cli/influx/bucket/create.md +++ b/content/influxdb/cloud-serverless/reference/cli/influx/bucket/create.md @@ -2,7 +2,7 @@ title: influx bucket create description: The `influx bucket create` command creates a new bucket in InfluxDB. menu: - influxdb_cloud_iox: + influxdb_cloud_serverless: name: influx bucket create parent: influx bucket weight: 201 @@ -10,8 +10,8 @@ aliases: - /influxdb/cloud/reference/cli/influx/bucket/create/ related: - /influxdb/cloud/organizations/buckets/create-buckets/ - - /influxdb/cloud-iox/reference/cli/influx/#provide-required-authentication-credentials, influx CLI—Provide required authentication credentials - - /influxdb/cloud-iox/reference/cli/influx/#provide-required-authentication-credentials, influx CLI—Provide required authentication credentials + - /influxdb/cloud-serverless/reference/cli/influx/#provide-required-authentication-credentials, influx CLI—Provide required authentication credentials + - /influxdb/cloud-serverless/reference/cli/influx/#provide-required-authentication-credentials, influx CLI—Provide required authentication credentials updated_in: CLI v2.1.0 --- diff --git a/content/influxdb/cloud-serverless/reference/cli/influx/bucket/delete.md b/content/influxdb/cloud-serverless/reference/cli/influx/bucket/delete.md new file mode 100644 index 000000000..506476d74 --- /dev/null +++ b/content/influxdb/cloud-serverless/reference/cli/influx/bucket/delete.md @@ -0,0 +1,15 @@ +--- +title: influx bucket delete +description: The `influx bucket delete` command deletes a bucket from InfluxDB and all the data it contains. +menu: + influxdb_cloud_serverless: + name: influx bucket delete + parent: influx bucket +weight: 201 +related: + - /influxdb/cloud/organizations/buckets/delete-bucket/ + - /influxdb/cloud-serverless/reference/cli/influx/#provide-required-authentication-credentials, influx CLI—Provide required authentication credentials + - /influxdb/cloud-serverless/reference/cli/influx/#provide-required-authentication-credentials, influx CLI—Provide required authentication credentials +--- + +{{< duplicate-oss >}} diff --git a/content/influxdb/cloud-iox/reference/cli/influx/bucket/list.md b/content/influxdb/cloud-serverless/reference/cli/influx/bucket/list.md similarity index 89% rename from content/influxdb/cloud-iox/reference/cli/influx/bucket/list.md rename to content/influxdb/cloud-serverless/reference/cli/influx/bucket/list.md index d1d4caecb..1fbe9339d 100644 --- a/content/influxdb/cloud-iox/reference/cli/influx/bucket/list.md +++ b/content/influxdb/cloud-serverless/reference/cli/influx/bucket/list.md @@ -2,7 +2,7 @@ title: influx bucket list description: The `influx bucket list` command lists and searches for buckets in InfluxDB. menu: - influxdb_cloud_iox: + influxdb_cloud_serverless: name: influx bucket list parent: influx bucket weight: 201 diff --git a/content/influxdb/cloud-iox/reference/cli/influx/bucket/update.md b/content/influxdb/cloud-serverless/reference/cli/influx/bucket/update.md similarity index 89% rename from content/influxdb/cloud-iox/reference/cli/influx/bucket/update.md rename to content/influxdb/cloud-serverless/reference/cli/influx/bucket/update.md index f32e07489..d8915ba81 100644 --- a/content/influxdb/cloud-iox/reference/cli/influx/bucket/update.md +++ b/content/influxdb/cloud-serverless/reference/cli/influx/bucket/update.md @@ -2,7 +2,7 @@ title: influx bucket update description: The `influx bucket update` command updates information associated with buckets in InfluxDB. menu: - influxdb_cloud_iox: + influxdb_cloud_serverless: name: influx bucket update parent: influx bucket weight: 201 diff --git a/content/influxdb/cloud-serverless/reference/cli/influx/completion/_index.md b/content/influxdb/cloud-serverless/reference/cli/influx/completion/_index.md new file mode 100644 index 000000000..c9ec6b3f6 --- /dev/null +++ b/content/influxdb/cloud-serverless/reference/cli/influx/completion/_index.md @@ -0,0 +1,18 @@ +--- +title: influx completion +description: > + The `influx completion` command outputs `influx` shell completion scripts for a + specified shell (`bash` or `zsh`). +menu: + influxdb_cloud_serverless: + name: influx completion + parent: influx +weight: 101 +influxdb/cloud-serverless/tags: [cli, tools] +related: + - /influxdb/cloud-serverless/reference/cli/influx/#provide-required-authentication-credentials, influx CLI—Provide required authentication credentials + - /influxdb/cloud-serverless/reference/cli/influx/#provide-required-authentication-credentials, influx CLI—Provide required authentication credentials +metadata: [influx CLI 2.0.0+] +--- + +{{< duplicate-oss >}} diff --git a/content/influxdb/cloud-serverless/reference/cli/influx/config/_index.md b/content/influxdb/cloud-serverless/reference/cli/influx/config/_index.md new file mode 100644 index 000000000..937968713 --- /dev/null +++ b/content/influxdb/cloud-serverless/reference/cli/influx/config/_index.md @@ -0,0 +1,17 @@ +--- +title: influx config +description: The `influx config` command and subcommands manage multiple InfluxDB connection configurations. +menu: + influxdb_cloud_serverless: + name: influx config + parent: influx +weight: 101 +influxdb/cloud-serverless/tags: [config] +cascade: + related: + - /influxdb/cloud-serverless/reference/cli/influx/#provide-required-authentication-credentials, influx CLI—Provide required authentication credentials + - /influxdb/cloud-serverless/reference/cli/influx/#provide-required-authentication-credentials, influx CLI—Provide required authentication credentials + metadata: [influx CLI 2.0.0+] +--- + +{{< duplicate-oss >}} diff --git a/content/influxdb/cloud-iox/reference/cli/influx/config/create.md b/content/influxdb/cloud-serverless/reference/cli/influx/config/create.md similarity index 88% rename from content/influxdb/cloud-iox/reference/cli/influx/config/create.md rename to content/influxdb/cloud-serverless/reference/cli/influx/config/create.md index 80f41c940..e5c07c7b0 100644 --- a/content/influxdb/cloud-iox/reference/cli/influx/config/create.md +++ b/content/influxdb/cloud-serverless/reference/cli/influx/config/create.md @@ -2,7 +2,7 @@ title: influx config create description: The `influx config create` command creates a new InfluxDB connection configuration. menu: - influxdb_cloud_iox: + influxdb_cloud_serverless: name: influx config create parent: influx config weight: 201 diff --git a/content/influxdb/cloud-iox/reference/cli/influx/config/list.md b/content/influxdb/cloud-serverless/reference/cli/influx/config/list.md similarity index 88% rename from content/influxdb/cloud-iox/reference/cli/influx/config/list.md rename to content/influxdb/cloud-serverless/reference/cli/influx/config/list.md index 52736b513..ac60ea4d6 100644 --- a/content/influxdb/cloud-iox/reference/cli/influx/config/list.md +++ b/content/influxdb/cloud-serverless/reference/cli/influx/config/list.md @@ -2,7 +2,7 @@ title: influx config list description: The `influx config list` command lists all InfluxDB connection configurations. menu: - influxdb_cloud_iox: + influxdb_cloud_serverless: name: influx config list parent: influx config weight: 201 diff --git a/content/influxdb/cloud-iox/reference/cli/influx/config/rm.md b/content/influxdb/cloud-serverless/reference/cli/influx/config/rm.md similarity index 88% rename from content/influxdb/cloud-iox/reference/cli/influx/config/rm.md rename to content/influxdb/cloud-serverless/reference/cli/influx/config/rm.md index 7137a8d7f..f7ee1679c 100644 --- a/content/influxdb/cloud-iox/reference/cli/influx/config/rm.md +++ b/content/influxdb/cloud-serverless/reference/cli/influx/config/rm.md @@ -2,7 +2,7 @@ title: influx config rm description: The `influx config rm` command removes an InfluxDB connection configuration. menu: - influxdb_cloud_iox: + influxdb_cloud_serverless: name: influx config rm parent: influx config weight: 201 diff --git a/content/influxdb/cloud-iox/reference/cli/influx/config/set.md b/content/influxdb/cloud-serverless/reference/cli/influx/config/set.md similarity index 88% rename from content/influxdb/cloud-iox/reference/cli/influx/config/set.md rename to content/influxdb/cloud-serverless/reference/cli/influx/config/set.md index 77b81b82d..affb09467 100644 --- a/content/influxdb/cloud-iox/reference/cli/influx/config/set.md +++ b/content/influxdb/cloud-serverless/reference/cli/influx/config/set.md @@ -2,7 +2,7 @@ title: influx config set description: The `influx config set` command updates an InfluxDB connection configuration. menu: - influxdb_cloud_iox: + influxdb_cloud_serverless: name: influx config set parent: influx config weight: 201 diff --git a/content/influxdb/cloud-serverless/reference/cli/influx/dashboards/_index.md b/content/influxdb/cloud-serverless/reference/cli/influx/dashboards/_index.md new file mode 100644 index 000000000..a547a0c49 --- /dev/null +++ b/content/influxdb/cloud-serverless/reference/cli/influx/dashboards/_index.md @@ -0,0 +1,25 @@ +--- +title: influx dashboards +description: > + The `influx dashboards` command lists existing InfluxDB dashboards. +menu: + influxdb_cloud_serverless: + name: influx dashboards + parent: influx +weight: 101 +influxdb/cloud-serverless/tags: [telegraf] +related: + - /influxdb/cloud-serverless/reference/cli/influx/#provide-required-authentication-credentials, influx CLI—Provide required authentication credentials + - /influxdb/cloud-serverless/reference/cli/influx/#provide-required-authentication-credentials, influx CLI—Provide required authentication credentials +metadata: [influx CLI 2.0.0+] +--- + +{{% warn %}} +#### Not supported in InfluxDB Cloud Serverless + +While this command is included in the `influx` CLI {{< latest-cli >}}, this +functionality is not available in InfluxDB Cloud Serverless organizations +powered by the InfluxDB IOx storage engine. +{{% /warn %}} + +{{< duplicate-oss >}} diff --git a/content/influxdb/cloud-serverless/reference/cli/influx/delete/_index.md b/content/influxdb/cloud-serverless/reference/cli/influx/delete/_index.md new file mode 100644 index 000000000..a15c6c048 --- /dev/null +++ b/content/influxdb/cloud-serverless/reference/cli/influx/delete/_index.md @@ -0,0 +1,19 @@ +--- +title: influx delete +description: The `influx delete` command deletes points from an InfluxDB bucket. +menu: + influxdb_cloud_serverless: + name: influx delete + parent: influx +weight: 101 +influxdb/cloud-serverless/tags: [delete] +related: + - /influxdb/cloud/write-data/delete-data + - /influxdb/cloud/reference/syntax/delete-predicate + - /influxdb/cloud-serverless/reference/cli/influx/#provide-required-authentication-credentials, influx CLI—Provide required authentication credentials + - /influxdb/cloud-serverless/reference/cli/influx/#provide-required-authentication-credentials, influx CLI—Provide required authentication credentials +metadata: [influx CLI 2.0.3+] +updated_in: CLI v2.2.0 +--- + +{{< duplicate-oss >}} diff --git a/content/influxdb/cloud-serverless/reference/cli/influx/export/_index.md b/content/influxdb/cloud-serverless/reference/cli/influx/export/_index.md new file mode 100644 index 000000000..40966af34 --- /dev/null +++ b/content/influxdb/cloud-serverless/reference/cli/influx/export/_index.md @@ -0,0 +1,24 @@ +--- +title: influx export +description: The `influx export` command exports existing resources as an InfluxDB template. +menu: + influxdb_cloud_serverless: + parent: influx +weight: 101 +cascade: + related: + - /influxdb/cloud/influxdb-templates/create/ + - /influxdb/cloud-serverless/reference/cli/influx/#provide-required-authentication-credentials, influx CLI—Provide required authentication credentials + - /influxdb/cloud-serverless/reference/cli/influx/#provide-required-authentication-credentials, influx CLI—Provide required authentication credentials + metadata: [influx CLI 2.0.0+] + prepend: + block: warn + content: | + #### Not supported in InfluxDB Cloud Serverless + + While this command is included in the `influx` CLI , this + functionality is not available in InfluxDB Cloud Serverless organizations + powered by the InfluxDB IOx storage engine. +--- + +{{< duplicate-oss >}} diff --git a/content/influxdb/cloud-serverless/reference/cli/influx/export/all.md b/content/influxdb/cloud-serverless/reference/cli/influx/export/all.md new file mode 100644 index 000000000..58756a546 --- /dev/null +++ b/content/influxdb/cloud-serverless/reference/cli/influx/export/all.md @@ -0,0 +1,15 @@ +--- +title: influx export all +description: > + The `influx export all` command exports all resources in an organization as an InfluxDB template. +menu: + influxdb_cloud_serverless: + parent: influx export +weight: 201 +related: + - /influxdb/cloud/influxdb-templates/create/ + - /influxdb/cloud-serverless/reference/cli/influx/#provide-required-authentication-credentials, influx CLI—Provide required authentication credentials + - /influxdb/cloud-serverless/reference/cli/influx/#provide-required-authentication-credentials, influx CLI—Provide required authentication credentials +--- + +{{< duplicate-oss >}} diff --git a/content/influxdb/cloud-iox/reference/cli/influx/export/stack.md b/content/influxdb/cloud-serverless/reference/cli/influx/export/stack.md similarity index 88% rename from content/influxdb/cloud-iox/reference/cli/influx/export/stack.md rename to content/influxdb/cloud-serverless/reference/cli/influx/export/stack.md index f0642bd30..ddb86c1bb 100644 --- a/content/influxdb/cloud-iox/reference/cli/influx/export/stack.md +++ b/content/influxdb/cloud-serverless/reference/cli/influx/export/stack.md @@ -3,7 +3,7 @@ title: influx export stack description: > The `influx export stack` command exports all resources associated with a stack as an InfluxDB template. menu: - influxdb_cloud_iox: + influxdb_cloud_serverless: parent: influx export weight: 201 --- diff --git a/content/influxdb/cloud-serverless/reference/cli/influx/help/_index.md b/content/influxdb/cloud-serverless/reference/cli/influx/help/_index.md new file mode 100644 index 000000000..92b172296 --- /dev/null +++ b/content/influxdb/cloud-serverless/reference/cli/influx/help/_index.md @@ -0,0 +1,15 @@ +--- +title: influx help +description: The `influx help` command provides help for any command in the `influx` command line interface. +menu: + influxdb_cloud_serverless: + name: influx help + parent: influx +weight: 101 +related: + - /influxdb/cloud-serverless/reference/cli/influx/#provide-required-authentication-credentials, influx CLI—Provide required authentication credentials + - /influxdb/cloud-serverless/reference/cli/influx/#provide-required-authentication-credentials, influx CLI—Provide required authentication credentials +metadata: [influx CLI 2.0.0+] +--- + +{{< duplicate-oss >}} diff --git a/content/influxdb/cloud-serverless/reference/cli/influx/org/_index.md b/content/influxdb/cloud-serverless/reference/cli/influx/org/_index.md new file mode 100644 index 000000000..51607e70a --- /dev/null +++ b/content/influxdb/cloud-serverless/reference/cli/influx/org/_index.md @@ -0,0 +1,17 @@ +--- +title: influx org +description: The `influx org` command and its subcommands manage organization information in InfluxDB. +menu: + influxdb_cloud_serverless: + name: influx org + parent: influx +weight: 101 +influxdb/cloud-serverless/tags: [organizations] +cascade: + related: + - /influxdb/cloud-serverless/reference/cli/influx/#provide-required-authentication-credentials, influx CLI—Provide required authentication credentials + - /influxdb/cloud-serverless/reference/cli/influx/#provide-required-authentication-credentials, influx CLI—Provide required authentication credentials + metadata: [influx CLI 2.0.0+] +--- + +{{< duplicate-oss >}} diff --git a/content/influxdb/cloud-iox/reference/cli/influx/org/create.md b/content/influxdb/cloud-serverless/reference/cli/influx/org/create.md similarity index 66% rename from content/influxdb/cloud-iox/reference/cli/influx/org/create.md rename to content/influxdb/cloud-serverless/reference/cli/influx/org/create.md index 8b86f9ee1..b0a3ed175 100644 --- a/content/influxdb/cloud-iox/reference/cli/influx/org/create.md +++ b/content/influxdb/cloud-serverless/reference/cli/influx/org/create.md @@ -2,7 +2,7 @@ title: influx org create description: The `influx org create` creates a new organization in InfluxDB. menu: - influxdb_cloud_iox: + influxdb_cloud_serverless: name: influx org create parent: influx org weight: 201 @@ -11,10 +11,11 @@ metadata: [influx CLI 2.0.0+, InfluxDB OSS only] {{% note %}} #### Works with InfluxDB OSS 2.x -The `influx org create` command works with **InfluxDB OSS 2.x**, but does not work with **InfluxDB Cloud**. +The `influx org create` command works with **InfluxDB OSS 2.x**, but does not +work with **InfluxDB Cloud Serverless**. New organizations are created for each new InfluxDB account. -For information about creating an InfluxDB Cloud account, see -[sign up for InfluxDB Cloud](/influxdb/cloud/sign-up/). +For information about creating an InfluxDB Cloud Serverless account, see +[sign up for InfluxDB Cloud Serverless](/influxdb/cloud/sign-up/). {{% /note %}} {{< duplicate-oss >}} diff --git a/content/influxdb/cloud-iox/reference/cli/influx/org/delete.md b/content/influxdb/cloud-serverless/reference/cli/influx/org/delete.md similarity index 60% rename from content/influxdb/cloud-iox/reference/cli/influx/org/delete.md rename to content/influxdb/cloud-serverless/reference/cli/influx/org/delete.md index 17f818e70..4f18f37bb 100644 --- a/content/influxdb/cloud-iox/reference/cli/influx/org/delete.md +++ b/content/influxdb/cloud-serverless/reference/cli/influx/org/delete.md @@ -2,7 +2,7 @@ title: influx org delete description: The `influx org delete` command deletes an organization in InfluxDB. menu: - influxdb_cloud_iox: + influxdb_cloud_serverless: name: influx org delete parent: influx org weight: 201 @@ -11,10 +11,11 @@ metadata: [influx CLI 2.0.0+, InfluxDB OSS only] {{% note %}} #### Works with InfluxDB OSS 2.x -The `influx org delete` command works with **InfluxDB OSS 2.x**, but does not work with **InfluxDB Cloud**. +The `influx org delete` command works with **InfluxDB OSS 2.x**, but does not +work with **InfluxDB Cloud Serverless**. An organizations is associated with your InfluxDB account. -For information about removing your InfluxDB Cloud account and its organization, -see [Cancel your InfluxDB Cloud subscription](/influxdb/cloud/account-management/offboarding/). +For information about removing your InfluxDB Cloud Serverless account and its organization, +see [Cancel your InfluxDB Cloud Serverless subscription](/influxdb/cloud/account-management/offboarding/). {{% /note %}} {{< duplicate-oss >}} diff --git a/content/influxdb/cloud-iox/reference/cli/influx/org/list.md b/content/influxdb/cloud-serverless/reference/cli/influx/org/list.md similarity index 87% rename from content/influxdb/cloud-iox/reference/cli/influx/org/list.md rename to content/influxdb/cloud-serverless/reference/cli/influx/org/list.md index 6c64431e5..60bbd7815 100644 --- a/content/influxdb/cloud-iox/reference/cli/influx/org/list.md +++ b/content/influxdb/cloud-serverless/reference/cli/influx/org/list.md @@ -2,7 +2,7 @@ title: influx org list description: The `influx org list` lists and searches for organizations in InfluxDB. menu: - influxdb_cloud_iox: + influxdb_cloud_serverless: name: influx org list parent: influx org weight: 201 diff --git a/content/influxdb/cloud-iox/reference/cli/influx/org/members/_index.md b/content/influxdb/cloud-serverless/reference/cli/influx/org/members/_index.md similarity index 64% rename from content/influxdb/cloud-iox/reference/cli/influx/org/members/_index.md rename to content/influxdb/cloud-serverless/reference/cli/influx/org/members/_index.md index c84907633..2f4e373d4 100644 --- a/content/influxdb/cloud-iox/reference/cli/influx/org/members/_index.md +++ b/content/influxdb/cloud-serverless/reference/cli/influx/org/members/_index.md @@ -2,7 +2,7 @@ title: influx org members description: The `influx org members` command and its subcommands manage organization members in InfluxDB. menu: - influxdb_cloud_iox: + influxdb_cloud_serverless: name: influx org members parent: influx org weight: 201 @@ -11,9 +11,10 @@ metadata: [influx CLI 2.0.0+, InfluxDB OSS only] {{% note %}} #### Works with InfluxDB OSS 2.x -The `influx org members` command works with **InfluxDB OSS 2.x**, but does not work with **InfluxDB Cloud**. -For information about managing users in your InfluxDB Cloud organization, see -[Manage users](/influxdb/cloud/organizations/users/). +The `influx org members` command works with **InfluxDB OSS 2.x**, but does not +work with **InfluxDB Cloud Serverless**. +For information about managing users in your InfluxDB Cloud Serverless organization, +see [Manage users](/influxdb/cloud/organizations/users/). {{% /note %}} {{< duplicate-oss >}} diff --git a/content/influxdb/cloud-iox/reference/cli/influx/org/members/add.md b/content/influxdb/cloud-serverless/reference/cli/influx/org/members/add.md similarity index 66% rename from content/influxdb/cloud-iox/reference/cli/influx/org/members/add.md rename to content/influxdb/cloud-serverless/reference/cli/influx/org/members/add.md index 917ea89c1..6af3fe2d5 100644 --- a/content/influxdb/cloud-iox/reference/cli/influx/org/members/add.md +++ b/content/influxdb/cloud-serverless/reference/cli/influx/org/members/add.md @@ -2,7 +2,7 @@ title: influx org members add description: The `influx org members add` command adds a new member to an organization in InfluxDB. menu: - influxdb_cloud_iox: + influxdb_cloud_serverless: name: influx org members add parent: influx org members weight: 301 @@ -13,9 +13,9 @@ metadata: [influx CLI 2.0.0+, InfluxDB OSS only] {{% note %}} #### Available with InfluxDB OSS 2.x only The `influx org members add` command adds members to organizations in **InfluxDB OSS 2.x**, -but cannot add organization members to **InfluxDB Cloud**. -For information about inviting users into your InfluxDB Cloud organization, see -[Manage users](/influxdb/cloud/organizations/users/). +but cannot add organization members to **InfluxDB Cloud Serverless**. +For information about inviting users into your InfluxDB Cloud Serverless organization, +see [Manage users](/influxdb/cloud/organizations/users/). {{% /note %}} {{< duplicate-oss >}} diff --git a/content/influxdb/cloud-iox/reference/cli/influx/org/members/list.md b/content/influxdb/cloud-serverless/reference/cli/influx/org/members/list.md similarity index 89% rename from content/influxdb/cloud-iox/reference/cli/influx/org/members/list.md rename to content/influxdb/cloud-serverless/reference/cli/influx/org/members/list.md index 2ec2a17c1..944919bd3 100644 --- a/content/influxdb/cloud-iox/reference/cli/influx/org/members/list.md +++ b/content/influxdb/cloud-serverless/reference/cli/influx/org/members/list.md @@ -2,7 +2,7 @@ title: influx org members list description: The `influx org members list` command lists members within an organization in InfluxDB. menu: - influxdb_cloud_iox: + influxdb_cloud_serverless: name: influx org members list parent: influx org members weight: 301 diff --git a/content/influxdb/cloud-iox/reference/cli/influx/org/members/remove.md b/content/influxdb/cloud-serverless/reference/cli/influx/org/members/remove.md similarity index 74% rename from content/influxdb/cloud-iox/reference/cli/influx/org/members/remove.md rename to content/influxdb/cloud-serverless/reference/cli/influx/org/members/remove.md index b1631afdf..cb6f244a1 100644 --- a/content/influxdb/cloud-iox/reference/cli/influx/org/members/remove.md +++ b/content/influxdb/cloud-serverless/reference/cli/influx/org/members/remove.md @@ -2,7 +2,7 @@ title: influx org members remove description: The `influx org members remove` command removes a member from an organization in InfluxDB. menu: - influxdb_cloud_iox: + influxdb_cloud_serverless: name: influx org members remove parent: influx org members weight: 301 @@ -12,8 +12,8 @@ metadata: [influx CLI 2.0.0+, InfluxDB OSS only] {{% note %}} #### Available with InfluxDB OSS 2.x only The `influx org members remove` command removes organization members in **InfluxDB OSS 2.x**, -but cannot remove organization members in **InfluxDB Cloud**. -For information about removing a user from your InfluxDB Cloud organization, see +but cannot remove organization members in **InfluxDB Cloud Serverless**. +For information about removing a user from your InfluxDB Cloud Serverless organization, see [Remove a user](/influxdb/cloud/organizations/users/#remove-a-user-from-your-organization/). {{% /note %}} diff --git a/content/influxdb/cloud-iox/reference/cli/influx/org/update.md b/content/influxdb/cloud-serverless/reference/cli/influx/org/update.md similarity index 88% rename from content/influxdb/cloud-iox/reference/cli/influx/org/update.md rename to content/influxdb/cloud-serverless/reference/cli/influx/org/update.md index fbc0556cc..b26c38f2c 100644 --- a/content/influxdb/cloud-iox/reference/cli/influx/org/update.md +++ b/content/influxdb/cloud-serverless/reference/cli/influx/org/update.md @@ -2,7 +2,7 @@ title: influx org update description: The `influx org update` command updates information related to organizations in InfluxDB. menu: - influxdb_cloud_iox: + influxdb_cloud_serverless: name: influx org update parent: influx org weight: 201 diff --git a/content/influxdb/cloud-iox/reference/cli/influx/ping/_index.md b/content/influxdb/cloud-serverless/reference/cli/influx/ping/_index.md similarity index 54% rename from content/influxdb/cloud-iox/reference/cli/influx/ping/_index.md rename to content/influxdb/cloud-serverless/reference/cli/influx/ping/_index.md index 421dddb69..e26a0950e 100644 --- a/content/influxdb/cloud-iox/reference/cli/influx/ping/_index.md +++ b/content/influxdb/cloud-serverless/reference/cli/influx/ping/_index.md @@ -4,14 +4,14 @@ description: > The `influx ping` command checks the health of a running InfluxDB instance by querying the `/health` endpoint. menu: - influxdb_cloud_iox: + influxdb_cloud_serverless: name: influx ping parent: influx weight: 101 -influxdb/cloud-iox/tags: [ping, health] +influxdb/cloud-serverless/tags: [ping, health] related: - - /influxdb/cloud-iox/reference/cli/influx/#provide-required-authentication-credentials, influx CLI—Provide required authentication credentials - - /influxdb/cloud-iox/reference/cli/influx/#provide-required-authentication-credentials, influx CLI—Provide required authentication credentials + - /influxdb/cloud-serverless/reference/cli/influx/#provide-required-authentication-credentials, influx CLI—Provide required authentication credentials + - /influxdb/cloud-serverless/reference/cli/influx/#provide-required-authentication-credentials, influx CLI—Provide required authentication credentials metadata: [influx CLI 2.0.0+, InfluxDB OSS only] --- diff --git a/content/influxdb/cloud-serverless/reference/cli/influx/query/_index.md b/content/influxdb/cloud-serverless/reference/cli/influx/query/_index.md new file mode 100644 index 000000000..747cf5bfa --- /dev/null +++ b/content/influxdb/cloud-serverless/reference/cli/influx/query/_index.md @@ -0,0 +1,30 @@ +--- +title: influx query +description: > + The `influx query` command executes a literal Flux query provided as a string + or a literal Flux query contained in a file by specifying the file prefixed with an '@' sign. +menu: + influxdb_cloud_serverless: + name: influx query + parent: influx +weight: 101 +influxdb/cloud-serverless/tags: [query] +related: + - /influxdb/cloud/query-data/ + - /influxdb/cloud/query-data/execute-queries/influx-query/ + - /influxdb/cloud-serverless/reference/cli/influx/#provide-required-authentication-credentials, influx CLI—Provide required authentication credentials + - /influxdb/cloud-serverless/reference/cli/influx/#provide-required-authentication-credentials, influx CLI—Provide required authentication credentials +metadata: [influx CLI 2.0.0+] +updated_in: CLI v2.0.5 +--- + +{{% note %}} +#### Use SQL and Flux together + +The `influx query` command and the InfluxDB `/api/v2/query` API endpoint it uses +only support Flux queries. To query an InfluxDB Cloud Serverless bucket powered +by IOx with SQL, use the `iox.sql()` Flux function. For more information, see +[Use Flux and SQL to query data](/influxdb/cloud-serverless/query-data/flux-sql/). +{{% /note %}} + +{{< duplicate-oss >}} diff --git a/content/influxdb/cloud-iox/reference/cli/influx/remote/_index.md b/content/influxdb/cloud-serverless/reference/cli/influx/remote/_index.md similarity index 77% rename from content/influxdb/cloud-iox/reference/cli/influx/remote/_index.md rename to content/influxdb/cloud-serverless/reference/cli/influx/remote/_index.md index c8d642314..0e7c80a94 100644 --- a/content/influxdb/cloud-iox/reference/cli/influx/remote/_index.md +++ b/content/influxdb/cloud-serverless/reference/cli/influx/remote/_index.md @@ -2,11 +2,11 @@ title: influx remote description: Manage remote InfluxDB connections for replicating data. menu: - influxdb_cloud_iox: + influxdb_cloud_serverless: name: influx remote parent: influx weight: 101 -influxdb/cloud-iox/tags: [write, replication] +influxdb/cloud-serverless/tags: [write, replication] related: - /influxdb/cloud/reference/cli/influx/replication - /influxdb/cloud/write-data/replication diff --git a/content/influxdb/cloud-iox/reference/cli/influx/remote/create.md b/content/influxdb/cloud-serverless/reference/cli/influx/remote/create.md similarity index 76% rename from content/influxdb/cloud-iox/reference/cli/influx/remote/create.md rename to content/influxdb/cloud-serverless/reference/cli/influx/remote/create.md index e528086be..9df37a2ec 100644 --- a/content/influxdb/cloud-iox/reference/cli/influx/remote/create.md +++ b/content/influxdb/cloud-serverless/reference/cli/influx/remote/create.md @@ -2,11 +2,11 @@ title: influx remote create description: Create a new remote InfluxDB connection for replicating data. menu: - influxdb_cloud_iox: + influxdb_cloud_serverless: name: influx remote create parent: influx remote weight: 101 -influxdb/cloud-iox/tags: [write, replication] +influxdb/cloud-serverless/tags: [write, replication] related: - /influxdb/cloud/reference/cli/influx/replication --- diff --git a/content/influxdb/cloud-iox/reference/cli/influx/remote/delete.md b/content/influxdb/cloud-serverless/reference/cli/influx/remote/delete.md similarity index 76% rename from content/influxdb/cloud-iox/reference/cli/influx/remote/delete.md rename to content/influxdb/cloud-serverless/reference/cli/influx/remote/delete.md index 59e5e1e5e..00057bd71 100644 --- a/content/influxdb/cloud-iox/reference/cli/influx/remote/delete.md +++ b/content/influxdb/cloud-serverless/reference/cli/influx/remote/delete.md @@ -2,11 +2,11 @@ title: influx remote delete description: Delete remote InfluxDB connections used for replicating data. menu: - influxdb_cloud_iox: + influxdb_cloud_serverless: name: influx remote delete parent: influx remote weight: 102 -influxdb/cloud-iox/tags: [write, replication] +influxdb/cloud-serverless/tags: [write, replication] related: - /influxdb/cloud/reference/cli/influx/replication --- diff --git a/content/influxdb/cloud-iox/reference/cli/influx/remote/list.md b/content/influxdb/cloud-serverless/reference/cli/influx/remote/list.md similarity index 76% rename from content/influxdb/cloud-iox/reference/cli/influx/remote/list.md rename to content/influxdb/cloud-serverless/reference/cli/influx/remote/list.md index e9a3aa65d..cd5867132 100644 --- a/content/influxdb/cloud-iox/reference/cli/influx/remote/list.md +++ b/content/influxdb/cloud-serverless/reference/cli/influx/remote/list.md @@ -2,11 +2,11 @@ title: influx remote list description: List remote InfluxDB connections sued for replicating data. menu: - influxdb_cloud_iox: + influxdb_cloud_serverless: name: influx remote list parent: influx remote weight: 102 -influxdb/cloud-iox/tags: [write, replication] +influxdb/cloud-serverless/tags: [write, replication] related: - /influxdb/cloud/reference/cli/influx/replication --- diff --git a/content/influxdb/cloud-iox/reference/cli/influx/remote/update.md b/content/influxdb/cloud-serverless/reference/cli/influx/remote/update.md similarity index 77% rename from content/influxdb/cloud-iox/reference/cli/influx/remote/update.md rename to content/influxdb/cloud-serverless/reference/cli/influx/remote/update.md index 36cd15a45..a71cdf90f 100644 --- a/content/influxdb/cloud-iox/reference/cli/influx/remote/update.md +++ b/content/influxdb/cloud-serverless/reference/cli/influx/remote/update.md @@ -2,11 +2,11 @@ title: influx remote update description: Update remote InfluxDB connections used for for replicating data. menu: - influxdb_cloud_iox: + influxdb_cloud_serverless: name: influx remote update parent: influx remote weight: 102 -influxdb/cloud-iox/tags: [write, replication] +influxdb/cloud-serverless/tags: [write, replication] related: - /influxdb/cloud/reference/cli/influx/replication --- diff --git a/content/influxdb/cloud-iox/reference/cli/influx/replication/_index.md b/content/influxdb/cloud-serverless/reference/cli/influx/replication/_index.md similarity index 80% rename from content/influxdb/cloud-iox/reference/cli/influx/replication/_index.md rename to content/influxdb/cloud-serverless/reference/cli/influx/replication/_index.md index dfff5e698..5f5e71d0b 100644 --- a/content/influxdb/cloud-iox/reference/cli/influx/replication/_index.md +++ b/content/influxdb/cloud-serverless/reference/cli/influx/replication/_index.md @@ -2,11 +2,11 @@ title: influx replication description: Use the `influx` CLI to manage InfluxDB replication streams. menu: - influxdb_cloud_iox: + influxdb_cloud_serverless: name: influx replication parent: influx weight: 101 -influxdb/cloud-iox/tags: [write, replication] +influxdb/cloud-serverless/tags: [write, replication] cascade: related: - /influxdb/cloud/reference/cli/influx/remote diff --git a/content/influxdb/cloud-iox/reference/cli/influx/replication/create.md b/content/influxdb/cloud-serverless/reference/cli/influx/replication/create.md similarity index 74% rename from content/influxdb/cloud-iox/reference/cli/influx/replication/create.md rename to content/influxdb/cloud-serverless/reference/cli/influx/replication/create.md index b1d4b8448..9b9beda7a 100644 --- a/content/influxdb/cloud-iox/reference/cli/influx/replication/create.md +++ b/content/influxdb/cloud-serverless/reference/cli/influx/replication/create.md @@ -2,11 +2,11 @@ title: influx replication create description: Create a new InfluxDB replication stream. menu: - influxdb_cloud_iox: + influxdb_cloud_serverless: name: influx replication create parent: influx replication weight: 101 -influxdb/cloud-iox/tags: [write] +influxdb/cloud-serverless/tags: [write] --- {{< duplicate-oss >}} diff --git a/content/influxdb/cloud-iox/reference/cli/influx/replication/delete.md b/content/influxdb/cloud-serverless/reference/cli/influx/replication/delete.md similarity index 71% rename from content/influxdb/cloud-iox/reference/cli/influx/replication/delete.md rename to content/influxdb/cloud-serverless/reference/cli/influx/replication/delete.md index 52bd6768f..79bf2a2bf 100644 --- a/content/influxdb/cloud-iox/reference/cli/influx/replication/delete.md +++ b/content/influxdb/cloud-serverless/reference/cli/influx/replication/delete.md @@ -2,11 +2,11 @@ title: influx replication delete description: Delete an InfluxDB replication stream. menu: - influxdb_cloud_iox: + influxdb_cloud_serverless: name: influx replication delete parent: influx replication weight: 102 -influxdb/cloud-iox/tags: [write, replication] +influxdb/cloud-serverless/tags: [write, replication] --- {{< duplicate-oss >}} diff --git a/content/influxdb/cloud-iox/reference/cli/influx/replication/list.md b/content/influxdb/cloud-serverless/reference/cli/influx/replication/list.md similarity index 72% rename from content/influxdb/cloud-iox/reference/cli/influx/replication/list.md rename to content/influxdb/cloud-serverless/reference/cli/influx/replication/list.md index a70c525c2..2318b09c4 100644 --- a/content/influxdb/cloud-iox/reference/cli/influx/replication/list.md +++ b/content/influxdb/cloud-serverless/reference/cli/influx/replication/list.md @@ -2,11 +2,11 @@ title: influx replication list description: List InfluxDB replication streams and corresponding metrics. menu: - influxdb_cloud_iox: + influxdb_cloud_serverless: name: influx replication list parent: influx replication weight: 102 -influxdb/cloud-iox/tags: [write, replication] +influxdb/cloud-serverless/tags: [write, replication] --- {{< duplicate-oss >}} diff --git a/content/influxdb/cloud-iox/reference/cli/influx/replication/update.md b/content/influxdb/cloud-serverless/reference/cli/influx/replication/update.md similarity index 70% rename from content/influxdb/cloud-iox/reference/cli/influx/replication/update.md rename to content/influxdb/cloud-serverless/reference/cli/influx/replication/update.md index a957a36c1..15253cca7 100644 --- a/content/influxdb/cloud-iox/reference/cli/influx/replication/update.md +++ b/content/influxdb/cloud-serverless/reference/cli/influx/replication/update.md @@ -2,11 +2,11 @@ title: influx replication update description: Update InfluxDB replication streams. menu: - influxdb_cloud_iox: + influxdb_cloud_serverless: name: influx replication update parent: influx replication weight: 102 -influxdb/cloud-iox/tags: [write, replication] +influxdb/cloud-serverless/tags: [write, replication] --- {{< duplicate-oss >}} diff --git a/content/influxdb/cloud-iox/reference/cli/influx/restore/index.md b/content/influxdb/cloud-serverless/reference/cli/influx/restore/index.md similarity index 60% rename from content/influxdb/cloud-iox/reference/cli/influx/restore/index.md rename to content/influxdb/cloud-serverless/reference/cli/influx/restore/index.md index db9bcf91a..a166751b0 100644 --- a/content/influxdb/cloud-iox/reference/cli/influx/restore/index.md +++ b/content/influxdb/cloud-serverless/reference/cli/influx/restore/index.md @@ -1,14 +1,14 @@ --- title: influx restore description: The `influx restore` command restores backup data and metadata from an InfluxDB backup directory. -influxdb/cloud-iox/tags: [restore] +influxdb/cloud-serverless/tags: [restore] menu: - influxdb_cloud_iox: + influxdb_cloud_serverless: parent: influx weight: 101 related: - - /influxdb/cloud-iox/reference/cli/influx/#provide-required-authentication-credentials, influx CLI—Provide required authentication credentials - - /influxdb/cloud-iox/reference/cli/influx/#provide-required-authentication-credentials, influx CLI—Provide required authentication credentials + - /influxdb/cloud-serverless/reference/cli/influx/#provide-required-authentication-credentials, influx CLI—Provide required authentication credentials + - /influxdb/cloud-serverless/reference/cli/influx/#provide-required-authentication-credentials, influx CLI—Provide required authentication credentials metadata: [influx CLI 2.0.0+] updated_in: CLI v2.0.7 --- diff --git a/content/influxdb/cloud-serverless/reference/cli/influx/scripts/_index.md b/content/influxdb/cloud-serverless/reference/cli/influx/scripts/_index.md new file mode 100644 index 000000000..af3a6a8ff --- /dev/null +++ b/content/influxdb/cloud-serverless/reference/cli/influx/scripts/_index.md @@ -0,0 +1,18 @@ +--- +title: influx scripts +description: The `influx scripts` command and its subcommands manage invokable scripts in InfluxDB. +menu: + influxdb_cloud_serverless: + name: influx scripts + parent: influx +weight: 101 +influxdb/cloud-serverless/tags: [scripts] +cascade: + related: + - /influxdb/cloud-serverless/reference/cli/influx/#provide-required-authentication-credentials, influx CLI—Provide required authentication credentials + - /influxdb/cloud-serverless/reference/cli/influx/#provide-required-authentication-credentials, influx CLI—Provide required authentication credentials + - /influxdb/cloud/api-guide/api-invokable-scripts/ + metadata: [influx CLI 2.4.0+, InfluxDB Cloud only] +--- + +{{< duplicate-oss >}} diff --git a/content/influxdb/cloud-iox/reference/cli/influx/scripts/create.md b/content/influxdb/cloud-serverless/reference/cli/influx/scripts/create.md similarity index 88% rename from content/influxdb/cloud-iox/reference/cli/influx/scripts/create.md rename to content/influxdb/cloud-serverless/reference/cli/influx/scripts/create.md index 72e3f2cb4..26fd91a80 100644 --- a/content/influxdb/cloud-iox/reference/cli/influx/scripts/create.md +++ b/content/influxdb/cloud-serverless/reference/cli/influx/scripts/create.md @@ -2,7 +2,7 @@ title: influx scripts create description: The `influx scripts create` command creates an invokable script in InfluxDB. menu: - influxdb_cloud_iox: + influxdb_cloud_serverless: name: influx scripts create parent: influx scripts weight: 201 diff --git a/content/influxdb/cloud-iox/reference/cli/influx/scripts/delete.md b/content/influxdb/cloud-serverless/reference/cli/influx/scripts/delete.md similarity index 88% rename from content/influxdb/cloud-iox/reference/cli/influx/scripts/delete.md rename to content/influxdb/cloud-serverless/reference/cli/influx/scripts/delete.md index 6668c0b8b..1521d6ae6 100644 --- a/content/influxdb/cloud-iox/reference/cli/influx/scripts/delete.md +++ b/content/influxdb/cloud-serverless/reference/cli/influx/scripts/delete.md @@ -2,7 +2,7 @@ title: influx scripts delete description: The `influx scripts delete` command deletes an invokable script in InfluxDB. menu: - influxdb_cloud_iox: + influxdb_cloud_serverless: name: influx scripts delete parent: influx scripts weight: 201 diff --git a/content/influxdb/cloud-iox/reference/cli/influx/scripts/invoke.md b/content/influxdb/cloud-serverless/reference/cli/influx/scripts/invoke.md similarity index 88% rename from content/influxdb/cloud-iox/reference/cli/influx/scripts/invoke.md rename to content/influxdb/cloud-serverless/reference/cli/influx/scripts/invoke.md index 7c185a915..6fb3bb695 100644 --- a/content/influxdb/cloud-iox/reference/cli/influx/scripts/invoke.md +++ b/content/influxdb/cloud-serverless/reference/cli/influx/scripts/invoke.md @@ -2,7 +2,7 @@ title: influx scripts invoke description: The `influx scripts invoke` command executes an invokable script in InfluxDB. menu: - influxdb_cloud_iox: + influxdb_cloud_serverless: name: influx scripts invoke parent: influx scripts weight: 201 diff --git a/content/influxdb/cloud-iox/reference/cli/influx/scripts/list.md b/content/influxdb/cloud-serverless/reference/cli/influx/scripts/list.md similarity index 88% rename from content/influxdb/cloud-iox/reference/cli/influx/scripts/list.md rename to content/influxdb/cloud-serverless/reference/cli/influx/scripts/list.md index 2d87d5ee8..9eb3e6ea4 100644 --- a/content/influxdb/cloud-iox/reference/cli/influx/scripts/list.md +++ b/content/influxdb/cloud-serverless/reference/cli/influx/scripts/list.md @@ -2,7 +2,7 @@ title: influx scripts list description: The `influx scripts list` command lists and searches for invokable scripts in InfluxDB. menu: - influxdb_cloud_iox: + influxdb_cloud_serverless: name: influx scripts list parent: influx scripts weight: 201 diff --git a/content/influxdb/cloud-iox/reference/cli/influx/scripts/retrieve.md b/content/influxdb/cloud-serverless/reference/cli/influx/scripts/retrieve.md similarity index 89% rename from content/influxdb/cloud-iox/reference/cli/influx/scripts/retrieve.md rename to content/influxdb/cloud-serverless/reference/cli/influx/scripts/retrieve.md index a5a90cee2..b584ed754 100644 --- a/content/influxdb/cloud-iox/reference/cli/influx/scripts/retrieve.md +++ b/content/influxdb/cloud-serverless/reference/cli/influx/scripts/retrieve.md @@ -2,7 +2,7 @@ title: influx scripts retrieve description: The `influx scripts retrieve` command retrieves invokable script information from InfluxDB. menu: - influxdb_cloud_iox: + influxdb_cloud_serverless: name: influx scripts retrieve parent: influx scripts weight: 201 diff --git a/content/influxdb/cloud-iox/reference/cli/influx/scripts/update.md b/content/influxdb/cloud-serverless/reference/cli/influx/scripts/update.md similarity index 89% rename from content/influxdb/cloud-iox/reference/cli/influx/scripts/update.md rename to content/influxdb/cloud-serverless/reference/cli/influx/scripts/update.md index 77d52b7ef..d6207a364 100644 --- a/content/influxdb/cloud-iox/reference/cli/influx/scripts/update.md +++ b/content/influxdb/cloud-serverless/reference/cli/influx/scripts/update.md @@ -2,7 +2,7 @@ title: influx scripts update description: The `influx scripts update` command updates information related to an invokable script in InfluxDB. menu: - influxdb_cloud_iox: + influxdb_cloud_serverless: name: influx scripts update parent: influx scripts weight: 201 diff --git a/content/influxdb/cloud-serverless/reference/cli/influx/secret/_index.md b/content/influxdb/cloud-serverless/reference/cli/influx/secret/_index.md new file mode 100644 index 000000000..8c04ff305 --- /dev/null +++ b/content/influxdb/cloud-serverless/reference/cli/influx/secret/_index.md @@ -0,0 +1,18 @@ +--- +title: influx secret +description: The `influx secret` command manages secrets. +menu: + influxdb_cloud_serverless: + name: influx secret + parent: influx +weight: 101 +cascade: + influxdb/cloud-serverless/tags: [secrets] + related: + - /influxdb/cloud/security/secrets/ + - /influxdb/cloud-serverless/reference/cli/influx/#provide-required-authentication-credentials, influx CLI—Provide required authentication credentials + - /influxdb/cloud-serverless/reference/cli/influx/#provide-required-authentication-credentials, influx CLI—Provide required authentication credentials + metadata: [influx CLI 2.0.0+] +--- + +{{< duplicate-oss >}} diff --git a/content/influxdb/cloud-iox/reference/cli/influx/secret/delete.md b/content/influxdb/cloud-serverless/reference/cli/influx/secret/delete.md similarity index 87% rename from content/influxdb/cloud-iox/reference/cli/influx/secret/delete.md rename to content/influxdb/cloud-serverless/reference/cli/influx/secret/delete.md index 74b6e9c1e..789f9df13 100644 --- a/content/influxdb/cloud-iox/reference/cli/influx/secret/delete.md +++ b/content/influxdb/cloud-serverless/reference/cli/influx/secret/delete.md @@ -2,7 +2,7 @@ title: influx secret delete description: The `influx secret delete` command deletes secrets. menu: - influxdb_cloud_iox: + influxdb_cloud_serverless: name: influx secret delete parent: influx secret weight: 101 diff --git a/content/influxdb/cloud-iox/reference/cli/influx/secret/list.md b/content/influxdb/cloud-serverless/reference/cli/influx/secret/list.md similarity index 87% rename from content/influxdb/cloud-iox/reference/cli/influx/secret/list.md rename to content/influxdb/cloud-serverless/reference/cli/influx/secret/list.md index ec5a23416..deeb38e4a 100644 --- a/content/influxdb/cloud-iox/reference/cli/influx/secret/list.md +++ b/content/influxdb/cloud-serverless/reference/cli/influx/secret/list.md @@ -2,7 +2,7 @@ title: influx secret list description: The `influx secret list` command lists secret keys. menu: - influxdb_cloud_iox: + influxdb_cloud_serverless: name: influx secret list parent: influx secret weight: 101 diff --git a/content/influxdb/cloud-iox/reference/cli/influx/secret/update.md b/content/influxdb/cloud-serverless/reference/cli/influx/secret/update.md similarity index 87% rename from content/influxdb/cloud-iox/reference/cli/influx/secret/update.md rename to content/influxdb/cloud-serverless/reference/cli/influx/secret/update.md index 013d2b6ee..9946cec0f 100644 --- a/content/influxdb/cloud-iox/reference/cli/influx/secret/update.md +++ b/content/influxdb/cloud-serverless/reference/cli/influx/secret/update.md @@ -2,7 +2,7 @@ title: influx secret update description: The `influx secret update` command adds and updates secrets. menu: - influxdb_cloud_iox: + influxdb_cloud_serverless: name: influx secret update parent: influx secret weight: 101 diff --git a/content/influxdb/cloud-iox/reference/cli/influx/setup/_index.md b/content/influxdb/cloud-serverless/reference/cli/influx/setup/_index.md similarity index 61% rename from content/influxdb/cloud-iox/reference/cli/influx/setup/_index.md rename to content/influxdb/cloud-serverless/reference/cli/influx/setup/_index.md index f981d85b5..82baa0e52 100644 --- a/content/influxdb/cloud-iox/reference/cli/influx/setup/_index.md +++ b/content/influxdb/cloud-serverless/reference/cli/influx/setup/_index.md @@ -4,14 +4,14 @@ description: > The `influx setup` command walks through the initial InfluxDB OSS setup process, creating a default user, organization, and bucket. menu: - influxdb_cloud_iox: + influxdb_cloud_serverless: name: influx setup parent: influx weight: 101 -influxdb/cloud-iox/tags: [get-started] +influxdb/cloud-serverless/tags: [get-started] related: - - /influxdb/cloud-iox/reference/cli/influx/#provide-required-authentication-credentials, influx CLI—Provide required authentication credentials - - /influxdb/cloud-iox/reference/cli/influx/#provide-required-authentication-credentials, influx CLI—Provide required authentication credentials + - /influxdb/cloud-serverless/reference/cli/influx/#provide-required-authentication-credentials, influx CLI—Provide required authentication credentials + - /influxdb/cloud-serverless/reference/cli/influx/#provide-required-authentication-credentials, influx CLI—Provide required authentication credentials metadata: [influx CLI 2.0.0+, InfluxDB OSS only] updated_in: CLI v2.0.3 canonical: /{{< latest "influxdb" "v2" >}}/reference/cli/influx/setup/ diff --git a/content/influxdb/cloud-serverless/reference/cli/influx/stacks/_index.md b/content/influxdb/cloud-serverless/reference/cli/influx/stacks/_index.md new file mode 100644 index 000000000..081d0c39a --- /dev/null +++ b/content/influxdb/cloud-serverless/reference/cli/influx/stacks/_index.md @@ -0,0 +1,20 @@ +--- +title: influx stacks +description: > + The `influx stacks` command and its subcommands list and manage InfluxDB stacks + and associated resources. +menu: + influxdb_cloud_serverless: + name: influx stacks + parent: influx +weight: 101 +influxdb/cloud-serverless/tags: [templates] +cascade: + related: + - /influxdb/cloud/influxdb-templates/stacks/ + - /influxdb/cloud-serverless/reference/cli/influx/#provide-required-authentication-credentials, influx CLI—Provide required authentication credentials + - /influxdb/cloud-serverless/reference/cli/influx/#provide-required-authentication-credentials, influx CLI—Provide required authentication credentials + metadata: [influx CLI 2.0.1+] +--- + +{{< duplicate-oss >}} diff --git a/content/influxdb/cloud-iox/reference/cli/influx/stacks/init.md b/content/influxdb/cloud-serverless/reference/cli/influx/stacks/init.md similarity index 73% rename from content/influxdb/cloud-iox/reference/cli/influx/stacks/init.md rename to content/influxdb/cloud-serverless/reference/cli/influx/stacks/init.md index efce323b5..c1df28dce 100644 --- a/content/influxdb/cloud-iox/reference/cli/influx/stacks/init.md +++ b/content/influxdb/cloud-serverless/reference/cli/influx/stacks/init.md @@ -2,11 +2,11 @@ title: influx stacks init description: The `influx stacks init` command initializes an InfluxDB stack. menu: - influxdb_cloud_iox: + influxdb_cloud_serverless: name: influx stacks init parent: influx stacks weight: 201 -influxdb/cloud-iox/tags: [templates] +influxdb/cloud-serverless/tags: [templates] --- {{< duplicate-oss >}} diff --git a/content/influxdb/cloud-iox/reference/cli/influx/stacks/remove.md b/content/influxdb/cloud-serverless/reference/cli/influx/stacks/remove.md similarity index 80% rename from content/influxdb/cloud-iox/reference/cli/influx/stacks/remove.md rename to content/influxdb/cloud-serverless/reference/cli/influx/stacks/remove.md index 9b50cea55..7346b7f1d 100644 --- a/content/influxdb/cloud-iox/reference/cli/influx/stacks/remove.md +++ b/content/influxdb/cloud-serverless/reference/cli/influx/stacks/remove.md @@ -2,13 +2,13 @@ title: influx stacks remove description: The `influx stacks remove` command removes an InfluxDB stack and all associated resources. menu: - influxdb_cloud_iox: + influxdb_cloud_serverless: name: influx stacks remove parent: influx stacks weight: 201 aliases: - /influxdb/cloud/reference/cli/influx/pkg/stack/remove/ -influxdb/cloud-iox/tags: [templates] +influxdb/cloud-serverless/tags: [templates] --- {{< duplicate-oss >}} diff --git a/content/influxdb/cloud-iox/reference/cli/influx/stacks/update.md b/content/influxdb/cloud-serverless/reference/cli/influx/stacks/update.md similarity index 76% rename from content/influxdb/cloud-iox/reference/cli/influx/stacks/update.md rename to content/influxdb/cloud-serverless/reference/cli/influx/stacks/update.md index d781159fd..22b535b74 100644 --- a/content/influxdb/cloud-iox/reference/cli/influx/stacks/update.md +++ b/content/influxdb/cloud-serverless/reference/cli/influx/stacks/update.md @@ -2,11 +2,11 @@ title: influx stacks update description: The 'influx stacks update' command updates an InfluxDB stack. menu: - influxdb_cloud_iox: + influxdb_cloud_serverless: name: influx stacks update parent: influx stacks weight: 201 -influxdb/cloud-iox/tags: [templates] +influxdb/cloud-serverless/tags: [templates] updated_in: CLI v2.0.4 --- diff --git a/content/influxdb/cloud-serverless/reference/cli/influx/task/_index.md b/content/influxdb/cloud-serverless/reference/cli/influx/task/_index.md new file mode 100644 index 000000000..0fd2da3a2 --- /dev/null +++ b/content/influxdb/cloud-serverless/reference/cli/influx/task/_index.md @@ -0,0 +1,18 @@ +--- +title: influx task +description: The `influx task` command and its subcommands manage tasks in InfluxDB. +menu: + influxdb_cloud_serverless: + name: influx task + parent: influx +weight: 101 +influxdb/cloud-serverless/tags: [tasks] +cascade: + related: + - /influxdb/cloud/process-data/ + - /influxdb/cloud-serverless/reference/cli/influx/#provide-required-authentication-credentials, influx CLI—Provide required authentication credentials + - /influxdb/cloud-serverless/reference/cli/influx/#provide-required-authentication-credentials, influx CLI—Provide required authentication credentials + metadata: [influx CLI 2.0.0+] +--- + +{{< duplicate-oss >}} diff --git a/content/influxdb/cloud-iox/reference/cli/influx/task/create.md b/content/influxdb/cloud-serverless/reference/cli/influx/task/create.md similarity index 87% rename from content/influxdb/cloud-iox/reference/cli/influx/task/create.md rename to content/influxdb/cloud-serverless/reference/cli/influx/task/create.md index 2d3efa135..1a521cb45 100644 --- a/content/influxdb/cloud-iox/reference/cli/influx/task/create.md +++ b/content/influxdb/cloud-serverless/reference/cli/influx/task/create.md @@ -2,7 +2,7 @@ title: influx task create description: The `influx task create` command creates a new task in InfluxDB. menu: - influxdb_cloud_iox: + influxdb_cloud_serverless: name: influx task create parent: influx task weight: 201 diff --git a/content/influxdb/cloud-iox/reference/cli/influx/task/delete.md b/content/influxdb/cloud-serverless/reference/cli/influx/task/delete.md similarity index 87% rename from content/influxdb/cloud-iox/reference/cli/influx/task/delete.md rename to content/influxdb/cloud-serverless/reference/cli/influx/task/delete.md index 3580f048e..d819562c4 100644 --- a/content/influxdb/cloud-iox/reference/cli/influx/task/delete.md +++ b/content/influxdb/cloud-serverless/reference/cli/influx/task/delete.md @@ -2,7 +2,7 @@ title: influx task delete description: The `influx task delete` command deletes a task in InfluxDB. menu: - influxdb_cloud_iox: + influxdb_cloud_serverless: name: influx task delete parent: influx task weight: 201 diff --git a/content/influxdb/cloud-iox/reference/cli/influx/task/list.md b/content/influxdb/cloud-serverless/reference/cli/influx/task/list.md similarity index 87% rename from content/influxdb/cloud-iox/reference/cli/influx/task/list.md rename to content/influxdb/cloud-serverless/reference/cli/influx/task/list.md index dd28b4259..73c5ada6f 100644 --- a/content/influxdb/cloud-iox/reference/cli/influx/task/list.md +++ b/content/influxdb/cloud-serverless/reference/cli/influx/task/list.md @@ -2,7 +2,7 @@ title: influx task list description: The `influx task list` command lists and searches for tasks in InfluxDB. menu: - influxdb_cloud_iox: + influxdb_cloud_serverless: name: influx task list parent: influx task weight: 201 diff --git a/content/influxdb/cloud-iox/reference/cli/influx/task/log/_index.md b/content/influxdb/cloud-serverless/reference/cli/influx/task/log/_index.md similarity index 77% rename from content/influxdb/cloud-iox/reference/cli/influx/task/log/_index.md rename to content/influxdb/cloud-serverless/reference/cli/influx/task/log/_index.md index cf471e351..8e6dff4fc 100644 --- a/content/influxdb/cloud-iox/reference/cli/influx/task/log/_index.md +++ b/content/influxdb/cloud-serverless/reference/cli/influx/task/log/_index.md @@ -4,11 +4,11 @@ description: > The `influx task log` and its subcommand, `list`, output log information related to a task. menu: - influxdb_cloud_iox: + influxdb_cloud_serverless: name: influx task log parent: influx task weight: 201 -influxdb/cloud-iox/tags: [logs] +influxdb/cloud-serverless/tags: [logs] --- {{< duplicate-oss >}} diff --git a/content/influxdb/cloud-iox/reference/cli/influx/task/log/list.md b/content/influxdb/cloud-serverless/reference/cli/influx/task/log/list.md similarity index 90% rename from content/influxdb/cloud-iox/reference/cli/influx/task/log/list.md rename to content/influxdb/cloud-serverless/reference/cli/influx/task/log/list.md index 5e97a5fe4..1aa466c1a 100644 --- a/content/influxdb/cloud-iox/reference/cli/influx/task/log/list.md +++ b/content/influxdb/cloud-serverless/reference/cli/influx/task/log/list.md @@ -2,7 +2,7 @@ title: influx task log list description: The `influx task log list` command outputs log information related to a task. menu: - influxdb_cloud_iox: + influxdb_cloud_serverless: name: influx task log list parent: influx task log weight: 301 diff --git a/content/influxdb/cloud-iox/reference/cli/influx/task/retry-failed.md b/content/influxdb/cloud-serverless/reference/cli/influx/task/retry-failed.md similarity index 89% rename from content/influxdb/cloud-iox/reference/cli/influx/task/retry-failed.md rename to content/influxdb/cloud-serverless/reference/cli/influx/task/retry-failed.md index 8d02c647e..34975a313 100644 --- a/content/influxdb/cloud-iox/reference/cli/influx/task/retry-failed.md +++ b/content/influxdb/cloud-serverless/reference/cli/influx/task/retry-failed.md @@ -2,7 +2,7 @@ title: influx task retry-failed description: The `influx task retry-failed` command retries failed InfluxDB task runs. menu: - influxdb_cloud_iox: + influxdb_cloud_serverless: name: influx task retry-failed parent: influx task weight: 201 diff --git a/content/influxdb/cloud-iox/reference/cli/influx/task/run/_index.md b/content/influxdb/cloud-serverless/reference/cli/influx/task/run/_index.md similarity index 89% rename from content/influxdb/cloud-iox/reference/cli/influx/task/run/_index.md rename to content/influxdb/cloud-serverless/reference/cli/influx/task/run/_index.md index ab43fc935..1e81ffdd4 100644 --- a/content/influxdb/cloud-iox/reference/cli/influx/task/run/_index.md +++ b/content/influxdb/cloud-serverless/reference/cli/influx/task/run/_index.md @@ -4,7 +4,7 @@ description: > The `influx task run` command and its subcommand, `list` output information related to runs of a task. menu: - influxdb_cloud_iox: + influxdb_cloud_serverless: name: influx task run parent: influx task weight: 201 diff --git a/content/influxdb/cloud-iox/reference/cli/influx/task/run/list.md b/content/influxdb/cloud-serverless/reference/cli/influx/task/run/list.md similarity index 88% rename from content/influxdb/cloud-iox/reference/cli/influx/task/run/list.md rename to content/influxdb/cloud-serverless/reference/cli/influx/task/run/list.md index 60fc4a35a..841de4027 100644 --- a/content/influxdb/cloud-iox/reference/cli/influx/task/run/list.md +++ b/content/influxdb/cloud-serverless/reference/cli/influx/task/run/list.md @@ -2,7 +2,7 @@ title: influx task run list description: The `influx task run list` command outputs information related to runs of a task. menu: - influxdb_cloud_iox: + influxdb_cloud_serverless: name: influx task run list parent: influx task run weight: 301 diff --git a/content/influxdb/cloud-iox/reference/cli/influx/task/run/retry.md b/content/influxdb/cloud-serverless/reference/cli/influx/task/run/retry.md similarity index 88% rename from content/influxdb/cloud-iox/reference/cli/influx/task/run/retry.md rename to content/influxdb/cloud-serverless/reference/cli/influx/task/run/retry.md index 206953b59..8d81af925 100644 --- a/content/influxdb/cloud-iox/reference/cli/influx/task/run/retry.md +++ b/content/influxdb/cloud-serverless/reference/cli/influx/task/run/retry.md @@ -2,7 +2,7 @@ title: influx task run retry description: The `influx task run retry` command retries to run a task in InfluxDB. menu: - influxdb_cloud_iox: + influxdb_cloud_serverless: name: influx task run retry parent: influx task run weight: 301 diff --git a/content/influxdb/cloud-iox/reference/cli/influx/task/update.md b/content/influxdb/cloud-serverless/reference/cli/influx/task/update.md similarity index 88% rename from content/influxdb/cloud-iox/reference/cli/influx/task/update.md rename to content/influxdb/cloud-serverless/reference/cli/influx/task/update.md index ac68ead8e..fa82c69dd 100644 --- a/content/influxdb/cloud-iox/reference/cli/influx/task/update.md +++ b/content/influxdb/cloud-serverless/reference/cli/influx/task/update.md @@ -2,7 +2,7 @@ title: influx task update description: The `influx task update` command updates information related to tasks in InfluxDB. menu: - influxdb_cloud_iox: + influxdb_cloud_serverless: name: influx task update parent: influx task weight: 201 diff --git a/content/influxdb/cloud-serverless/reference/cli/influx/telegrafs/_index.md b/content/influxdb/cloud-serverless/reference/cli/influx/telegrafs/_index.md new file mode 100644 index 000000000..5ad8123ed --- /dev/null +++ b/content/influxdb/cloud-serverless/reference/cli/influx/telegrafs/_index.md @@ -0,0 +1,20 @@ +--- +title: influx telegrafs +description: > + The `influx telegrafs` command lists Telegraf configurations. + Subcommands manage Telegraf configurations. +menu: + influxdb_cloud_serverless: + name: influx telegrafs + parent: influx +weight: 101 +influxdb/cloud-serverless/tags: [telegraf] +cascade: + related: + - /influxdb/cloud/telegraf-configs/ + - /influxdb/cloud-serverless/reference/cli/influx/#provide-required-authentication-credentials, influx CLI—Provide required authentication credentials + - /influxdb/cloud-serverless/reference/cli/influx/#provide-required-authentication-credentials, influx CLI—Provide required authentication credentials + metadata: [influx CLI 2.0.0+] +--- + +{{< duplicate-oss >}} diff --git a/content/influxdb/cloud-iox/reference/cli/influx/telegrafs/create.md b/content/influxdb/cloud-serverless/reference/cli/influx/telegrafs/create.md similarity index 91% rename from content/influxdb/cloud-iox/reference/cli/influx/telegrafs/create.md rename to content/influxdb/cloud-serverless/reference/cli/influx/telegrafs/create.md index 494befc78..2e9b57cf6 100644 --- a/content/influxdb/cloud-iox/reference/cli/influx/telegrafs/create.md +++ b/content/influxdb/cloud-serverless/reference/cli/influx/telegrafs/create.md @@ -4,7 +4,7 @@ description: > The `influx telegrafs create` command creates a new Telegraf configuration in InfluxDB using a provided Telegraf configuration file. menu: - influxdb_cloud_iox: + influxdb_cloud_serverless: name: influx telegrafs create parent: influx telegrafs weight: 201 diff --git a/content/influxdb/cloud-iox/reference/cli/influx/telegrafs/rm.md b/content/influxdb/cloud-serverless/reference/cli/influx/telegrafs/rm.md similarity index 88% rename from content/influxdb/cloud-iox/reference/cli/influx/telegrafs/rm.md rename to content/influxdb/cloud-serverless/reference/cli/influx/telegrafs/rm.md index fbc6c8268..0cd4913db 100644 --- a/content/influxdb/cloud-iox/reference/cli/influx/telegrafs/rm.md +++ b/content/influxdb/cloud-serverless/reference/cli/influx/telegrafs/rm.md @@ -3,7 +3,7 @@ title: influx telegrafs rm description: > The `influx telegrafs rm` command removes Telegraf configurations from InfluxDB. menu: - influxdb_cloud_iox: + influxdb_cloud_serverless: name: influx telegrafs rm parent: influx telegrafs weight: 201 diff --git a/content/influxdb/cloud-iox/reference/cli/influx/telegrafs/update.md b/content/influxdb/cloud-serverless/reference/cli/influx/telegrafs/update.md similarity index 92% rename from content/influxdb/cloud-iox/reference/cli/influx/telegrafs/update.md rename to content/influxdb/cloud-serverless/reference/cli/influx/telegrafs/update.md index f2e715b28..4c204fec2 100644 --- a/content/influxdb/cloud-iox/reference/cli/influx/telegrafs/update.md +++ b/content/influxdb/cloud-serverless/reference/cli/influx/telegrafs/update.md @@ -4,7 +4,7 @@ description: > The `influx telegrafs update` command updates a Telegraf configuration to match the specified parameters. If a name or description are not provided, they are set to an empty string. menu: - influxdb_cloud_iox: + influxdb_cloud_serverless: name: influx telegrafs update parent: influx telegrafs weight: 201 diff --git a/content/influxdb/cloud-serverless/reference/cli/influx/template/_index.md b/content/influxdb/cloud-serverless/reference/cli/influx/template/_index.md new file mode 100644 index 000000000..444e55da7 --- /dev/null +++ b/content/influxdb/cloud-serverless/reference/cli/influx/template/_index.md @@ -0,0 +1,18 @@ +--- +title: influx template +description: The `influx template` command summarizes the specified InfluxDB template. +menu: + influxdb_cloud_serverless: + name: influx template + parent: influx +weight: 101 +influxdb/cloud-serverless/tags: [templates] +cascade: + related: + - /influxdb/cloud/influxdb-templates/ + - /influxdb/cloud-serverless/reference/cli/influx/#provide-required-authentication-credentials, influx CLI—Provide required authentication credentials + - /influxdb/cloud-serverless/reference/cli/influx/#provide-required-authentication-credentials, influx CLI—Provide required authentication credentials + metadata: [influx CLI 2.0.1+] +--- + +{{< duplicate-oss >}} diff --git a/content/influxdb/cloud-iox/reference/cli/influx/template/validate.md b/content/influxdb/cloud-serverless/reference/cli/influx/template/validate.md similarity index 87% rename from content/influxdb/cloud-iox/reference/cli/influx/template/validate.md rename to content/influxdb/cloud-serverless/reference/cli/influx/template/validate.md index 1244a9348..dfa147a36 100644 --- a/content/influxdb/cloud-iox/reference/cli/influx/template/validate.md +++ b/content/influxdb/cloud-serverless/reference/cli/influx/template/validate.md @@ -3,7 +3,7 @@ title: influx template validate description: > The `influx template validate` command validates the provided InfluxDB template. menu: - influxdb_cloud_iox: + influxdb_cloud_serverless: parent: influx template weight: 201 --- diff --git a/content/influxdb/cloud-iox/reference/cli/influx/transpile/_index.md b/content/influxdb/cloud-serverless/reference/cli/influx/transpile/_index.md similarity index 70% rename from content/influxdb/cloud-iox/reference/cli/influx/transpile/_index.md rename to content/influxdb/cloud-serverless/reference/cli/influx/transpile/_index.md index 916709430..09cf58772 100644 --- a/content/influxdb/cloud-iox/reference/cli/influx/transpile/_index.md +++ b/content/influxdb/cloud-serverless/reference/cli/influx/transpile/_index.md @@ -3,8 +3,8 @@ title: influx transpile description: > The `influx transpile` command transpiles an InfluxQL query to Flux source code. related: - - /influxdb/cloud-iox/reference/cli/influx/#provide-required-authentication-credentials, influx CLI—Provide required authentication credentials - - /influxdb/cloud-iox/reference/cli/influx/#provide-required-authentication-credentials, influx CLI—Provide required authentication credentials + - /influxdb/cloud-serverless/reference/cli/influx/#provide-required-authentication-credentials, influx CLI—Provide required authentication credentials + - /influxdb/cloud-serverless/reference/cli/influx/#provide-required-authentication-credentials, influx CLI—Provide required authentication credentials metadata: [influx CLI 2.0.0 – 2.0.5] prepend: block: warn diff --git a/content/influxdb/cloud-iox/reference/cli/influx/user/_index.md b/content/influxdb/cloud-serverless/reference/cli/influx/user/_index.md similarity index 62% rename from content/influxdb/cloud-iox/reference/cli/influx/user/_index.md rename to content/influxdb/cloud-serverless/reference/cli/influx/user/_index.md index e0e3a50e4..5a86a9021 100644 --- a/content/influxdb/cloud-iox/reference/cli/influx/user/_index.md +++ b/content/influxdb/cloud-serverless/reference/cli/influx/user/_index.md @@ -2,15 +2,15 @@ title: influx user description: The `influx user` command and its subcommands manage user information in InfluxDB OSS. menu: - influxdb_cloud_iox: + influxdb_cloud_serverless: name: influx user parent: influx weight: 101 -influxdb/cloud-iox/tags: [users] +influxdb/cloud-serverless/tags: [users] cascade: related: - - /influxdb/cloud-iox/reference/cli/influx/#provide-required-authentication-credentials, influx CLI—Provide required authentication credentials - - /influxdb/cloud-iox/reference/cli/influx/#provide-required-authentication-credentials, influx CLI—Provide required authentication credentials + - /influxdb/cloud-serverless/reference/cli/influx/#provide-required-authentication-credentials, influx CLI—Provide required authentication credentials + - /influxdb/cloud-serverless/reference/cli/influx/#provide-required-authentication-credentials, influx CLI—Provide required authentication credentials metadata: [influx CLI 2.0.0+, InfluxDB OSS only] prepend: block: note diff --git a/content/influxdb/cloud-iox/reference/cli/influx/user/create.md b/content/influxdb/cloud-serverless/reference/cli/influx/user/create.md similarity index 90% rename from content/influxdb/cloud-iox/reference/cli/influx/user/create.md rename to content/influxdb/cloud-serverless/reference/cli/influx/user/create.md index 55aa960e6..2a66e4788 100644 --- a/content/influxdb/cloud-iox/reference/cli/influx/user/create.md +++ b/content/influxdb/cloud-serverless/reference/cli/influx/user/create.md @@ -2,7 +2,7 @@ title: influx user create description: The `influx user create` command creates a user in InfluxDB OSS. menu: - influxdb_cloud_iox: + influxdb_cloud_serverless: name: influx user create parent: influx user weight: 201 diff --git a/content/influxdb/cloud-iox/reference/cli/influx/user/delete.md b/content/influxdb/cloud-serverless/reference/cli/influx/user/delete.md similarity index 90% rename from content/influxdb/cloud-iox/reference/cli/influx/user/delete.md rename to content/influxdb/cloud-serverless/reference/cli/influx/user/delete.md index 2699cd115..7329944c7 100644 --- a/content/influxdb/cloud-iox/reference/cli/influx/user/delete.md +++ b/content/influxdb/cloud-serverless/reference/cli/influx/user/delete.md @@ -2,7 +2,7 @@ title: influx user delete description: The `influx user delete` command deletes a specified user. menu: - influxdb_cloud_iox: + influxdb_cloud_serverless: name: influx user delete parent: influx user weight: 201 diff --git a/content/influxdb/cloud-iox/reference/cli/influx/user/list.md b/content/influxdb/cloud-serverless/reference/cli/influx/user/list.md similarity index 91% rename from content/influxdb/cloud-iox/reference/cli/influx/user/list.md rename to content/influxdb/cloud-serverless/reference/cli/influx/user/list.md index 8df9ccaf3..9f931ad7a 100644 --- a/content/influxdb/cloud-iox/reference/cli/influx/user/list.md +++ b/content/influxdb/cloud-serverless/reference/cli/influx/user/list.md @@ -2,7 +2,7 @@ title: influx user list description: The `influx user list` lists users in InfluxDB. menu: - influxdb_cloud_iox: + influxdb_cloud_serverless: name: influx user list parent: influx user weight: 201 diff --git a/content/influxdb/cloud-serverless/reference/cli/influx/user/password.md b/content/influxdb/cloud-serverless/reference/cli/influx/user/password.md new file mode 100644 index 000000000..0a9da7fa7 --- /dev/null +++ b/content/influxdb/cloud-serverless/reference/cli/influx/user/password.md @@ -0,0 +1,16 @@ +--- +title: influx user password +description: The `influx user password` command updates the password for a user in InfluxDB. +menu: + influxdb_cloud_serverless: + name: influx user password + parent: influx user +weight: 201 +related: + - /influxdb/cloud-serverless/admin/accounts/change-password/ + - /influxdb/cloud-serverless/reference/cli/influx/#provide-required-authentication-credentials, influx CLI—Provide required authentication credentials + - /influxdb/cloud-serverless/reference/cli/influx/#provide-required-authentication-credentials, influx CLI—Provide required authentication credentials +canonical: /{{< latest "influxdb" "v2" >}}/reference/cli/influx/user/password/ +--- + +{{< duplicate-oss >}} diff --git a/content/influxdb/cloud-iox/reference/cli/influx/user/update.md b/content/influxdb/cloud-serverless/reference/cli/influx/user/update.md similarity index 91% rename from content/influxdb/cloud-iox/reference/cli/influx/user/update.md rename to content/influxdb/cloud-serverless/reference/cli/influx/user/update.md index 27e982ccc..7439518dd 100644 --- a/content/influxdb/cloud-iox/reference/cli/influx/user/update.md +++ b/content/influxdb/cloud-serverless/reference/cli/influx/user/update.md @@ -3,7 +3,7 @@ title: influx user update description: > The `influx user update` command updates information related to a user such as their user name. menu: - influxdb_cloud_iox: + influxdb_cloud_serverless: name: influx user update parent: influx user weight: 201 diff --git a/content/influxdb/cloud-serverless/reference/cli/influx/v1/_index.md b/content/influxdb/cloud-serverless/reference/cli/influx/v1/_index.md new file mode 100644 index 000000000..c320fc027 --- /dev/null +++ b/content/influxdb/cloud-serverless/reference/cli/influx/v1/_index.md @@ -0,0 +1,17 @@ +--- +title: influx v1 +description: > + The `influx v1` command provides commands for working with the InfluxDB 1.x API in InfluxDB 2.0. +menu: + influxdb_cloud_serverless: + name: influx v1 + parent: influx +weight: 101 +cascade: + related: + - /influxdb/cloud-serverless/reference/cli/influx/#provide-required-authentication-credentials, influx CLI—Provide required authentication credentials + - /influxdb/cloud-serverless/reference/cli/influx/#provide-required-authentication-credentials, influx CLI—Provide required authentication credentials + metadata: [influx CLI 2.0.0+] +--- + +{{< duplicate-oss >}} diff --git a/content/influxdb/cloud-iox/reference/cli/influx/v1/auth/_index.md b/content/influxdb/cloud-serverless/reference/cli/influx/v1/auth/_index.md similarity index 86% rename from content/influxdb/cloud-iox/reference/cli/influx/v1/auth/_index.md rename to content/influxdb/cloud-serverless/reference/cli/influx/v1/auth/_index.md index 51d03597e..9cabadda5 100644 --- a/content/influxdb/cloud-iox/reference/cli/influx/v1/auth/_index.md +++ b/content/influxdb/cloud-serverless/reference/cli/influx/v1/auth/_index.md @@ -3,11 +3,11 @@ title: influx v1 auth description: > The `influx v1 auth` subcommands provide authorization management for the InfluxDB 1.x compatibility API. menu: - influxdb_cloud_iox: + influxdb_cloud_serverless: name: influx v1 auth parent: influx v1 weight: 101 -influxdb/cloud-iox/tags: [authorization] +influxdb/cloud-serverless/tags: [authorization] --- {{% cloud %}} diff --git a/content/influxdb/cloud-iox/reference/cli/influx/v1/auth/create.md b/content/influxdb/cloud-serverless/reference/cli/influx/v1/auth/create.md similarity index 88% rename from content/influxdb/cloud-iox/reference/cli/influx/v1/auth/create.md rename to content/influxdb/cloud-serverless/reference/cli/influx/v1/auth/create.md index 476853cda..6dd36d53f 100644 --- a/content/influxdb/cloud-iox/reference/cli/influx/v1/auth/create.md +++ b/content/influxdb/cloud-serverless/reference/cli/influx/v1/auth/create.md @@ -3,11 +3,11 @@ title: influx v1 auth create description: > The `influx v1 auth create` command creates an authorization in the InfluxDB 1.x compatibility API. menu: - influxdb_cloud_iox: + influxdb_cloud_serverless: name: influx v1 auth create parent: influx v1 auth weight: 101 -influxdb/cloud-iox/tags: [authorization] +influxdb/cloud-serverless/tags: [authorization] updated_in: CLI v2.0.3 --- diff --git a/content/influxdb/cloud-iox/reference/cli/influx/v1/auth/delete.md b/content/influxdb/cloud-serverless/reference/cli/influx/v1/auth/delete.md similarity index 88% rename from content/influxdb/cloud-iox/reference/cli/influx/v1/auth/delete.md rename to content/influxdb/cloud-serverless/reference/cli/influx/v1/auth/delete.md index 9eef53ef3..0ff81d56a 100644 --- a/content/influxdb/cloud-iox/reference/cli/influx/v1/auth/delete.md +++ b/content/influxdb/cloud-serverless/reference/cli/influx/v1/auth/delete.md @@ -3,11 +3,11 @@ title: influx v1 auth delete description: > The `influx v1 auth delete` command deletes an authorization in the InfluxDB 1.x compatibility API. menu: - influxdb_cloud_iox: + influxdb_cloud_serverless: name: influx v1 auth delete parent: influx v1 auth weight: 101 -influxdb/cloud-iox/tags: [authorization] +influxdb/cloud-serverless/tags: [authorization] --- {{% cloud %}} diff --git a/content/influxdb/cloud-iox/reference/cli/influx/v1/auth/list.md b/content/influxdb/cloud-serverless/reference/cli/influx/v1/auth/list.md similarity index 88% rename from content/influxdb/cloud-iox/reference/cli/influx/v1/auth/list.md rename to content/influxdb/cloud-serverless/reference/cli/influx/v1/auth/list.md index 4f2228bc6..263a1307d 100644 --- a/content/influxdb/cloud-iox/reference/cli/influx/v1/auth/list.md +++ b/content/influxdb/cloud-serverless/reference/cli/influx/v1/auth/list.md @@ -3,11 +3,11 @@ title: influx v1 auth list description: > The `influx v1 auth list` command lists and searches authorizations in the InfluxDB 1.x compatibility API. menu: - influxdb_cloud_iox: + influxdb_cloud_serverless: name: influx v1 auth list parent: influx v1 auth weight: 101 -influxdb/cloud-iox/tags: [authorization] +influxdb/cloud-serverless/tags: [authorization] --- {{% cloud %}} diff --git a/content/influxdb/cloud-iox/reference/cli/influx/v1/auth/set-active.md b/content/influxdb/cloud-serverless/reference/cli/influx/v1/auth/set-active.md similarity index 88% rename from content/influxdb/cloud-iox/reference/cli/influx/v1/auth/set-active.md rename to content/influxdb/cloud-serverless/reference/cli/influx/v1/auth/set-active.md index 4084849ca..6dca9bb8b 100644 --- a/content/influxdb/cloud-iox/reference/cli/influx/v1/auth/set-active.md +++ b/content/influxdb/cloud-serverless/reference/cli/influx/v1/auth/set-active.md @@ -3,11 +3,11 @@ title: influx v1 auth set-active description: > The `influx v1 auth set-active` command activates an authorization in the InfluxDB 1.x compatibility API. menu: - influxdb_cloud_iox: + influxdb_cloud_serverless: name: influx v1 auth set-active parent: influx v1 auth weight: 101 -influxdb/cloud-iox/tags: [authorization] +influxdb/cloud-serverless/tags: [authorization] --- {{% cloud %}} diff --git a/content/influxdb/cloud-iox/reference/cli/influx/v1/auth/set-inactive.md b/content/influxdb/cloud-serverless/reference/cli/influx/v1/auth/set-inactive.md similarity index 88% rename from content/influxdb/cloud-iox/reference/cli/influx/v1/auth/set-inactive.md rename to content/influxdb/cloud-serverless/reference/cli/influx/v1/auth/set-inactive.md index 0a3a3510c..bd41699d9 100644 --- a/content/influxdb/cloud-iox/reference/cli/influx/v1/auth/set-inactive.md +++ b/content/influxdb/cloud-serverless/reference/cli/influx/v1/auth/set-inactive.md @@ -3,11 +3,11 @@ title: influx v1 auth set-inactive description: > The `influx v1 auth set-inactive` command deactivates an authorization in the InfluxDB 1.x compatibility API. menu: - influxdb_cloud_iox: + influxdb_cloud_serverless: name: influx v1 auth set-inactive parent: influx v1 auth weight: 101 -influxdb/cloud-iox/tags: [authorization] +influxdb/cloud-serverless/tags: [authorization] --- {{% cloud %}} diff --git a/content/influxdb/cloud-iox/reference/cli/influx/v1/auth/set-password.md b/content/influxdb/cloud-serverless/reference/cli/influx/v1/auth/set-password.md similarity index 89% rename from content/influxdb/cloud-iox/reference/cli/influx/v1/auth/set-password.md rename to content/influxdb/cloud-serverless/reference/cli/influx/v1/auth/set-password.md index c448d6172..ef9f0409b 100644 --- a/content/influxdb/cloud-iox/reference/cli/influx/v1/auth/set-password.md +++ b/content/influxdb/cloud-serverless/reference/cli/influx/v1/auth/set-password.md @@ -3,11 +3,11 @@ title: influx v1 auth set-password description: > The `influx v1 auth set-password` command sets a password for an existing authorization in the InfluxDB 1.x compatibility API. menu: - influxdb_cloud_iox: + influxdb_cloud_serverless: name: influx v1 auth set-password parent: influx v1 auth weight: 101 -influxdb/cloud-iox/tags: [authorization] +influxdb/cloud-serverless/tags: [authorization] updated_in: CLI v2.0.3 --- diff --git a/content/influxdb/cloud-iox/reference/cli/influx/v1/dbrp/_index.md b/content/influxdb/cloud-serverless/reference/cli/influx/v1/dbrp/_index.md similarity index 81% rename from content/influxdb/cloud-iox/reference/cli/influx/v1/dbrp/_index.md rename to content/influxdb/cloud-serverless/reference/cli/influx/v1/dbrp/_index.md index fb5410659..1ca1b8286 100644 --- a/content/influxdb/cloud-iox/reference/cli/influx/v1/dbrp/_index.md +++ b/content/influxdb/cloud-serverless/reference/cli/influx/v1/dbrp/_index.md @@ -3,11 +3,11 @@ title: influx v1 dbrp description: > The `influx v1 dbrp` subcommands provide database retention policy (DBRP) mapping management for the InfluxDB 1.x compatibility API. menu: - influxdb_cloud_iox: + influxdb_cloud_serverless: name: influx v1 dbrp parent: influx v1 weight: 101 -influxdb/cloud-iox/tags: [DBRP] +influxdb/cloud-serverless/tags: [DBRP] cascade: metadata: [influx CLI 2.0.2+] --- diff --git a/content/influxdb/cloud-iox/reference/cli/influx/v1/dbrp/create.md b/content/influxdb/cloud-serverless/reference/cli/influx/v1/dbrp/create.md similarity index 72% rename from content/influxdb/cloud-iox/reference/cli/influx/v1/dbrp/create.md rename to content/influxdb/cloud-serverless/reference/cli/influx/v1/dbrp/create.md index d58ae56db..69b69c282 100644 --- a/content/influxdb/cloud-iox/reference/cli/influx/v1/dbrp/create.md +++ b/content/influxdb/cloud-serverless/reference/cli/influx/v1/dbrp/create.md @@ -3,11 +3,11 @@ title: influx v1 dbrp create description: > The `influx v1 dbrp create` command creates a DBRP mapping in the InfluxDB 1.x compatibility API. menu: - influxdb_cloud_iox: + influxdb_cloud_serverless: name: influx v1 dbrp create parent: influx v1 dbrp weight: 101 -influxdb/cloud-iox/tags: [DBRP] +influxdb/cloud-serverless/tags: [DBRP] --- {{< duplicate-oss >}} \ No newline at end of file diff --git a/content/influxdb/cloud-iox/reference/cli/influx/v1/dbrp/delete.md b/content/influxdb/cloud-serverless/reference/cli/influx/v1/dbrp/delete.md similarity index 72% rename from content/influxdb/cloud-iox/reference/cli/influx/v1/dbrp/delete.md rename to content/influxdb/cloud-serverless/reference/cli/influx/v1/dbrp/delete.md index 75fd08703..2bd193c50 100644 --- a/content/influxdb/cloud-iox/reference/cli/influx/v1/dbrp/delete.md +++ b/content/influxdb/cloud-serverless/reference/cli/influx/v1/dbrp/delete.md @@ -3,11 +3,11 @@ title: influx v1 dbrp delete description: > The `influx v1 dbrp delete` command deletes a DBRP mapping in the InfluxDB 1.x compatibility API. menu: - influxdb_cloud_iox: + influxdb_cloud_serverless: name: influx v1 dbrp delete parent: influx v1 dbrp weight: 101 -influxdb/cloud-iox/tags: [DBRP] +influxdb/cloud-serverless/tags: [DBRP] --- {{< duplicate-oss >}} \ No newline at end of file diff --git a/content/influxdb/cloud-iox/reference/cli/influx/v1/dbrp/list.md b/content/influxdb/cloud-serverless/reference/cli/influx/v1/dbrp/list.md similarity index 72% rename from content/influxdb/cloud-iox/reference/cli/influx/v1/dbrp/list.md rename to content/influxdb/cloud-serverless/reference/cli/influx/v1/dbrp/list.md index 8ffa4b15f..651e7b605 100644 --- a/content/influxdb/cloud-iox/reference/cli/influx/v1/dbrp/list.md +++ b/content/influxdb/cloud-serverless/reference/cli/influx/v1/dbrp/list.md @@ -3,11 +3,11 @@ title: influx v1 dbrp list description: > The `influx v1 dbrp list` command lists and searches DBRP mappings in the InfluxDB 1.x compatibility API. menu: - influxdb_cloud_iox: + influxdb_cloud_serverless: name: influx v1 dbrp list parent: influx v1 dbrp weight: 101 -influxdb/cloud-iox/tags: [dbrp] +influxdb/cloud-serverless/tags: [dbrp] --- {{< duplicate-oss >}} \ No newline at end of file diff --git a/content/influxdb/cloud-iox/reference/cli/influx/v1/dbrp/update.md b/content/influxdb/cloud-serverless/reference/cli/influx/v1/dbrp/update.md similarity index 72% rename from content/influxdb/cloud-iox/reference/cli/influx/v1/dbrp/update.md rename to content/influxdb/cloud-serverless/reference/cli/influx/v1/dbrp/update.md index fe98126af..8ab291dbf 100644 --- a/content/influxdb/cloud-iox/reference/cli/influx/v1/dbrp/update.md +++ b/content/influxdb/cloud-serverless/reference/cli/influx/v1/dbrp/update.md @@ -3,11 +3,11 @@ title: influx v1 dbrp update description: > The `influx v1 dbrp update` command updates a DBRP mapping in the InfluxDB 1.x compatibility API. menu: - influxdb_cloud_iox: + influxdb_cloud_serverless: name: influx v1 dbrp update parent: influx v1 dbrp weight: 101 -influxdb/cloud-iox/tags: [DBRP] +influxdb/cloud-serverless/tags: [DBRP] --- {{< duplicate-oss >}} \ No newline at end of file diff --git a/content/influxdb/cloud-serverless/reference/cli/influx/v1/shell.md b/content/influxdb/cloud-serverless/reference/cli/influx/v1/shell.md new file mode 100644 index 000000000..aa8056ad1 --- /dev/null +++ b/content/influxdb/cloud-serverless/reference/cli/influx/v1/shell.md @@ -0,0 +1,19 @@ +--- +title: influx v1 shell +description: > + The `influx v1 shell` subcommand starts an InfluxQL shell (REPL). +menu: + influxdb_cloud_serverless: + name: influx v1 shell + parent: influx v1 +weight: 101 +influxdb/cloud-serverless/tags: [InfluxQL] +related: + - /influxdb/cloud-serverless/reference/cli/influx/#provide-required-authentication-credentials, influx CLI—Provide required authentication credentials + - /influxdb/cloud-serverless/reference/cli/influx/#provide-required-authentication-credentials, influx CLI—Provide required authentication credentials + - /influxdb/cloud/query-data/influxql/ + - /influxdb/v2.4/tools/influxql-shell/ +metadata: [influx CLI 2.4.0+, InfluxDB Cloud] +--- + +{{< duplicate-oss >}} diff --git a/content/influxdb/cloud-iox/reference/cli/influx/version/_index.md b/content/influxdb/cloud-serverless/reference/cli/influx/version/_index.md similarity index 68% rename from content/influxdb/cloud-iox/reference/cli/influx/version/_index.md rename to content/influxdb/cloud-serverless/reference/cli/influx/version/_index.md index 2c522275e..9a320e3ba 100644 --- a/content/influxdb/cloud-iox/reference/cli/influx/version/_index.md +++ b/content/influxdb/cloud-serverless/reference/cli/influx/version/_index.md @@ -1,9 +1,9 @@ --- title: influx version description: The `influx version` command outputs the current version of the influx command line interface (CLI). -influxdb/cloud-iox/tags: [influx, cli] +influxdb/cloud-serverless/tags: [influx, cli] menu: - influxdb_cloud_iox: + influxdb_cloud_serverless: parent: influx weight: 202 metadata: [influx CLI 2.0.0+] diff --git a/content/influxdb/cloud-serverless/reference/cli/influx/write/_index.md b/content/influxdb/cloud-serverless/reference/cli/influx/write/_index.md new file mode 100644 index 000000000..ce2ceae48 --- /dev/null +++ b/content/influxdb/cloud-serverless/reference/cli/influx/write/_index.md @@ -0,0 +1,24 @@ +--- +title: influx write +description: > + The `influx write` command writes data to InfluxDB via stdin or from a specified file. + Write data using line protocol, annotated CSV, or extended annotated CSV. +menu: + influxdb_cloud_serverless: + name: influx write + parent: influx +weight: 101 +influxdb/cloud-serverless/tags: [write] +cascade: + related: + - /influxdb/cloud-serverless/write-data/ + - /influxdb/cloud-serverless/reference/syntax/line-protocol/ + - /influxdb/cloud-serverless/reference/syntax/annotated-csv/ + - /influxdb/cloud-serverless/reference/syntax/annotated-csv/extended/ + - /influxdb/cloud-serverless/reference/cli/influx/#provide-required-authentication-credentials, influx CLI—Provide required authentication credentials + - /influxdb/cloud-serverless/reference/cli/influx/#provide-required-authentication-credentials, influx CLI—Provide required authentication credentials + metadata: [influx CLI 2.0.0+] +updated_in: CLI v2.0.5 +--- + +{{< duplicate-oss >}} diff --git a/content/influxdb/cloud-iox/reference/cli/influx/write/dryrun.md b/content/influxdb/cloud-serverless/reference/cli/influx/write/dryrun.md similarity index 88% rename from content/influxdb/cloud-iox/reference/cli/influx/write/dryrun.md rename to content/influxdb/cloud-serverless/reference/cli/influx/write/dryrun.md index c71b71456..7aea4cf4b 100644 --- a/content/influxdb/cloud-iox/reference/cli/influx/write/dryrun.md +++ b/content/influxdb/cloud-serverless/reference/cli/influx/write/dryrun.md @@ -4,11 +4,11 @@ description: > The `influx write dryrun` command prints write output to stdout instead of writing to InfluxDB. Use this command to test writing data. menu: - influxdb_cloud_iox: + influxdb_cloud_serverless: name: influx write dryrun parent: influx write weight: 101 -influxdb/cloud-iox/tags: [write] +influxdb/cloud-serverless/tags: [write] related: - /influxdb/cloud/write-data/ - /influxdb/cloud/write-data/developer-tools/csv/ diff --git a/content/influxdb/cloud-iox/reference/flux.md b/content/influxdb/cloud-serverless/reference/flux.md similarity index 87% rename from content/influxdb/cloud-iox/reference/flux.md rename to content/influxdb/cloud-serverless/reference/flux.md index 2eff748a5..7c0a19802 100644 --- a/content/influxdb/cloud-iox/reference/flux.md +++ b/content/influxdb/cloud-serverless/reference/flux.md @@ -3,7 +3,7 @@ title: Flux reference documentation description: > Learn the Flux syntax and structure used to query InfluxDB. menu: - influxdb_cloud_iox: + influxdb_cloud_serverless: name: Flux reference parent: Reference weight: 103 @@ -15,7 +15,7 @@ All Flux reference material is provided in the Flux documentation: ## Flux with the InfluxDB IOx storage engine -When querying data from an InfluxDB bucket backed by InfluxDB IOx, use the following +When querying data from an InfluxDB bucket powered by InfluxDB IOx, use the following input functions: - [`iox.from()`](/flux/v0.x/stdlib/experimental/iox/from/): alternative to @@ -71,7 +71,7 @@ iox.sql(bucket: "example-bucket", query: query) {{% warn %}} #### Flux performance with InfluxDB IOx -When querying data from an InfluxDB bucket backed by InfluxDB IOx, using `iox.from()` -is **less performant** than querying a TSM-backed bucket with `from()`. +When querying data from an InfluxDB bucket powered by InfluxDB IOx, using `iox.from()` +is **less performant** than querying a TSM-powered bucket with `from()`. For better Flux query performance, use `iox.sql()`. {{% /warn %}} diff --git a/content/influxdb/cloud-iox/reference/glossary.md b/content/influxdb/cloud-serverless/reference/glossary.md similarity index 70% rename from content/influxdb/cloud-iox/reference/glossary.md rename to content/influxdb/cloud-serverless/reference/glossary.md index a53c1486c..be4d3c627 100644 --- a/content/influxdb/cloud-iox/reference/glossary.md +++ b/content/influxdb/cloud-serverless/reference/glossary.md @@ -4,10 +4,10 @@ description: > Terms related to InfluxData products and platforms. weight: 120 menu: - influxdb_cloud_iox: + influxdb_cloud_serverless: name: Glossary parent: Reference -influxdb/cloud-iox/tags: [glossary] +influxdb/cloud-serverless/tags: [glossary] --- {{< duplicate-oss >}} diff --git a/content/influxdb/cloud-serverless/reference/internals/_index.md b/content/influxdb/cloud-serverless/reference/internals/_index.md new file mode 100644 index 000000000..cb90dba15 --- /dev/null +++ b/content/influxdb/cloud-serverless/reference/internals/_index.md @@ -0,0 +1,12 @@ +--- +title: InfluxDB Cloud Serverless internals +description: > + Learn about InfluxDB Cloud Serverless internal systems and mechanisms. +menu: + influxdb_cloud_serverless: + name: InfluxDB Cloud internals + parent: Reference +weight: 107 +--- + +{{< children >}} diff --git a/content/influxdb/cloud-iox/reference/internals/storage-limits.md b/content/influxdb/cloud-serverless/reference/internals/storage-limits.md similarity index 93% rename from content/influxdb/cloud-iox/reference/internals/storage-limits.md rename to content/influxdb/cloud-serverless/reference/internals/storage-limits.md index 64ba6e1a5..575ec355c 100644 --- a/content/influxdb/cloud-iox/reference/internals/storage-limits.md +++ b/content/influxdb/cloud-serverless/reference/internals/storage-limits.md @@ -3,7 +3,7 @@ title: IOx storage engine limits description: > The InfluxDB IOx storage enforces specific limits on the storage level. menu: - influxdb_cloud_iox: + influxdb_cloud_serverless: name: IOx storage limits parent: InfluxDB Cloud internals weight: 201 @@ -18,7 +18,7 @@ The InfluxDB IOx storage enforces specific limits on the storage level. ## Terminology - **namespace**: organization+bucket -- **table**: [measurement](/influxdb/cloud-iox/reference/glossary/#measurement) +- **table**: [measurement](/influxdb/cloud-serverless/reference/glossary/#measurement) - **column**: time, tags and fields are structured as columns ## Service-level limits diff --git a/content/influxdb/cloud-serverless/reference/regions.md b/content/influxdb/cloud-serverless/reference/regions.md new file mode 100644 index 000000000..92e3c82f0 --- /dev/null +++ b/content/influxdb/cloud-serverless/reference/regions.md @@ -0,0 +1,47 @@ +--- +title: InfluxDB Cloud Serverless regions +description: > + InfluxDB Cloud Serverless is available on multiple cloud providers and in multiple regions. + Each region has a unique URL and API endpoint. +aliases: + - /influxdb/cloud-serverless/reference/urls/ +weight: 106 +menu: + influxdb_cloud_serverless: + name: InfluxDB Cloud regions + parent: Reference +--- + +InfluxDB Cloud Serverless is available on on the following cloud providers and regions. +Each region has a unique URL and API endpoint. +Use the URLs below to interact with your InfluxDB Cloud Serverless instances with the +[InfluxDB API](/influxdb/cloud-serverless/reference/api/), [InfluxDB client libraries](/influxdb/cloud/api-guide/client-libraries/), +[`influx` CLI](/influxdb/cloud-serverless/reference/cli/influx/), or [Telegraf](/influxdb/cloud-serverless/write-data/use-telegraf/). + +{{% note %}} +#### InfluxDB IOx-enabled cloud regions + +We are in the process of deploying and enabling the InfluxDB IOx storage engine +on other cloud providers and regions. +{{% /note %}} + +Request a cloud region + + + +{{< cloud_regions type="iox-table" >}} diff --git a/content/influxdb/cloud-serverless/reference/sql/_index.md b/content/influxdb/cloud-serverless/reference/sql/_index.md new file mode 100644 index 000000000..fc8b464d6 --- /dev/null +++ b/content/influxdb/cloud-serverless/reference/sql/_index.md @@ -0,0 +1,622 @@ +--- +title: SQL reference documentation +description: > + Learn the SQL syntax and structure used to query InfluxDB. +menu: + influxdb_cloud_serverless: + name: SQL reference + parent: Reference +weight: 101 +--- + +InfluxDB Cloud Serverless uses the [Apache Arrow DataFusion](https://arrow.apache.org/datafusion/) implementation of SQL. + +- [Identifiers](#identifiers) +- [Quoting and case sensitivity](#quoting-and-case-sensitivity) +- [Literals](#literals) +- [Duration units](#duration-units) +- [Operators](#operators) +- [Keywords](#keywords) +- [Conditional expressions](#conditional-expressions) +- [Statements and clauses](#statements-and-clauses) +- [Comments](#comments) +- [Functions](#functions) + +## Identifiers + +An identifier is a token which refers to the name of an InfluxDB database object, such as a **measurement** or a column name (**time**, **tag keys**, or **field keys**). + +## Quoting + +Use double quotes on [identifiers](#identifiers) to treat them as case-sensitive. +Use single quotes on string literals. + +General quoting guidelines: + +- Single quote RFC3339 and RFC3339-like time values. +- Do _not_ quote Unix epoch time values (integers cast to a timestamp). +- Double-quote mixed case, [camel case](https://en.wikipedia.org/wiki/Camel_case) or case-sensitive identifiers. +- Double-quote identifiers that contain special characters or whitespace characters. + +##### Quoting examples + +```sql +-- Double-quote identifiers that contain whitespace +SELECT "water temperature", "buoy location" FROM buoy + +-- Double-quote measurement names with special characters +SELECT * FROM "h2o-temperature" + +-- Double-quote identifiers that should be treated as case-sensitive +SELECT "pH" FROM "Water" +``` + +{{% note %}} +**Note:** We recommend always double-quoting identifiers, regardless of case-sensitivity. +{{% /note %}} + + +Unquoted identifiers **are not** case-sensitive and match any measurement, tag key, or field key with the same characters, despite case. +For example, if you have two fields in a measurement named `ph` and `pH`, the unquoted identifier, `pH` will match both. +To query in a case-sensitive manner, double-quote identifiers. + +## Literals + +A literal is an explicit value not represented by an identifier. + +### String literals + +String literals are surrounded by single quotes. + +```sql +'santa_monica' +'pH' +'average temperature' +``` + +### Numeric literals + +Number literals are positive or negative numbers that are either exact numbers or floats. + +```sql +-- Integers +10 ++10 +-10 + +-- Unsigned integers +10::BIGINT UNSIGNED ++10::BIGINT UNSIGNED + +-- Floats +10.78654 +-100.56 +``` + +### Date and time literals + +The following date and time literals are supported: + +```sql +'2022-01-31T06:30:30.123Z' -- (RFC3339) +'2022-01-31T06:30:30.123' -- (RFC3339-like) +'2022-01-31 06:30:30.123' -- (RFC3339-like) +'2022-01-31 06:30:30' -- ((RFC3339-like, no fractional seconds) +1643610630123000000::TIMESTAMP -- (Unix epoch nanosecond cast to a timestamp) +``` + +### Boolean literals + +Boolean literals are either `TRUE` or `FALSE`. + +## Duration units + +Interval literals specify a length or unit of time. + +```sql +INTERVAL '4 minutes' +INTERVAL '12 days 6 hours 30 minutes' +``` + +The following units of time are supported: + +- nanoseconds +- microseconds +- milliseconds +- seconds +- minutes +- hours +- days +- weeks +- months +- years +- century + +## Operators + +Operators are reserved words or characters which perform certain operations, inluding comparisons and arithmetic. + +### Arithmetic operators + +Arithmetic operators take two numeric values (either literals or variables) and +perform a calculation that returns a single numeric value. + +| Operator | Description | Example | Result | +| :------: | :------------- | ------- | -----: | +| `+` | Addition | `2 + 2` | `4` | +| `-` | Subtraction | `4 - 2` | `2` | +| `*` | Multiplication | `2 * 3` | `6` | +| `/` | Division | `6 / 3` | `2` | +| `%` | Modulo | `7 % 2` | `1` | + +### Comparison operators + +Comparison operators evaluate the relationship between the left and right operands and `TRUE` or `FALSE`. + +| Operator | Meaning | Example | +| :------: | :---------------------------------- | :--------------- | +| `=` | Equal to | `123 = 123` | +| `<>` | Not equal to | `123 <> 456` | +| `!=` | Not equal to | `123 != 456` | +| `>` | Greater than | `3 > 2` | +| `>=` | Greater than or equal to | `3 >= 2` | +| `<` | Less than | `1 < 2` | +| `<=` | Less than or equal to | `1 <= 2` | +| `~` | Matches a regular expression | `'abc' ~ 'a.*'` | +| `!~` | Does not match a regular expression | `'abc' !~ 'd.*'` | + +## Keywords + +The following reserved keywords cannot be used as identifiers. + +```sql +AND +ALL +ANALYZE +AS +ASC +BETWEEN +BOTTOM +CASE +DESC +DISTINCT +EXISTS +EXPLAIN +FROM +GROUP BY +HAVING +IN +INNER JOIN +JOIN +LEFT JOIN +LIMIT +NOT EXISTS +NOT IN +OR +ORDER BY +FULL OUTER JOIN +RIGHT JOIN +SELECT +TOP +TYPE +UNION +UNION ALL +WHERE +WITH +``` + +## Conditional expressions + +Conditional expressions evaluate conditions based on input values. +The following conditional expressions are supported: + +| Expression | Description | +| :--------- | :----------------------------------------------------------------- | +| CASE | Allows for use of WHEN-THEN-ELSE statements. | +| COALESCE | Returns the first non-NULL expression in a specified list. | +| NULLIF | Returns a NULL value if value1 = value2. Otherwise returns value1. | + +## Statements and clauses + +InfluxDB SQL supports the following basic syntax for queries: + +```sql +[ WITH with_query [, …] ] +SELECT [ ALL | DISTINCT ] select_expr [, …] +[ FROM from_item [, …] ] +[ JOIN join_item [, …] ] +[ WHERE condition ] +[ GROUP BY grouping_element [, …] ] +[ HAVING condition] +[ UNION [ ALL ] ] +[ ORDER BY expression [ ASC | DESC ][, …] ] +[ LIMIT count ] +``` + +### SELECT statement and FROM clause + +Use the SQL `SELECT` statement to query data from a specific measurement or measurements. The `FROM` clause always accompanies the `SELECT` statement. + +#### Examples + +```sql +SELECT * FROM "h2o_feet" +``` +### WHERE clause + +Use the `WHERE` clause to filter results based on `fields`, `tags`, and `timestamps`. +Use predicates to evaluate each row. +Rows that evaluate as `TRUE` are returned in the result set. +Rows that evaluate as `FALSE` are omitted from the result set. + +#### Examples + +```sql +SELECT * FROM "h2o_feet" WHERE "water_level" <= 9 +``` +```sql +SELECT + * +FROM + "h2o_feet" +WHERE + "location" = 'santa_monica' + AND "level description" = 'below 3 feet' +``` + +### JOIN clause + +Use the `JOIN` clause to join data from multiple measurements (tables). The following joins are supported: + +{{< flex >}} +{{< flex-content "quarter" >}} +

Inner join

+ {{< svg svg="static/svgs/join-diagram.svg" class="inner small center" >}} +{{< /flex-content >}} +{{< flex-content "quarter" >}} +

Left outer join

+ {{< svg svg="static/svgs/join-diagram.svg" class="left small center" >}} +{{< /flex-content >}} +{{< flex-content "quarter" >}} +

Right outer join

+ {{< svg svg="static/svgs/join-diagram.svg" class="right small center" >}} +{{< /flex-content >}} +{{< flex-content "quarter" >}} +

Full outer join

+ {{< svg svg="static/svgs/join-diagram.svg" class="full small center" >}} +{{< /flex-content >}} +{{< /flex >}} + +The `INNER JOIN` clause gathers data where there is a match between the two measurements being joined. + +```sql +SELECT + * +FROM + h2o_feet + INNER JOIN h2o_temperature ON h2o_feet.location = h2o_temperature.location + AND h2o_feet.time = h2o_temperature.time +``` + +The `LEFT JOIN` and `LEFT OUTER JOIN` clauses gather data from all rows in the left table regardless of whether there is a match in the right table. + +```sql +SELECT + * +FROM + h2o_feet + LEFT OUTER JOIN h2o_temperature ON h2o_feet.location = h2o_temperature.location + AND h2o_feet.time = h2o_temperature.time +``` + +The `RIGHT JOIN` and `RIGHT OUTER JOIN` clauses gather data from all rows in the right table regardless of whether there is a match in the left table + +```sql +SELECT + * +FROM + h2o_feet + RIGHT OUTER JOIN h2o_temperature ON h2o_feet.location = h2o_temperature.location + AND h2o_feet.time = h2o_temperature.time +``` + +The `FULL JOIN` and `FULL OUTER JOIN` clauses return all rows from the left and the right side of the join with `NULL` values where there is no match. + +```sql +SELECT + * +FROM + h2o_feet + FULL JOIN h2o_temperature ON h2o_feet.location = h2o_temperature.location + AND h2o_feet.time = h2o_temperature.time +``` + +### GROUP BY clause + +Use the `GROUP BY` clause to group query results based on specified column values. `GROUP BY` **requires** an aggregate or selector function in the `SELECT` statement. + +#### Examples + +```sql +SELECT + MEAN("water_level"), + "location" +FROM + "h2o_feet" +GROUP BY + "location" +``` + +### HAVING clause + + Use the `HAVING` clause to filter query results based on a specified condition. + The `HAVING` clause must _follow_ the `GROUP BY` clause, but _precede_ the `ORDER BY` clause. + +#### Examples + +```sql +SELECT + MEAN("water_level"), + "location" +FROM + "h2o_feet" +GROUP BY + "location" +HAVING + MEAN("water_level") > 4 +ORDER BY + "location" +``` + +### UNION clause + +The `UNION` clause combines the results of two or more `SELECT` statements without returning any duplicate rows. `UNION ALL` returns all results, including duplicates. + +#### Examples + +```sql +SELECT + 'pH' +FROM + "h2o_pH" +UNION ALL +SELECT + "location" +FROM + "h2o_quality" +``` + +### ORDER BY clause + +The `ORDER BY` clause orders results by specified columns and order. +Sort data based on fields, tags, and timestamps. +The following orders are supported: + +- `ASC`: ascending _(default)_ +- `DESC`: descending + +#### Examples + +```sql +SELECT + "water_level", + "location" +FROM + "h2o_feet" +ORDER BY + "location", + "time" DESC +``` + +### LIMIT clause + +The `LIMIT` clause limits the number of rows to return. +The defined limit should be a non-negative integer. + +#### Examples + +```sql +SELECT + "water_level", + "location" +FROM + "h2o_feet" +LIMIT + 10 +``` + +### WITH clause + +The `WITH` clause provides a way to write auxiliary statements for use in a larger query. +It can help break down large, complicated queries into simpler forms. + +```sql +WITH summary_data as +(SELECT degrees, location, time + FROM average_temperature) +SELECT * FROM summary_data +``` + +### OVER clause + +The `OVER` clause is used with SQL window functions. +A **window function** performs a calculation across a set of table rows that are related in some way to the current row. + While similar to aggregate functions, window functions output results into rows retaining their separate identities. + +```sql +SELECT + time, + water_level +FROM + ( + SELECT + time, + "water_level", + row_number() OVER ( + order by + water_level desc + ) as rn + FROM + h2o_feet + ) +WHERE + rn <= 3; +``` + +## Comments + +Use comments to describe and add detail or notes to your queries. + +- Single line comments use the double hyphen `--` symbol. Single line comments end with a line break. +- Multi-line comments begin with `/*` and end with ` */`. + +```sql +-- Single-line comment + +/* + * Multi-line comment + */ +``` + +## Schema information + +InfluxDB Cloud Serverless supports the following metedata schema queries: + +```sql +SHOW tables + +SHOW columns FROM +``` + +## Functions + +Following is a list of supported functions by type. + +### Aggregate functions + +An aggregate function performs a calculation or computation on a set of data values in a column and returns a single value. + +| Function | Description | +| :------- | :--------------------------------------------------------- | +| COUNT() | Returns returns the number of rows from a field or tag key | +| AVG() | Returns the average value of a column | +| SUM() | Returns the summed value of a column | +| MEAN() | Returns the mean value of a column | +| MIN() | Returns the smallest value of the selected column | +| MAX() | Returns the largest value of the selected column | + +#### Examples + +```sql + +SELECT COUNT("water_level") +FROM "h2o_feet" + +SELECT AVG("water_level"), "location" +FROM "h2o_feet" +GROUP BY "location" + +SELECT SUM("water_level"), "location" +FROM "h2o_feet" +GROUP BY "location" +``` + +### Selector functions + +Selector functions are unique to InfluxDB. They behave like aggregate functions in that they take a row of data and compute it down to a single value. However, selectors are unique in that they return a **time value** in addition to the computed value. In short, selectors retrun an aggreagetd value along with a timestamp. + +| Function | Description | +| :--------------- | :-------------------------------------------------------------- | +| SELECTOR_FIRST() | Returns the first value of a selected column and timestamp. | +| SELECTOR_LAST() | Returns the last value of a selected column and timestamp. | +| SELECTOR_MIN() | Returns the smallest value of a selected column and timestamp. | +| SELECTOR_MAX() | Returns the largest value of a selected column and timestamp. | + +#### Examples + +```sql +SELECT +SELECTOR_MAX("pH", time)['value'], +SELECTOR_MAX("pH", time)['time'] +FROM "h2o_pH" + +SELECT +SELECTOR_LAST("water_level", time)['value'], +SELECTOR_LAST("water_level", time)['time'] +FROM "h2o_feet" +WHERE time >= timestamp '2019-09-10T00:00:00Z' AND time <= timestamp '2019-09-19T00:00:00Z' + +``` + +### Date and time functions + +| Function | Description | +| :----------- | :---------------------------------------------------------------------------------------------- | +| DATE_BIN() | Bins the input timestamp into a specified interval. | +| DATE_TRUNC() | Truncates a timestamp expression based on the date part specified, such as hour, day, or month. | +| DATE_PART() | Returns the specified part of a date. | +| NOW() | Returns the current time (UTC). | + +#### Examples + +```sql +SELECT DATE_BIN(INTERVAL '1 hour', time, '2019-09-18T00:00:00Z'::timestamp), +SUM(water_level) +FROM "h2o_feet" +GROUP BY DATE_BIN(INTERVAL '1 hour', time, '2019-09-18T00:00:00Z'::timestamp) + +SELECT DATE_TRUNC('month',time) AS "date", +SUM(water_level) +FROM "h2o_feet" +GROUP BY time +``` + +### Approximate functions + +| Function | Description | +| :--------------------------------- | :-------------------------------------------------------------------------------------------- | +| APPROX_MEDIAN | Returns the approximate median of input values. | +| APPROX_DISTINCT | Returns the approximate count of the number of distinct values. Implemented only for strings. | +| APPROX_PERCENTILE_CONT | Returns the approximate percentile of input values. | +| APPROX_PERCENTILE_CONT_WITH_WEIGHT | Returns the approximate percentile of input values with weight. | + + +### Math functions + +| Function | Description | +| :------- | :------------------------------------------------------------------------------- | +| ABS() | Absolute value | +| ACOS() | Inverse cosine | +| ASIN() | Inverse sine | +| ATAN() | Inverse tangent | +| ATAN2() | Inverse tangent of y / x | +| CEIL() | Returns the smallest integer value greater than or equal to the specified number | +| COS() | Cosine | +| EXP() | Exponential | +| FLOOR() | Nearest integer less than or equal to the specified number | +| LN() | Natural logarithm | +| LOG10() | Base 10 logarithm | +| LOG2() | Base 2 logarithm | +| POWER() | Returns the value of a number raised to the power of the number | +| ROUND() | Round to the nearest integer | +| SIGNUM() | Sign of the argument (-1, 0, +1) | +| SINE() | Sine | +| SQRT() | Returns the square root of a number | +| TAN() | Tangent | +| TRUNC() | Truncates a number to the specified number of decimal places | + +### Conditional functions + +| Function | Description | +| :------- | :--------------------------------------------------------------------------------------------------------- | +| COALESCE | Returns the first argument that is not null. If all arguments are null, then `COALESCE` will return nulls. | +| NULLIF | Returns a null value if value1 equals value2, otherwise returns value1. | + + +### Regular expression functions + +| Function | Description | +| :------------- | :---------------------------------------------------------------------------- | +| REGEXP_MATCH | Matches a regular expression against a string and returns matched substrings. | +| REGEXP_REPLACE | Replaces substrings that match a regular expression by a new substring. | + diff --git a/content/influxdb/cloud-serverless/reference/sql/data-types.md b/content/influxdb/cloud-serverless/reference/sql/data-types.md new file mode 100644 index 000000000..c3fa79b34 --- /dev/null +++ b/content/influxdb/cloud-serverless/reference/sql/data-types.md @@ -0,0 +1,210 @@ +--- +title: SQL data types +list_title: Data types +description: > + The InfluxDB SQL implementation supports a number of data types including 64-bit integers, + double-precision floating point numbers, strings, and more. +menu: + influxdb_cloud_serverless: + name: Data types + parent: SQL reference +weight: 200 +related: + - /influxdb/cloud-serverless/query-data/sql/cast-types/ +--- + +InfluxDB Cloud Serverless uses the [Apache Arrow DataFusion](https://arrow.apache.org/datafusion/) implementation of SQL. +Data types define the type of values that can be stored in table columns. +In InfluxDB's SQL implementation, a **measurement** is structured as a table, +and **tags**, **fields** and **timestamps** are exposed as columns. + +DataFusion uses the [Arrow](https://arrow.apache.org/) type system for query execution. +Data types stored in InfluxDB's storage engine are mapped to SQL data types at query time. + +{{% note %}} +When performing casting operations, cast to the **name** of the data type, not the actual data type. +Names and indentifiers in SQL are _case-insensitive_ by default. For example: + +```sql +SELECT + '99'::BIGINT, + '2019-09-18T00:00:00Z'::timestamp +``` +{{% /note %}} + +- [String types](#string-types) +- [Numeric types](#numeric-types) + - [Integers](#integers) + - [Unsigned integers](#unsigned-integers) + - [Floats](#floats) +- [Date and time data types](#date-and-time-data-types) + - [Timestamp](#timestamp) + - [Interval ](#interval-) +- [Boolean types](#boolean-types) +- [Unsupported SQL types](#unsupported-sql-types) + +## String types + +| Name | Data type | Description | +| :------ | :-------- | --------------------------------- | +| STRING | UTF8 | Character string, variable-length | +| CHAR | UTF8 | Character string, fixed-length | +| VARCHAR | UTF8 | Character string, variable-length | +| TEXT | UTF8 | Variable unlimited length | + +##### Example string literals + +```sql +'abcdefghijk' +'time' +'h2o_temperature' +``` + +## Numeric types + +The following numeric types are supported: + +| Name | Data type | Description | +| :-------------- | :-------- | :--------------------------- | +| BIGINT | INT64 | 64-bit signed integer | +| BIGINT UNSIGNED | UINT64 | 64-bit unsigned integer | +| DOUBLE | FLOAT64 | 64-bit floating-point number | + +### Integers + +InfluxDB SQL supports the 64-bit signed integers: + +**Minimum signed integer**: `-9223372036854775808` +**Maximum signed integer**: `9223372036854775807` + +##### Example integer literals + +```sql +234 +-446 +5 +``` + +### Unsigned integers + +InfluxDB SQL supports the 64-bit unsigned integers: + +**Minimum unsigned integer**: `0` +**Maximum unsigned integer**: `18446744073709551615` + +##### Example unsigned integer literals + +Unsigned integer literals are comprised of an integer cast to the `BIGINT UNSIGNED` type: + +```sql +234::BIGINT UNSIGNED +458374893::BIGINT UNSIGNED +5::BIGINT UNSIGNED +``` + +### Floats + +InfluxDB SQL supports the 64-bit double floating point values. +Floats can be a decimal point, decimal integer, or decimal fraction. + +##### Example float literals + +```sql +23.8 +-446.89 +5.00 +0.033 +``` + +## Date and time data types + +InfluxDB SQL supports the following DATE/TIME data types: + +| Name | Data type | Description | +| :-------- | :-------- | :------------------------------------------------------------------- | +| TIMESTAMP | TIMESTAMP | TimeUnit::Nanosecond, None | +| INTERVAL | INTERVAL | Interval(IntervalUnit::YearMonth) or Interval(IntervalUnit::DayTime) | + +### Timestamp + +A time type is a single point in time using nanosecond precision. + +The following date and time formats are supported: + +```sql +YYYY-MM-DDT00:00:00.000Z +YYYY-MM-DDT00:00:00.000-00:00 +YYYY-MM-DD 00:00:00.000-00:00 +YYYY-MM-DDT00:00:00Z +YYYY-MM-DD 00:00:00.000 +YYYY-MM-DD 00:00:00 +``` + +##### Example timestamp literals + +```sql +'2023-01-02T03:04:06.000Z' +'2023-01-02T03:04:06.000-00:00' +'2023-01-02 03:04:06.000-00:00' +'2023-01-02T03:04:06Z' +'2023-01-02 03:04:06.000' +'2023-01-02 03:04:06' +``` + +### Interval + +The INTERVAL data type can be used with the following precision: + +- nanosecond +- microsecond +- millisecond +- second +- minute +- hour +- day +- week +- month +- year +- century + +##### Example interval literals +```sql +INTERVAL '10 minutes' +INTERVAL '1 year' +INTERVAL '2 days 1 hour 31 minutes' +``` + +## Boolean types + +Booleans store TRUE or FALSE values. + +| Name | Data type | Description | +| :------ | :-------- | :------------------- | +| BOOLEAN | BOOLEAN | True or false values | + +##### Example boolean literals + +```sql +true +TRUE +false +FALSE +``` + +## Unsupported SQL types + +The following SQL types are not currently supported: + +- UUID +- BLOB +- CLOB +- BINARY +- VARBINARY +- REGCLASS +- NVARCHAR +- CUSTOM +- ARRAY +- ENUM +- SET +- DATETIME +- BYTEA diff --git a/content/influxdb/cloud-serverless/reference/sql/explain.md b/content/influxdb/cloud-serverless/reference/sql/explain.md new file mode 100644 index 000000000..a68b1aa4a --- /dev/null +++ b/content/influxdb/cloud-serverless/reference/sql/explain.md @@ -0,0 +1,74 @@ +--- +title: EXPLAIN command +description: > + The `EXPLAIN` command shows the logical and physical execution plan for the + specified SQL statement. +menu: + influxdb_cloud_serverless: + name: EXPLAIN command + parent: SQL reference +weight: 207 +--- + +The `EXPLAIN` command returns the logical and physical execution plan for the +specified SQL statement. + +```sql +EXPLAIN [ANALYZE] [VERBOSE] statement +``` + +- [EXPLAIN](#explain) +- [EXPLAIN ANALYZE](#explain-analyze) + +## EXPLAIN + +Returns the execution plan of a statement. +To output more details, use `EXPLAIN VERBOSE`. + +##### Example EXPLAIN ANALYZE + +```sql +EXPLAIN +SELECT + room, + avg(temp) AS temp +FROM home +GROUP BY room +``` + +{{< expand-wrapper >}} +{{% expand "View `EXPLAIN` example output" %}} + +| plan_type | plan | +| :------------ | :------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| logical_plan | Projection: home.room, AVG(home.temp) AS temp Aggregate: groupBy=[[home.room]], aggr=[[AVG(home.temp)]] TableScan: home projection=[room, temp] | +| physical_plan | ProjectionExec: expr=[room@0 as room, AVG(home.temp)@1 as temp] AggregateExec: mode=FinalPartitioned, gby=[room@0 as room], aggr=[AVG(home.temp)] CoalesceBatchesExec: target_batch_size=8192 RepartitionExec: partitioning=Hash([Column { name: "room", index: 0 }], 4), input_partitions=4 RepartitionExec: partitioning=RoundRobinBatch(4), input_partitions=1 AggregateExec: mode=Partial, gby=[room@0 as room], aggr=[AVG(home.temp)] ParquetExec: limit=None, partitions={1 group: [[136/316/1120/1ede0031-e86e-06e5-12ba-b8e6fd76a202.parquet]]}, projection=[room, temp] | + +{{% /expand %}} +{{< /expand-wrapper >}} + +## EXPLAIN ANALYZE + +Returns the execution plan and metrics of a statement. +To output more information, use `EXPLAIN ANALYZE VERBOSE`. + +##### Example EXPLAIN ANALYZE + +```sql +EXPLAIN ANALYZE +SELECT + room, + avg(temp) AS temp +FROM home +GROUP BY room +``` + +{{< expand-wrapper >}} +{{% expand "View `EXPLAIN ANALYZE` example output" %}} + +| plan_type | plan | +| :---------------- | :-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| Plan with Metrics | CoalescePartitionsExec, metrics=[output_rows=2, elapsed_compute=8.892µs, spill_count=0, spilled_bytes=0, mem_used=0] ProjectionExec: expr=[room@0 as room, AVG(home.temp)@1 as temp], metrics=[output_rows=2, elapsed_compute=3.608µs, spill_count=0, spilled_bytes=0, mem_used=0] AggregateExec: mode=FinalPartitioned, gby=[room@0 as room], aggr=[AVG(home.temp)], metrics=[output_rows=2, elapsed_compute=121.771µs, spill_count=0, spilled_bytes=0, mem_used=0] CoalesceBatchesExec: target_batch_size=8192, metrics=[output_rows=2, elapsed_compute=23.711µs, spill_count=0, spilled_bytes=0, mem_used=0] RepartitionExec: partitioning=Hash([Column { name: "room", index: 0 }], 4), input_partitions=4, metrics=[repart_time=25.117µs, fetch_time=1.614597ms, send_time=6.705µs] RepartitionExec: partitioning=RoundRobinBatch(4), input_partitions=1, metrics=[repart_time=1ns, fetch_time=319.754µs, send_time=2.067µs] AggregateExec: mode=Partial, gby=[room@0 as room], aggr=[AVG(home.temp)], metrics=[output_rows=2, elapsed_compute=75.615µs, spill_count=0, spilled_bytes=0, mem_used=0] ParquetExec: limit=None, partitions={1 group: [[136/316/1120/1ede0031-e86e-06e5-12ba-b8e6fd76a202.parquet]]}, projection=[room, temp], metrics=[output_rows=26, elapsed_compute=1ns, spill_count=0, spilled_bytes=0, mem_used=0, pushdown_rows_filtered=0, bytes_scanned=290, row_groups_pruned=0, num_predicate_creation_errors=0, predicate_evaluation_errors=0, page_index_rows_filtered=0, time_elapsed_opening=100.37µs, page_index_eval_time=2ns, time_elapsed_scanning_total=157.086µs, time_elapsed_processing=226.644µs, pushdown_eval_time=2ns, time_elapsed_scanning_until_data=116.875µs] | + +{{% /expand %}} +{{< /expand-wrapper >}} \ No newline at end of file diff --git a/content/influxdb/cloud-serverless/reference/sql/functions/_index.md b/content/influxdb/cloud-serverless/reference/sql/functions/_index.md new file mode 100644 index 000000000..845b45591 --- /dev/null +++ b/content/influxdb/cloud-serverless/reference/sql/functions/_index.md @@ -0,0 +1,14 @@ +--- +title: SQL functions +list_title: Functions +description: > + Use SQL functions to transform queried values. +menu: + influxdb_cloud_serverless: + name: Functions + parent: SQL reference + identifier: sql-functions +weight: 220 +--- + +{{< children >}} \ No newline at end of file diff --git a/content/influxdb/cloud-serverless/reference/sql/functions/aggregate.md b/content/influxdb/cloud-serverless/reference/sql/functions/aggregate.md new file mode 100644 index 000000000..19303fa87 --- /dev/null +++ b/content/influxdb/cloud-serverless/reference/sql/functions/aggregate.md @@ -0,0 +1,752 @@ +--- +title: SQL aggregate functions +list_title: Aggregate functions +description: > + Aggregate data with SQL aggregate functions. +menu: + influxdb_cloud_serverless: + name: Aggregate + parent: sql-functions +weight: 301 +related: + - /influxdb/cloud-serverless/query-data/sql/aggregate-select/ +--- + +SQL aggregate functions aggregate values in a specified column for each +group or SQL partition and return a single row per group containing the +aggregate value. + +- [General aggregate functions](#general-aggregate-functions) + - [avg](#avg) + - [count](#count) + - [max](#max) + - [mean](#mean) + - [min](#min) + - [sum](#sum) +- [Statistical aggregate functions](#statistical-aggregate-functions) + - [corr](#corr) + - [covar](#covar) + - [covar_pop](#covar_pop) + - [covar_samp](#covar_samp) + - [stddev](#stddev) + - [stddev_pop](#stddev_pop) + - [stddev_samp](#stddev_samp) + - [var](#var) + - [var_pop](#var_pop) + - [var_samp](#var_samp) +- [Approximate aggregate functions](#approximate-aggregate-functions) + - [approx_distinct](#approx_distinct) + - [approx_median](#approx_median) + - [approx_percentile_cont](#approx_percentile_cont) + - [approx_percentile_cont_with_weight](#approx_percentile_cont_with_weight) + +--- + +## General aggregate functions + +- [avg](#avg) +- [count](#count) +- [max](#max) +- [min](#min) +- [sum](#sum) + +### avg + +Returns the average of numeric values in the specified column. + +```sql +avg(expression) +``` + +##### Arguments + +- **expression**: Expression to operate on. + Can be a constant, column, or function, and any combination of arithmetic operators. + +##### Aliases + +- `mean` + +{{< expand-wrapper >}} +{{% expand "View `avg` query example" %}} + +```sql +SELECT + location, + avg(water_level) AS water_level_avg +FROM h2o_feet +GROUP BY location +``` + +| location | water_level_avg | +| :----------- | -----------------: | +| coyote_creek | 5.359142420303919 | +| santa_monica | 3.5307120942458843 | + +{{% /expand %}} +{{< /expand-wrapper >}} + +### count + +Returns the number of rows in the specified column. + +Count includes _null_ values in the total count. +To exclude _null_ values from the total count, include ` IS NOT NULL` +in the `WHERE` clause. + +```sql +count(expression) +``` + +##### Arguments + +- **expression**: Expression to operate on. + Can be a constant, column, or function, and any combination of arithmetic operators. + +{{< expand-wrapper >}} +{{% expand "View `count` query example" %}} + +```sql +SELECT + location, + count(water_level) AS water_level_count +FROM h2o_feet +GROUP BY location +``` + +| location | water_level_count | +| :----------- | ----------------: | +| coyote_creek | 7604 | +| santa_monica | 7654 | + +{{% /expand %}} +{{< /expand-wrapper >}} + +### max + +Returns the maximum value in the specified column. + +```sql +max(expression) +``` + +_To return both the maximum value and its associated timestamp, use +[`selector_max`](/influxdb/cloud-serverless/reference/sql/functions/selector/#selector_max)._ + +##### Arguments + +- **expression**: Expression to operate on. + Can be a constant, column, or function, and any combination of arithmetic operators. + +{{< expand-wrapper >}} +{{% expand "View `max` query example" %}} + +```sql +SELECT + location, + max(water_level) AS water_level_max +FROM h2o_feet +GROUP BY location +``` + +| location | water_level_max | +| :----------- | --------------: | +| santa_monica | 7.205 | +| coyote_creek | 9.964 | + +{{% /expand %}} +{{< /expand-wrapper >}} + +### mean + +_Alias of [avg](#avg)._ + +### min + +Returns the minimum value in the specified column. + +```sql +min(expression) +``` + +_To return both the minimum value and its associated timestamp, use +[`selector_max`](/influxdb/cloud-serverless/reference/sql/functions/selector/#selector_min)._ + +##### Arguments + +- **expression**: Expression to operate on. + Can be a constant, column, or function, and any combination of arithmetic operators. + +{{< expand-wrapper >}} +{{% expand "View `min` query example" %}} + +```sql +SELECT + location, + min(water_level) AS water_level_min +FROM h2o_feet +GROUP BY location +``` + +| location | water_level_min | +| :----------- | --------------: | +| coyote_creek | -0.61 | +| santa_monica | -0.243 | + +{{% /expand %}} +{{< /expand-wrapper >}} + +### sum + +Returns the sum of all values in the specified column. + +```sql +sum(expression) +``` + +##### Arguments + +- **expression**: Expression to operate on. + Can be a constant, column, or function, and any combination of arithmetic operators. + +{{< expand-wrapper >}} +{{% expand "View `sum` query example" %}} + +```sql +SELECT + location, + sum(water_level) AS water_level_sum +FROM h2o_feet +GROUP BY location +``` + +| location | water_level_sum | +| :----------- | -----------------: | +| santa_monica | 27024.070369358 | +| coyote_creek | 40750.918963991004 | + +{{% /expand %}} +{{< /expand-wrapper >}} + + +## Statistical aggregate functions + +- [corr](#corr) +- [covar](#covar) +- [covar_pop](#covar_pop) +- [covar_samp](#covar_samp) +- [stddev](#stddev) +- [stddev_pop](#stddev_pop) +- [stddev_samp](#stddev_samp) +- [var](#var) +- [var_pop](#var_pop) +- [var_samp](#var_samp) + +### corr + +Returns the coefficient of correlation between two numeric values. + +```sql +corr(expression1, expression2) +``` + +##### Arguments + +- **expression1**: First column or literal value to operate on. +- **expression2**: Second column or literal value to operate on. + +{{< expand-wrapper >}} +{{% expand "View `corr` query example" %}} + +_The following example uses the sample data set provided in +[Get started with InfluxDB tutorial](/influxdb/cloud-serverless/get-started/write/#construct-line-protocol)._ + +```sql +SELECT + room, + corr(hum, temp) AS correlation +FROM home +GROUP BY room +``` + +| room | correlation | +| :---------- | ------------------: | +| Living Room | 0.43665270457835725 | +| Kitchen | 0.6741766954929539 | + +{{% /expand %}} +{{< /expand-wrapper >}} + +### covar + +Returns the covariance of a set of number pairs. + +```sql +covar(expression1, expression2) +``` + +##### Arguments + +- **expression1**: First column or literal value to operate on. +- **expression2**: Second column or literal value to operate on. + +{{< expand-wrapper >}} +{{% expand "View `covar` query example" %}} + +_The following example uses the sample data set provided in +[Get started with InfluxDB tutorial](/influxdb/cloud-serverless/get-started/write/#construct-line-protocol)._ + +```sql +SELECT + room, + covar(hum, temp) AS covar +FROM home +GROUP BY room +``` + +| room | covar | +| :---------- | ------------------: | +| Living Room | 0.03346153846153959 | +| Kitchen | 0.11134615384615432 | + +{{% /expand %}} +{{< /expand-wrapper >}} + +### covar_pop + +Returns the population covariance of a set of number pairs. + +```sql +covar_pop(expression1, expression2) +``` + +##### Arguments + +- **expression1**: First column or literal value to operate on. +- **expression2**: Second column or literal value to operate on. + +{{< expand-wrapper >}} +{{% expand "View `covar_pop` query example" %}} + +_The following example uses the sample data set provided in +[Get started with InfluxDB tutorial](/influxdb/cloud-serverless/get-started/write/#construct-line-protocol)._ + +```sql +SELECT + room, + covar_pop(hum, temp) AS covar_pop +FROM home +GROUP BY room +``` + +| room | covar_pop | +| :---------- | -------------------: | +| Kitchen | 0.10278106508875783 | +| Living Room | 0.030887573964498087 | + +{{% /expand %}} +{{< /expand-wrapper >}} + +### covar_samp + +Returns the sample covariance of a set of number pairs. + +```sql +covar_samp(expression1, expression2) +``` + +##### Arguments + +- **expression1**: First column or literal value to operate on. +- **expression2**: Second column or literal value to operate on. + +{{< expand-wrapper >}} +{{% expand "View `covar_samp` query example" %}} + +_The following example uses the sample data set provided in +[Get started with InfluxDB tutorial](/influxdb/cloud-serverless/get-started/write/#construct-line-protocol)._ + +```sql +SELECT + room, + covar_samp(hum, temp) AS covar_samp +FROM home +GROUP BY room +``` + +| room | covar_samp | +| :---------- | ------------------: | +| Kitchen | 0.11134615384615432 | +| Living Room | 0.03346153846153959 | + +{{% /expand %}} +{{< /expand-wrapper >}} + +### stddev + +Returns the standard deviation of a set of numbers. + +```sql +stddev(expression) +``` + +##### Arguments + +- **expression**: Expression to operate on. + Can be a constant, column, or function, and any combination of arithmetic operators. + +{{< expand-wrapper >}} +{{% expand "View `stddev` query example" %}} + +_The following example uses the sample data set provided in +[Get started with InfluxDB tutorial](/influxdb/cloud-serverless/get-started/write/#construct-line-protocol)._ + +```sql +SELECT + room, + stddev(co) AS stddev +FROM home +GROUP BY room +``` + +| room | stddev | +| :---------- | ----------------: | +| Living Room | 5.885662718931967 | +| Kitchen | 9.321879418735037 | + +{{% /expand %}} +{{< /expand-wrapper >}} + +### stddev_pop + +Returns the population standard deviation of a set of numbers. + +```sql +stddev_pop(expression) +``` + +##### Arguments + +- **expression**: Expression to operate on. + Can be a constant, column, or function, and any combination of arithmetic operators. + +{{< expand-wrapper >}} +{{% expand "View `stddev_pop` query example" %}} + +_The following example uses the sample data set provided in +[Get started with InfluxDB tutorial](/influxdb/cloud-serverless/get-started/write/#construct-line-protocol)._ + +```sql +SELECT + room, + stddev_pop(co) AS stddev_pop +FROM home +GROUP BY room +``` + +| room | stddev_pop | +| :---------- | ----------------: | +| Kitchen | 8.956172047894082 | +| Living Room | 5.654761830612032 | + +{{% /expand %}} +{{< /expand-wrapper >}} + +### stddev_samp + +Returns the sample standard deviation of a set of numbers. + +```sql +stddev_samp(expression) +``` + +##### Arguments + +- **expression**: Expression to operate on. + Can be a constant, column, or function, and any combination of arithmetic operators. + +{{< expand-wrapper >}} +{{% expand "View `stddev_samp` query example" %}} + +_The following example uses the sample data set provided in +[Get started with InfluxDB tutorial](/influxdb/cloud-serverless/get-started/write/#construct-line-protocol)._ + +```sql +SELECT + room, + stddev_samp(co) AS stddev_samp +FROM home +GROUP BY room +``` + +| room | stddev_samp | +| :---------- | ----------------: | +| Living Room | 5.885662718931967 | +| Kitchen | 9.321879418735037 | + +{{% /expand %}} +{{< /expand-wrapper >}} + +### var + +Returns the statistical variance of a set of numbers. + +```sql +var(expression) +``` + +##### Arguments + +- **expression**: Expression to operate on. + Can be a constant, column, or function, and any combination of arithmetic operators. + +{{< expand-wrapper >}} +{{% expand "View `var` query example" %}} + +_The following example uses the sample data set provided in +[Get started with InfluxDB tutorial](/influxdb/cloud-serverless/get-started/write/#construct-line-protocol)._ + +```sql +SELECT + room, + var(co) AS var +FROM home +GROUP BY room +``` + +| room | var | +| :---------- | ----------------: | +| Living Room | 34.64102564102564 | +| Kitchen | 86.89743589743587 | + +{{% /expand %}} +{{< /expand-wrapper >}} + +### var_pop + +Returns the statistical population variance of a set of numbers. + +```sql +var_pop(expression) +``` + +##### Arguments + +- **expression**: Expression to operate on. + Can be a constant, column, or function, and any combination of arithmetic operators. + +{{< expand-wrapper >}} +{{% expand "View `var_pop` query example" %}} + +_The following example uses the sample data set provided in +[Get started with InfluxDB tutorial](/influxdb/cloud-serverless/get-started/write/#construct-line-protocol)._ + +```sql +SELECT + room, + var_pop(co) AS var_pop +FROM home +GROUP BY room +``` + +| room | var_pop | +| :---------- | -----------------: | +| Living Room | 31.976331360946745 | +| Kitchen | 80.21301775147927 | + +{{% /expand %}} +{{< /expand-wrapper >}} + +### var_samp + +Returns the statistical sample variance of a set of numbers. + +```sql +var_samp(expression) +``` + +##### Arguments + +- **expression**: Expression to operate on. + Can be a constant, column, or function, and any combination of arithmetic operators. + +{{< expand-wrapper >}} +{{% expand "View `var_samp` query example" %}} + +_The following example uses the sample data set provided in +[Get started with InfluxDB tutorial](/influxdb/cloud-serverless/get-started/write/#construct-line-protocol)._ + +```sql +SELECT + room, + var_samp(co) AS var_samp +FROM home +GROUP BY room +``` + +| room | var_samp | +| :---------- | ----------------: | +| Kitchen | 86.89743589743587 | +| Living Room | 34.64102564102564 | + +{{% /expand %}} +{{< /expand-wrapper >}} + +## Approximate aggregate functions + +- [approx_distinct](#approx_distinct) +- [approx_median](#approx_median) +- [approx_percentile_cont](#approx_percentile_cont) +- [approx_percentile_cont_with_weight](#approx_percentile_cont_with_weight) + +### approx_distinct + +Returns the approximate number of distinct input values calculated using the +HyperLogLog algorithm. + +```sql +approx_distinct(expression) +``` + +##### Arguments + +- **expression**: Expression to operate on. + Can be a constant, column, or function, and any combination of arithmetic operators. + +{{< expand-wrapper >}} +{{% expand "View `approx_distinct` query example" %}} + +_The following example uses the sample data set provided in +[Get started with InfluxDB tutorial](/influxdb/cloud-serverless/get-started/write/#construct-line-protocol)._ + +```sql +SELECT + room, + approx_distinct(co::string) AS approx_distinct +FROM home +GROUP BY room +``` + +| room | approx_distinct | +| :---------- | --------------: | +| Living Room | 7 | +| Kitchen | 8 | + +{{% /expand %}} +{{< /expand-wrapper >}} + +### approx_median + +Returns the approximate median (50th percentile) of input values. +It is an alias of `approx_percentile_cont(x, 0.5)`. + +```sql +approx_median(expression) +``` + +##### Arguments + +- **expression**: Expression to operate on. + Can be a constant, column, or function, and any combination of arithmetic operators. + +{{< expand-wrapper >}} +{{% expand "View `approx_median` query example" %}} + +_The following example uses the sample data set provided in +[Get started with InfluxDB tutorial](/influxdb/cloud-serverless/get-started/write/#construct-line-protocol)._ + +```sql +SELECT + room, + approx_median(temp) AS approx_median +FROM home +GROUP BY room +``` + +| room | approx_median | +| :---------- | ------------: | +| Kitchen | 22.7 | +| Living Room | 22.3 | + +{{% /expand %}} +{{< /expand-wrapper >}} + +### approx_percentile_cont + +Returns the approximate percentile of input values using the t-digest algorithm. + +```sql +approx_percentile_cont(expression, percentile, centroids) +``` + +##### Arguments + +- **expression**: Expression to operate on. + Can be a constant, column, or function, and any combination of arithmetic operators. +- **percentile**: Percentile to compute. Must be a float value between 0 and 1 (inclusive). +- **centroids**: Number of centroids to use in the t-digest algorithm. _Default is 100_. + + If there are this number or fewer unique values, you can expect an exact result. + A higher number of centroids results in a more accurate approximation, but + requires more memory to compute. + +{{< expand-wrapper >}} +{{% expand "View `approx_percentile_cont` query example" %}} + +_The following example uses the sample data set provided in +[Get started with InfluxDB tutorial](/influxdb/cloud-serverless/get-started/write/#construct-line-protocol)._ + +```sql +SELECT + room, + approx_percentile_cont(temp, 0.99) AS "99th_percentile" +FROM home +GROUP BY room +``` + +| room | 99th_percentile | +| :---------- | --------------: | +| Kitchen | 23.3 | +| Living Room | 22.8 | + +{{% /expand %}} +{{< /expand-wrapper >}} + +### approx_percentile_cont_with_weight + +Returns the weighted approximate percentile of input values using the +t-digest algorithm. + +```sql +approx_percentile_cont_with_weight(expression, weight, percentile) +``` + +##### Arguments + +- **expression**: Expression to operate on. + Can be a constant, column, or function, and any combination of arithmetic operators. +- **weight**: Expression to use as weight. + Can be a constant, column, or function, and any combination of arithmetic operators. +- **percentile**: Percentile to compute. Must be a float value between 0 and 1 (inclusive). + +{{< expand-wrapper >}} +{{% expand "View `approx_percentile_cont_with_weight` query example" %}} + +_The following example uses the sample data set provided in +[Get started with InfluxDB tutorial](/influxdb/cloud-serverless/get-started/write/#construct-line-protocol)._ + +```sql +SELECT + room, + approx_percentile_cont_with_weight(temp, co, 0.99) AS "co_weighted_99th_percentile" +FROM home +GROUP BY room +``` + +| room | co_weighted_99th_percentile | +| :---------- | --------------------------: | +| Kitchen | 23.3 | +| Living Room | 22.8 | + +{{% /expand %}} +{{< /expand-wrapper >}} diff --git a/content/influxdb/cloud-serverless/reference/sql/functions/conditional.md b/content/influxdb/cloud-serverless/reference/sql/functions/conditional.md new file mode 100644 index 000000000..8e5a07209 --- /dev/null +++ b/content/influxdb/cloud-serverless/reference/sql/functions/conditional.md @@ -0,0 +1,100 @@ +--- +title: SQL conditional functions +list_title: Conditional functions +description: > + Use conditional functions to conditionally handle null values in SQL queries. +menu: + influxdb_cloud_serverless: + name: Conditional + parent: sql-functions +weight: 306 +--- + +The InfluxDB SQL implementation supports the following conditional functions for +conditionally handling _null_ values: + +- [coalesce](#coalesce) +- [nullif](#nullif) + +## coalesce + +Returns the first of its arguments that is not _null_. +Returns _null_ if all arguments are _null_. +This function is often used to substitute a default value for _null_ values. + +```sql +coalesce(expression1[, ..., expression_n]) +``` + +##### Arguments + +- **expression1, expression_n**: + Expression to use if previous expressions are _null_. + Can be a constant, column, or function, and any combination of arithmetic operators. + Pass as many expression arguments as necessary. + +{{< expand-wrapper >}} +{{% expand "View `coalesce` query example" %}} + +```sql +SELECT + val1, + val2, + val3, + coalesce(val1, val2, val3, 'quz') AS coalesce +FROM + (values ('foo', 'bar', 'baz'), + (NULL, 'bar', 'baz'), + (NULL, NULL, 'baz'), + (NULL, NULL, NULL) + ) data(val1, val2, val3) +``` + +| val1 | val2 | val3 | coalesce | +| :--: | :--: | :--: | :------: | +| foo | bar | baz | foo | +| | bar | baz | bar | +| | | baz | baz | +| | | | quz | + +{{% /expand %}} +{{< /expand-wrapper >}} + +## nullif + +Returns _null_ if _expression1_ equals _expression2_; otherwise it returns _expression1_. +This can be used to perform the inverse operation of [`coalesce`](#coalesce). + +```sql +nullif(expression1, expression2) +``` + +##### Arguments + +- **expression1**: Expression to compare and return if equal to expression2. + Can be a constant, column, or function, and any combination of arithmetic operators. +- **expression2**: Expression to compare to expression1. + Can be a constant, column, or function, and any combination of arithmetic operators. + +{{< expand-wrapper >}} +{{% expand "View `nullif` query example" %}} + +```sql +SELECT + value, + nullif(value, 'baz') AS nullif +FROM + (values ('foo'), + ('bar'), + ('baz') + ) data(value) +``` + +| value | nullif | +| :---- | :----- | +| foo | foo | +| bar | bar | +| baz | | + +{{% /expand %}} +{{< /expand-wrapper >}} diff --git a/content/influxdb/cloud-serverless/reference/sql/functions/math.md b/content/influxdb/cloud-serverless/reference/sql/functions/math.md new file mode 100644 index 000000000..be9001730 --- /dev/null +++ b/content/influxdb/cloud-serverless/reference/sql/functions/math.md @@ -0,0 +1,681 @@ +--- +title: SQL math functions +list_title: Math functions +description: > + Use math functions to perform mathematical operations in SQL queries. +menu: + influxdb_cloud_serverless: + name: Math + parent: sql-functions +weight: 306 +--- + +The InfluxDB SQL implementation supports the following math functions for +performing mathematic operations: + +- [abs](#abs) +- [acos](#acos) +- [asin](#asin) +- [atan](#atan) +- [atan2](#atan2) +- [ceil](#ceil) +- [cos](#cos) +- [exp](#exp) +- [floor](#floor) +- [ln](#ln) +- [log10](#log10) +- [log2](#log2) +- [power](#power) +- [random](#random) +- [round](#round) +- [signum](#signum) +- [sin](#sin) +- [sqrt](#sqrt) +- [tan](#tan) +- [trunc](#trunc) + +## abs + +Returns the absolute value of a number. + +```sql +abs(numeric_expression) +``` + +##### Arguments + +- **numeric_expression**: Numeric expression to operate on. + Can be a constant, column, or function, and any combination of arithmetic operators. + +{{< expand-wrapper >}} +{{% expand "View `abs` query example" %}} + +_The following example uses the sample data set provided in +[Get started with InfluxDB tutorial](/influxdb/cloud-serverless/get-started/write/#construct-line-protocol)._ + +```sql +SELECT abs(temp) AS abs FROM home LIMIT 3 +``` + +| abs | +| ---: | +| 21 | +| 23 | +| 22.7 | + +{{% /expand %}} +{{< /expand-wrapper >}} + +## acos + +Returns the arc cosine or inverse cosine of a number. + +```sql +acos(numeric_expression) +``` + +##### Arguments + +- **numeric_expression**: Numeric expression to operate on. + Can be a constant, column, or function, and any combination of arithmetic operators. + +{{< expand-wrapper >}} +{{% expand "View `acos` query example" %}} + +_The following example uses the sample data set provided in +[Get started with InfluxDB tutorial](/influxdb/cloud-serverless/get-started/write/#construct-line-protocol)._ + +```sql +SELECT acos(temp * .01) AS acos FROM home LIMIT 3 +``` + +| acos | +| -----------------: | +| 1.359221367036801 | +| 1.3387186439321834 | +| 1.3418001704498232 | + +{{% /expand %}} +{{< /expand-wrapper >}} + +## asin + +Returns the arc sine or inverse sine of a number. + +```sql +asin(numeric_expression) +``` + +##### Arguments + +- **numeric_expression**: Numeric expression to operate on. + Can be a constant, column, or function, and any combination of arithmetic operators. + +{{< expand-wrapper >}} +{{% expand "View `asin` query example" %}} + +_The following example uses the sample data set provided in +[Get started with InfluxDB tutorial](/influxdb/cloud-serverless/get-started/write/#construct-line-protocol)._ + +```sql +SELECT asin(temp * .01) AS asin FROM home LIMIT 3 +``` + +| asin | +| ------------------: | +| 0.2115749597580956 | +| 0.23207768286271319 | +| 0.22899615634507337 | + +{{% /expand %}} +{{< /expand-wrapper >}} + +## atan + +Returns the arc tangent or inverse tangent of a number. + +```sql +atan(numeric_expression) +``` + +##### Arguments + +- **numeric_expression**: Numeric expression to operate on. + Can be a constant, column, or function, and any combination of arithmetic operators. + +{{< expand-wrapper >}} +{{% expand "View `atan` query example" %}} + +_The following example uses the sample data set provided in +[Get started with InfluxDB tutorial](/influxdb/cloud-serverless/get-started/write/#construct-line-protocol)._ + +```sql +SELECT atan(temp * .01) AS atan FROM home LIMIT 3 +``` + +| atan | +| ------------------: | +| 0.206992194219821 | +| 0.22606838799388393 | +| 0.22321725383717603 | + +{{% /expand %}} +{{< /expand-wrapper >}} + +## atan2 + +Returns the arc tangent or inverse tangent of `expression_y / expression_x`. + +```sql +atan2(expression_y, expression_x) +``` + +##### Arguments + +- **expression_y**: First numeric expression to operate on. + Can be a constant, column, or function, and any combination of arithmetic operators. +- **expression_x**: Second numeric expression to operate on. + Can be a constant, column, or function, and any combination of arithmetic operators. + +{{< expand-wrapper >}} +{{% expand "View `atan2` query example" %}} + +_The following example uses the sample data set provided in +[Get started with InfluxDB tutorial](/influxdb/cloud-serverless/get-started/write/#construct-line-protocol)._ + +```sql +SELECT atan2(temp, hum) AS atan2 FROM home LIMIT 3 +``` + +| atan2 | +| -----------------: | +| 0.5292859396993504 | +| 0.5660139100632452 | +| 0.5613335864315844 | + +{{% /expand %}} +{{< /expand-wrapper >}} + +## ceil + +Returns the nearest integer greater than or equal to a number. + +```sql +ceil(numeric_expression) +``` + +##### Arguments + +- **numeric_expression**: Numeric expression to operate on. + Can be a constant, column, or function, and any combination of arithmetic operators. + +{{< expand-wrapper >}} +{{% expand "View `ceil` query example" %}} + +_The following example uses the sample data set provided in +[Get started with InfluxDB tutorial](/influxdb/cloud-serverless/get-started/write/#construct-line-protocol)._ + +```sql +SELECT ceil(temp) AS ceil FROM home LIMIT 3 +``` + +| ceil | +| ---: | +| 21 | +| 23 | +| 23 | + +{{% /expand %}} +{{< /expand-wrapper >}} + +## cos + +Returns the cosine of a number. + +```sql +cos(numeric_expression) +``` + +##### Arguments + +- **numeric_expression**: Numeric expression to operate on. + Can be a constant, column, or function, and any combination of arithmetic operators. + +{{< expand-wrapper >}} +{{% expand "View `cos` query example" %}} + +_The following example uses the sample data set provided in +[Get started with InfluxDB tutorial](/influxdb/cloud-serverless/get-started/write/#construct-line-protocol)._ + +```sql +SELECT cos(temp) AS cos FROM home LIMIT 3 +``` + +| cos | +| ------------------: | +| -0.5477292602242684 | +| -0.5328330203333975 | +| -0.7591100556583898 | + +{{% /expand %}} +{{< /expand-wrapper >}} + +## exp + +Returns the base-e exponential of a number. + +```sql +exp(numeric_expression) +``` + +##### Arguments + +- **numeric_expression**: Numeric expression to use as the exponent. + Can be a constant, column, or function, and any combination of arithmetic operators. + +{{< expand-wrapper >}} +{{% expand "View `exp` query example" %}} + +_The following example uses the sample data set provided in +[Get started with InfluxDB tutorial](/influxdb/cloud-serverless/get-started/write/#construct-line-protocol)._ + +```sql +SELECT exp(temp) AS exp FROM home LIMIT 3 +``` + +| exp | +| -----------------: | +| 1318815734.4832146 | +| 9744803446.248903 | +| 7219127949.943179 | + +{{% /expand %}} +{{< /expand-wrapper >}} + +## floor + +Returns the nearest integer less than or equal to a number. + +```sql +floor(numeric_expression) +``` + +##### Arguments + +- **numeric_expression**: Numeric expression to operate on. + Can be a constant, column, or function, and any combination of arithmetic operators. + +{{< expand-wrapper >}} +{{% expand "View `floor` query example" %}} + +_The following example uses the sample data set provided in +[Get started with InfluxDB tutorial](/influxdb/cloud-serverless/get-started/write/#construct-line-protocol)._ + +```sql +SELECT floor(temp) AS floor FROM home LIMIT 3 +``` + +| floor | +| ----: | +| 21 | +| 23 | +| 22 | + +{{% /expand %}} +{{< /expand-wrapper >}} + +## ln + +Returns the natural logarithm of a number. + +```sql +ln(numeric_expression) +``` + +##### Arguments + +- **numeric_expression**: Numeric expression to operate on. + Can be a constant, column, or function, and any combination of arithmetic operators. + +{{< expand-wrapper >}} +{{% expand "View `ln` query example" %}} + +_The following example uses the sample data set provided in +[Get started with InfluxDB tutorial](/influxdb/cloud-serverless/get-started/write/#construct-line-protocol)._ + +```sql +SELECT ln(temp) AS ln FROM home LIMIT 3 +``` + +| ln | +| -----------------: | +| 3.044522437723423 | +| 3.1354942159291497 | +| 3.122364924487357 | + +{{% /expand %}} +{{< /expand-wrapper >}} + +## log10 + +Returns the base-10 logarithm of a number. + +```sql +log10(numeric_expression) +``` + +##### Arguments + +- **numeric_expression**: Numeric expression to operate on. + Can be a constant, column, or function, and any combination of arithmetic operators. + +{{< expand-wrapper >}} +{{% expand "View `log10` query example" %}} + +_The following example uses the sample data set provided in +[Get started with InfluxDB tutorial](/influxdb/cloud-serverless/get-started/write/#construct-line-protocol)._ + +```sql +SELECT log10(temp) AS log10 FROM home LIMIT 3 +``` + +| log10 | +| -----------------: | +| 1.3222192947339193 | +| 1.3617278360175928 | +| 1.3560258571931227 | + +{{% /expand %}} +{{< /expand-wrapper >}} + +## log2 + +Returns the base-2 logarithm or a number. + +```sql +log2(numeric_expression) +``` + +##### Arguments + +- **numeric_expression**: Numeric expression to operate on. + Can be a constant, column, or function, and any combination of arithmetic operators. + +{{< expand-wrapper >}} +{{% expand "View `log2` query example" %}} + +_The following example uses the sample data set provided in +[Get started with InfluxDB tutorial](/influxdb/cloud-serverless/get-started/write/#construct-line-protocol)._ + +```sql +SELECT log2(temp) AS log2 FROM home LIMIT 3 +``` + +| log2 | +| ----------------: | +| 4.392317422778761 | +| 4.523561956057013 | +| 4.504620392403552 | + +{{% /expand %}} +{{< /expand-wrapper >}} + +## power + +Returns a base number raised to the power of an exponent. + +```sql +power(base, exponent) +``` + +##### Arguments + +- **power**: Base numeric expression to operate on. + Can be a constant, column, or function, and any combination of arithmetic operators. +- **exponent**: Exponent numeric expression to operate on. + Can be a constant, column, or function, and any combination of arithmetic operators. + +{{< expand-wrapper >}} +{{% expand "View `power` query example" %}} + +_The following example uses the sample data set provided in +[Get started with InfluxDB tutorial](/influxdb/cloud-serverless/get-started/write/#construct-line-protocol)._ + +```sql +SELECT power(temp, hum * .1) AS power FROM home LIMIT 3 +``` + +| power | +| -----------------: | +| 55817.099910217476 | +| 85007.01501569824 | +| 78569.38332452129 | + +{{% /expand %}} +{{< /expand-wrapper >}} + +## random + +Returns a random float value between 0 and 1. +The random seed is unique to each row. + +```sql +random() +``` + +{{< expand-wrapper >}} +{{% expand "View `random` query example" %}} + +_The following example uses the sample data set provided in +[Get started with InfluxDB tutorial](/influxdb/cloud-serverless/get-started/write/#construct-line-protocol)._ + +```sql +SELECT temp * random() AS random FROM home LIMIT 3 +``` + +{{% note %}} +Due to the nature of the function, your results will not match the results below. +{{% /note %}} + +| random | +| -----------------: | +| 0.5030770374815072 | +| 12.938847036567514 | +| 2.8204596545385385 | + +{{% /expand %}} +{{< /expand-wrapper >}} + +## round + +Rounds a number to the nearest integer. + +```sql +round(numeric_expression) +``` + +##### Arguments + +- **numeric_expression**: Numeric expression to operate on. + Can be a constant, column, or function, and any combination of arithmetic operators. + +{{< expand-wrapper >}} +{{% expand "View `round` query example" %}} + +_The following example uses the sample data set provided in +[Get started with InfluxDB tutorial](/influxdb/cloud-serverless/get-started/write/#construct-line-protocol)._ + +```sql +SELECT round(temp) AS round FROM home LIMIT 3 +``` + +| round | +| ----: | +| 21 | +| 23 | +| 23 | + +{{% /expand %}} +{{< /expand-wrapper >}} + +## signum + +Returns the sign of a number. +Negative numbers return `-1`. +Zero and positive numbers return `1`. + +```sql +signum(numeric_expression) +``` + +##### Arguments + +- **numeric_expression**: Numeric expression to operate on. + Can be a constant, column, or function, and any combination of arithmetic operators. + +{{< expand-wrapper >}} +{{% expand "View `signum` query example" %}} + +_The following example uses the sample data set provided in +[Get started with InfluxDB tutorial](/influxdb/cloud-serverless/get-started/write/#construct-line-protocol)._ + +```sql +SELECT signum(temp - 23) AS signum FROM home LIMIT 3 +``` + +| signum | +| -----: | +| -1 | +| 1 | +| -1 | + +{{% /expand %}} +{{< /expand-wrapper >}} + +## sin + +Returns the sine of a number. + +```sql +sin(numeric_expression) +``` + +##### Arguments + +- **numeric_expression**: Numeric expression to operate on. + Can be a constant, column, or function, and any combination of arithmetic operators. + +{{< expand-wrapper >}} +{{% expand "View `sin` query example" %}} + +_The following example uses the sample data set provided in +[Get started with InfluxDB tutorial](/influxdb/cloud-serverless/get-started/write/#construct-line-protocol)._ + +```sql +SELECT sin(temp) AS sin FROM home LIMIT 3 +``` + +| sin | +| ------------------: | +| 0.8366556385360561 | +| -0.8462204041751706 | +| -0.6509623056662469 | + +{{% /expand %}} +{{< /expand-wrapper >}} + +## sqrt + +Returns the square root of a number. + +```sql +sqrt(numeric_expression) +``` + +##### Arguments + +- **numeric_expression**: Numeric expression to operate on. + Can be a constant, column, or function, and any combination of arithmetic operators. + +{{< expand-wrapper >}} +{{% expand "View `sqrt` query example" %}} + +_The following example uses the sample data set provided in +[Get started with InfluxDB tutorial](/influxdb/cloud-serverless/get-started/write/#construct-line-protocol)._ + +```sql +SELECT sqrt(temp) AS sqrt FROM home LIMIT 3 +``` + +| sqrt | +| ----------------: | +| 4.58257569495584 | +| 4.795831523312719 | +| 4.764451699828638 | + +{{% /expand %}} +{{< /expand-wrapper >}} + +## tan + +Returns the tangent of a number. + +```sql +tan(numeric_expression) +``` + +##### Arguments + +- **numeric_expression**: Numeric expression to operate on. + Can be a constant, column, or function, and any combination of arithmetic operators. + +{{< expand-wrapper >}} +{{% expand "View `tan` query example" %}} + +_The following example uses the sample data set provided in +[Get started with InfluxDB tutorial](/influxdb/cloud-serverless/get-started/write/#construct-line-protocol)._ + +```sql +SELECT tan(temp) AS tan FROM home LIMIT 3 +``` + +| tan | +| ------------------: | +| -1.5274985276366035 | +| 1.5881530833912738 | +| 0.8575335036257101 | + +{{% /expand %}} +{{< /expand-wrapper >}} + +## trunc + +Truncates a number toward zero (at the decimal point). + +```sql +trunc(numeric_expression) +``` + +##### Arguments + +- **numeric_expression**: Numeric expression to operate on. + Can be a constant, column, or function, and any combination of arithmetic operators. + +{{< expand-wrapper >}} +{{% expand "View `trunc` query example" %}} + +_The following example uses the sample data set provided in +[Get started with InfluxDB tutorial](/influxdb/cloud-serverless/get-started/write/#construct-line-protocol)._ + +```sql +SELECT trunc(temp) AS trunc FROM home LIMIT 3 +``` + +| trunc | +| ----: | +| 21 | +| 23 | +| 22 | + +{{% /expand %}} +{{< /expand-wrapper >}} diff --git a/content/influxdb/cloud-serverless/reference/sql/functions/misc.md b/content/influxdb/cloud-serverless/reference/sql/functions/misc.md new file mode 100644 index 000000000..1e9755af6 --- /dev/null +++ b/content/influxdb/cloud-serverless/reference/sql/functions/misc.md @@ -0,0 +1,122 @@ +--- +title: Miscellaneous SQL functions +list_title: Miscellaneous functions +description: > + Use miscellaneous SQL functions to perform a variety of operations in SQL queries. +menu: + influxdb_cloud_serverless: + name: Miscellaneous + parent: sql-functions +weight: 310 +--- + +The InfluxDB SQL implementation supports the following miscellaneous functions +for performing a variety of operations: + +- [arrow_cast](#arrow_cast) +- [arrow_typeof](#arrow_typeof) + + +### `arrow_cast` + +Casts a value to a specific Arrow data type. + +```sql +arrow_cast(expression, datatype) +``` + +#### Arguments + +- **expression**: Expression to cast. + Can be a constant, column, or function, and any combination of arithmetic or + string operators. +- **datatype**: [Arrow data type](https://arrow.apache.org/datafusion/user-guide/sql/data_types.html) + to cast to. + +{{< expand-wrapper >}} +{{% expand "View `arrow_cast` query example" %}} + +_The following example uses the sample data set provided in +[Get started with InfluxDB tutorial](/influxdb/cloud-serverless/get-started/write/#construct-line-protocol)._ + +```sql +SELECT + arrow_cast(time, 'Int64') AS time, + arrow_cast(temp, 'Utf8') AS temp, + arrow_cast(co, 'Float64')AS co +FROM home +LIMIT 1 +``` + +| time | temp | co | +| :------------------ | ---: | --: | +| 1641024000000000000 | 21.0 | 0 | + +{{% /expand %}} +{{< /expand-wrapper >}} + +## arrow_typeof + +Returns the underlying [Arrow data type](https://arrow.apache.org/datafusion/user-guide/sql/data_types.html) +of the the expression: + +```sql +arrow_typeof(expression) +``` + +##### Arguments + +- **expression**: Expression to evaluate. + Can be a constant, column, or function, and any combination of arithmetic or + string operators. + +{{< expand-wrapper >}} +{{% expand "View `arrow_typeof` query example" %}} + +_The following example uses the sample data set provided in +[Get started with InfluxDB tutorial](/influxdb/cloud-serverless/get-started/write/#construct-line-protocol)._ + +```sql +SELECT + arrow_typeof(time) AS time, + arrow_typeof(room) AS room, + arrow_typeof(temp) AS temp, + arrow_typeof(co) AS co +FROM home +LIMIT 1 +``` + +| time | room | temp | co | +| :-------------------------- | :---------------------- | :------ | :---- | +| Timestamp(Nanosecond, None) | Dictionary(Int32, Utf8) | Float64 | Int64 | + +{{% /expand %}} +{{< /expand-wrapper >}} + + diff --git a/content/influxdb/cloud-serverless/reference/sql/functions/regular-expression.md b/content/influxdb/cloud-serverless/reference/sql/functions/regular-expression.md new file mode 100644 index 000000000..df8f8fb51 --- /dev/null +++ b/content/influxdb/cloud-serverless/reference/sql/functions/regular-expression.md @@ -0,0 +1,105 @@ +--- +title: SQL regular expression functions +list_title: Regular expression functions +description: > + Use regular expression functions to operate on data in SQL queries. +menu: + influxdb_cloud_serverless: + name: Regular expression + parent: sql-functions +weight: 308 +influxdb/cloud-serverless/tags: [regular expressions, sql] +--- + +The InfluxDB SQL implementation uses the POSIX regular expression syntax and +supports the following regular expression functions: + +- [regexp_match](#regexp_match) +- [regexp_replace](#regexp_replace) + +## regexp_match + +Returns a list of regular expression matches in a string. + +```sql +regexp_match(str, regexp, flags) +``` + +##### Arguments + +- **str**: String expression to operate on. + Can be a constant, column, or function, and any combination of string operators. +- **regexp**: Regular expression to match against. + Can be a constant, column, or function. +- **flags**: Regular expression flags that control the behavior of the + regular expression. The following flags are supported. + - **i**: (insensitive) Ignore case when matching. + +{{< expand-wrapper >}} +{{% expand "View `regexp_replace` query example" %}} + +_The following example uses the sample data set provided in +[Get started with InfluxDB tutorial](/influxdb/cloud-serverless/get-started/write/#construct-line-protocol)._ + +{{% note %}} +`regexp_match` returns a _list_ Arrow type, which is not supported by InfluxDB. +Use _bracket notation_ to reference a value in the list. +Lists use 1-based indexing. +{{% /note %}} + +```sql +SELECT DISTINCT + room, + regexp_match(room::STRING, '.{3}')[1] AS regexp_match +FROM home +``` + +| room | regexp_match | +| :---------- | :----------- | +| Kitchen | Kit | +| Living Room | Liv | + +{{% /expand %}} +{{< /expand-wrapper >}} + +## regexp_replace + +Replaces substrings in a string that match a regular expression. + +```sql +regexp_replace(str, regexp, replacement, flags) +``` + +##### Arguments + +- **str**: String expression to operate on. + Can be a constant, column, or function, and any combination of string operators. +- **regexp**: Regular expression to match against. + Can be a constant, column, or function. +- **replacement**: Replacement string expression. + Can be a constant, column, or function, and any combination of string operators. +- **flags**: Regular expression flags that control the behavior of the + regular expression. The following flags are supported. + - **g**: (global) Search globally and don't return after the first match. + - **i**: (insensitive) Ignore case when matching. + +{{< expand-wrapper >}} +{{% expand "View `regexp_replace` query example" %}} + +_The following example uses the sample data set provided in +[Get started with InfluxDB tutorial](/influxdb/cloud-serverless/get-started/write/#construct-line-protocol)._ + +```sql +SELECT DISTINCT + room, + regexp_replace(room::STRING, '\sRoom', '', 'gi') AS regexp_replace +FROM home +``` + +| room | regexp_replace | +| :---------- | :------------- | +| Kitchen | Kitchen | +| Living Room | Living | + +{{% /expand %}} +{{< /expand-wrapper >}} diff --git a/content/influxdb/cloud-serverless/reference/sql/functions/selector.md b/content/influxdb/cloud-serverless/reference/sql/functions/selector.md new file mode 100644 index 000000000..ed344c556 --- /dev/null +++ b/content/influxdb/cloud-serverless/reference/sql/functions/selector.md @@ -0,0 +1,200 @@ +--- +title: SQL selector functions +list_title: Selector functions +description: > + Select data with SQL selector functions. +menu: + influxdb_cloud_serverless: + name: Selector + parent: sql-functions +weight: 302 +related: + - /influxdb/cloud-serverless/query-data/sql/aggregate-select/ +--- + +SQL selector functions are designed to work with time series data. +They behave similarly to aggregate functions in that they take a collection of +data and return a single value. +However, selectors are unique in that they return a _struct_ that contains +a **time value** in addition to the computed value. + +- [How do selector functions work?](#how-do-selector-functions-work) +- [Selector functions](#selector-functions) + - [selector_min](#selector_min) + - [selector_max](#selector_max) + - [selector_first](#selector_first) + - [selector_last](#selector_last) + +## How do selector functions work? + +Each selector function returns an [Arrow _struct_](https://arrow.apache.org/docs/format/Columnar.html#struct-layout) +(similar to a JSON object) representing a single time and value from the +specified column in the each group. +What time and value get returned depend on the logic in the selector function. +For example, `selector_first` returns the value of specified column in the first row of the group. +`selector_max` returns the maximum value of the specified column in the group. + +### Selector struct schema + +The struct returned from a selector function has two properties: + +- **time**: `time` value in the selected row +- **value**: value of the specified column in the selected row + +```js +{time: 2023-01-01T00:00:00Z, value: 72.1} +``` + +### Selector functions in use + +In your `SELECT` statement, execute a selector function and use bracket notation +to reference properties of the [returned struct](#selector-struct-schema) to +populate the column value: + +```sql +SELECT + selector_first(temp, time)['time'] AS time, + selector_first(temp, time)['value'] AS temp, + room +FROM home +GROUP BY room +``` + +## Selector functions + +- [selector_min](#selector_min) +- [selector_max](#selector_max) +- [selector_first](#selector_first) +- [selector_last](#selector_last) + +### selector_min + +Returns the smallest value of a selected column and a timestamp. + +```sql +selector_min(expression, timestamp) +``` + +##### Arguments + +- **expression**: Expression to operate on. + Can be a constant, column, or function, and any combination of string or + arithmetic operators. +- **timestamp**: Time expression. + Can be a constant, column, or function. + +{{< expand-wrapper >}} +{{% expand "View `selector_min` query example" %}} + +```sql +SELECT + selector_min(water_level, time)['time'] AS time, + selector_min(water_level, time)['value'] AS water_level +FROM h2o_feet +``` + +| time | water_level | +| :------------------- | ----------: | +| 2019-08-28T14:30:00Z | -0.61 | + +{{% /expand %}} +{{< /expand-wrapper >}} + +### selector_max + +Returns the largest value of a selected column and a timestamp. + +```sql +selector_max(expression, timestamp) +``` + +##### Arguments + +- **expression**: Expression to operate on. + Can be a constant, column, or function, and any combination of string or + arithmetic operators. +- **timestamp**: Time expression. + Can be a constant, column, or function. + +{{< expand-wrapper >}} +{{% expand "View `selector_max` query example" %}} + +```sql +SELECT + selector_max(water_level, time)['time'] AS time, + selector_max(water_level, time)['value'] AS water_level +FROM h2o_feet +``` + +| time | water_level | +| :------------------- | ----------: | +| 2019-08-28T07:24:00Z | 9.964 | + +{{% /expand %}} +{{< /expand-wrapper >}} + +### selector_first + +Returns the first value ordered by time ascending. + +```sql +selector_first(expression, timestamp) +``` + +##### Arguments + +- **expression**: Expression to operate on. + Can be a constant, column, or function, and any combination of string or + arithmetic operators. +- **timestamp**: Time expression. + Can be a constant, column, or function. + +{{< expand-wrapper >}} +{{% expand "View `selector_first` query example" %}} + +```sql +SELECT + selector_first(water_level, time)['time'] AS time, + selector_first(water_level, time)['value'] AS water_level +FROM h2o_feet +``` + +| time | water_level | +| :------------------- | ----------: | +| 2019-08-28T07:24:00Z | 9.964 | + +{{% /expand %}} +{{< /expand-wrapper >}} + +### selector_last + +Returns the last value ordered by time ascending. + +```sql +selector_last(expression, timestamp) +``` + +##### Arguments + +- **expression**: Expression to operate on. + Can be a constant, column, or function, and any combination of string or + arithmetic operators. +- **timestamp**: Time expression. + Can be a constant, column, or function. + +{{< expand-wrapper >}} +{{% expand "View `selector_last` query example" %}} + +```sql +SELECT + selector_last(water_level, time)['time'] AS time, + selector_last(water_level, time)['value'] AS water_level +FROM h2o_feet +``` + +| time | water_level | +| :------------------- | ----------: | +| 2019-09-17T21:42:00Z | 4.938 | + +{{% /expand %}} +{{< /expand-wrapper >}} diff --git a/content/influxdb/cloud-serverless/reference/sql/functions/string.md b/content/influxdb/cloud-serverless/reference/sql/functions/string.md new file mode 100644 index 000000000..ce77df410 --- /dev/null +++ b/content/influxdb/cloud-serverless/reference/sql/functions/string.md @@ -0,0 +1,1185 @@ +--- +title: SQL string functions +list_title: String functions +description: > + Use string functions to operate on string values in SQL queries. +menu: + influxdb_cloud_serverless: + name: String + parent: sql-functions +weight: 307 +--- + +The InfluxDB SQL implementation supports the following string functions for +operating on string values: + +- [ascii](#ascii) +- [bit_length](#bit_length) +- [btrim](#btrim) +- [char_length](#char_length) +- [character_length](#character_length) +- [concat](#concat) +- [concat_ws](#concat_ws) +- [chr](#chr) +- [initcap](#initcap) +- [left](#left) +- [length](#length) +- [lower](#lower) +- [lpad](#lpad) +- [ltrim](#ltrim) +- [md5](#md5) +- [octet_length](#octet_length) +- [repeat](#repeat) +- [replace](#replace) +- [reverse](#reverse) +- [right](#right) +- [rpad](#rpad) +- [rtrim](#rtrim) +- [split_part](#split_part) +- [starts_with](#starts_with) +- [strpos](#strpos) +- [substr](#substr) +- [to_hex](#to_hex) +- [translate](#translate) +- [trim](#trim) +- [upper](#upper) + +## ascii + +Returns the ASCII value of the first character in a string. + +{{% note %}} +`ascii` returns a 32-bit integer. +To use with InfluxDB, [cast the return value to 64-bit integer](/influxdb/cloud-serverless/query-data/sql/cast-types/#cast-to-an-integer). +{{% /note %}} + +```sql +ascii(str) +``` + +##### Arguments + +- **str**: String expression to operate on. + Can be a constant, column, or function, and any combination of string operators. + +##### Related functions + +[chr](#chr) + +{{< expand-wrapper >}} +{{% expand "View `ascii` query example" %}} + +_The following example uses the sample data set provided in +[Get started with InfluxDB tutorial](/influxdb/cloud-serverless/get-started/write/#construct-line-protocol)._ + +```sql +SELECT DISTINCT + room, + ascii(room)::BIGINT AS ascii +FROM home +``` + +| room | ascii | +| :---------- | ----: | +| Kitchen | 75 | +| Living Room | 76 | + +{{% /expand %}} +{{< /expand-wrapper >}} + +## bit_length + +Returns the bit length of a string. + +{{% note %}} +`bit_length` returns a 32-bit integer. +To use with InfluxDB, [cast the return value to 64-bit integer](/influxdb/cloud-serverless/query-data/sql/cast-types/#cast-to-an-integer). +{{% /note %}} + +```sql +bit_length(str) +``` + +##### Arguments + +- **str**: String expression to operate on. + Can be a constant, column, or function, and any combination of string operators. + +##### Related functions + +[length](#length), [octet_length](#octet_length) + +{{< expand-wrapper >}} +{{% expand "View `bit_length` query example" %}} + +_The following example uses the sample data set provided in +[Get started with InfluxDB tutorial](/influxdb/cloud-serverless/get-started/write/#construct-line-protocol)._ + +```sql +SELECT DISTINCT + room, + bit_length(room)::BIGINT AS bit_length +FROM home +``` + +| room | bit_length | +| :---------- | ---------: | +| Living Room | 88 | +| Kitchen | 56 | + +{{% /expand %}} +{{< /expand-wrapper >}} + +## btrim + +Trims the specified trim string from the start and end of a string. +If no trim string is provided, all whitespace is removed from the start and end +of the input string. + +```sql +btrim(str[, trim_str]) +``` + +##### Arguments + +- **str**: String expression to operate on. + Can be a constant, column, or function, and any combination of string operators. +- **trim_str**: String expression to trim from the beginning and end of the input string. + Can be a constant, column, or function, and any combination of arithmetic operators. + _Default is whitespace characters_. + +##### Related functions + +[ltrim](#ltrim), +[rtrim](#rtrim), +[trim](#trim) + +{{< expand-wrapper >}} +{{% expand "View `btrim` query example" %}} + +_The following example uses the sample data set provided in +[Get started with InfluxDB tutorial](/influxdb/cloud-serverless/get-started/write/#construct-line-protocol)._ + +```sql +SELECT DISTINCT + room, + btrim(room::STRING, ' Room') AS btrim +FROM home +``` + +| room | btrim | +| :---------- | :------ | +| Living Room | Living | +| Kitchen | Kitchen | + +{{% /expand %}} +{{< /expand-wrapper >}} + +## char_length + +_Alias of [length](#length)._ + +## character_length + +_Alias of [length](#length)._ + +## concat + +Concatenates multiple strings together. + +```sql +concat(str[, ..., str_n]) +``` + +##### Arguments + +- **str**: String expression to concatenate. + Can be a constant, column, or function, and any combination of string operators. +- **str_n**: Subsequent string expression to concatenate. + +##### Related functions + +[contcat_ws](#contcat_ws) + +{{< expand-wrapper >}} +{{% expand "View `concat` query example" %}} + +_The following example uses the sample data set provided in +[Get started with InfluxDB tutorial](/influxdb/cloud-serverless/get-started/write/#construct-line-protocol)._ + +```sql +SELECT + concat('At ', time::STRING, ', the ', room, ' was ', temp::STRING, '°C.') AS concat +FROM home +LIMIT 3 +``` + +{{% influxdb/custom-timestamps %}} + +| concat | +| :---------------------------------------------- | +| At 2022-01-01T08:00:00, the Kitchen was 21.0°C. | +| At 2022-01-01T09:00:00, the Kitchen was 23.0°C. | +| At 2022-01-01T10:00:00, the Kitchen was 22.7°C. | + +{{% /influxdb/custom-timestamps %}} + +{{% /expand %}} +{{< /expand-wrapper >}} + +## concat_ws + +Concatenates multiple strings together with a specified separator. + +```sql +concat(separator, str[, ..., str_n]) +``` + +##### Arguments + +- **separator**: Separator to insert between concatenated strings. +- **str**: String expression to concatenate. + Can be a constant, column, or function, and any combination of string operators. +- **str_n**: Subsequent string expression to concatenate. + Can be a constant, column, or function, and any combination of string operators. + +##### Related functions + +[concat](#concat) + +{{< expand-wrapper >}} +{{% expand "View `concat_ws` query example" %}} + +_The following example uses the sample data set provided in +[Get started with InfluxDB tutorial](/influxdb/cloud-serverless/get-started/write/#construct-line-protocol)._ + +```sql +SELECT + concat_ws(' -- ', time::STRING, room, temp::STRING) AS concat_ws +FROM home +LIMIT 3 +``` + +{{% influxdb/custom-timestamps %}} + +| concat_ws | +| :----------------------------------------- | +| 2022-01-01T08:00:00 \-\- Kitchen \-\- 21.0 | +| 2022-01-01T09:00:00 \-\- Kitchen \-\- 23.0 | +| 2022-01-01T10:00:00 \-\- Kitchen \-\- 22.7 | + +{{% /influxdb/custom-timestamps %}} + +{{% /expand %}} +{{< /expand-wrapper >}} + +## chr + +Returns the character with the specified ASCII or Unicode code value. + +``` +chr(expression) +``` + +#### Arguments + +- **expression**: Expression containing the ASCII or Unicode code value to operate on. + Can be a constant, column, or function, and any combination of arithmetic or + string operators. + +##### Related functions + +[ascii](#ascii) + +{{< expand-wrapper >}} +{{% expand "View `chr` query example" %}} + +```sql +SELECT + ascii, + chr(ascii) AS chr +FROM + (values (112), + (75), + (214) + ) data(ascii) +``` + +| ascii | chr | +| :---- | :-: | +| 112 | p | +| 75 | K | +| 214 | Ö | + +{{% /expand %}} +{{< /expand-wrapper >}} + +## initcap + +Capitalizes the first character in each word in the input string. +Words are delimited by non-alphanumeric characters. + +```sql +initcap(str) +``` + +##### Arguments + +- **str**: String expression to operate on. + Can be a constant, column, or function, and any combination of string operators. + +##### Related functions + +[lower](#lower), +[upper](#upper) + +{{< expand-wrapper >}} +{{% expand "View `initcap` query example" %}} + +```sql +SELECT + string, + initcap(string) AS initcap +FROM + (values ('hello world'), + ('hello-world'), + ('hello_world') + ) data(string) +``` + +| string | initcap | +| :---------- | :---------- | +| hello world | Hello World | +| hello-world | Hello-World | +| hello_world | Hello_World | + +{{% /expand %}} +{{< /expand-wrapper >}} + +## left + +Returns a specified number of characters from the left side of a string. + +```sql +left(str, n) +``` + +##### Arguments + +- **str**: String expression to operate on. + Can be a constant, column, or function, and any combination of string operators. +- **n**: Number of characters to return. + +##### Related functions + +[right](#right) + +{{< expand-wrapper >}} +{{% expand "View `left` query example" %}} + +_The following example uses the sample data set provided in +[Get started with InfluxDB tutorial](/influxdb/cloud-serverless/get-started/write/#construct-line-protocol)._ + +```sql +SELECT DISTINCT + room, + left(room::STRING, 3) AS left +FROM home +``` + +| room | left | +| :---------- | :--- | +| Kitchen | Kit | +| Living Room | Liv | + +{{% /expand %}} +{{< /expand-wrapper >}} + +## length + +Returns the number of characters in a string. + +{{% note %}} +`char_length` returns a 32-bit integer. +To use with InfluxDB, [cast the return value to 64-bit integer](/influxdb/cloud-serverless/query-data/sql/cast-types/#cast-to-an-integer). +{{% /note %}} + +```sql +length(str) +``` + +##### Arguments + +- **str**: String expression to operate on. + Can be a constant, column, or function, and any combination of string operators. + +##### Aliases + +- char\_length +- character\_length + +##### Related functions + +[bit_length](#bit_length), +[octet_length](#octet_length) + +{{< expand-wrapper >}} +{{% expand "View `length` query example" %}} + +_The following example uses the sample data set provided in +[Get started with InfluxDB tutorial](/influxdb/cloud-serverless/get-started/write/#construct-line-protocol)._ + +```sql +SELECT DISTINCT + room, + length(room)::BIGINT AS length +FROM home +``` + +| room | length | +| :---------- | -----: | +| Kitchen | 7 | +| Living Room | 11 | + +{{% /expand %}} +{{< /expand-wrapper >}} + +## lower + +Converts a string to lower-case. + +```sql +lower(str) +``` + +##### Arguments + +- **str**: String expression to operate on. + Can be a constant, column, or function, and any combination of string operators. + +##### Related functions + +[initcap](#initcap), +[upper](#upper) + +{{< expand-wrapper >}} +{{% expand "View `lower` query example" %}} + +_The following example uses the sample data set provided in +[Get started with InfluxDB tutorial](/influxdb/cloud-serverless/get-started/write/#construct-line-protocol)._ + +```sql +SELECT DISTINCT + room, + lower(room::STRING) AS lower +FROM home +``` + +| room | lower | +| :---------- | :---------- | +| Kitchen | kitchen | +| Living Room | living room | + +{{% /expand %}} +{{< /expand-wrapper >}} + +## lpad + +Pads the left side a string with another string to a specified string length. + +```sql +lpad(str, n[, padding_str]) +``` + +##### Arguments + +- **str**: String expression to operate on. + Can be a constant, column, or function, and any combination of string operators. +- **n**: String length to pad to. +- **padding_str**: String expression to pad with. + Can be a constant, column, or function, and any combination of string operators. + _Default is a space._ + +##### Related functions + +[rpad](#rpad) + +{{< expand-wrapper >}} +{{% expand "View `lpad` query example" %}} + +_The following example uses the sample data set provided in +[Get started with InfluxDB tutorial](/influxdb/cloud-serverless/get-started/write/#construct-line-protocol)._ + +```sql +SELECT DISTINCT + room, + lpad(room::STRING, 14, '-') AS lpad +FROM home +``` + +| room | lpad | +| :---------- | :-------------------- | +| Kitchen | \-\-\-\-\-\-\-Kitchen | +| Living Room | \-\-\-Living Room | + +{{% /expand %}} +{{< /expand-wrapper >}} + +## ltrim + +Removes leading spaces from a string. + +```sql +ltrim(str) +``` + +##### Arguments + +- **str**: String expression to operate on. + Can be a constant, column, or function, and any combination of string operators. + +##### Related functions + +[btrim](#btrim), +[rtrim](#rtrim), +[trim](#trim) + +{{< expand-wrapper >}} +{{% expand "View `ltrim` query example" %}} + +```sql +SELECT + string, + ltrim(string) AS ltrim +FROM + (values (' Leading spaces'), + ('Trailing spaces '), + (' Leading and trailing spaces ') + ) data(string) +``` + +| string | ltrim | +| :-------------------------------------- | :-------------------------------------- | +|   Leading spaces | Leading spaces | +| Trailing spaces   | Trailing spaces   | +| Leading and trailing spaces   | Leading and trailing spaces   | + +{{% /expand %}} +{{< /expand-wrapper >}} + +## md5 + +Computes an MD5 128-bit checksum for a string expression. + +```sql +md5(str) +``` + +##### Arguments + +- **expression**: String expression to operate on. + Can be a constant, column, or function, and any combination of string operators. + +{{< expand-wrapper >}} +{{% expand "View `md5` query example" %}} + +_The following example uses the sample data set provided in +[Get started with InfluxDB tutorial](/influxdb/cloud-serverless/get-started/write/#construct-line-protocol)._ + +```sql +SELECT DISTINCT + room, + md5(room) AS md5 +FROM home +``` + +| room | md5 | +| :---------- | :------------------------------- | +| Kitchen | 33fa00a66f2edf0d1c5697a9f8693ba8 | +| Living Room | f45b0e6aec165544faccaf2cad820542 | + +{{% /expand %}} +{{< /expand-wrapper >}} + +## octet_length + +Returns the length of a string in bytes. + +{{% note %}} +`length` returns a 32-bit integer. +To use with InfluxDB, [cast the return value to 64-bit integer](/influxdb/cloud-serverless/query-data/sql/cast-types/#cast-to-an-integer). +{{% /note %}} + +```sql +octet_length(str) +``` + +##### Arguments + +- **str**: String expression to operate on. + Can be a constant, column, or function, and any combination of string operators. + +##### Related functions + +[bit_length](#bit_length), +[length](#length) + +{{< expand-wrapper >}} +{{% expand "View `octet_length` query example" %}} + +_The following example uses the sample data set provided in +[Get started with InfluxDB tutorial](/influxdb/cloud-serverless/get-started/write/#construct-line-protocol)._ + +```sql +SELECT DISTINCT + room, + octet_length(room)::BIGINT AS octet_length +FROM home +``` + +| room | octet_length | +| :---------- | -----------: | +| Living Room | 11 | +| Kitchen | 7 | + +{{% /expand %}} +{{< /expand-wrapper >}} + +## repeat + +Returns a string with an input string repeated a specified number. + +```sql +repeat(str, n) +``` + +##### Arguments + +- **str**: String expression to repeat. + Can be a constant, column, or function, and any combination of string operators. +- **n**: Number of times to repeat the input string. + +{{< expand-wrapper >}} +{{% expand "View `repeat` query example" %}} + +```sql +SELECT + string, + repeat(string, 3) AS repeat +FROM + (values ('foo '), + ('bar '), + ('baz ') + ) data(string) +``` + +| string | repeat | +| :-------- | :---------- | +| foo  | foo foo foo | +| bar  | bar bar bar | +| baz  | baz baz baz | + +{{% /expand %}} +{{< /expand-wrapper >}} + +## replace + +Replaces all occurrences of a specified substring in a string with a new substring. + +```sql +replace(str, substr, replacement) +``` + +##### Arguments + +- **str**: String expression to repeat. + Can be a constant, column, or function, and any combination of string operators. +- **substr**: Substring expression to replace in the input string. + Can be a constant, column, or function, and any combination of string operators. +- **replacement**: Replacement substring expression. + Can be a constant, column, or function, and any combination of string operators. + +{{< expand-wrapper >}} +{{% expand "View `replace` query example" %}} + +_The following example uses the sample data set provided in +[Get started with InfluxDB tutorial](/influxdb/cloud-serverless/get-started/write/#construct-line-protocol)._ + +```sql +SELECT DISTINCT + room, + replace(room::STRING, ' ', '_') AS replace +FROM home +``` + +| room | replace | +| :---------- | :---------- | +| Kitchen | Kitchen | +| Living Room | Living_Room | + +{{% /expand %}} +{{< /expand-wrapper >}} + +## reverse + +Reverses the character order of a string. + +```sql +reverse(str) +``` + +##### Arguments + +- **str**: String expression to repeat. + Can be a constant, column, or function, and any combination of string operators. + +{{< expand-wrapper >}} +{{% expand "View `reverse` query example" %}} + +_The following example uses the sample data set provided in +[Get started with InfluxDB tutorial](/influxdb/cloud-serverless/get-started/write/#construct-line-protocol)._ + +```sql +SELECT DISTINCT + room, + reverse(room::STRING) AS reverse +FROM home +``` + +| room | reverse | +| :---------- | :---------- | +| Kitchen | nehctiK | +| Living Room | mooR gniviL | + +{{% /expand %}} +{{< /expand-wrapper >}} + +## right + +Returns a specified number of characters from the right side of a string. + +```sql +right(str, n) +``` + +##### Arguments + +- **str**: String expression to operate on. + Can be a constant, column, or function, and any combination of string operators. +- **n**: Number of characters to return. + +##### Related functions + +[left](#left) + +{{< expand-wrapper >}} +{{% expand "View `right` query example" %}} + +_The following example uses the sample data set provided in +[Get started with InfluxDB tutorial](/influxdb/cloud-serverless/get-started/write/#construct-line-protocol)._ + +```sql +SELECT DISTINCT + room, + right(room::STRING, 3) AS right +FROM home +``` + +| room | right | +| :---------- | :---- | +| Living Room | oom | +| Kitchen | hen | + +{{% /expand %}} +{{< /expand-wrapper >}} + +## rpad +right side a string with another string to a specified string length. + +```sql +rpad(str, n[, padding_str]) +``` + +##### Arguments + +- **str**: String expression to operate on. + Can be a constant, column, or function, and any combination of string operators. +- **n**: String length to pad to. +- **padding_str**: String expression to pad with. + Can be a constant, column, or function, and any combination of string operators. + _Default is a space._ + +##### Related functions + +[lpad](#lpad) + +{{< expand-wrapper >}} +{{% expand "View `rpad` query example" %}} + +_The following example uses the sample data set provided in +[Get started with InfluxDB tutorial](/influxdb/cloud-serverless/get-started/write/#construct-line-protocol)._ + +```sql +SELECT DISTINCT + room, + rpad(room::STRING, 14, '-') AS rpad +FROM home +``` + +| room | rpad | +| :---------- | :-------------------- | +| Kitchen | Kitchen\-\-\-\-\-\-\- | +| Living Room | Living Room\-\-\- | + +{{% /expand %}} +{{< /expand-wrapper >}} + +## rtrim + +Removes trailing spaces from a string. + +```sql +rtrim(str) +``` + +##### Arguments + +- **str**: String expression to operate on. + Can be a constant, column, or function, and any combination of string operators. + +##### Related functions + +[btrim](#btrim), +[ltrim](#ltrim), +[trim](#trim) + +{{< expand-wrapper >}} +{{% expand "View `rtrim` query example" %}} + +```sql +SELECT + string, + rtrim(string) AS rtrim +FROM + (values (' Leading spaces'), + ('Trailing spaces '), + (' Leading and trailing spaces ') + ) data(string) +``` + +| string | rtrim | +| :-------------------------------------- | :-------------------------------------- | +|   Leading spaces |   Leading spaces | +| Trailing spaces   | Trailing spaces | +| Leading and trailing spaces   |   Leading and trailing spaces | + +{{% /expand %}} +{{< /expand-wrapper >}} + +## split_part + +Splits a string based on a specified delimiter and returns the substring a the +specified position. + +```sql +split_part(str, delimiter, pos) +``` + +##### Arguments + +- **str**: String expression to spit. + Can be a constant, column, or function, and any combination of string operators. +- **delimiter**: String or character to split on. +- **pos**: Position of the part to return. + +{{< expand-wrapper >}} +{{% expand "View `split_part` query example" %}} + +```sql +SELECT + url, + split_part(url, '.', 1) AS split_part +FROM + (values ('www.influxdata.com'), + ('docs.influxdata.com'), + ('community.influxdata.com') + ) data(url) +``` + +| url | split_part | +| :----------------------- | :--------- | +| www.influxdata.com | www | +| docs.influxdata.com | docs | +| community.influxdata.com | community | + +{{% /expand %}} +{{< /expand-wrapper >}} + +## starts_with + +Tests if a string starts with a substring. + +```sql +starts_with(str, substr) +``` + +##### Arguments + +- **str**: String expression to test. + Can be a constant, column, or function, and any combination of string operators. +- **substr**: Substring to test for. + +{{< expand-wrapper >}} +{{% expand "View `starts_with` query example" %}} + +_The following example uses the sample data set provided in +[Get started with InfluxDB tutorial](/influxdb/cloud-serverless/get-started/write/#construct-line-protocol)._ + +```sql +SELECT DISTINCT + room, + starts_with(room::STRING, 'Kit') AS starts_with +FROM home +``` + +| room | starts_with | +| :---------- | :---------- | +| Kitchen | true | +| Living Room | false | + +{{% /expand %}} +{{< /expand-wrapper >}} + +## strpos + +Returns the starting position of a specified substring in a string. +Positions begin at 1. +If the substring does not exist in the string, the function returns 0. + +{{% note %}} +`strpos` returns a 32-bit integer. +To use with InfluxDB, [cast the return value to 64-bit integer](/influxdb/cloud-serverless/query-data/sql/cast-types/#cast-to-an-integer). +{{% /note %}} + +```sql +strpos(str, substr) +``` + +##### Arguments + +- **str**: String expression to operate on. + Can be a constant, column, or function, and any combination of string operators. +- **substr**: Substring expression to search for. + Can be a constant, column, or function, and any combination of string operators. + +{{< expand-wrapper >}} +{{% expand "View `strpos` query example" %}} + +_The following example uses the sample data set provided in +[Get started with InfluxDB tutorial](/influxdb/cloud-serverless/get-started/write/#construct-line-protocol)._ + +```sql +SELECT DISTINCT + room, + strpos(room::STRING, 'Room')::BIGINT AS strpos +FROM home +``` + +| room | strpos | +| :---------- | -----: | +| Kitchen | 0 | +| Living Room | 8 | + +{{% /expand %}} +{{< /expand-wrapper >}} + +## substr + +Extracts a substring of a specified number of characters from a specific +starting position in a string. + +```sql +substr(str, start_pos[, length]) +``` + +##### Arguments + +- **str**: String expression to operate on. + Can be a constant, column, or function, and any combination of string operators. +- **start_pos**: Character position to start the substring at. + The first character in the string has a position of 1. +- **length**: Number of characters to extract. + If not specified, returns the rest of the string after the start position. + +{{< expand-wrapper >}} +{{% expand "View `substr` query example" %}} + +_The following example uses the sample data set provided in +[Get started with InfluxDB tutorial](/influxdb/cloud-serverless/get-started/write/#construct-line-protocol)._ + +```sql +SELECT DISTINCT + room, + substr(room::STRING, 3, 5) AS substr +FROM home +``` + +| room | substr | +| :---------- | :--------- | +| Living Room | ving  | +| Kitchen | tchen | + +{{% /expand %}} +{{< /expand-wrapper >}} + +## translate + +Translates characters in a string to specified translation characters. + +```sql +translate(str, chars, translation) +``` + +- **str**: String expression to operate on. + Can be a constant, column, or function, and any combination of string operators. +- **chars**: Characters to translate. +- **translation**: Translation characters. Translation characters replace only + characters at the same position in the **chars** string. + +{{< expand-wrapper >}} +{{% expand "View `translate` query example" %}} + +_The following example uses the sample data set provided in +[Get started with InfluxDB tutorial](/influxdb/cloud-serverless/get-started/write/#construct-line-protocol)._ + +```sql +SELECT DISTINCT + room, + translate(room::STRING, 'Rom', 'sOn') AS translate +FROM home +``` + +| room | translate | +| :---------- | :---------- | +| Living Room | Living sOOn | +| Kitchen | Kitchen | + +{{% /expand %}} +{{< /expand-wrapper >}} + +## to_hex + +Converts an integer to a hexadecimal string. + +```sql +to_hex(int) +``` + +##### Arguments + +- **int**: Integer expression to convert. + Can be a constant, column, or function, and any combination of arithmetic operators. + +{{< expand-wrapper >}} +{{% expand "View `to_hex` query example" %}} + +```sql +SELECT + int, + to_hex(int) AS to_hex +FROM + (values (123), + (345), + (678) + ) data(int) +``` + +| int | to_hex | +| :-- | -----: | +| 123 | 7b | +| 345 | 159 | +| 678 | 2a6 | + +{{% /expand %}} +{{< /expand-wrapper >}} + +## trim + +Removes leading and trailing spaces from a string. + +```sql +trim(str) +``` + +##### Arguments + +- **str**: String expression to operate on. + Can be a constant, column, or function, and any combination of string operators. + +##### Related functions + +[btrim](#btrim), +[ltrim](#ltrim), +[rtrim](#rtrim) + +{{< expand-wrapper >}} +{{% expand "View `trim` query example" %}} + +```sql +SELECT + string, + trim(string) AS trim +FROM + (values (' Leading spaces'), + ('Trailing spaces '), + (' Leading and trailing spaces ') + ) data(string) +``` + +| string | trim | +| :-------------------------------------- | :-------------------------- | +|   Leading spaces | Leading spaces | +| Trailing spaces   | Trailing spaces | +| Leading and trailing spaces   | Leading and trailing spaces | + +{{% /expand %}} +{{< /expand-wrapper >}} + +## upper + +Converts a string to upper-case. + +```sql +upper(str) +``` + +##### Arguments + +- **str**: String expression to operate on. + Can be a constant, column, or function, and any combination of string operators. + +##### Related functions + +[initcap](#initcap), +[lower](#lower) + +{{< expand-wrapper >}} +{{% expand "View `upper` query example" %}} + +_The following example uses the sample data set provided in +[Get started with InfluxDB tutorial](/influxdb/cloud-serverless/get-started/write/#construct-line-protocol)._ + +```sql +SELECT DISTINCT + room, + upper(room::STRING) AS upper +FROM home +``` + +| room | upper | +| :---------- | :---------- | +| Living Room | LIVING ROOM | +| Kitchen | KITCHEN | + +{{% /expand %}} +{{< /expand-wrapper >}} diff --git a/content/influxdb/cloud-serverless/reference/sql/functions/time-and-date.md b/content/influxdb/cloud-serverless/reference/sql/functions/time-and-date.md new file mode 100644 index 000000000..c929e055a --- /dev/null +++ b/content/influxdb/cloud-serverless/reference/sql/functions/time-and-date.md @@ -0,0 +1,460 @@ +--- +title: SQL time and date functions +list_title: Time and date functions +description: > + Use time and date functions to work with time values and time series data. +menu: + influxdb_cloud_serverless: + name: Time and date + parent: sql-functions +weight: 305 +--- + +InfluxDB's SQL implementation supports time and date functions that are useful when working with time series data. + +- [now](#now) +- [date_bin](#date_bin) +- [date_trunc](#date_trunc) +- [date_part](#date_part) +- [extract](#extract) +- [to_timestamp](#to_timestamp) +- [to_timestamp_millis](#to_timestamp_millis) +- [to_timestamp_micros](#to_timestamp_micros) +- [to_timestamp_seconds](#to_timestamp_seconds) +- [from_unixtime](#from_unixtime) + +### now + +Returns the current UTC timestamp. + +The `now()` return value is determined at query time and will return the same timestamp, +no matter when in the query plan the function executes. + +```sql +now() +``` + +{{< expand-wrapper >}} +{{% expand "View `now` query example" %}} + +```sql +SELECT + "water_level", + "time" +FROM h2o_feet +WHERE + time <= now() - interval '12 minutes' +``` + +{{% /expand %}} +{{< /expand-wrapper >}} + +### date_bin + +Calculates time intervals and returns the start of the interval nearest to the specified timestamp. +Use `date_bin` to downsample time series data by grouping rows into time-based "bins" or "windows" +and applying an aggregate or selector function to each window. + +For example, if you "bin" or "window" data into 15 minute intervals, an input timestamp of `2023-01-01T18:18:18Z` will be updated to the start time of the 15 minute bin it is in: `2023-01-01T18:15:00Z`. + +```sql +date_bin(interval, expression, origin-timestamp) +``` + +##### Arguments: + +- **interval**: Bin interval. +- **expression**: Time expression to operate on. + Can be a constant, column, or function. +- **timestamp**: Starting point used to determine bin boundaries. + +The following intervals are supported: + +- nanoseconds +- microseconds +- milliseconds +- seconds +- minutes +- hours +- days +- weeks +- months +- years +- century + +{{< expand-wrapper >}} +{{% expand "View `date_bin` query example" %}} + +The following query returns the daily average of water levels in the queried time range. + +```sql +SELECT + date_bin(INTERVAL '1 day', time, TIMESTAMP '1970-01-01 00:00:00Z') AS time, + avg("water_level") AS water_level_avg +FROM "h2o_feet" +WHERE + time >= timestamp '2019-09-10T00:00:00Z' + AND time <= timestamp '2019-09-20T00:00:00Z' +GROUP BY date_bin(INTERVAL '1 day', time, TIMESTAMP '1970-01-01 00:00:00Z') +ORDER BY time DESC +``` + +| time | water_level_avg | +| :----------------------- | :----------------- | +| 2019-09-17T00:00:00.000Z | 4.370175687443861 | +| 2019-09-16T00:00:00.000Z | 4.6034785848437485 | +| 2019-09-15T00:00:00.000Z | 4.680651501506248 | +| 2019-09-14T00:00:00.000Z | 4.857683652395836 | +| 2019-09-13T00:00:00.000Z | 4.911051520291668 | +| 2019-09-12T00:00:00.000Z | 4.763990784533338 | +| 2019-09-11T00:00:00.000Z | 4.6582452515041695 | +| 2019-09-10T00:00:00.000Z | 4.608425018785421 | + +{{% /expand %}} +{{< /expand-wrapper >}} + +### date_trunc + +Truncates a timestamp value to a specified precision. + +```sql +date_trunc(precision, expression) +``` + +##### Arguments: + +- **precision**: Time precision to truncate to. + The following precisions are supported: + + - year + - month + - week + - day + - hour + - minute + - second + +- **expression**: Time expression to operate on. + Can be a constant, column, or function. + +{{< expand-wrapper >}} +{{% expand "View `date_trunc` query examples" %}} + +#### Use date_trunc to return hourly averages + +```sql +SELECT + avg(water_level) AS level, + date_trunc('hour', time) AS hour +FROM h2o_feet +WHERE + time >= timestamp '2019-09-10T00:00:00Z' + AND time <= timestamp '2019-09-12T00:00:00Z' +GROUP BY hour +ORDER BY hour +``` + +| hour | level | +| :----------------------- | :----------------- | +| 2019-09-10T00:00:00.000Z | 3.7248000000000006 | +| 2019-09-10T01:00:00.000Z | 3.8561499999999995 | +| 2019-09-10T02:00:00.000Z | 4.5405999999999995 | +| 2019-09-10T03:00:00.000Z | 5.5548072072500005 | +| 2019-09-10T04:00:00.000Z | 6.433900000000001 | +| 2019-09-10T05:00:00.000Z | 6.810949999999998 | + +#### Use date_trunc to return weekly averages + +```sql +SELECT + mean(water_level) as level, + date_trunc('week',time) AS week +FROM h2o_feet +WHERE + time >= timestamp '2019-08-01T00:00:00Z' + AND time <= timestamp '2019-10-31T00:00:00Z' +GROUP BY week +ORDER BY week +``` + +| level | week | +| :----------------- | :----------------------- | +| 4.3314415259020835 | 2019-08-12T00:00:00.000Z | +| 4.234838403584523 | 2019-08-19T00:00:00.000Z | +| 4.4184818559633925 | 2019-08-26T00:00:00.000Z | +| 4.405153386766021 | 2019-09-02T00:00:00.000Z | +| 4.725866897257734 | 2019-09-09T00:00:00.000Z | +| 4.499938596774042 | 2019-09-16T00:00:00.000Z | + +{{% /expand %}} +{{< /expand-wrapper >}} + +### date_part + +Returns the specified part of the date as an integer. + +```sql +date_part(part, expression) +``` + +##### Arguments: + +- **part**: Part of the date to return. + The following date parts are supported: + + - year + - month + - week _(week of the year)_ + - day _(day of the month)_ + - hour + - minute + - second + - millisecond + - microsecond + - nanosecond + - dow _(day of the week)_ + - doy _(day of the year)_ + +- **expression**: Time expression to operate on. + Can be a constant, column, or function. + +{{< expand-wrapper >}} +{{% expand "View `date_part` query examples" %}} + +```sql +SELECT + date_part('hour', time) AS hour, + time, + "level description", + location +FROM h2o_feet +WHERE + time >= timestamp '2019-08-17T02:54:00Z' + AND time <= timestamp '2019-08-17T03:06:00Z' +ORDER BY time +``` + +| hour | time | level description | location | +| :--: | :------------------- | :------------------- | :----------- | +| 2 | 2019-08-17T02:54:00Z | between 3 and 6 feet | coyote_creek | +| 2 | 2019-08-17T02:54:00Z | between 3 and 6 feet | santa_monica | +| 3 | 2019-08-17T03:00:00Z | between 3 and 6 feet | coyote_creek | +| 3 | 2019-08-17T03:00:00Z | between 3 and 6 feet | santa_monica | +| 3 | 2019-08-17T03:06:00Z | between 3 and 6 feet | coyote_creek | +| 3 | 2019-08-17T03:06:00Z | between 3 and 6 feet | santa_monica | + +{{% /expand %}} +{{< /expand-wrapper >}} + +### extract + +Returns a sub-field from a time value as an integer. +Similar to `date_part`, but with different arguments. + +```sql +extract(field FROM source) +``` + +##### Arguments + +- **field**: Part or field of the date to return. + The following date fields are supported: + + - year + - month + - week _(week of the year)_ + - day _(day of the month)_ + - hour + - minute + - second + - millisecond + - microsecond + - nanosecond + - dow _(day of the week)_ + - doy _(day of the year)_ + +- **source**: Source time expression to operate on. + Can be a constant, column, or function. + +{{< expand-wrapper >}} +{{% expand "View `extract` query example" %}} + +```sql +SELECT + extract(day from time) AS day +FROM + h2o_feet +LIMIT 1 +``` + +| day | +| :-- | +| 25 | + +{{% /expand %}} +{{< /expand-wrapper >}} + +### to_timestamp + +Converts a value to RFC3339 nanosecond timestamp format (`YYYY-MM-DDT00:00:00.000000000Z`). +Supports timestamp, integer, and unsigned integer types as input. +Integers and unsigned integers are parsed as [Unix nanosecond timestamps](/influxdb/cloud-serverless/reference/glossary/#unix-timestamp) +and return the corresponding RFC3339 nanosecond timestamp. + +```sql +to_timestamp(expression) +``` + +##### Arguments: + +- **expression**: Expression to operate on. + Can be a constant, column, or function, and any combination of arithmetic operators. + +{{< expand-wrapper >}} +{{% expand "View `to_timestamp` query example" %}} + +```sql +SELECT to_timestamp(time) +FROM h2o_feet +LIMIT 1 +``` + +| totimestamp(cpu.time) | +| :----------------------- | +| 2019-08-27T00:00:00.000Z | + +{{% /expand %}} +{{< /expand-wrapper >}} + +### to_timestamp_millis + +Converts a value to RFC3339 millisecond timestamp format (`YYYY-MM-DDT00:00:00.000Z`). +Supports timestamp, integer, and unsigned integer types as input. +Integers and unsigned integers are parsed as [Unix nanosecond timestamps](/influxdb/cloud-serverless/reference/glossary/#unix-timestamp) +and return the corresponding RFC3339 timestamp. + +```sql +to_timestamp_millis(expression) +``` + +##### Arguments: + +- **expression**: Expression to operate on. + Can be a constant, column, or function, and any combination of arithmetic operators. + +{{< expand-wrapper >}} +{{% expand "View `to_timestamp_millis` query example" %}} + +```sql +SELECT + to_timestamp_millis(time) +FROM + h2o_temperature +LIMIT 1 +``` + +Results +| totimestampmillis(cpu.time) | +| :-------------------------- | +| 2023-02-08T17:25:18.864Z | + +{{% /expand %}} +{{< /expand-wrapper >}} + +### to_timestamp_micros + +Converts a value to RFC3339 microsecond timestamp format (`YYYY-MM-DDT00:00:00.000000Z`). +Supports timestamp, integer, and unsigned integer types as input. +Integers and unsigned integers are parsed as [Unix nanosecond timestamps](/influxdb/cloud-serverless/reference/glossary/#unix-timestamp) +and return the corresponding RFC3339 timestamp. + +```sql +to_timestamp_micros(expression) +``` + +##### Arguments: + +- **expression**: Expression to operate on. + Can be a constant, column, or function, and any combination of arithmetic operators. + +{{< expand-wrapper >}} +{{% expand "View `to_timestamp_micros` query example" %}} + +```sql +SELECT + to_timestamp_micros(time) +FROM + cpu +LIMIT 1 +``` + +| totimestampmicros(cpu.time) | +| :-------------------------- | +| 2023-02-08T19:21:10.000Z | +{{% /expand %}} +{{< /expand-wrapper >}} + +### to_timestamp_seconds + +Converts a value to RFC3339 second timestamp format (`YYYY-MM-DDT00:00:00Z`). +Supports timestamp, integer, and unsigned integer types as input. +Integers and unsigned integers are parsed as [Unix nanosecond timestamps](/influxdb/cloud-serverless/reference/glossary/#unix-timestamp) +and return the corresponding RFC3339 timestamp. + +```sql +to_timestamp_seconds(expression) +``` + +##### Arguments: + +- **expression**: Expression to operate on. + Can be a constant, column, or function, and any combination of arithmetic operators. + +{{< expand-wrapper >}} +{{% expand "View `to_timestamp_seconds` query example" %}} + +```sql +SELECT + to_timestamp_seconds(time) +FROM + cpu +LIMIT 1; +``` + +| totimestampseconds(cpu.time) | +| :--------------------------- | +| 2023-02-08T17:21:10 | + +{{% /expand %}} +{{< /expand-wrapper >}} + + +### from_unixtime + +Converts an integer to RFC3339 timestamp format (`YYYY-MM-DDT00:00:00.000000000Z`). +Input is parsed as a [Unix nanosecond timestamp](/influxdb/cloud-serverless/reference/glossary/#unix-timestamp) +and returns the corresponding RFC3339 timestamp. + +```sql +from_unixtime(expression) +``` + +##### Arguments: + +- **expression**: Integer expression to operate on. + Can be a constant, column, or function, and any combination of arithmetic operators. + +{{< expand-wrapper >}} +{{% expand "View `from_unixtime` query example" %}} + +```sql +SELECT + from_unixtime(1672531200000000000) AS RFC3339 +``` + +| RFC3339 | +| :------------------- | +| 2023-01-01T00:00:00Z | + +{{% /expand %}} +{{< /expand-wrapper >}} diff --git a/content/influxdb/cloud-serverless/reference/sql/group-by.md b/content/influxdb/cloud-serverless/reference/sql/group-by.md new file mode 100644 index 000000000..a198dc2d1 --- /dev/null +++ b/content/influxdb/cloud-serverless/reference/sql/group-by.md @@ -0,0 +1,98 @@ +--- +title: GROUP BY clause +description: > + Use the `GROUP BY` clause to group query data by column values. +menu: + influxdb_cloud_serverless: + name: GROUP BY clause + parent: SQL reference +weight: 203 +--- + +Use the `GROUP BY` clause to group data by values. + +`GROUP BY` is an optional clause used to group rows that have the same values for all columns and expressions in the list. +To output an aggregation for each group, include an aggregate or selector function in the `SELECT` statement. +When `GROUP BY` appears in a query, the `SELECT` list can only use columns that appear in the `GROUP BY` list +or in aggregate expressions. + +`GROUP BY` can use column aliases that are defined in the `SELECT` clause. +`GROUP BY` can't use an alias named `time`. +In a `GROUP BY` list, `time` always refers to the measurement `time` column. + +- [Syntax](#syntax) +- [Examples](#examples) + +## Syntax + +```sql +SELECT + AGGREGATE_FN(field1), + tag1 +FROM measurement +GROUP BY tag1 +``` + +## Examples + +### Group data by tag values + +```sql +SELECT + AVG("water_level") AS "avg_water_level", + "location" +FROM "h2o_feet" +GROUP BY "location" +``` + +{{< expand-wrapper >}}} +{{% expand "View example results" %}} + +| avg_water_level | location | +| ----------------: | ------------ | +| 5.359142420303919 | coyote_creek | +| 3.530712094245885 | santa_monica | + +{{% /expand %}} +{{< /expand-wrapper >}} + +Group results in 15 minute time intervals by tag: + +```sql +SELECT + "location", + DATE_BIN(INTERVAL '15 minutes', time, TIMESTAMP '2022-01-01 00:00:00Z') AS time, + COUNT("water_level") AS count +FROM "h2o_feet" +WHERE + time >= timestamp '2019-09-17T00:00:00Z' + AND time <= timestamp '2019-09-17T01:00:00Z' +GROUP BY + DATE_BIN(INTERVAL '15 minutes', time, TIMESTAMP '2022-01-01 00:00:00Z'), + location +ORDER BY + location, + time +``` + +{{< expand-wrapper >}}} +{{% expand "View example results" %}} + +The query uses the `COUNT()` function to count the number of `water_level` points per 15 minute interval. +Results are then ordered by location and time. + +| location | time | count | +| :----------- | :------------------- | ----: | +| coyote_creek | 2019-09-16T23:45:00Z | 1 | +| coyote_creek | 2019-09-17T00:00:00Z | 2 | +| coyote_creek | 2019-09-17T00:15:00Z | 3 | +| coyote_creek | 2019-09-17T00:30:00Z | 2 | +| coyote_creek | 2019-09-17T00:45:00Z | 3 | +| santa_monica | 2019-09-16T23:45:00Z | 1 | +| santa_monica | 2019-09-17T00:00:00Z | 2 | +| santa_monica | 2019-09-17T00:15:00Z | 3 | +| santa_monica | 2019-09-17T00:30:00Z | 2 | +| santa_monica | 2019-09-17T00:45:00Z | 3 | + +{{% /expand %}} +{{< /expand-wrapper >}} diff --git a/content/influxdb/cloud-serverless/reference/sql/having.md b/content/influxdb/cloud-serverless/reference/sql/having.md new file mode 100644 index 000000000..8981075af --- /dev/null +++ b/content/influxdb/cloud-serverless/reference/sql/having.md @@ -0,0 +1,85 @@ +--- +title: HAVING clause +description: > + Use the `HAVING` clause to filter query results based on values returned from + an aggregate operation. +menu: + influxdb_cloud_serverless: + name: HAVING clause + parent: SQL reference +weight: 205 +--- + +The `HAVING` clause places conditions on results created by an aggregate operation on groups. +The `HAVING` clause must follow the `GROUP BY` clause and precede the `ORDER BY` clause. + +{{% note %}} +The `WHERE` clause filters rows based on specified conditions _before_ the aggregate operation. +The `HAVING` clause filters rows based on specified conditions _after_ the aggregate operation has taken place. +{{% /note %}} + +- [Syntax](#syntax) +- [Examples](#examples) + +## Syntax + +```sql +SELECT_clause FROM_clause [WHERE_clause] [GROUP_BY_clause] [HAVING_clause] [ORDER_BY_clause] +``` + +## Examples + +### Return rows with an aggregate value greater than a specified number + +```sql +SELECT + MEAN("water_level") AS "mean_water_level", "location" +FROM + "h2o_feet" +GROUP BY + "location" +HAVING + "mean_water_level" > 5 +``` + +{{< expand-wrapper >}} +{{% expand "View example results" %}} +The query returns on rows with values in the `mean_water_level` greater than 5 _after_ the aggregate operation. + +| location | mean_water_level | +| :----------- | :---------------- | +| coyote_creek | 5.359142420303919 | +{{% /expand %}} +{{< /expand-wrapper >}} + +### Return the average result greater than a specified number from a specific time range + +```sql +SELECT + AVG("water_level") AS "avg_water_level", + "time" +FROM + "h2o_feet" +WHERE + time >= '2019-09-01T00:00:00Z' AND time <= '2019-09-02T00:00:00Z' +GROUP BY + "time" +HAVING + "avg_water_level" > 6.82 +ORDER BY + "time" +``` + +{{< expand-wrapper >}} +{{% expand "View example results" %}} + +The query calculates the average water level per time and only returns rows with an average greater than 6.82 during the specified time range. + +| time | avg_water_level | +| :------------------- | -----------------: | +| 2019-09-01T22:06:00Z | 6.8225 | +| 2019-09-01T22:12:00Z | 6.8405000000000005 | +| 2019-09-01T22:30:00Z | 6.8505 | +| 2019-09-01T22:36:00Z | 6.8325 | +{{% /expand %}} +{{< /expand-wrapper >}} \ No newline at end of file diff --git a/content/influxdb/cloud-serverless/reference/sql/information-schema.md b/content/influxdb/cloud-serverless/reference/sql/information-schema.md new file mode 100644 index 000000000..9c7cbbfcc --- /dev/null +++ b/content/influxdb/cloud-serverless/reference/sql/information-schema.md @@ -0,0 +1,146 @@ +--- +title: Information schema +description: > + The `SHOW TABLES`, `SHOW COLUMNS`, and `SHOW ALL` commands return metadata related to + your data schema. +menu: + influxdb_cloud_serverless: + parent: SQL reference +weight: 210 +--- + +The underlying query engine for the InfluxDB SQL implementation, +[DataFusion](https://arrow.apache.org/datafusion/index.html), provides commands +that return metadata related to your data schema. +To access this information, use the `SHOW TABLES`, `SHOW COLUMNS`, and +`SHOW ALL` commands or query views in the [ISO](https://www.iso.org/) SQL +`information_schema` schema. + +In the context of InfluxDB, a [measurement](/influxdb/cloud-serverless/reference/glossary/#measurement) +is represented as a table. Time, [tags](/influxdb/cloud-serverless/reference/glossary/#tag), +and [fields](/influxdb/cloud-serverless/reference/glossary/#field) are each represented +by columns in a table. + +- [SHOW TABLES](#show-tables) + - [Example SHOW TABLES output](#example-show-tables-output) +- [SHOW COLUMNS](#show-columns) + - [Example SHOW COLUMNS output](#example-show-columns-output) +- [SHOW ALL](#show-all) + - [Example SHOW ALL output](#view-show-all-example-output) + +## SHOW TABLES + +Returns information about tables (measurements) in an InfluxDB bucket. + +```sql +SHOW TABLES +``` + +You can also query the `information_schema.tables` view: + +```sql +SELECT * FROM information_schema.tables +``` + +#### Example SHOW TABLES output + +_Measurements are those that use the **`iox` table schema**._ + +| table_catalog | table_schema | table_name | table_type | +| :------------ | :----------------- | :---------- | :--------- | +| public | iox | home | BASE TABLE | +| public | system | queries | BASE TABLE | +| public | information_schema | tables | VIEW | +| public | information_schema | views | VIEW | +| public | information_schema | columns | VIEW | +| public | information_schema | df_settings | VIEW | + +## SHOW COLUMNS + +Returns information about the schema of a table (measurement) in an InfluxDB bucket. + +```sql +SHOW COLUMNS FROM example_table +``` + +You can also query the `information_schema.columns` view: + +```sql +SELECT + table_catalog, + table_schema, + table_name, + column_name, + data_type, + is_nullable +FROM information_schema.columns +WHERE table_name = 'example_table' +``` + +#### Example SHOW COLUMNS output + +| table_catalog | table_schema | table_name | column_name | data_type | is_nullable | +| :------------ | :----------- | :--------- | :---------- | :-------------------------- | :---------- | +| public | iox | home | co | Int64 | YES | +| public | iox | home | hum | Float64 | YES | +| public | iox | home | room | Dictionary(Int32, Utf8) | YES | +| public | iox | home | temp | Float64 | YES | +| public | iox | home | time | Timestamp(Nanosecond, None) | NO | + +## SHOW ALL + +Returns the configuration options of the current session. + +```sql +SHOW ALL +``` + +You can also query the `information_schema.df_settings` view: + +```sql +SELECT * FROM information_schema.df_settings +``` + +{{< expand-wrapper >}} +{{% expand "View `SHOW ALL` example output" %}} + +| name | setting | +| :-------------------------------------------------------- | :------- | +| datafusion.catalog.create_default_catalog_and_schema | true | +| datafusion.catalog.default_catalog | public | +| datafusion.catalog.default_schema | iox | +| datafusion.catalog.format | | +| datafusion.catalog.has_header | false | +| datafusion.catalog.information_schema | true | +| datafusion.catalog.location | | +| datafusion.execution.batch_size | 8192 | +| datafusion.execution.coalesce_batches | true | +| datafusion.execution.collect_statistics | false | +| datafusion.execution.parquet.enable_page_index | false | +| datafusion.execution.parquet.metadata_size_hint | | +| datafusion.execution.parquet.pruning | true | +| datafusion.execution.parquet.pushdown_filters | true | +| datafusion.execution.parquet.reorder_filters | true | +| datafusion.execution.parquet.skip_metadata | true | +| datafusion.execution.target_partitions | 4 | +| datafusion.execution.time_zone | +00:00 | +| datafusion.explain.logical_plan_only | false | +| datafusion.explain.physical_plan_only | false | +| datafusion.optimizer.enable_round_robin_repartition | true | +| datafusion.optimizer.filter_null_join_keys | false | +| datafusion.optimizer.hash_join_single_partition_threshold | 1048576 | +| datafusion.optimizer.max_passes | 3 | +| datafusion.optimizer.prefer_hash_join | true | +| datafusion.optimizer.repartition_aggregations | true | +| datafusion.optimizer.repartition_file_min_size | 10485760 | +| datafusion.optimizer.repartition_file_scans | true | +| datafusion.optimizer.repartition_joins | true | +| datafusion.optimizer.repartition_sorts | false | +| datafusion.optimizer.repartition_windows | true | +| datafusion.optimizer.skip_failed_rules | true | +| datafusion.optimizer.top_down_join_key_reordering | true | +| datafusion.sql_parser.enable_ident_normalization | true | +| datafusion.sql_parser.parse_float_as_decimal | false | + +{{% /expand %}} +{{< /expand-wrapper >}} diff --git a/content/influxdb/cloud-serverless/reference/sql/limit.md b/content/influxdb/cloud-serverless/reference/sql/limit.md new file mode 100644 index 000000000..c8ccff561 --- /dev/null +++ b/content/influxdb/cloud-serverless/reference/sql/limit.md @@ -0,0 +1,76 @@ +--- +title: LIMIT clause +description: > + Use the `LIMIT` clause to limit the number of results returned by a query. +menu: + influxdb_cloud_serverless: + name: LIMIT clause + parent: SQL reference +weight: 206 +--- + +The `LIMIT` clause limits the number of rows returned by a query to a specified non-negative integer. + +- [Syntax](#syntax) +- [Examples](#examples) + +## Syntax + +```sql +SELECT_clause FROM_clause [WHERE_clause] [GROUP_BY_clause] [ORDER_BY_clause] LIMIT +``` + +## Examples + +### Limit results to a maximum of five rows + +```sql +SELECT + "water_level","location", "time" +FROM + "h2o_feet" +LIMIT + 5 +``` +{{< expand-wrapper >}} +{{% expand "View example results" %}} +The query returns a maximum of 5 results. + +| location | time | water_level | +| :----------- | :----------------------- | ----------- | +| coyote_creek | 2019-08-28T00:00:00.000Z | 4.206 | +| coyote_creek | 2019-08-28T00:06:00.000Z | 4.052 | +| coyote_creek | 2019-08-28T00:12:00.000Z | 3.901 | +| coyote_creek | 2019-08-28T00:18:00.000Z | 3.773 | +| coyote_creek | 2019-08-28T00:24:00.000Z | 3.632 | +{{% /expand %}} +{{< /expand-wrapper >}} + +### Sort and limit results + +Use the `ORDER BY` and `LIMIT` clauses to first sort results by specified columns, +then limit the sorted results by a specified number. + +```sql +SELECT + "water_level", "location", "time" +FROM + "h2o_feet" +ORDER BY + "water_level" DESC +LIMIT + 3 +``` + +{{< expand-wrapper >}} +{{% expand "View example results" %}} +The query returns the highest 3 `water_level` readings in the `h2o_feet` measurement. + +| location | time | water_level | +| :----------- | :----------------------- | ----------- | +| coyote_creek | 2019-08-27T13:42:00.000Z | -0.561 | +| coyote_creek | 2019-08-29T15:24:00.000Z | -0.571 | +| coyote_creek | 2019-08-28T14:24:00.000Z | -0.587 | +{{% /expand %}} +{{< /expand-wrapper >}} + diff --git a/content/influxdb/cloud-serverless/reference/sql/order-by.md b/content/influxdb/cloud-serverless/reference/sql/order-by.md new file mode 100644 index 000000000..09a5c193a --- /dev/null +++ b/content/influxdb/cloud-serverless/reference/sql/order-by.md @@ -0,0 +1,98 @@ +--- +title: ORDER BY clause +list_title: ORDER BY clause +description: > + Use the `ORDER BY` clause to sort results by specified columns and order. +menu: + influxdb_cloud_serverless: + name: ORDER BY clause + parent: SQL reference +weight: 204 +--- + +The `ORDER BY` clause sort results by specified columns and order. +Sort data based on fields, tags, and timestamps. +The following orders are supported: + +- `ASC`: ascending _(default)_ +- `DESC`: descending + +- [Syntax](#syntax) +- [Examples](#examples) + +## Syntax + +```sql +[SELECT CLAUSE] [FROM CLAUSE] [ ORDER BY expression [ ASC | DESC ][, …] ] +``` + +{{% note %}} +**Note:** If your query includes a `GROUP BY` clause, the `ORDER BY` clause must appear **after** the `GROUP BY` clause. +{{% /note %}} + +## Examples + +### Sort data by time with the most recent first + +```sql +SELECT + "water_level", "time" +FROM + "h2o_feet" +WHERE + "location" = 'coyote_creek' +ORDER BY + time DESC +``` + +{{< expand-wrapper >}} +{{% expand "View example results" %}} +| time | water_level | +| :----------------------- | :----------- | +| 2019-09-17T16:24:00.000Z | 3.235 | +| 2019-09-17T16:18:00.000Z | 3.314 | +| 2019-09-17T16:12:00.000Z | 3.402 | +| 2019-09-17T16:06:00.000Z | 3.497 | +| 2019-09-17T16:00:00.000Z | 3.599 | +| 2019-09-17T15:54:00.000Z | 3.704 | +{{% /expand %}} +{{< /expand-wrapper >}} + +### Sort data by tag or field values + +```sql +SELECT + "water_level", "time", "location" +FROM + "h2o_feet" +ORDER BY + "location", "water_level" DESC +``` + +### Sort data by selection order + +```sql +SELECT + "location","water_level", "time" +FROM + "h2o_feet" +ORDER BY + 1, 2 +``` + +{{< expand-wrapper >}} +{{% expand "View example results" %}} +The query sorts results the location of a column in the `SELECT` statement: +first by `location` (1), and second by `water_level` (2). + +| location | time | water_level | +| :----------- | :----------------------- | :---------- | +| coyote_creek | 2019-08-28T14:30:00.000Z | -0.61 | +| coyote_creek | 2019-08-29T15:18:00.000Z | -0.594 | +| coyote_creek | 2019-08-28T14:36:00.000Z | -0.591 | +| coyote_creek | 2019-08-28T14:24:00.000Z | -0.587 | +| coyote_creek | 2019-08-29T15:24:00.000Z | -0.571 | +| coyote_creek | 2019-08-27T13:42:00.000Z | -0.561 | + +{{% /expand %}} +{{< /expand-wrapper >}} diff --git a/content/influxdb/cloud-serverless/reference/sql/select.md b/content/influxdb/cloud-serverless/reference/sql/select.md new file mode 100644 index 000000000..92f0c09a2 --- /dev/null +++ b/content/influxdb/cloud-serverless/reference/sql/select.md @@ -0,0 +1,112 @@ +--- +title: SELECT statement +description: > + Use the SQL `SELECT` statement to query data from a measurement. +menu: + influxdb_cloud_serverless: + name: SELECT statement + parent: SQL reference +weight: 201 +--- + +Use the `SELECT` statement to query data from an InfluxDB measurement. +The `SELECT` clause is required when querying data in SQL. + +- [Syntax](#syntax) +- [Examples](#examples) + +### Syntax + +```sql +SELECT a, b, "time" FROM +``` + +{{% note %}} +**Note:** When querying InfluxDB, the `SELECT` statement **always requires** a `FROM` clause. +{{% /note %}} + +The SELECT clause supports the following: + + - `SELECT *` - return all tags, fields and timestamps. + - `SELECT DISTINCT` to return all distinct (different) values. + - `SELECT <"field" or "tag">` - returns a specified field or tag. + - `SELECT <"field" or "tag">, <"field" or "tag">` - returns more than one tag or field. + - `SELECT <"field"> AS a `- return the field as the alias. + +## Examples + +The following examples use data from the NOAA database. +To download the NOAA test data see [NOAA water sample data](/influxdb/v2.6/reference/sample-data/#noaa-water-sample-data). + +### Select all fields and tags from a measurement + +```sql +SELECT * FROM h2o_feet LIMIT 10 +``` + +{{< expand-wrapper >}} +{{% expand "View example results" %}} +| level description | location | time | water_level | +| :------------------------ | :----------- | :----------------------- | :---------- | +| at or greater than 9 feet | coyote_creek | 2019-09-01T00:00:00.000Z | 9.126144144 | +| at or greater than 9 feet | coyote_creek | 2019-09-01T00:06:00.000Z | 9.009 | +| between 6 and 9 feet | coyote_creek | 2019-09-01T00:12:00.000Z | 8.862 | +| between 6 and 9 feet | coyote_creek | 2019-09-01T00:18:00.000Z | 8.714 | +{{% /expand %}} +{{< /expand-wrapper >}} + +### Select specific tags and fields from a measurement + +```sql +SELECT "location", "water_level" FROM "h2o_feet" +``` + +{{< expand-wrapper >}} +{{% expand "View example results" %}} +| location | water_level | +| :----------- | :---------- | +| coyote_creek | 9.126144144 | +| coyote_creek | 9.009 | +| coyote_creek | 8.862 | +| coyote_creek | 8.714 | +| coyote_creek | 8.547 | +{{% /expand %}} +{{< /expand-wrapper >}} + +### Select a field, tag and timestamp from a measurement + +```sql +SELECT "water_level", "location", "time" FROM "h2o_feet" +``` + +{{< expand-wrapper >}} +{{% expand "View example results" %}} +| location | time | water_level | +| :----------- | :----------------------- | :---------- | +| coyote_creek | 2019-08-20T00:00:00.000Z | 8.638 | +| coyote_creek | 2019-08-20T00:06:00.000Z | 8.658 | +| coyote_creek | 2019-08-20T00:12:00.000Z | 8.678 | +{{% /expand %}} +{{< /expand-wrapper >}} + +### Select a field and perform basic arithmetic + +The following query takes the value of water_level, multiplies it by 3 and adds 5 to the result. + +```sql +SELECT ("water_level" * 3) + 5 FROM "h2o_feet" +``` + +{{< expand-wrapper >}} +{{% expand "View example results" %}} +| water_level | +| :----------------- | +| 30.128 | +| 30.641000000000002 | +| 31.142000000000003 | +| 31.586 | +| 32.027 | +| 32.378432432 | +{{% /expand %}} +{{< /expand-wrapper >}} + diff --git a/content/influxdb/cloud-serverless/reference/sql/table-value-constructor.md b/content/influxdb/cloud-serverless/reference/sql/table-value-constructor.md new file mode 100644 index 000000000..a4cbf3e7e --- /dev/null +++ b/content/influxdb/cloud-serverless/reference/sql/table-value-constructor.md @@ -0,0 +1,121 @@ +--- +title: Table value constructor +description: > + The table value constructor (TVC) uses the `VALUES` keyword to specify a set of + row value expressions to construct into a table. +menu: + influxdb_cloud_serverless: + parent: SQL reference +weight: 220 +--- + +The table value constructor (TVC) uses the `VALUES` keyword to specify a set of +row value expressions to construct into a table. +The TVC can be used in the `FROM` clause +to build an ad hoc table at query time. + +```sql +VALUES (row_value_list)[,...n] +``` + +##### Arguments + +- **row_value_list**: + Comma-delimited list of column values. + Enclose each list in parentheses and separate multiple lists with commas. + Each list must have the same number of values and values must be in the same + order as columns in the table. + Each list must contain a value for each column. + +## Usage + +```sql +SELECT + expression[,...n] +FROM + (VALUES (row_value_list)[,...n]) [AS] table_name(column_name[,...n]) +``` + +{{% note %}} +When using the TVC, the `AS` keyword is optional and implied when naming the +table and providing column names. +{{% /note %}} + +## Examples + +- [Select data from an ad hoc table](#select-data-from-an-ad-hoc-table) + + +### Select data from an ad hoc table + +```sql +SELECT * +FROM + (VALUES ('2023-01-01 12:00:00'::TIMESTAMP, 1.23, 4.56), + ('2023-01-01 13:00:00'::TIMESTAMP, 2.46, 8.1), + ('2023-01-01 13:00:00'::TIMESTAMP, 4.81, 16.2) + ) AS data(time, f1, f2) +``` + +| time | f1 | f2 | +| :------------------- | ---: | ---: | +| 2023-01-01T12:00:00Z | 1.23 | 4.56 | +| 2023-01-01T13:00:00Z | 2.46 | 8.1 | +| 2023-01-01T13:00:00Z | 4.81 | 16.2 | + + diff --git a/content/influxdb/cloud-serverless/reference/sql/union.md b/content/influxdb/cloud-serverless/reference/sql/union.md new file mode 100644 index 000000000..5ca20bdcc --- /dev/null +++ b/content/influxdb/cloud-serverless/reference/sql/union.md @@ -0,0 +1,168 @@ +--- +title: UNION clause +description: > + The `UNION` clause combines the results of two or more `SELECT` statements into + a single result set. +menu: + influxdb_cloud_serverless: + name: UNION clause + parent: SQL reference +weight: 206 +--- + +The `UNION` clause combines the results of two or more `SELECT` statements into +a single result set. +By default, `UNION` only keeps unique rows. +To keep all rows, including duplicates, use `UNION ALL`. + +- [Syntax](#syntax) +- [Examples](#examples) + +**When using the `UNION` clause**: + +- The number of columns in each result set must be the same. +- Columns must be in the same order and of the same or compatible data types. + +## Syntax + +```sql +SELECT expression[,...n] +FROM measurement_1 +UNION [ALL] +SELECT expression[,...n] +FROM measurement_2 +``` + +## Examples + +- [Union results from different measurements](#union-results-from-different-measurements) +- [Return the highest and lowest three results in a single result set](#return-the-highest-and-lowest-three-results-in-a-single-result-set) +- [Union query results with custom data](#union-query-results-with-custom-data) + +### Union results from different measurements + +```sql +( + SELECT + 'h2o_pH' AS measurement, + time, + "pH" AS "water_pH" + FROM "h2o_pH" + LIMIT 4 +) +UNION +( + SELECT + 'h2o_quality' AS measurement, + time, + index + FROM h2o_quality + LIMIT 4 +) +``` +{{< expand-wrapper >}} +{{% expand "View example results" %}} + +| measurement | time | water_pH | +| :---------- | :------------------- | -------: | +| h2o_pH | 2019-08-27T00:12:00Z | 7 | +| h2o_pH | 2019-08-27T00:18:00Z | 8 | +| h2o_quality | 2019-09-11T01:06:00Z | 89 | +| h2o_pH | 2019-08-27T00:06:00Z | 7 | +| h2o_quality | 2019-09-11T00:00:00Z | 26 | +| h2o_quality | 2019-09-11T01:00:00Z | 19 | +| h2o_quality | 2019-09-11T00:48:00Z | 65 | +| h2o_pH | 2019-08-27T00:00:00Z | 8 | + +{{% /expand %}} +{{< /expand-wrapper >}} + +### Return the highest and lowest three results in a single result set + +_The following example uses the sample data set provided in +[Get started with InfluxDB tutorial](/influxdb/cloud-serverless/get-started/write/#construct-line-protocol)._ + +```sql +( + SELECT + 'low' as type, + time, + co + FROM home + ORDER BY co ASC + LIMIT 3 +) +UNION +( + SELECT + 'high' as type, + time, + co + FROM home + ORDER BY co DESC + LIMIT 3 +) +``` + +{{< expand-wrapper >}} +{{% expand "View example results" %}} + +| type | time | co | +| :--- | :------------------- | --: | +| high | 2022-01-01T20:00:00Z | 26 | +| high | 2022-01-01T19:00:00Z | 22 | +| high | 2022-01-01T18:00:00Z | 18 | +| low | 2022-01-01T14:00:00Z | 0 | +| low | 2022-01-01T10:00:00Z | 0 | +| low | 2022-01-01T08:00:00Z | 0 | + +{{% /expand %}} +{{< /expand-wrapper >}} + +### Union query results with custom data + +_The following example uses the sample data set provided in +[Get started with InfluxDB tutorial](/influxdb/cloud-serverless/get-started/write/#construct-line-protocol). +It also uses the [table value constructor](/influxdb/cloud-serverless/reference/sql/table-value-constructor/) +to build a table with custom data._ + +```sql +SELECT * +FROM home +WHERE + time >= '2022-01-01T08:00:00Z' + AND time <= '2022-01-01T12:00:00Z' +UNION +SELECT * FROM + (VALUES (0, 34.2, 'Bedroom', 21.1, '2022-01-01T08:00:00Z'::TIMESTAMP), + (0, 34.5, 'Bedroom', 21.2, '2022-01-01T09:00:00Z'::TIMESTAMP), + (0, 34.6, 'Bedroom', 21.5, '2022-01-01T10:00:00Z'::TIMESTAMP), + (0, 34.5, 'Bedroom', 21.8, '2022-01-01T11:00:00Z'::TIMESTAMP), + (0, 33.9, 'Bedroom', 22.0, '2022-01-01T12:00:00Z'::TIMESTAMP) + ) newRoom(co, hum, room, temp, time) +ORDER BY room, time +``` + +{{< expand-wrapper >}} +{{% expand "View example results" %}} + +| co | hum | room | temp | time | +| --: | ---: | :---------- | ---: | :------------------- | +| 0 | 34.2 | Bedroom | 21.1 | 2022-01-01T08:00:00Z | +| 0 | 34.5 | Bedroom | 21.2 | 2022-01-01T09:00:00Z | +| 0 | 34.6 | Bedroom | 21.5 | 2022-01-01T10:00:00Z | +| 0 | 34.5 | Bedroom | 21.8 | 2022-01-01T11:00:00Z | +| 0 | 33.9 | Bedroom | 22 | 2022-01-01T12:00:00Z | +| 0 | 35.9 | Kitchen | 21 | 2022-01-01T08:00:00Z | +| 0 | 36.2 | Kitchen | 23 | 2022-01-01T09:00:00Z | +| 0 | 36.1 | Kitchen | 22.7 | 2022-01-01T10:00:00Z | +| 0 | 36 | Kitchen | 22.4 | 2022-01-01T11:00:00Z | +| 0 | 36 | Kitchen | 22.5 | 2022-01-01T12:00:00Z | +| 0 | 35.9 | Living Room | 21.1 | 2022-01-01T08:00:00Z | +| 0 | 35.9 | Living Room | 21.4 | 2022-01-01T09:00:00Z | +| 0 | 36 | Living Room | 21.8 | 2022-01-01T10:00:00Z | +| 0 | 36 | Living Room | 22.2 | 2022-01-01T11:00:00Z | +| 0 | 35.9 | Living Room | 22.2 | 2022-01-01T12:00:00Z | + +{{% /expand %}} +{{< /expand-wrapper >}} diff --git a/content/influxdb/cloud-serverless/reference/sql/where.md b/content/influxdb/cloud-serverless/reference/sql/where.md new file mode 100644 index 000000000..b35a0edec --- /dev/null +++ b/content/influxdb/cloud-serverless/reference/sql/where.md @@ -0,0 +1,132 @@ +--- +title: WHERE clause +list_title: WHERE clause +description: > + Use the `WHERE` clause to filter results based on fields, tags, or timestamps. +menu: + influxdb_cloud_serverless: + name: WHERE clause + parent: SQL reference +weight: 202 +--- + +Use the `WHERE` clause to filter results based on fields, tags, or timestamps. + +- [Syntax](#syntax) +- [Examples](#examples) + +## Syntax + +```sql +SELECT_clause FROM_clause WHERE [(AND|OR) [...]] +``` + +{{% note %}} +**Note:** Unlike InfluxQL, SQL **supports** `OR` in the `WHERE` clause to specify multiple conditions, including time ranges. +{{% /note %}} + +## Examples + +Note that single quotes are required for string literals in the `WHERE` clause. + +### Filter data based on field values + +```sql +SELECT * +FROM "h2o_feet" +WHERE "water_level" >= 9.78 +``` + +{{< expand-wrapper >}} +{{% expand "View example results" %}} + +The query returns data from the `h2o_feet` measurement with `water_level` field values +that are greater than or equal to 9.78. + +| level description | location | time | water_level | +| :------------------------ | :----------- | :----------------------- | :---------- | +| at or greater than 9 feet | coyote_creek | 2019-09-01T23:06:00.000Z | 9.8 | +| at or greater than 9 feet | coyote_creek | 2019-09-01T23:12:00.000Z | 9.829 | +| at or greater than 9 feet | coyote_creek | 2019-09-01T23:18:00.000Z | 9.862 | +| at or greater than 9 feet | coyote_creek | 2019-09-01T23:24:00.000Z | 9.892 | +| at or greater than 9 feet | coyote_creek | 2019-09-01T23:30:00.000Z | 9.902 | +| at or greater than 9 feet | coyote_creek | 2019-09-01T23:36:00.000Z | 9.898 | + +{{% /expand %}} +{{< /expand-wrapper >}} + + +### Filter data based on specific tag and field values + +```sql +SELECT * +FROM "h2o_feet" +WHERE "location" = 'santa_monica' and "level description" = 'below 3 feet' +``` + +{{< expand-wrapper >}} +{{% expand "View example results" %}} + +The query returns all data from the `h2o_feet` measurement with the `location` tag key, `santa_monica`, +and a `level description` field value that equals `below 3 feet`. + +| level description | location | time | water_level | +| :---------------- | :----------- | :----------------------- | :---------- | +| below 3 feet | santa_monica | 2019-09-01T00:00:00.000Z | 1.529 | +| below 3 feet | santa_monica | 2019-09-01T00:06:00.000Z | 1.444 | +| below 3 feet | santa_monica | 2019-09-01T00:12:00.000Z | 1.335 | +| below 3 feet | santa_monica | 2019-09-01T00:18:00.000Z | 1.345 | +| below 3 feet | santa_monica | 2019-09-01T00:24:00.000Z | 1.27 | + +{{% /expand %}} +{{< /expand-wrapper >}} + +### Filter data within a specific time period + +```sql +SELECT * +FROM h2o_feet +WHERE "location" = 'santa_monica' +AND "time" >= '2019-08-19T12:00:00Z'::timestamp AND "time" <= '2019-08-19T13:00:00Z'::timestamp +``` + +{{< expand-wrapper >}} +{{% expand "View example results" %}} + +The query returns results with timestamps greater than or equal to `08-19-2019T12:00:00Z` and +less than or equal to `08-19-2019T13:00:00Z`. + +| level description | location | time | water_level | +| :---------------- | :----------- | :----------------------- | :---------- | +| below 3 feet | santa_monica | 2019-08-19T12:00:00.000Z | 2.533 | +| below 3 feet | santa_monica | 2019-08-19T12:06:00.000Z | 2.543 | +| below 3 feet | santa_monica | 2019-08-19T12:12:00.000Z | 2.385 | +| below 3 feet | santa_monica | 2019-08-19T12:18:00.000Z | 2.362 | +| below 3 feet | santa_monica | 2019-08-19T12:24:00.000Z | 2.405 | +| below 3 feet | santa_monica | 2019-08-19T12:30:00.000Z | 2.398 | + +{{% /expand %}} +{{< /expand-wrapper >}} + +### Filter data using the OR operator + +```sql +SELECT * +FROM "h2o_feet" +WHERE "level description" = 'less than 3 feet' OR "water_level" < 2.5 +``` + +{{< expand-wrapper >}} +{{% expand "View example results" %}} + +The query returns results with a `level description` field value equal to `less than 3 feet` or a `water_level` field value less than 2.5. + +| level description | location | time | water_level | +| :---------------- | :----------- | :----------------------- | :---------- | +| below 3 feet | coyote_creek | 2019-08-25T10:06:00.000Z | 2.398 | +| below 3 feet | coyote_creek | 2019-08-25T10:12:00.000Z | 2.234 | +| below 3 feet | coyote_creek | 2019-08-25T10:18:00.000Z | 2.064 | +| below 3 feet | coyote_creek | 2019-08-25T10:24:00.000Z | 1.893 | + +{{% /expand %}} +{{< /expand-wrapper >}} diff --git a/content/influxdb/cloud-iox/reference/syntax/_index.md b/content/influxdb/cloud-serverless/reference/syntax/_index.md similarity index 79% rename from content/influxdb/cloud-iox/reference/syntax/_index.md rename to content/influxdb/cloud-serverless/reference/syntax/_index.md index e91fc7a80..565f9bdc2 100644 --- a/content/influxdb/cloud-iox/reference/syntax/_index.md +++ b/content/influxdb/cloud-serverless/reference/syntax/_index.md @@ -5,10 +5,10 @@ description: > writing, querying, processing, and deleting data. weight: 105 menu: - influxdb_cloud_iox: + influxdb_cloud_serverless: name: Other syntaxes parent: Reference -influxdb/cloud-iox/tags: [syntax] +influxdb/cloud-serverless/tags: [syntax] --- {{< duplicate-oss >}} diff --git a/content/influxdb/cloud-iox/reference/syntax/annotated-csv/_index.md b/content/influxdb/cloud-serverless/reference/syntax/annotated-csv/_index.md similarity index 94% rename from content/influxdb/cloud-iox/reference/syntax/annotated-csv/_index.md rename to content/influxdb/cloud-serverless/reference/syntax/annotated-csv/_index.md index 623eb297e..396358b7b 100644 --- a/content/influxdb/cloud-iox/reference/syntax/annotated-csv/_index.md +++ b/content/influxdb/cloud-serverless/reference/syntax/annotated-csv/_index.md @@ -5,16 +5,16 @@ description: > You can write data to InfluxDB using annotated CSV and the `influx write` command. weight: 103 menu: - influxdb_cloud_iox: + influxdb_cloud_serverless: parent: Other syntaxes -influxdb/cloud-iox/tags: [csv, syntax] +influxdb/cloud-serverless/tags: [csv, syntax] related: - - /influxdb/cloud-iox/reference/syntax/annotated-csv/extended/ + - /influxdb/cloud-serverless/reference/syntax/annotated-csv/extended/ --- The InfluxDB `/api/v2/query` API returns query results in annotated CSV format. You can also write data to InfluxDB using annotated CSV and the `influx write` command, -or [upload a CSV file](/influxdb/cloud-iox/write-data/csv/user-interface) in the InfluxDB UI. +or [upload a CSV file](/influxdb/cloud-serverless/write-data/csv/user-interface) in the InfluxDB UI. CSV tables must be encoded in UTF-8 and Unicode Normal Form C as defined in [UAX15](http://www.unicode.org/reports/tr15/). InfluxDB removes carriage returns before newline characters. @@ -117,7 +117,7 @@ Subsequent columns contain annotation values as shown in the table below. {{% note %}} -To encode a table with its [group key](/influxdb/cloud-iox/reference/glossary/#group-key), +To encode a table with its [group key](/influxdb/cloud-serverless/reference/glossary/#group-key), the `datatype`, `group`, and `default` annotations must be included. If a table has no rows, the `default` annotation provides the group key values. {{% /note %}} @@ -140,7 +140,7 @@ If a table has no rows, the `default` annotation provides the group key values. The `datatype` annotation accepts [data types](#data-types) and **line protocol elements**. Line protocol elements identify how columns are converted into line protocol when using the -[`influx write` command](/influxdb/cloud-iox/reference/cli/influx/write/) to write annotated CSV to InfluxDB. +[`influx write` command](/influxdb/cloud-serverless/reference/cli/influx/write/) to write annotated CSV to InfluxDB. | Line protocol element | Description | |:--------------------- |:----------- | @@ -157,7 +157,7 @@ Columns with [data types](#data-types) (other than `dateTime`) in the Columns without a specified data type default to `field` when converted to line protocol and **column values are left unmodified** in line protocol. _See an example [below](#example-of-mixing-data-types-line-protocol-elements) and -[line protocol data types and format](/influxdb/cloud-iox/reference/syntax/line-protocol/#data-types-and-format)._ +[line protocol data types and format](/influxdb/cloud-serverless/reference/syntax/line-protocol/#data-types-and-format)._ ### Time columns diff --git a/content/influxdb/cloud-iox/reference/syntax/annotated-csv/extended.md b/content/influxdb/cloud-serverless/reference/syntax/annotated-csv/extended.md similarity index 54% rename from content/influxdb/cloud-iox/reference/syntax/annotated-csv/extended.md rename to content/influxdb/cloud-serverless/reference/syntax/annotated-csv/extended.md index df04f52ba..ec96a951a 100644 --- a/content/influxdb/cloud-iox/reference/syntax/annotated-csv/extended.md +++ b/content/influxdb/cloud-serverless/reference/syntax/annotated-csv/extended.md @@ -5,16 +5,16 @@ description: > how CSV data should be converted to [line protocol](/influxdb/cloud/reference/syntax/line-protocol/) and written to InfluxDB. menu: - influxdb_cloud_iox: + influxdb_cloud_serverless: name: Extended annotated CSV parent: Annotated CSV weight: 201 -influxdb/cloud-iox/tags: [csv, syntax, write] +influxdb/cloud-serverless/tags: [csv, syntax, write] related: - - /influxdb/cloud-iox/write-data/csv/ - - /influxdb/cloud-iox/reference/cli/influx/write/ - - /influxdb/cloud-iox/reference/syntax/line-protocol/ - - /influxdb/cloud-iox/reference/syntax/annotated-csv/ + - /influxdb/cloud-serverless/write-data/csv/ + - /influxdb/cloud-serverless/reference/cli/influx/write/ + - /influxdb/cloud-serverless/reference/syntax/line-protocol/ + - /influxdb/cloud-serverless/reference/syntax/annotated-csv/ --- {{< duplicate-oss >}} diff --git a/content/influxdb/cloud-iox/reference/syntax/line-protocol.md b/content/influxdb/cloud-serverless/reference/syntax/line-protocol.md similarity index 67% rename from content/influxdb/cloud-iox/reference/syntax/line-protocol.md rename to content/influxdb/cloud-serverless/reference/syntax/line-protocol.md index 9a5b329b9..0579ccb2a 100644 --- a/content/influxdb/cloud-iox/reference/syntax/line-protocol.md +++ b/content/influxdb/cloud-serverless/reference/syntax/line-protocol.md @@ -4,12 +4,12 @@ description: > InfluxDB uses line protocol to write data points. It is a text-based format that provides the measurement, tag set, field set, and timestamp of a data point. menu: - influxdb_cloud_iox: + influxdb_cloud_serverless: parent: Other syntaxes weight: 102 -influxdb/cloud-iox/tags: [write, line protocol, syntax] +influxdb/cloud-serverless/tags: [write, line protocol, syntax] related: - - /influxdb/cloud-iox/write-data/ + - /influxdb/cloud-serverless/write-data/ --- {{< duplicate-oss >}} diff --git a/content/influxdb/cloud-iox/write-data/_index.md b/content/influxdb/cloud-serverless/write-data/_index.md similarity index 72% rename from content/influxdb/cloud-iox/write-data/_index.md rename to content/influxdb/cloud-serverless/write-data/_index.md index bc9db2aef..9eb039c2c 100644 --- a/content/influxdb/cloud-iox/write-data/_index.md +++ b/content/influxdb/cloud-serverless/write-data/_index.md @@ -2,12 +2,12 @@ title: Write data to InfluxDB list_title: Write data description: > - Collect and write time series data to InfluxDB Cloud and InfluxDB OSS. + Collect and write time series data to InfluxDB Cloud Serverless and InfluxDB OSS. weight: 3 menu: - influxdb_cloud_iox: + influxdb_cloud_serverless: name: Write data -influxdb/cloud-iox/tags: [write, line protocol] +influxdb/cloud-serverless/tags: [write, line protocol] # related: # - /influxdb/cloud/api/#tag/Write, InfluxDB API /write endpoint # - /influxdb/cloud/reference/syntax/line-protocol diff --git a/content/influxdb/cloud-iox/write-data/best-practices/_index.md b/content/influxdb/cloud-serverless/write-data/best-practices/_index.md similarity index 93% rename from content/influxdb/cloud-iox/write-data/best-practices/_index.md rename to content/influxdb/cloud-serverless/write-data/best-practices/_index.md index e1e49bccf..3aca0e13c 100644 --- a/content/influxdb/cloud-iox/write-data/best-practices/_index.md +++ b/content/influxdb/cloud-serverless/write-data/best-practices/_index.md @@ -5,7 +5,7 @@ description: > Learn about the recommendations and best practices for writing data to InfluxDB. weight: 105 menu: - influxdb_cloud_iox: + influxdb_cloud_serverless: name: Best practices identifier: write-best-practices parent: Write data diff --git a/content/influxdb/cloud-iox/write-data/best-practices/schema-design.md b/content/influxdb/cloud-serverless/write-data/best-practices/schema-design.md similarity index 94% rename from content/influxdb/cloud-iox/write-data/best-practices/schema-design.md rename to content/influxdb/cloud-serverless/write-data/best-practices/schema-design.md index 8c52ffe74..882c2aadf 100644 --- a/content/influxdb/cloud-iox/write-data/best-practices/schema-design.md +++ b/content/influxdb/cloud-serverless/write-data/best-practices/schema-design.md @@ -4,13 +4,13 @@ seotitle: InfluxDB schema design recommendations and best practices description: > Design your schema for simpler and more performant queries. menu: - influxdb_cloud_iox: + influxdb_cloud_serverless: name: Schema design weight: 201 parent: write-best-practices --- -Use the following guidelines to design your [schema](/influxdb/cloud-iox/reference/glossary/#schema) +Use the following guidelines to design your [schema](/influxdb/cloud-serverless/reference/glossary/#schema) for simpler and more performant queries. @@ -56,7 +56,7 @@ tags and fields. ### Primary keys In time series data, the primary key for a row of data is typically a combination of timestamp and other attributes that uniquely identify each data point. -In InfluxDB, the primary key for a row is the combination of the point's timestamp and _tag set_ - the collection of [tag keys](/influxdb/cloud-iox/reference/glossary/#tag-key) and [tag values](/influxdb/cloud-iox/reference/glossary/#tag-value) on the point. +In InfluxDB, the primary key for a row is the combination of the point's timestamp and _tag set_ - the collection of [tag keys](/influxdb/cloud-serverless/reference/glossary/#tag-key) and [tag values](/influxdb/cloud-serverless/reference/glossary/#tag-value) on the point. ### Tags versus fields @@ -76,7 +76,7 @@ question as you design your schema. {{% note %}} The InfluxDB IOx engine supports infinite tag value and series cardinality. -Unlike InfluxDB backed by the TSM storage engine, **tag value** +Unlike InfluxDB powered by the TSM storage engine, **tag value** cardinality doesn't affect the overall performance of your database. {{% /note %}} @@ -133,7 +133,7 @@ your fields into a separate measurement. #### Avoid too many tags -In InfluxDB, the primary key for a row is the combination of the point's timestamp and _tag set_ - the collection of [tag keys](/influxdb/cloud-iox/reference/glossary/#tag-key) and [tag values](/influxdb/cloud-iox/reference/glossary/#tag-value) on the point. +In InfluxDB, the primary key for a row is the combination of the point's timestamp and _tag set_ - the collection of [tag keys](/influxdb/cloud-serverless/reference/glossary/#tag-key) and [tag values](/influxdb/cloud-serverless/reference/glossary/#tag-value) on the point. A point that contains more tags has a more complex primary key, which could impact sorting performance if you sort using all parts of the key. ### Avoid sparse schemas @@ -142,7 +142,7 @@ A sparse schema is one where, for many rows, columns contain null values. These generally stem from the following: - [non-homogenous measurement schemas](#measurement-schemas-should-be-homogenous) -- [writing individual fields with different timestamps]() +- [writing individual fields with different timestamps](#writing-individual-fields-with-different-timestamps) Sparse schemas require the InfluxDB query engine to evaluate many null columns, adding unnecessary overhead to storing and querying data. @@ -173,7 +173,8 @@ A measurement full of null values has a ["sparse" schema](#avoid-sparse-schemas) {{% expand "View example of a sparse, non-homogenous schema" %}} Non-homogenous schemas are often caused by writing points to a measurement with -inconsistent tag or field sets. For example, lets say data is collected from two +inconsistent tag or field sets. +In the following example, data is collected from two different sources and each source returns data with different tag and field sets. {{< flex >}} @@ -199,7 +200,7 @@ different sources and each source returns data with different tag and field sets {{< /flex >}} These sets of data written to the same measurement will result in a measurement -full of null values (also known as a sparse schema): +full of null values (also known as a _sparse schema_): | time | source | src | code | currency | crypto | price | cost | volume | | :------------------- | :----- | --: | :--- | :------- | :------ | ----------: | ---------: | ----------: | @@ -235,7 +236,7 @@ data attributes into a measurement name, tag key, or field key. #### Not recommended {.orange} -As a basic example, consider the following [line protocol](/influxdb/cloud-iox/reference/syntax/line-protocol/) +As a basic example, consider the following [line protocol](/influxdb/cloud-serverless/reference/syntax/line-protocol/) that embeds sensor metadata (location, model, and ID) into a tag key: ``` @@ -359,8 +360,8 @@ or regular expressions. To simplify query writing, avoid using reserved keywords or special characters in measurement names, tag keys, and field keys. -- [SQL keywords](#) -- [InfluxQL keywords](/influxdb/cloud-iox/reference/syntax/influxql/spec/#keywords) +- [SQL keywords](/influxdb/cloud-serverless/reference/sql/#keywords) +- [InfluxQL keywords](/influxdb/cloud-serverless/reference/syntax/influxql/spec/#keywords) - [Flux keywords](/{{< latest "flux" >}}/spec/lexical-elements/#keywords) When using SQL or InfluxQL to query measurements, tags, and fields with special diff --git a/content/influxdb/cloud-iox/write-data/csv/_index.md b/content/influxdb/cloud-serverless/write-data/csv/_index.md similarity index 58% rename from content/influxdb/cloud-iox/write-data/csv/_index.md rename to content/influxdb/cloud-serverless/write-data/csv/_index.md index 013b5ed90..19809baa2 100644 --- a/content/influxdb/cloud-iox/write-data/csv/_index.md +++ b/content/influxdb/cloud-serverless/write-data/csv/_index.md @@ -4,14 +4,14 @@ description: > Use the `influx CLI`, InfluxDB user interface, or Telegraf to write CSV data to InfluxDB. menu: - influxdb_cloud_iox: + influxdb_cloud_serverless: name: Write CSV data parent: Write data weight: 103 related: - - /influxdb/cloud-iox/reference/syntax/line-protocol/ - - /influxdb/cloud-iox/reference/syntax/annotated-csv/ - - /influxdb/cloud-iox/reference/cli/influx/write/ + - /influxdb/cloud-serverless/reference/syntax/line-protocol/ + - /influxdb/cloud-serverless/reference/syntax/annotated-csv/ + - /influxdb/cloud-serverless/reference/cli/influx/write/ alt_engine: /influxdb/cloud/write-data/developer-tools/csv/ --- diff --git a/content/influxdb/cloud-iox/write-data/csv/influx-cli.md b/content/influxdb/cloud-serverless/write-data/csv/influx-cli.md similarity index 87% rename from content/influxdb/cloud-iox/write-data/csv/influx-cli.md rename to content/influxdb/cloud-serverless/write-data/csv/influx-cli.md index 723b33872..a738b6948 100644 --- a/content/influxdb/cloud-iox/write-data/csv/influx-cli.md +++ b/content/influxdb/cloud-serverless/write-data/csv/influx-cli.md @@ -1,24 +1,24 @@ --- title: Write CSV data with the influx CLI description: > - Use the [`influx write` command](/influxdb/cloud-iox/reference/cli/influx/write/) to write CSV data + Use the [`influx write` command](/influxdb/cloud-serverless/reference/cli/influx/write/) to write CSV data to InfluxDB. Include annotations with the CSV data to determine how the data translates - into [line protocol](/influxdb/cloud-iox/reference/syntax/line-protocol/). + into [line protocol](/influxdb/cloud-serverless/reference/syntax/line-protocol/). menu: - influxdb_cloud_iox: + influxdb_cloud_serverless: name: Use the influx CLI parent: Write CSV data weight: 201 related: - - /influxdb/cloud-iox/reference/syntax/line-protocol/ - - /influxdb/cloud-iox/reference/syntax/annotated-csv/ - - /influxdb/cloud-iox/reference/cli/influx/write/ + - /influxdb/cloud-serverless/reference/syntax/line-protocol/ + - /influxdb/cloud-serverless/reference/syntax/annotated-csv/ + - /influxdb/cloud-serverless/reference/cli/influx/write/ alt_engine: /influxdb/cloud/write-data/developer-tools/csv/ --- -Use the [`influx write` command](/influxdb/cloud-iox/reference/cli/influx/write/) to write CSV data -to InfluxDB. Include [Extended annotated CSV](/influxdb/cloud-iox/reference/syntax/annotated-csv/extended/) -annotations to specify how the data translates into [line protocol](/influxdb/cloud-iox/reference/syntax/line-protocol/). +Use the [`influx write` command](/influxdb/cloud-serverless/reference/cli/influx/write/) to write CSV data +to InfluxDB. Include [Extended annotated CSV](/influxdb/cloud-serverless/reference/syntax/annotated-csv/extended/) +annotations to specify how the data translates into [line protocol](/influxdb/cloud-serverless/reference/syntax/line-protocol/). Include annotations in the CSV file or inject them using the `--header` flag of the `influx write` command. @@ -72,22 +72,22 @@ Use **CSV annotations** to specify which element of line protocol each CSV colum represents and how to format the data. CSV annotations are rows at the beginning of a CSV file that describe column properties. -The `influx write` command supports [Extended annotated CSV](/influxdb/cloud-iox/reference/syntax/annotated-csv/extended) +The `influx write` command supports [Extended annotated CSV](/influxdb/cloud-serverless/reference/syntax/annotated-csv/extended) which provides options for specifying how CSV data should be converted into line protocol and how data is formatted. To write data to InfluxDB, data must include the following: -- [measurement](/influxdb/cloud-iox/reference/syntax/line-protocol/#measurement) -- [field set](/influxdb/cloud-iox/reference/syntax/line-protocol/#field-set) -- [timestamp](/influxdb/cloud-iox/reference/syntax/line-protocol/#timestamp) _(Optional but recommended)_ -- [tag set](/influxdb/cloud-iox/reference/syntax/line-protocol/#tag-set) _(Optional)_ +- [measurement](/influxdb/cloud-serverless/reference/syntax/line-protocol/#measurement) +- [field set](/influxdb/cloud-serverless/reference/syntax/line-protocol/#field-set) +- [timestamp](/influxdb/cloud-serverless/reference/syntax/line-protocol/#timestamp) _(Optional but recommended)_ +- [tag set](/influxdb/cloud-serverless/reference/syntax/line-protocol/#tag-set) _(Optional)_ Use CSV annotations to specify which of these elements each column represents. ## Write raw query results back to InfluxDB -Flux returns query results in [annotated CSV](/influxdb/cloud-iox/reference/syntax/annotated-csv/). +Flux returns query results in [annotated CSV](/influxdb/cloud-serverless/reference/syntax/annotated-csv/). These results include all annotations necessary to write the data back to InfluxDB. ## Inject annotation headers @@ -226,7 +226,7 @@ influx write -b example-bucket \ ## Skip rows with errors If a row in your CSV data is missing an -[element required to write to InfluxDB](/influxdb/cloud-iox/reference/syntax/line-protocol/#elements-of-line-protocol) +[element required to write to InfluxDB](/influxdb/cloud-serverless/reference/syntax/line-protocol/#elements-of-line-protocol) or data is incorrectly formatted, when processing the row, the `influx write` command returns an error and cancels the write request. To skip rows with errors, use the `--skipRowOnError` flag. @@ -263,7 +263,7 @@ cpu,1.1 ### Define constants -Use the Extended annotated CSV [`#constant` annotation](/influxdb/cloud-iox/reference/syntax/annotated-csv/extended/#constant) +Use the Extended annotated CSV [`#constant` annotation](/influxdb/cloud-serverless/reference/syntax/annotated-csv/extended/#constant) to add a column and value to each row in the CSV data. {{< flex >}} @@ -297,7 +297,7 @@ example,source=csv count=18 1578096000000000000 ### Annotation shorthand -Extended annotated CSV supports [annotation shorthand](/influxdb/cloud-iox/reference/syntax/annotated-csv/extended/#annotation-shorthand), +Extended annotated CSV supports [annotation shorthand](/influxdb/cloud-serverless/reference/syntax/annotated-csv/extended/#annotation-shorthand), which lets you define the **column label**, **datatype**, and **default value** in the column header. {{< flex >}} @@ -370,7 +370,7 @@ example count=18i 1578096000000000000 ### Ignore columns -Use the Extended annotated CSV [`#datatype ignored` annotation](/influxdb/cloud-iox/reference/syntax/annotated-csv/extended/#ignored) +Use the Extended annotated CSV [`#datatype ignored` annotation](/influxdb/cloud-serverless/reference/syntax/annotated-csv/extended/#ignored) to ignore columns when writing CSV data to InfluxDB. {{< flex >}} @@ -403,13 +403,13 @@ m count=18i 1578096000000000000 ### Use alternate numeric formats If your CSV data contains numeric values that use a non-default fraction separator (`.`) -or contain group separators, [define your numeric format](/influxdb/cloud-iox/reference/syntax/annotated-csv/extended/#double) +or contain group separators, [define your numeric format](/influxdb/cloud-serverless/reference/syntax/annotated-csv/extended/#double) in the `double`, `long`, and `unsignedLong` datatype annotations. {{% note %}} If your **numeric format separators** include a comma (`,`), wrap the column annotation in double quotes (`""`) to prevent the comma from being parsed as a column separator or delimiter. -You can also [define a custom column separator](/influxdb/cloud-iox/reference/syntax/annotated-csv/extended/#define-custom-column-separator). +You can also [define a custom column separator](/influxdb/cloud-serverless/reference/syntax/annotated-csv/extended/#define-custom-column-separator). {{% /note %}} {{< tabs-wrapper >}} @@ -504,9 +504,9 @@ example lbs=2014u 1578096000000000000 ### Use alternate boolean format -Line protocol supports only [specific boolean values](/influxdb/cloud-iox/reference/syntax/line-protocol/#boolean). +Line protocol supports only [specific boolean values](/influxdb/cloud-serverless/reference/syntax/line-protocol/#boolean). If your CSV data contains boolean values that line protocol does not support, -[define your boolean format](/influxdb/cloud-iox/reference/syntax/annotated-csv/extended/#boolean) +[define your boolean format](/influxdb/cloud-serverless/reference/syntax/annotated-csv/extended/#boolean) in the `boolean` datatype annotation. {{< flex >}} @@ -540,7 +540,7 @@ example verified=false 1578096000000000000 The `influx write` command automatically detects **RFC3339** and **number** formatted timestamps when converting CSV to line protocol. -If using a different timestamp format, [define your timestamp format](/influxdb/cloud-iox/reference/syntax/annotated-csv/extended/#datetime) +If using a different timestamp format, [define your timestamp format](/influxdb/cloud-serverless/reference/syntax/annotated-csv/extended/#datetime) in the `dateTime` datatype annotation. {{< flex >}} diff --git a/content/influxdb/cloud-iox/write-data/csv/telegraf.md b/content/influxdb/cloud-serverless/write-data/csv/telegraf.md similarity index 69% rename from content/influxdb/cloud-iox/write-data/csv/telegraf.md rename to content/influxdb/cloud-serverless/write-data/csv/telegraf.md index 7653ae13a..39177a00e 100644 --- a/content/influxdb/cloud-iox/write-data/csv/telegraf.md +++ b/content/influxdb/cloud-serverless/write-data/csv/telegraf.md @@ -1,29 +1,37 @@ --- -title: Use Telegraf to write CSV data +title: Use Telegraf to write CSV data to InfluxDB Cloud Serverless description: > Use the Telegraf `file` input plugin to read and parse CSV data into - [line protocol](/influxdb/cloud-iox/reference/syntax/line-protocol/) + [line protocol](/influxdb/cloud-serverless/reference/syntax/line-protocol/) and write it to InfluxDB. menu: - influxdb_cloud_iox: + influxdb_cloud_serverless: name: Use Telegraf identifier: write-csv-telegraf parent: Write CSV data weight: 203 related: - /{{< latest "telegraf" >}}/data_formats/input/csv/ - - /influxdb/cloud-iox/write-data/use-telegraf/ + - /influxdb/cloud-serverless/write-data/use-telegraf/ --- Use the Telegraf `file` input plugin to read and parse CSV data into -[line protocol](/influxdb/cloud-iox/reference/syntax/line-protocol/) +[line protocol](/influxdb/cloud-serverless/reference/syntax/line-protocol/) and write it to InfluxDB. [Telegraf](/{{< latest "telegraf" >}}/) is a plugin-based agent that collects metrics from different sources and writes them to specified destinations. + + +- [Configure Telegraf to read CSV files](#configure-telegraf-to-read-csv-files) +- [Configure Telegraf to write to InfluxDB](#configure-telegraf-to-write-to-influxdb) + - [Other Telegraf configuration options](#other-telegraf-configuration-options) + + + ## Configure Telegraf to read CSV files -1. And and enable the [`inputs.file` plugin](/{{< latest "telegraf" >}}/plugins/#input-file) +1. Add and enable the [`inputs.file` plugin](/{{< latest "telegraf" >}}/plugins/#input-file) in your Telegraf configuration file. 2. Use the `files` option to specify the list of CSV files to read. CSV files must be accessible by the Telegraf agent. @@ -60,13 +68,12 @@ metrics from different sources and writes them to specified destinations. ## Configure Telegraf to write to InfluxDB -1. Add and enable the the [`outputs.influxdb_v2`](/{{< latest "telegraf" >}}/plugins/#output-influxdb_v2) +1. Add and enable the [`outputs.influxdb_v2`](/{{< latest "telegraf" >}}/plugins/#output-influxdb_v2) plugin in your Telegraf configuration file. 2. Include the following options: - **urls**: List of - {{% cloud-only %}}[InfluxDB Cloud region URLs](/influxdb/cloud-iox/reference/regions/){{% /cloud-only %}} - {{% oss-only %}}[InfluxDB URLs](/{{< latest "influxdb" >}}/reference/regions/){{% /oss-only %}} + [InfluxDB Cloud Serverless region URLs](/influxdb/cloud-serverless/reference/regions/) to write data to. - **token**: InfluxDB API token. - **organization**: InfluxDB organization name. @@ -118,4 +125,12 @@ metrics from different sources and writes them to specified destinations. {{< /expand-wrapper >}} **Restart the Telegraf agent** to apply the configuration change and write the CSV -data to InfluxDB. \ No newline at end of file +data to InfluxDB. + +#### Other Telegraf configuration options + +The preceding examples describe Telegraf configurations necessary for writing to InfluxDB Cloud Serverless. +The output plugin provides several other options for configuring the Telegraf client: + +- `influx_uint_support`: supported by the InfluxDB IOx storage engine. +- See [`influxdb_v2` plugin options](https://github.com/influxdata/telegraf/blob/master/plugins/outputs/influxdb_v2/README.md) on GitHub. \ No newline at end of file diff --git a/content/influxdb/cloud-iox/write-data/csv/user-interface.md b/content/influxdb/cloud-serverless/write-data/csv/user-interface.md similarity index 81% rename from content/influxdb/cloud-iox/write-data/csv/user-interface.md rename to content/influxdb/cloud-serverless/write-data/csv/user-interface.md index 6a6f33c6d..4dc413410 100644 --- a/content/influxdb/cloud-iox/write-data/csv/user-interface.md +++ b/content/influxdb/cloud-serverless/write-data/csv/user-interface.md @@ -3,13 +3,13 @@ title: Use the InfluxDB UI to write CSV data description: > Use the InfluxDB user interface (UI) to write CSV data to InfluxDB. menu: - influxdb_cloud_iox: + influxdb_cloud_serverless: name: Use the InfluxDB UI identifier: write-csv-ui parent: Write CSV data weight: 202 related: - - /influxdb/cloud-iox/reference/syntax/annotated-csv/ + - /influxdb/cloud-serverless/reference/syntax/annotated-csv/ --- Use the InfluxDB user interface (UI) to write CSV data to InfluxDB. @@ -20,7 +20,7 @@ Use the InfluxDB user interface (UI) to write CSV data to InfluxDB. 2. Under **File Upload**, select **Upload a CSV**. Verify your CSV file follows the supported - [annotated CSV](/influxdb/cloud-iox/reference/syntax/annotated-csv/) syntax. + [annotated CSV](/influxdb/cloud-serverless/reference/syntax/annotated-csv/) syntax. 3. Select the bucket to write to. 4. Do one of the following: diff --git a/content/influxdb/cloud-serverless/write-data/delete-data.md b/content/influxdb/cloud-serverless/write-data/delete-data.md new file mode 100644 index 000000000..d0046dac7 --- /dev/null +++ b/content/influxdb/cloud-serverless/write-data/delete-data.md @@ -0,0 +1,21 @@ +--- +title: Delete data +description: > + To delete data from an InfluxDB Cloud Serverless bucket, please contact + [InfluxData support](https://support.influxdata.com). +menu: + influxdb_cloud_serverless: + name: Delete data + parent: Write data +weight: 107 +influxdb/cloud-serverless/tags: [delete] +# related: +# - /influxdb/cloud-serverless/reference/syntax/delete-predicate/ +# - /influxdb/cloud-serverless/reference/cli/influx/delete/ +--- + +The InfluxDB `/api/v2/delete` API endpoint has been disabled for InfluxDB +Cloud Serverless organizations. To delete data from an bucket, please +contact InfluxData Support. + +Contact InfluxData Support \ No newline at end of file diff --git a/content/influxdb/cloud-iox/write-data/migrate-data/_index.md b/content/influxdb/cloud-serverless/write-data/migrate-data/_index.md similarity index 68% rename from content/influxdb/cloud-iox/write-data/migrate-data/_index.md rename to content/influxdb/cloud-serverless/write-data/migrate-data/_index.md index 5e19d0a26..6297cadd4 100644 --- a/content/influxdb/cloud-iox/write-data/migrate-data/_index.md +++ b/content/influxdb/cloud-serverless/write-data/migrate-data/_index.md @@ -1,19 +1,19 @@ --- -title: Migrate data to the InfluxDB IOx storage engine +title: Migrate data to InfluxDB Cloud Serverless description: > - Migrate data from InfluxDB backed by TSM (OSS, Enterprise, or Cloud) to - InfluxDB Cloud backed by InfluxDB IOx. + Migrate data from InfluxDB powered by TSM (OSS, Enterprise, or Cloud) to + InfluxDB Cloud Serverless. menu: - influxdb_cloud_iox: + influxdb_cloud_serverless: name: Migrate data parent: Write data weight: 104 alt_engine: /influxdb/cloud/migrate-data/ --- -Migrate data to InfluxDB Cloud backed by InfluxDB IOx from other -InfluxDB instances backed by TSM including InfluxDB OSS 1.x, 2.x, -InfluxDB Enterprise, and InfluxDB Cloud. +Migrate data to InfluxDB Cloud Serverless powered by InfluxDB IOx from other +InfluxDB instances powered by TSM including InfluxDB OSS 1.x, 2.x, +InfluxDB Enterprise, and InfluxDB Cloud (TSM). - [Should you migrate?](#should-you-migrate) - [Are you currently limited by series cardinality?](#are-you-currently-limited-by-series-cardinality) @@ -25,8 +25,8 @@ InfluxDB Enterprise, and InfluxDB Cloud. ## Should you migrate? -There are important things to consider with migrating to InfluxDB Cloud backed -by InfluxDB IOx. The following questions will help guide your decision to migrate. +There are important things to consider with migrating to InfluxDB Cloud Serverless. +The following questions will help guide your decision to migrate. #### Are you currently limited by series cardinality? @@ -38,24 +38,23 @@ question, the better solution for high series cardinality workloads. #### Do you want to use SQL to query your data? -**Yes, you should migrate**. InfluxDB {{< current-version >}} backed by InfluxDB -IOx lets you query your time series data with SQL. For more information about -querying your data with SQL, see: +**Yes, you should migrate**. InfluxDB Cloud Serverless lets you query your time +series data with SQL. For more information about querying your data with SQL, see: -- [Query data with SQL](/influxdb/cloud-iox/query-data/sql/) -- [InfluxDB SQL reference](/influxdb/cloud-iox/reference/sql/) +- [Query data with SQL](/influxdb/cloud-serverless/query-data/sql/) +- [InfluxDB SQL reference](/influxdb/cloud-serverless/reference/sql/) +When compared to querying InfluxDB powered by TSM (InfluxDB OSS 1.x, 2.x, and Enterprise), +InfluxQL queries are more performant when querying InfluxDB powered by InfluxDB IOx. --> #### Do you depend on a specific cloud provider or region? -**You should maybe migrate**. InfluxDB Cloud instances backed by InfluxDB IOx -are available from the following providers: +**You should maybe migrate**. InfluxDB Cloud Serverless instances are available +from the following providers: {{< cloud_regions type=iox-list >}} @@ -74,7 +73,7 @@ To maintain performant Flux queries against the IOx storage engine, you need to update Flux queries to use a mixture of both SQL and Flux—SQL to query the base dataset and Flux to perform other transformations that SQL does not support. For information about using SQL and Flux together for performant queries, see -[Use Flux and SQL to query data](/influxdb/cloud-iox/query-data/flux-sql/). +[Use Flux and SQL to query data](/influxdb/cloud-serverless/query-data/flux-sql/). --- diff --git a/content/influxdb/cloud-iox/write-data/migrate-data/migrate-1x-to-iox.md b/content/influxdb/cloud-serverless/write-data/migrate-data/migrate-1x-to-iox.md similarity index 84% rename from content/influxdb/cloud-iox/write-data/migrate-data/migrate-1x-to-iox.md rename to content/influxdb/cloud-serverless/write-data/migrate-data/migrate-1x-to-iox.md index d9733ced8..b59db92f3 100644 --- a/content/influxdb/cloud-iox/write-data/migrate-data/migrate-1x-to-iox.md +++ b/content/influxdb/cloud-serverless/write-data/migrate-data/migrate-1x-to-iox.md @@ -1,25 +1,25 @@ --- -title: Migrate data from InfluxDB 1.x to IOx in InfluxDB Cloud +title: Migrate data from InfluxDB 1.x to InfluxDB Cloud Serverless description: > - To migrate data from a TSM-backed InfluxDB 1.x (OSS or Enterprise) to an - InfluxDB Cloud IOx-backed organization, export the data as line protocol and - write the exported data to an IOx bucket in your InfluxDB Cloud organization. + To migrate data from a TSM-powered InfluxDB 1.x (OSS or Enterprise) to an + InfluxDB Cloud Serverless organization, export the data as line protocol and + write the exported data to an bucket in your InfluxDB Cloud Serverless organization. menu: - influxdb_cloud_iox: - name: Migrate from 1.x to IOx + influxdb_cloud_serverless: + name: Migrate from 1.x to Serverless parent: Migrate data weight: 103 --- To migrate data from an InfluxDB 1.x OSS or Enterprise instance to InfluxDB Cloud -backed by InfluxDB IOx, export the data as line protocol and write the exported -data to an IOx bucket in your InfluxDB Cloud organization. +Serverless powered by InfluxDB IOx, export the data as line protocol and write +the exported data to a bucket in your InfluxDB Cloud Serverless organization. Because full data migrations will likely exceed your organizations' limits and adjustable quotas, migrate your data in batches. {{% cloud %}} -All write requests are subject to your InfluxDB Cloud organization's -[rate limits and adjustable quotas](/influxdb/cloud-iox/account-management/limits/). +All write requests are subject to your InfluxDB Cloud Serverless organization's +[rate limits and adjustable quotas](/influxdb/cloud-serverless/account-management/limits/). {{% /cloud %}} ## Tools to use @@ -31,7 +31,7 @@ The migration process uses the following tools: - **InfluxDB 2.x `influx` CLI**: The [2.x `influx` CLI]((/influxdb/cloud/tools/influx-cli/)) is packaged - separately from InfluxDB OSS 2.x and InfluxDB Cloud. + separately from InfluxDB OSS 2.x and InfluxDB Cloud Serverless. [Download and install the 2.x CLI](/influxdb/cloud/tools/influx-cli/). - **InfluxDB Cloud user interface (UI)**: @@ -163,7 +163,7 @@ influx_inspect export \ {{% /expand %}} {{< /expand-wrapper >}} -2. Create InfluxDB Cloud buckets for each InfluxDB 1.x database and retention policy combination. +2. Create InfluxDB Cloud Serverless buckets for each InfluxDB 1.x database and retention policy combination. InfluxDB {{< current-version >}} combines InfluxDB 1.x databases and retention policies into buckets--named locations for time series data with specified retention periods. @@ -199,15 +199,15 @@ You would create the following InfluxDB {{< current-version >}} buckets: {{% tab-content %}} -Use the [`influx bucket create` command](/influxdb/cloud-iox/reference/cli/influx/bucket/create/) +Use the [`influx bucket create` command](/influxdb/cloud-serverless/reference/cli/influx/bucket/create/) to create a new bucket. **Provide the following**: -- [InfluxDB Cloud connection and authentication credentials](#) +- [InfluxDB Cloud Serverless connection and authentication credentials](#) - `-n, --name` flag with the bucket name. - `-r, --retention` flag with the bucket's retention period duration. - Supported retention periods depend on your InfluxDB Cloud plan. + Supported retention periods depend on your InfluxDB Cloud Serverless plan. ```sh influx bucket create \ @@ -231,8 +231,8 @@ influx bucket create \ 3. Click **+ {{< caps >}}Create bucket{{< /caps >}}**. 4. Provide a bucket name (for example: `example-db/autogen`) and select a - [retention period](/influxdb/cloud-iox/reference/glossary/#retention-period). - Supported retention periods depend on your InfluxDB Cloud plan. + [retention period](/influxdb/cloud-serverless/reference/glossary/#retention-period). + Supported retention periods depend on your InfluxDB Cloud Serverless plan. 5. Click **{{< caps >}}Create{{< /caps >}}**. @@ -240,16 +240,16 @@ influx bucket create \ {{% /tab-content %}} {{< /tabs-wrapper >}} -3. **Write the exported line protocol to your InfluxDB Cloud organization backed by InfluxDB IOx.** +3. **Write the exported line protocol to your InfluxDB Cloud Serverless organization.** - Use the **InfluxDB 2.x CLI** to write data to InfluxDB Cloud. + Use the **InfluxDB 2.x CLI** to write data to InfluxDB Cloud Serverless. While you can use the `/api/v2/write` API endpoint to write data directly, the `influx write` command lets you define the rate at which data is written to avoid exceeding your organization's rate limits. Use the `influx write` command and include the following: - - [InfluxDB Cloud connection and authentication credentials](#authentication-credentials) + - [InfluxDB Cloud Serverless connection and authentication credentials](#authentication-credentials) - `-b, --bucket` flag to identify the target bucket. - `-f, --file` flag with the path to the line protocol file to import. - `-rate-limit` flag with a rate limit that matches your InfluxDB Cloud @@ -281,6 +281,6 @@ influx write \ --compression gzip ``` {{% /code-tab-content %}} - {{< code-tabs-wrapper >}} + {{< /code-tabs-wrapper >}} Repeat for each export file and target bucket. diff --git a/content/influxdb/cloud-iox/write-data/migrate-data/migrate-tsm-to-iox.md b/content/influxdb/cloud-serverless/write-data/migrate-data/migrate-tsm-to-iox.md similarity index 87% rename from content/influxdb/cloud-iox/write-data/migrate-data/migrate-tsm-to-iox.md rename to content/influxdb/cloud-serverless/write-data/migrate-data/migrate-tsm-to-iox.md index c673274dd..7b4b87566 100644 --- a/content/influxdb/cloud-iox/write-data/migrate-data/migrate-tsm-to-iox.md +++ b/content/influxdb/cloud-serverless/write-data/migrate-data/migrate-tsm-to-iox.md @@ -1,31 +1,33 @@ --- title: Migrate data from TSM to IOx in InfluxDB Cloud description: > - To migrate data from a TSM-backed InfluxDB Cloud organization to an InfluxDB - IOx-backed organization, query the data in time-based batches and write the - queried data to an IOx bucket in your InfluxDB Cloud organization. + To migrate data from a TSM-powered InfluxDB Cloud organization to an InfluxDB + Cloud Serverless organization powered by InfluxDB IOx, query the data in + time-based batches and write the queried data to an IOx bucket in your + InfluxDB Cloud Serverless organization. menu: - influxdb_cloud_iox: - name: Migrate from TSM to IOx + influxdb_cloud_serverless: + name: Migrate from TSM to Serverless parent: Migrate data weight: 102 alt_engine: /influxdb/cloud/migrate-data/migrate-cloud-to-cloud/ --- -To migrate data from an InfluxDB Cloud organization backed by TSM to an organization -backed by InfluxDB IOx, query the data from your TSM backed buckets in time-based -batches and write the queried data to a bucket in your InfluxDB IOx-backed organization. +To migrate data from an InfluxDB Cloud (TSM) organization to an +InfluxDB Cloud Serverless organization powered by InfluxDB IOx, query the data +from your TSM-powered buckets in time-based batches and write the queried data to +a bucket in your InfluxDB Cloud Serverless organization. Because full data migrations will likely exceed your organizations' limits and adjustable quotas, migrate your data in batches. The following guide provides instructions for setting up an InfluxDB task -that queries data from an InfluxDB Cloud TSM-backed bucket in time-based batches -and writes each batch to another InfluxDB Cloud IOx-backed bucket in another +that queries data from an InfluxDB Cloud TSM-powered bucket in time-based batches +and writes each batch to an InfluxDB Cloud Serverless IOx-powered bucket in another organization. {{% cloud %}} All query and write requests are subject to your InfluxDB Cloud organization's -[rate limits and adjustable quotas](/influxdb/cloud-iox/account-management/limits/). +[rate limits and adjustable quotas](/influxdb/cloud-serverless/account-management/limits/). {{% /cloud %}} - [Set up the migration](#set-up-the-migration) @@ -48,16 +50,16 @@ To migrate more than one bucket, you need to [upgrade to the Usage-based plan](/ to complete the migration. {{% /note %}} -1. **In the InfluxDB Cloud (IOx) organization you're migrating data _to_**: +1. **In the InfluxDB Cloud Serverless organization you're migrating data _to_**: - 1. [Create a bucket](/influxdb/cloud-iox/organizations/buckets/create-bucket/) + 1. [Create a bucket](/influxdb/cloud-serverless/organizations/buckets/create-bucket/) **to migrate data to**. - 2. [Create an API token](/influxdb/cloud-iox/security/tokens/create-token/) + 2. [Create an API token](/influxdb/cloud-serverless/security/tokens/create-token/) with **write access** to the bucket you want to migrate to. 2. **In the InfluxDB Cloud (TSM) organization you're migrating data _from_**: - 1. Add the **InfluxDB Cloud API token from the IOx-backed organization _(created in step 1b)_** + 1. Add the **InfluxDB Cloud API token from the InfluxDB Cloud Serverless organization _(created in step 1b)_** as a secret using the key, `INFLUXDB_IOX_TOKEN`. _See [Add secrets](/influxdb/cloud/security/secrets/add/) for more information._ 3. [Create a bucket](/influxdb/cloud/organizations/buckets/create-bucket/) @@ -97,10 +99,10 @@ Batch range is beyond the migration range. Migration is complete. _See [Determine your batch interval](#determine-your-batch-interval)._ - **batchBucket**: InfluxDB Cloud (TSM) bucket to store migration batch metadata in. - **sourceBucket**: InfluxDB Cloud (TSM) bucket to migrate data from. - - **destinationHost**: [InfluxDB Cloud (IOx) region URL](/influxdb/cloud-iox/reference/regions) + - **destinationHost**: [InfluxDB Cloud Serverless region URL](/influxdb/cloud-serverless/reference/regions) to migrate data from. - - **destinationOrg**: InfluxDB Cloud (IOx) organization to migrate data to. - - **destinationToken**: InfluxDB Cloud (IOx) API token. To keep the API token secure, store + - **destinationOrg**: InfluxDB Cloud Serverless organization to migrate data to. + - **destinationToken**: InfluxDB Cloud Serverless API token. To keep the API token secure, store it as a secret in InfluxDB Cloud (TSM). - **destinationBucket**: InfluxDB OSS bucket to migrate data to. @@ -124,7 +126,7 @@ migration = { sourceBucket: "example-cloud-bucket", destinationHost: "https://cloud2.influxdata.com", destinationOrg: "example-destination-org", - destinationToken: secrets.get(key: "INFLUXDB_IOX_TOKEN"), + destinationToken: secrets.get(key: "INFLUXDB_SERVERLESS_TOKEN"), destinationBucket: "example-destination-bucket", } @@ -274,7 +276,7 @@ from(bucket: "example-cloud-bucket") The `migration.batchInterval` setting controls the time range queried by each batch. The "density" of the data in your InfluxDB Cloud bucket and your InfluxDB Cloud -organization's [rate limits and quotas](/influxdb/cloud-iox/admin/accounts/limits/) +organization's [rate limits and quotas](/influxdb/cloud-serverless/admin/accounts/limits/) determine what your batch interval should be. For example, if you're migrating data collected from hundreds of sensors with @@ -335,7 +337,7 @@ So in this example, **it would be best to set your `batchInterval` to `4d`**. ##### Important things to note - This assumes no other queries are running in your source InfluxDB Cloud organization. -- This assumes no other writes are happening in your destination InfluxDB Cloud organization. +- This assumes no other writes are happening in your destination InfluxDB Cloud Serverless organization. {{% /expand %}} {{< /expand-wrapper >}} @@ -345,7 +347,7 @@ The [InfluxDB TSM to IOx Migration Community template](https://github.com/influx installs the migration task outlined in this guide as well as a dashboard for monitoring running data migrations. -{{< img-hd src="/img/influxdb/cloud-iox-migration-dashboard.png" alt="InfluxDB Cloud migration dashboard" />}} +{{< img-hd src="/img/influxdb/cloud-serverless-migration-dashboard.png" alt="InfluxDB Cloud migration dashboard" />}} Install the InfluxDB Cloud Migration template @@ -370,17 +372,17 @@ too many requests a smaller interval. Each batch will then query less data. ### Invalid API token -If the API token you add as the `INFLUXDB_IOX_SECRET` doesn't have write access -to your InfluxDB Cloud (IOx) bucket, the task will return an error similar to: +If the API token you add as the `INFLUXDB_SERVERLESS_SECRET` doesn't have write access +to your InfluxDB Cloud Serverless bucket, the task will return an error similar to: ``` unauthorized access ``` **Possible solutions**: -- Ensure the API token has write access to your InfluxDB Cloud (IOx) bucket. +- Ensure the API token has write access to your InfluxDB Cloud Serverless bucket. - Generate a new API token with write access to the bucket you want to migrate to. - Then, update the `INFLUXDB_IOX_TOKEN` secret in your InfluxDB Cloud (TSM) + Then, update the `INFLUXDB_SERVERLESS_TOKEN` secret in your InfluxDB Cloud (TSM) instance with the new token. ### Query timeout diff --git a/content/influxdb/cloud-iox/write-data/use-telegraf/_index.md b/content/influxdb/cloud-serverless/write-data/use-telegraf/_index.md similarity index 81% rename from content/influxdb/cloud-iox/write-data/use-telegraf/_index.md rename to content/influxdb/cloud-serverless/write-data/use-telegraf/_index.md index 90ed8138f..d88f5dae6 100644 --- a/content/influxdb/cloud-iox/write-data/use-telegraf/_index.md +++ b/content/influxdb/cloud-serverless/write-data/use-telegraf/_index.md @@ -6,12 +6,12 @@ description: > Use Telegraf to collect and write data to InfluxDB. Create Telegraf configurations in the InfluxDB UI or manually configure Telegraf. aliases: - - /influxdb/cloud-iox/collect-data/advanced-telegraf - - /influxdb/cloud-iox/collect-data/use-telegraf - - /influxdb/cloud-iox/write-data/use-telegraf/ - - /influxdb/cloud-iox/write-data/no-code/use-telegraf/ + - /influxdb/cloud-serverless/collect-data/advanced-telegraf + - /influxdb/cloud-serverless/collect-data/use-telegraf + - /influxdb/cloud-serverless/write-data/use-telegraf/ + - /influxdb/cloud-serverless/write-data/no-code/use-telegraf/ menu: - influxdb_cloud_iox: + influxdb_cloud_serverless: name: Use Telegraf parent: Write data alt_engine: /influxdb/cloud/write-data/no-code/use-telegraf/ @@ -53,7 +53,7 @@ Use the `outputs.influxdb_v2` plugin to write metrics collected by Telegraf to I # ... ``` -_For more information, see [Manually configure Telegraf](/influxdb/cloud-iox/write-data/use-telegraf/configure/manual-config/#enable-and-configure-the-influxdb-v2-output-plugin)._ +_For more information, see [Manually configure Telegraf](/influxdb/cloud-serverless/write-data/use-telegraf/configure/manual-config/#enable-and-configure-the-influxdb-v2-output-plugin)._ ## Use Telegraf with InfluxDB diff --git a/content/influxdb/cloud-iox/write-data/use-telegraf/configure/_index.md b/content/influxdb/cloud-serverless/write-data/use-telegraf/configure/_index.md similarity index 93% rename from content/influxdb/cloud-iox/write-data/use-telegraf/configure/_index.md rename to content/influxdb/cloud-serverless/write-data/use-telegraf/configure/_index.md index 59ba6ea99..18773b534 100644 --- a/content/influxdb/cloud-iox/write-data/use-telegraf/configure/_index.md +++ b/content/influxdb/cloud-serverless/write-data/use-telegraf/configure/_index.md @@ -5,7 +5,7 @@ description: > your Telegraf configuration file (`telegraf.conf`). Learn how to create Telegraf configuration files that work with InfluxDB. menu: - influxdb_cloud_iox: + influxdb_cloud_serverless: name: Configure Telegraf parent: Use Telegraf weight: 101 diff --git a/content/influxdb/cloud-iox/write-data/use-telegraf/configure/auto-config.md b/content/influxdb/cloud-serverless/write-data/use-telegraf/configure/auto-config.md similarity index 90% rename from content/influxdb/cloud-iox/write-data/use-telegraf/configure/auto-config.md rename to content/influxdb/cloud-serverless/write-data/use-telegraf/configure/auto-config.md index 07790d3b2..01d00bf19 100644 --- a/content/influxdb/cloud-iox/write-data/use-telegraf/configure/auto-config.md +++ b/content/influxdb/cloud-serverless/write-data/use-telegraf/configure/auto-config.md @@ -5,15 +5,15 @@ description: > Use the InfluxDB UI to automatically generate a Telegraf configuration, then start Telegraf using the generated configuration file. aliases: - - /influxdb/cloud-iox/collect-data/use-telegraf/auto-config - - /influxdb/cloud-iox/write-data/use-telegraf/auto-config + - /influxdb/cloud-serverless/collect-data/use-telegraf/auto-config + - /influxdb/cloud-serverless/write-data/use-telegraf/auto-config menu: - influxdb_cloud_iox: + influxdb_cloud_serverless: parent: Configure Telegraf name: Automatically weight: 201 related: - - /influxdb/cloud-iox/use-telegraf/telegraf-configs/create/ + - /influxdb/cloud-serverless/use-telegraf/telegraf-configs/create/ alt_engine: /influxdb/cloud/write-data/no-code/use-telegraf/auto-config/ --- @@ -24,7 +24,7 @@ start Telegraf using the generated configuration file. {{< youtube M8KP7FAb2L0 >}} {{% note %}} -_View the [requirements](/influxdb/cloud-iox/write-data/no-code/use-telegraf#requirements) +_View the [requirements](/influxdb/cloud-serverless/write-data/no-code/use-telegraf#requirements) for using Telegraf with InfluxDB {{< current-version >}}._ {{% /note %}} @@ -73,7 +73,7 @@ A token identifies specific permissions to the InfluxDB instance. ### Configure your token as an environment variable -1. Find your API token. _For information about viewing tokens, see [View tokens](/influxdb/cloud-iox/security/tokens/view-tokens/)._ +1. Find your API token. _For information about viewing tokens, see [View tokens](/influxdb/cloud-serverless/security/tokens/view-tokens/)._ 2. To configure your API token as the `INFLUX_TOKEN` environment variable, run the command appropriate for your operating system and command-line tool: @@ -124,7 +124,7 @@ Start the Telegraf service using the `-config` flag to specify the location of t Telegraf starts using the Telegraf configuration pulled from InfluxDB API. {{% note %}} -InfluxDB host URLs and ports differ between InfluxDB OSS and InfluxDB Cloud. +InfluxDB host URLs and ports differ between InfluxDB OSS and InfluxDB Cloud Serverless. For the exact command, see the Telegraf configuration **Setup Instructions** in the InfluxDB UI. {{% /note %}} @@ -135,4 +135,4 @@ telegraf -config http://localhost:8086/api/v2/telegrafs/0xoX00oOx0xoX00o ## Manage Telegraf configurations For more information about managing Telegraf configurations in InfluxDB, see -[Telegraf configurations](/influxdb/cloud-iox/write-data/use-telegraf/telegraf-configs/). +[Telegraf configurations](/influxdb/cloud-serverless/write-data/use-telegraf/telegraf-configs/). diff --git a/content/influxdb/cloud-iox/write-data/use-telegraf/configure/manual-config.md b/content/influxdb/cloud-serverless/write-data/use-telegraf/configure/manual-config.md similarity index 85% rename from content/influxdb/cloud-iox/write-data/use-telegraf/configure/manual-config.md rename to content/influxdb/cloud-serverless/write-data/use-telegraf/configure/manual-config.md index 846ec861b..0311791e5 100644 --- a/content/influxdb/cloud-iox/write-data/use-telegraf/configure/manual-config.md +++ b/content/influxdb/cloud-serverless/write-data/use-telegraf/configure/manual-config.md @@ -6,15 +6,15 @@ description: > output plugin to write to InfluxDB. Start Telegraf using the custom configuration. menu: - influxdb_cloud_iox: + influxdb_cloud_serverless: name: Manually parent: Configure Telegraf weight: 202 -influxdb/cloud-iox/tags: [telegraf] +influxdb/cloud-serverless/tags: [telegraf] related: - /{{< latest "telegraf" >}}/plugins// - - /influxdb/cloud-iox/use-telegraf/telegraf-configs/create/ - - /influxdb/cloud-iox/use-telegraf/telegraf-configs/update/ + - /influxdb/cloud-serverless/use-telegraf/telegraf-configs/create/ + - /influxdb/cloud-serverless/use-telegraf/telegraf-configs/update/ alt_engine: /influxdb/cloud/write-data/no-code/use-telegraf/manual-config/ --- @@ -27,7 +27,7 @@ then start Telegraf using the custom configuration file. {{< youtube qFS2zANwIrc >}} {{% note %}} -_View the [requirements](/influxdb/cloud-iox/write-data/use-telegraf#requirements) +_View the [requirements](/influxdb/cloud-serverless/write-data/use-telegraf#requirements) for using Telegraf with InfluxDB {{< current-version >}}._ {{% /note %}} @@ -71,14 +71,14 @@ The InfluxDB output plugin configuration contains the following options: ##### urls An array of URLs for your InfluxDB {{< current-version >}} instances. -See [InfluxDB Cloud regions](/influxdb/cloud-iox/reference/regions/) for +See [InfluxDB Cloud Serverless regions](/influxdb/cloud-serverless/reference/regions/) for information about which URLs to use. **{{< cloud-name "short">}} requires HTTPS**. ##### token Your InfluxDB {{< current-version >}} authorization token. -For information about viewing tokens, see [View tokens](/influxdb/cloud-iox/security/tokens/view-tokens/). +For information about viewing tokens, see [View tokens](/influxdb/cloud-serverless/security/tokens/view-tokens/). {{% note %}} ###### Avoid storing tokens in `telegraf.conf` @@ -160,12 +160,12 @@ enabling the InfluxDB v2 output plugin will write data to both v1.x and v2.6 ins ## Add a custom Telegraf configuration to InfluxDB To add a custom or manually configured Telegraf configuration to your collection -of Telegraf configurations in InfluxDB, use the [`influx telegrafs create`](/influxdb/cloud-iox/reference/cli/influx/telegrafs/create/) -or [`influx telegrafs update`](/influxdb/cloud-iox/reference/cli/influx/telegrafs/update/) commands. +of Telegraf configurations in InfluxDB, use the [`influx telegrafs create`](/influxdb/cloud-serverless/reference/cli/influx/telegrafs/create/) +or [`influx telegrafs update`](/influxdb/cloud-serverless/reference/cli/influx/telegrafs/update/) commands. For more information, see: -- [Create a Telegraf configuration](/influxdb/cloud-iox/telegraf-configs/create/#use-the-influx-cli) -- [Update a Telegraf configuration](/influxdb/cloud-iox/telegraf-configs/update/#use-the-influx-cli) +- [Create a Telegraf configuration](/influxdb/cloud-serverless/telegraf-configs/create/#use-the-influx-cli) +- [Update a Telegraf configuration](/influxdb/cloud-serverless/telegraf-configs/update/#use-the-influx-cli) ## Start Telegraf diff --git a/content/influxdb/cloud-iox/write-data/use-telegraf/dual-write.md b/content/influxdb/cloud-serverless/write-data/use-telegraf/dual-write.md similarity index 93% rename from content/influxdb/cloud-iox/write-data/use-telegraf/dual-write.md rename to content/influxdb/cloud-serverless/write-data/use-telegraf/dual-write.md index 2daabd071..9473aa1c1 100644 --- a/content/influxdb/cloud-iox/write-data/use-telegraf/dual-write.md +++ b/content/influxdb/cloud-serverless/write-data/use-telegraf/dual-write.md @@ -1,9 +1,9 @@ --- title: Dual write to InfluxDB OSS and InfluxDB Cloud description: > - Configure Telegraf to write data to both InfluxDB OSS and InfluxDB Cloud simultaneously. + Configure Telegraf to write data to both InfluxDB OSS and InfluxDB Cloud Serverless simultaneously. menu: - influxdb_cloud_iox: + influxdb_cloud_serverless: name: Dual write to OSS & Cloud parent: Use Telegraf weight: 203 @@ -12,7 +12,7 @@ alt_engine: /influxdb/cloud/write-data/no-code/use-telegraf/dual-write/ If you want to back up your data in two places, or if you're migrating from OSS to Cloud, you may want to set up dual write. -Use Telegraf to write to both InfluxDB OSS and InfluxDB Cloud simultaneously. +Use Telegraf to write to both InfluxDB OSS and InfluxDB Cloud Serverless simultaneously. The sample configuration below uses: - The [InfluxDB v2 output plugin](https://github.com/influxdata/telegraf/tree/master/plugins/outputs/influxdb_v2) twice: first pointing to the OSS instance and then to the cloud instance. diff --git a/content/influxdb/cloud-serverless/write-data/use-telegraf/telegraf-configs/_index.md b/content/influxdb/cloud-serverless/write-data/use-telegraf/telegraf-configs/_index.md new file mode 100644 index 000000000..9f079b05e --- /dev/null +++ b/content/influxdb/cloud-serverless/write-data/use-telegraf/telegraf-configs/_index.md @@ -0,0 +1,19 @@ +--- +title: Manage Telegraf configurations +description: > + InfluxDB Cloud Serverless lets you automatically generate Telegraf configurations + or upload customized Telegraf configurations that collect metrics and write + them to InfluxDB Cloud Serverless. +weight: 102 +menu: + influxdb_cloud_serverless: + name: Manage Telegraf configs + parent: Use Telegraf +influxdb/cloud-serverless/tags: [telegraf] +related: + - /influxdb/cloud-serverless/write-data/use-telegraf/manual-config/ + - /influxdb/cloud-serverless/write-data/use-telegraf/auto-config/ +alt_engine: /influxdb/cloud/telegraf-configs/ +--- + +{{< duplicate-oss "/telegraf-configs/" >}} diff --git a/content/influxdb/cloud-iox/write-data/use-telegraf/telegraf-configs/create.md b/content/influxdb/cloud-serverless/write-data/use-telegraf/telegraf-configs/create.md similarity index 54% rename from content/influxdb/cloud-iox/write-data/use-telegraf/telegraf-configs/create.md rename to content/influxdb/cloud-serverless/write-data/use-telegraf/telegraf-configs/create.md index 0df08cf0f..6eb918d17 100644 --- a/content/influxdb/cloud-iox/write-data/use-telegraf/telegraf-configs/create.md +++ b/content/influxdb/cloud-serverless/write-data/use-telegraf/telegraf-configs/create.md @@ -5,16 +5,16 @@ description: > to create an Telegraf configuration. weight: 101 menu: - influxdb_cloud_iox: + influxdb_cloud_serverless: name: Create a config parent: Manage Telegraf configs related: - - /influxdb/cloud-iox/write-data/no-code/use-telegraf/configure/manual-config/ - - /influxdb/cloud-iox/write-data/no-code/use-telegraf/configure/auto-config/ - - /influxdb/cloud-iox/write-data/use-telegraf/telegraf-configs/update/ + - /influxdb/cloud-serverless/write-data/no-code/use-telegraf/configure/manual-config/ + - /influxdb/cloud-serverless/write-data/no-code/use-telegraf/configure/auto-config/ + - /influxdb/cloud-serverless/write-data/use-telegraf/telegraf-configs/update/ aliases: - - /influxdb/cloud-iox/telegraf-configs/create/ - - /influxdb/cloud-iox/telegraf-configs/clone/ + - /influxdb/cloud-serverless/telegraf-configs/create/ + - /influxdb/cloud-serverless/telegraf-configs/clone/ alt_engine: /influxdb/cloud/telegraf-configs/create/ --- diff --git a/content/influxdb/cloud-iox/write-data/use-telegraf/telegraf-configs/remove.md b/content/influxdb/cloud-serverless/write-data/use-telegraf/telegraf-configs/remove.md similarity index 82% rename from content/influxdb/cloud-iox/write-data/use-telegraf/telegraf-configs/remove.md rename to content/influxdb/cloud-serverless/write-data/use-telegraf/telegraf-configs/remove.md index 06a517abc..0a04af4f8 100644 --- a/content/influxdb/cloud-iox/write-data/use-telegraf/telegraf-configs/remove.md +++ b/content/influxdb/cloud-serverless/write-data/use-telegraf/telegraf-configs/remove.md @@ -5,11 +5,11 @@ description: > to remove Telegraf configurations from InfluxDB. weight: 104 menu: - influxdb_cloud_iox: + influxdb_cloud_serverless: name: Remove a config parent: Manage Telegraf configs aliases: - - /influxdb/cloud-iox/telegraf-configs/remove/ + - /influxdb/cloud-serverless/telegraf-configs/remove/ alt_engine: /influxdb/cloud/telegraf-configs/remove/ --- diff --git a/content/influxdb/cloud-iox/write-data/use-telegraf/telegraf-configs/update.md b/content/influxdb/cloud-serverless/write-data/use-telegraf/telegraf-configs/update.md similarity index 82% rename from content/influxdb/cloud-iox/write-data/use-telegraf/telegraf-configs/update.md rename to content/influxdb/cloud-serverless/write-data/use-telegraf/telegraf-configs/update.md index 482df8450..67132ed49 100644 --- a/content/influxdb/cloud-iox/write-data/use-telegraf/telegraf-configs/update.md +++ b/content/influxdb/cloud-serverless/write-data/use-telegraf/telegraf-configs/update.md @@ -5,11 +5,11 @@ description: > to update InfluxDB Telegraf configurations. weight: 103 menu: - influxdb_cloud_iox: + influxdb_cloud_serverless: name: Update a config parent: Manage Telegraf configs aliases: - - /influxdb/cloud-iox/telegraf-configs/update/ + - /influxdb/cloud-serverless/telegraf-configs/update/ alt_engine: /influxdb/cloud/telegraf-configs/update/ --- diff --git a/content/influxdb/cloud-iox/write-data/use-telegraf/telegraf-configs/view.md b/content/influxdb/cloud-serverless/write-data/use-telegraf/telegraf-configs/view.md similarity index 82% rename from content/influxdb/cloud-iox/write-data/use-telegraf/telegraf-configs/view.md rename to content/influxdb/cloud-serverless/write-data/use-telegraf/telegraf-configs/view.md index fbbc7bf59..255927750 100644 --- a/content/influxdb/cloud-iox/write-data/use-telegraf/telegraf-configs/view.md +++ b/content/influxdb/cloud-serverless/write-data/use-telegraf/telegraf-configs/view.md @@ -5,11 +5,11 @@ description: > to view and download InfluxDB Telegraf configurations. weight: 102 menu: - influxdb_cloud_iox: + influxdb_cloud_serverless: name: View configs parent: Manage Telegraf configs aliases: - - /influxdb/cloud-iox/telegraf-configs/view/ + - /influxdb/cloud-serverless/telegraf-configs/view/ alt_engine: /influxdb/cloud/telegraf-configs/view/ --- diff --git a/content/influxdb/v2.0/security/tokens/view-tokens.md b/content/influxdb/v2.0/security/tokens/view-tokens.md index 636c4f14f..6ede92290 100644 --- a/content/influxdb/v2.0/security/tokens/view-tokens.md +++ b/content/influxdb/v2.0/security/tokens/view-tokens.md @@ -76,6 +76,6 @@ To filter tokens by user, include `userID` as a query parameter in your request. [***Operator tokens***](/{{% latest "influxdb" %}}/security/tokens/#operator-token) have access to all organizations' authorizations. To filter authorizations by organization when using an operator token, include an `org` or `orgID` query parameter in your request. -{{% oss-only %}} +{{% /oss-only %}} See the [`/authorizations` endpoint documentation](/influxdb/v2.0/api/#tag/Authorizations) for more information about available parameters. diff --git a/content/influxdb/v2.1/security/tokens/view-tokens.md b/content/influxdb/v2.1/security/tokens/view-tokens.md index a295f523e..e8368a42d 100644 --- a/content/influxdb/v2.1/security/tokens/view-tokens.md +++ b/content/influxdb/v2.1/security/tokens/view-tokens.md @@ -105,6 +105,6 @@ To filter tokens by user, include `userID` as a query parameter in your request. [***Operator tokens***](/{{% latest "influxdb" %}}/security/tokens/#operator-token) have access to all organizations' authorizations. To filter authorizations by organization when using an operator token, include an `org` or `orgID` query parameter in your request. -{{% oss-only %}} +{{% /oss-only %}} See the [`/authorizations` endpoint documentation](/influxdb/v2.1/api/#tag/Authorizations) for more information about available parameters. diff --git a/content/influxdb/v2.2/api-guide/tutorials/client-library-starter/python.md b/content/influxdb/v2.2/api-guide/tutorials/client-library-starter/python.md index a735a3bb9..8fd4ffbc4 100644 --- a/content/influxdb/v2.2/api-guide/tutorials/client-library-starter/python.md +++ b/content/influxdb/v2.2/api-guide/tutorials/client-library-starter/python.md @@ -221,12 +221,6 @@ The example below uses the following steps to create the authorization: Create a `./api/devices.py` file that contains the following: -{{< code-tabs-wrapper >}} -{{% code-tabs %}} -[Python](#python) -{{% /code-tabs %}} -{{% code-tab-content %}} - {{% truncate %}} ```python @@ -301,12 +295,6 @@ Storing the device authorization in a bucket allows you to do the following: To write a point to InfluxDB, use the InfluxDB client library to send a `POST` request to the `/api/v2/write` InfluxDB API endpoint. In `./api/devices.py`, add the following `create_device(device_id)` function: -{{< code-tabs-wrapper >}} -{{% code-tabs %}} -[Python](#python) -{{% /code-tabs %}} -{{% code-tab-content %}} - ```python def create_device(device_id=None): influxdb_client = InfluxDBClient(url=config.get('APP', 'INFLUX_URL'), @@ -329,9 +317,6 @@ def create_device(device_id=None): {{% caption %}}[iot-api-python/api/devices.py](https://github.com/influxdata/iot-api-python/blob/f354941c80b6bac643ca29efe408fde1deebdc96/api/devices.py#L47){{% /caption %}} -{{% /code-tab-content %}} -{{< /code-tabs-wrapper >}} - `create_device(device_id)` takes a _`device_id`_ and writes data to `INFLUX_BUCKET_AUTH` in the following steps: 1. Initialize `InfluxDBClient()` with `url`, `token`, and `org` values from the configuration. diff --git a/content/influxdb/v2.2/query-data/flux/flux-version.md b/content/influxdb/v2.2/query-data/flux/flux-version.md index f8526c8db..50d08ef74 100644 --- a/content/influxdb/v2.2/query-data/flux/flux-version.md +++ b/content/influxdb/v2.2/query-data/flux/flux-version.md @@ -136,6 +136,7 @@ curl --request POST \ ``` {{% /tab-content %}} +{{< /tabs-wrapper >}} {{% warn %}} #### Flux version in the Flux REPL diff --git a/content/influxdb/v2.2/security/tokens/view-tokens.md b/content/influxdb/v2.2/security/tokens/view-tokens.md index 3f574ce7a..e144ebe6b 100644 --- a/content/influxdb/v2.2/security/tokens/view-tokens.md +++ b/content/influxdb/v2.2/security/tokens/view-tokens.md @@ -105,6 +105,6 @@ To filter tokens by user, include `userID` as a query parameter in your request. [***Operator tokens***](/{{% latest "influxdb" %}}/security/tokens/#operator-token) have access to all organizations' authorizations. To filter authorizations by organization when using an operator token, include an `org` or `orgID` query parameter in your request. -{{% oss-only %}} +{{% /oss-only %}} See the [`/authorizations` endpoint documentation](/influxdb/v2.2/api/#tag/Authorizations) for more information about available parameters. diff --git a/content/influxdb/v2.3/api-guide/tutorials/python.md b/content/influxdb/v2.3/api-guide/tutorials/python.md index 72c269796..f53983e14 100644 --- a/content/influxdb/v2.3/api-guide/tutorials/python.md +++ b/content/influxdb/v2.3/api-guide/tutorials/python.md @@ -221,12 +221,6 @@ The example below uses the following steps to create the authorization: Create a `./api/devices.py` file that contains the following: -{{< code-tabs-wrapper >}} -{{% code-tabs %}} -[Python](#python) -{{% /code-tabs %}} -{{% code-tab-content %}} - {{% truncate %}} ```python @@ -301,12 +295,6 @@ Storing the device authorization in a bucket allows you to do the following: To write a point to InfluxDB, use the InfluxDB client library to send a `POST` request to the `/api/v2/write` InfluxDB API endpoint. In `./api/devices.py`, add the following `create_device(device_id)` function: -{{< code-tabs-wrapper >}} -{{% code-tabs %}} -[Python](#python) -{{% /code-tabs %}} -{{% code-tab-content %}} - ```python def create_device(device_id=None): influxdb_client = InfluxDBClient(url=config.get('APP', 'INFLUX_URL'), @@ -329,9 +317,6 @@ def create_device(device_id=None): {{% caption %}}[iot-api-python/api/devices.py](https://github.com/influxdata/iot-api-python/blob/f354941c80b6bac643ca29efe408fde1deebdc96/api/devices.py#L47){{% /caption %}} -{{% /code-tab-content %}} -{{< /code-tabs-wrapper >}} - `create_device(device_id)` takes a _`device_id`_ and writes data to `INFLUX_BUCKET_AUTH` in the following steps: 1. Initialize `InfluxDBClient()` with `url`, `token`, and `org` values from the configuration. diff --git a/content/influxdb/v2.3/query-data/flux/flux-version.md b/content/influxdb/v2.3/query-data/flux/flux-version.md index 26bea9143..7b8dc107a 100644 --- a/content/influxdb/v2.3/query-data/flux/flux-version.md +++ b/content/influxdb/v2.3/query-data/flux/flux-version.md @@ -136,6 +136,7 @@ curl --request POST \ ``` {{% /tab-content %}} +{{< /tabs-wrapper >}} {{% warn %}} #### Flux version in the Flux REPL diff --git a/content/influxdb/v2.3/write-data/troubleshoot.md b/content/influxdb/v2.3/write-data/troubleshoot.md index 149f2046f..7d6e17877 100644 --- a/content/influxdb/v2.3/write-data/troubleshoot.md +++ b/content/influxdb/v2.3/write-data/troubleshoot.md @@ -320,3 +320,5 @@ InfluxDB logs the following `rejected_points` entry to the `_monitoring` bucket: | _measurement | _field | _value | bucket | field | gotType | measurement | reason | wantType | |:------------------|:-------|:-------|:-------------------|:--------------|:---------|:------------|:----------------------------------|:---------| | rejected_points | count | 1 | a7d5558b880a93da | temperature | String | airSensors | field type mismatch with schema | Float | + +{{% /cloud-only %}} diff --git a/content/influxdb/v2.4/api-guide/tutorials/python.md b/content/influxdb/v2.4/api-guide/tutorials/python.md index ba3577a13..cd1358765 100644 --- a/content/influxdb/v2.4/api-guide/tutorials/python.md +++ b/content/influxdb/v2.4/api-guide/tutorials/python.md @@ -221,12 +221,6 @@ The example below uses the following steps to create the authorization: Create a `./api/devices.py` file that contains the following: -{{< code-tabs-wrapper >}} -{{% code-tabs %}} -[Python](#python) -{{% /code-tabs %}} -{{% code-tab-content %}} - {{% truncate %}} ```python @@ -301,12 +295,6 @@ Storing the device authorization in a bucket allows you to do the following: To write a point to InfluxDB, use the InfluxDB client library to send a `POST` request to the `/api/v2/write` InfluxDB API endpoint. In `./api/devices.py`, add the following `create_device(device_id)` function: -{{< code-tabs-wrapper >}} -{{% code-tabs %}} -[Python](#python) -{{% /code-tabs %}} -{{% code-tab-content %}} - ```python def create_device(device_id=None): influxdb_client = InfluxDBClient(url=config.get('APP', 'INFLUX_URL'), @@ -329,9 +317,6 @@ def create_device(device_id=None): {{% caption %}}[iot-api-python/api/devices.py](https://github.com/influxdata/iot-api-python/blob/f354941c80b6bac643ca29efe408fde1deebdc96/api/devices.py#L47){{% /caption %}} -{{% /code-tab-content %}} -{{< /code-tabs-wrapper >}} - `create_device(device_id)` takes a _`device_id`_ and writes data to `INFLUX_BUCKET_AUTH` in the following steps: 1. Initialize `InfluxDBClient()` with `url`, `token`, and `org` values from the configuration. @@ -371,12 +356,6 @@ Add the `/api/devices` API endpoint that retrieves, processes, and lists registe In `./api/devices.py`, add the following: - {{< code-tabs-wrapper >}} - {{% code-tabs %}} - [Python](#python) - {{% /code-tabs %}} - {{% code-tab-content %}} - {{% truncate %}} ```python @@ -415,9 +394,6 @@ Add the `/api/devices` API endpoint that retrieves, processes, and lists registe {{% caption %}}[iot-api-python/api/devices.py get_device()](https://github.com/influxdata/iot-api-python/blob/9bf44a659424a27eb937d545dc0455754354aef5/api/devices.py#L30){{% /caption %}} -{{% /code-tab-content %}} -{{< /code-tabs-wrapper >}} - The `get_device(device_id)` function does the following: 1. Instantiates a `QueryApi` client and sends the Flux query to InfluxDB. @@ -443,12 +419,6 @@ The example below uses the following steps to generate data and then write it to In `./api/devices.py`, add the following `write_measurements(device_id)` function: -{{< code-tabs-wrapper >}} -{{% code-tabs %}} -[Python](#python) -{{% /code-tabs %}} -{{% code-tab-content %}} - ```python def write_measurements(device_id): influxdb_client = InfluxDBClient(url=config.get('APP', 'INFLUX_URL'), @@ -480,9 +450,6 @@ def write_measurements(device_id): {{% caption %}}[iot-api-python/api/devices.py write_measurement()](https://github.com/influxdata/iot-api-python/blob/f354941c80b6bac643ca29efe408fde1deebdc96/api/devices.py){{% /caption %}} -{{% /code-tab-content %}} -{{< /code-tabs-wrapper >}} - ## Query telemetry data In this section, you retrieve telemetry data from an InfluxDB bucket. @@ -495,12 +462,6 @@ The example below uses the following steps to retrieve and process telemetry dat In `./api/devices.py`, add the following `get_measurements(device_id)` function: -{{< code-tabs-wrapper >}} -{{% code-tabs %}} -[Python](#python) -{{% /code-tabs %}} -{{% code-tab-content %}} - ```python def get_measurements(query): influxdb_client = InfluxDBClient(url=config.get('APP', 'INFLUX_URL'), @@ -521,20 +482,11 @@ def get_measurements(query): {{% caption %}}[iot-api-python/api/devices.py get_measurements()](https://github.com/influxdata/iot-api-python/blob/9bf44a659424a27eb937d545dc0455754354aef5/api/devices.py#L122){{% /caption %}} -{{% /code-tab-content %}} -{{< /code-tabs-wrapper >}} - ## Define API responses In `app.py`, add API endpoints that match incoming requests and respond with the results of your modules. In the following `/api/devices/` route example, `app.py` retrieves _`device_id`_ from `GET` and `POST` requests, passes it to the `get_device(device_id)` method and returns the result as JSON data with CORS `allow-` headers. -{{< code-tabs-wrapper >}} -{{% code-tabs %}} -[Python](#python) -{{% /code-tabs %}} -{{% code-tab-content %}} - ```python @app.route('/api/devices/', methods=['GET', 'POST']) def api_get_device(device_id): @@ -545,9 +497,6 @@ def api_get_device(device_id): {{% caption %}}[iot-api-python/app.py](https://github.com/influxdata/iot-api-python/blob/9bf44a659424a27eb937d545dc0455754354aef5/app.py){{% /caption %}} -{{% /code-tab-content %}} -{{< /code-tabs-wrapper >}} - Enter the following commands into your terminal to restart the application: 1. `CONTROL+C` to stop the application. diff --git a/content/influxdb/v2.4/query-data/flux/flux-version.md b/content/influxdb/v2.4/query-data/flux/flux-version.md index 7e6676b46..9d22c8549 100644 --- a/content/influxdb/v2.4/query-data/flux/flux-version.md +++ b/content/influxdb/v2.4/query-data/flux/flux-version.md @@ -136,6 +136,7 @@ curl --request POST \ ``` {{% /tab-content %}} +{{< /tabs-wrapper >}} {{% warn %}} #### Flux version in the Flux REPL diff --git a/content/influxdb/v2.4/query-data/influxql/explore-data/offset-and-soffset.md b/content/influxdb/v2.4/query-data/influxql/explore-data/offset-and-soffset.md index a4c0425d9..a23b65f2b 100644 --- a/content/influxdb/v2.4/query-data/influxql/explore-data/offset-and-soffset.md +++ b/content/influxdb/v2.4/query-data/influxql/explore-data/offset-and-soffset.md @@ -103,8 +103,7 @@ tags: location=coyote_creek | 2019-08-18T00:36:00Z | 7.8330000000 | | 2019-08-18T00:24:00Z | 8.0710000000 | -{{< /expand >}} - +{{% /expand %}} {{< /expand-wrapper >}} ## `SOFFSET` clause @@ -128,8 +127,7 @@ query results](https://github.com/influxdata/influxdb/issues/7578). ### Examples -{{% expand-wrapper %}} - +{{< expand-wrapper >}} {{% expand "Paginate series" %}} #### Paginate series @@ -158,7 +156,6 @@ The results above are partial, as the data set is quite large. The query returns measurement and the `location = santa_monica` tag. Without `SOFFSET 1`, the query returns data for the series associated with the `h2o_feet` measurement and the `location = coyote_creek` tag. {{% /expand %}} - {{% expand "Paginate points and include several clauses" %}} #### Paginate series and include all clauses @@ -195,6 +192,7 @@ Output: {{% influxql/table-meta %}} name: h2o_feet tags: location=coyote_creek +{{% /influxql/table-meta %}} | time | mean | | :------------------ | ---------------------:| @@ -202,5 +200,4 @@ tags: location=coyote_creek | 2019-08-18T00:00:00Z | 8.4615000000 | {{% /expand %}} - {{< /expand-wrapper >}} diff --git a/content/influxdb/v2.5/api-guide/tutorials/python.md b/content/influxdb/v2.5/api-guide/tutorials/python.md index f99f1d9ff..6c702fa2a 100644 --- a/content/influxdb/v2.5/api-guide/tutorials/python.md +++ b/content/influxdb/v2.5/api-guide/tutorials/python.md @@ -221,12 +221,6 @@ The example below uses the following steps to create the authorization: Create a `./api/devices.py` file that contains the following: -{{< code-tabs-wrapper >}} -{{% code-tabs %}} -[Python](#python) -{{% /code-tabs %}} -{{% code-tab-content %}} - {{% truncate %}} ```python @@ -301,12 +295,6 @@ Storing the device authorization in a bucket allows you to do the following: To write a point to InfluxDB, use the InfluxDB client library to send a `POST` request to the `/api/v2/write` InfluxDB API endpoint. In `./api/devices.py`, add the following `create_device(device_id)` function: -{{< code-tabs-wrapper >}} -{{% code-tabs %}} -[Python](#python) -{{% /code-tabs %}} -{{% code-tab-content %}} - ```python def create_device(device_id=None): influxdb_client = InfluxDBClient(url=config.get('APP', 'INFLUX_URL'), @@ -329,9 +317,6 @@ def create_device(device_id=None): {{% caption %}}[iot-api-python/api/devices.py](https://github.com/influxdata/iot-api-python/blob/f354941c80b6bac643ca29efe408fde1deebdc96/api/devices.py#L47){{% /caption %}} -{{% /code-tab-content %}} -{{< /code-tabs-wrapper >}} - `create_device(device_id)` takes a _`device_id`_ and writes data to `INFLUX_BUCKET_AUTH` in the following steps: 1. Initialize `InfluxDBClient()` with `url`, `token`, and `org` values from the configuration. @@ -371,12 +356,6 @@ Add the `/api/devices` API endpoint that retrieves, processes, and lists registe In `./api/devices.py`, add the following: - {{< code-tabs-wrapper >}} - {{% code-tabs %}} - [Python](#python) - {{% /code-tabs %}} - {{% code-tab-content %}} - {{% truncate %}} ```python @@ -415,9 +394,6 @@ Add the `/api/devices` API endpoint that retrieves, processes, and lists registe {{% caption %}}[iot-api-python/api/devices.py get_device()](https://github.com/influxdata/iot-api-python/blob/9bf44a659424a27eb937d545dc0455754354aef5/api/devices.py#L30){{% /caption %}} -{{% /code-tab-content %}} -{{< /code-tabs-wrapper >}} - The `get_device(device_id)` function does the following: 1. Instantiates a `QueryApi` client and sends the Flux query to InfluxDB. @@ -443,12 +419,6 @@ The example below uses the following steps to generate data and then write it to In `./api/devices.py`, add the following `write_measurements(device_id)` function: -{{< code-tabs-wrapper >}} -{{% code-tabs %}} -[Python](#python) -{{% /code-tabs %}} -{{% code-tab-content %}} - ```python def write_measurements(device_id): influxdb_client = InfluxDBClient(url=config.get('APP', 'INFLUX_URL'), @@ -480,9 +450,6 @@ def write_measurements(device_id): {{% caption %}}[iot-api-python/api/devices.py write_measurement()](https://github.com/influxdata/iot-api-python/blob/f354941c80b6bac643ca29efe408fde1deebdc96/api/devices.py){{% /caption %}} -{{% /code-tab-content %}} -{{< /code-tabs-wrapper >}} - ## Query telemetry data In this section, you retrieve telemetry data from an InfluxDB bucket. @@ -495,12 +462,6 @@ The example below uses the following steps to retrieve and process telemetry dat In `./api/devices.py`, add the following `get_measurements(device_id)` function: -{{< code-tabs-wrapper >}} -{{% code-tabs %}} -[Python](#python) -{{% /code-tabs %}} -{{% code-tab-content %}} - ```python def get_measurements(query): influxdb_client = InfluxDBClient(url=config.get('APP', 'INFLUX_URL'), @@ -521,20 +482,11 @@ def get_measurements(query): {{% caption %}}[iot-api-python/api/devices.py get_measurements()](https://github.com/influxdata/iot-api-python/blob/9bf44a659424a27eb937d545dc0455754354aef5/api/devices.py#L122){{% /caption %}} -{{% /code-tab-content %}} -{{< /code-tabs-wrapper >}} - ## Define API responses In `app.py`, add API endpoints that match incoming requests and respond with the results of your modules. In the following `/api/devices/` route example, `app.py` retrieves _`device_id`_ from `GET` and `POST` requests, passes it to the `get_device(device_id)` method and returns the result as JSON data with CORS `allow-` headers. -{{< code-tabs-wrapper >}} -{{% code-tabs %}} -[Python](#python) -{{% /code-tabs %}} -{{% code-tab-content %}} - ```python @app.route('/api/devices/', methods=['GET', 'POST']) def api_get_device(device_id): @@ -545,9 +497,6 @@ def api_get_device(device_id): {{% caption %}}[iot-api-python/app.py](https://github.com/influxdata/iot-api-python/blob/9bf44a659424a27eb937d545dc0455754354aef5/app.py){{% /caption %}} -{{% /code-tab-content %}} -{{< /code-tabs-wrapper >}} - Enter the following commands into your terminal to restart the application: 1. `CONTROL+C` to stop the application. diff --git a/content/influxdb/v2.5/query-data/flux/flux-version.md b/content/influxdb/v2.5/query-data/flux/flux-version.md index ad344b898..bf13d2504 100644 --- a/content/influxdb/v2.5/query-data/flux/flux-version.md +++ b/content/influxdb/v2.5/query-data/flux/flux-version.md @@ -136,6 +136,7 @@ curl --request POST \ ``` {{% /tab-content %}} +{{< /tabs-wrapper >}} {{% warn %}} #### Flux version in the Flux REPL diff --git a/content/influxdb/v2.5/query-data/influxql/explore-data/offset-and-soffset.md b/content/influxdb/v2.5/query-data/influxql/explore-data/offset-and-soffset.md index 78ea73f7b..d8f717faf 100644 --- a/content/influxdb/v2.5/query-data/influxql/explore-data/offset-and-soffset.md +++ b/content/influxdb/v2.5/query-data/influxql/explore-data/offset-and-soffset.md @@ -128,7 +128,7 @@ query results](https://github.com/influxdata/influxdb/issues/7578). ### Examples -{{% expand-wrapper %}} +{{< expand-wrapper >}} {{% expand "Paginate series" %}} @@ -195,6 +195,7 @@ Output: {{% influxql/table-meta %}} name: h2o_feet tags: location=coyote_creek +{{% /influxql/table-meta %}} | time | mean | | :------------------ | ---------------------:| diff --git a/content/influxdb/v2.6/api-guide/tutorials/python.md b/content/influxdb/v2.6/api-guide/tutorials/python.md index 0fe880b1c..debfdb8f8 100644 --- a/content/influxdb/v2.6/api-guide/tutorials/python.md +++ b/content/influxdb/v2.6/api-guide/tutorials/python.md @@ -221,12 +221,6 @@ The example below uses the following steps to create the authorization: Create a `./api/devices.py` file that contains the following: -{{< code-tabs-wrapper >}} -{{% code-tabs %}} -[Python](#python) -{{% /code-tabs %}} -{{% code-tab-content %}} - {{% truncate %}} ```python @@ -301,12 +295,6 @@ Storing the device authorization in a bucket allows you to do the following: To write a point to InfluxDB, use the InfluxDB client library to send a `POST` request to the `/api/v2/write` InfluxDB API endpoint. In `./api/devices.py`, add the following `create_device(device_id)` function: -{{< code-tabs-wrapper >}} -{{% code-tabs %}} -[Python](#python) -{{% /code-tabs %}} -{{% code-tab-content %}} - ```python def create_device(device_id=None): influxdb_client = InfluxDBClient(url=config.get('APP', 'INFLUX_URL'), @@ -329,9 +317,6 @@ def create_device(device_id=None): {{% caption %}}[iot-api-python/api/devices.py](https://github.com/influxdata/iot-api-python/blob/f354941c80b6bac643ca29efe408fde1deebdc96/api/devices.py#L47){{% /caption %}} -{{% /code-tab-content %}} -{{< /code-tabs-wrapper >}} - `create_device(device_id)` takes a _`device_id`_ and writes data to `INFLUX_BUCKET_AUTH` in the following steps: 1. Initialize `InfluxDBClient()` with `url`, `token`, and `org` values from the configuration. @@ -371,12 +356,6 @@ Add the `/api/devices` API endpoint that retrieves, processes, and lists registe In `./api/devices.py`, add the following: - {{< code-tabs-wrapper >}} - {{% code-tabs %}} - [Python](#python) - {{% /code-tabs %}} - {{% code-tab-content %}} - {{% truncate %}} ```python @@ -415,9 +394,6 @@ Add the `/api/devices` API endpoint that retrieves, processes, and lists registe {{% caption %}}[iot-api-python/api/devices.py get_device()](https://github.com/influxdata/iot-api-python/blob/9bf44a659424a27eb937d545dc0455754354aef5/api/devices.py#L30){{% /caption %}} -{{% /code-tab-content %}} -{{< /code-tabs-wrapper >}} - The `get_device(device_id)` function does the following: 1. Instantiates a `QueryApi` client and sends the Flux query to InfluxDB. @@ -443,12 +419,6 @@ The example below uses the following steps to generate data and then write it to In `./api/devices.py`, add the following `write_measurements(device_id)` function: -{{< code-tabs-wrapper >}} -{{% code-tabs %}} -[Python](#python) -{{% /code-tabs %}} -{{% code-tab-content %}} - ```python def write_measurements(device_id): influxdb_client = InfluxDBClient(url=config.get('APP', 'INFLUX_URL'), @@ -480,9 +450,6 @@ def write_measurements(device_id): {{% caption %}}[iot-api-python/api/devices.py write_measurement()](https://github.com/influxdata/iot-api-python/blob/f354941c80b6bac643ca29efe408fde1deebdc96/api/devices.py){{% /caption %}} -{{% /code-tab-content %}} -{{< /code-tabs-wrapper >}} - ## Query telemetry data In this section, you retrieve telemetry data from an InfluxDB bucket. @@ -495,12 +462,6 @@ The example below uses the following steps to retrieve and process telemetry dat In `./api/devices.py`, add the following `get_measurements(device_id)` function: -{{< code-tabs-wrapper >}} -{{% code-tabs %}} -[Python](#python) -{{% /code-tabs %}} -{{% code-tab-content %}} - ```python def get_measurements(query): influxdb_client = InfluxDBClient(url=config.get('APP', 'INFLUX_URL'), @@ -521,20 +482,11 @@ def get_measurements(query): {{% caption %}}[iot-api-python/api/devices.py get_measurements()](https://github.com/influxdata/iot-api-python/blob/9bf44a659424a27eb937d545dc0455754354aef5/api/devices.py#L122){{% /caption %}} -{{% /code-tab-content %}} -{{< /code-tabs-wrapper >}} - ## Define API responses In `app.py`, add API endpoints that match incoming requests and respond with the results of your modules. In the following `/api/devices/` route example, `app.py` retrieves _`device_id`_ from `GET` and `POST` requests, passes it to the `get_device(device_id)` method and returns the result as JSON data with CORS `allow-` headers. -{{< code-tabs-wrapper >}} -{{% code-tabs %}} -[Python](#python) -{{% /code-tabs %}} -{{% code-tab-content %}} - ```python @app.route('/api/devices/', methods=['GET', 'POST']) def api_get_device(device_id): @@ -545,9 +497,6 @@ def api_get_device(device_id): {{% caption %}}[iot-api-python/app.py](https://github.com/influxdata/iot-api-python/blob/9bf44a659424a27eb937d545dc0455754354aef5/app.py){{% /caption %}} -{{% /code-tab-content %}} -{{< /code-tabs-wrapper >}} - Enter the following commands into your terminal to restart the application: 1. `CONTROL+C` to stop the application. diff --git a/content/influxdb/v2.6/query-data/flux/flux-version.md b/content/influxdb/v2.6/query-data/flux/flux-version.md index 6f71776fc..e77d1aea4 100644 --- a/content/influxdb/v2.6/query-data/flux/flux-version.md +++ b/content/influxdb/v2.6/query-data/flux/flux-version.md @@ -136,6 +136,7 @@ curl --request POST \ ``` {{% /tab-content %}} +{{< /tabs-wrapper >}} {{% warn %}} #### Flux version in the Flux REPL diff --git a/content/influxdb/v2.6/query-data/influxql/explore-data/offset-and-soffset.md b/content/influxdb/v2.6/query-data/influxql/explore-data/offset-and-soffset.md index 5beb6d10b..2c3d45ec9 100644 --- a/content/influxdb/v2.6/query-data/influxql/explore-data/offset-and-soffset.md +++ b/content/influxdb/v2.6/query-data/influxql/explore-data/offset-and-soffset.md @@ -128,7 +128,7 @@ query results](https://github.com/influxdata/influxdb/issues/7578). ### Examples -{{% expand-wrapper %}} +{{< expand-wrapper >}} {{% expand "Paginate series" %}} @@ -195,6 +195,7 @@ Output: {{% influxql/table-meta %}} name: h2o_feet tags: location=coyote_creek +{{% /influxql/table-meta %}} | time | mean | | :------------------ | ---------------------:| diff --git a/content/influxdb/v2.7/api-guide/tutorials/python.md b/content/influxdb/v2.7/api-guide/tutorials/python.md index f24a9ea12..57c35ecc6 100644 --- a/content/influxdb/v2.7/api-guide/tutorials/python.md +++ b/content/influxdb/v2.7/api-guide/tutorials/python.md @@ -221,12 +221,6 @@ The example below uses the following steps to create the authorization: Create a `./api/devices.py` file that contains the following: -{{< code-tabs-wrapper >}} -{{% code-tabs %}} -[Python](#python) -{{% /code-tabs %}} -{{% code-tab-content %}} - {{% truncate %}} ```python @@ -301,12 +295,6 @@ Storing the device authorization in a bucket allows you to do the following: To write a point to InfluxDB, use the InfluxDB client library to send a `POST` request to the `/api/v2/write` InfluxDB API endpoint. In `./api/devices.py`, add the following `create_device(device_id)` function: -{{< code-tabs-wrapper >}} -{{% code-tabs %}} -[Python](#python) -{{% /code-tabs %}} -{{% code-tab-content %}} - ```python def create_device(device_id=None): influxdb_client = InfluxDBClient(url=config.get('APP', 'INFLUX_URL'), @@ -329,9 +317,6 @@ def create_device(device_id=None): {{% caption %}}[iot-api-python/api/devices.py](https://github.com/influxdata/iot-api-python/blob/f354941c80b6bac643ca29efe408fde1deebdc96/api/devices.py#L47){{% /caption %}} -{{% /code-tab-content %}} -{{< /code-tabs-wrapper >}} - `create_device(device_id)` takes a _`device_id`_ and writes data to `INFLUX_BUCKET_AUTH` in the following steps: 1. Initialize `InfluxDBClient()` with `url`, `token`, and `org` values from the configuration. @@ -371,12 +356,6 @@ Add the `/api/devices` API endpoint that retrieves, processes, and lists registe In `./api/devices.py`, add the following: - {{< code-tabs-wrapper >}} - {{% code-tabs %}} - [Python](#python) - {{% /code-tabs %}} - {{% code-tab-content %}} - {{% truncate %}} ```python @@ -415,9 +394,6 @@ Add the `/api/devices` API endpoint that retrieves, processes, and lists registe {{% caption %}}[iot-api-python/api/devices.py get_device()](https://github.com/influxdata/iot-api-python/blob/9bf44a659424a27eb937d545dc0455754354aef5/api/devices.py#L30){{% /caption %}} -{{% /code-tab-content %}} -{{< /code-tabs-wrapper >}} - The `get_device(device_id)` function does the following: 1. Instantiates a `QueryApi` client and sends the Flux query to InfluxDB. @@ -443,12 +419,6 @@ The example below uses the following steps to generate data and then write it to In `./api/devices.py`, add the following `write_measurements(device_id)` function: -{{< code-tabs-wrapper >}} -{{% code-tabs %}} -[Python](#python) -{{% /code-tabs %}} -{{% code-tab-content %}} - ```python def write_measurements(device_id): influxdb_client = InfluxDBClient(url=config.get('APP', 'INFLUX_URL'), @@ -480,9 +450,6 @@ def write_measurements(device_id): {{% caption %}}[iot-api-python/api/devices.py write_measurement()](https://github.com/influxdata/iot-api-python/blob/f354941c80b6bac643ca29efe408fde1deebdc96/api/devices.py){{% /caption %}} -{{% /code-tab-content %}} -{{< /code-tabs-wrapper >}} - ## Query telemetry data In this section, you retrieve telemetry data from an InfluxDB bucket. @@ -495,12 +462,6 @@ The example below uses the following steps to retrieve and process telemetry dat In `./api/devices.py`, add the following `get_measurements(device_id)` function: -{{< code-tabs-wrapper >}} -{{% code-tabs %}} -[Python](#python) -{{% /code-tabs %}} -{{% code-tab-content %}} - ```python def get_measurements(query): influxdb_client = InfluxDBClient(url=config.get('APP', 'INFLUX_URL'), @@ -521,20 +482,11 @@ def get_measurements(query): {{% caption %}}[iot-api-python/api/devices.py get_measurements()](https://github.com/influxdata/iot-api-python/blob/9bf44a659424a27eb937d545dc0455754354aef5/api/devices.py#L122){{% /caption %}} -{{% /code-tab-content %}} -{{< /code-tabs-wrapper >}} - ## Define API responses In `app.py`, add API endpoints that match incoming requests and respond with the results of your modules. In the following `/api/devices/` route example, `app.py` retrieves _`device_id`_ from `GET` and `POST` requests, passes it to the `get_device(device_id)` method and returns the result as JSON data with CORS `allow-` headers. -{{< code-tabs-wrapper >}} -{{% code-tabs %}} -[Python](#python) -{{% /code-tabs %}} -{{% code-tab-content %}} - ```python @app.route('/api/devices/', methods=['GET', 'POST']) def api_get_device(device_id): @@ -545,9 +497,6 @@ def api_get_device(device_id): {{% caption %}}[iot-api-python/app.py](https://github.com/influxdata/iot-api-python/blob/9bf44a659424a27eb937d545dc0455754354aef5/app.py){{% /caption %}} -{{% /code-tab-content %}} -{{< /code-tabs-wrapper >}} - Enter the following commands into your terminal to restart the application: 1. `CONTROL+C` to stop the application. diff --git a/content/influxdb/v2.7/query-data/flux/flux-version.md b/content/influxdb/v2.7/query-data/flux/flux-version.md index d142322d7..b1db3b496 100644 --- a/content/influxdb/v2.7/query-data/flux/flux-version.md +++ b/content/influxdb/v2.7/query-data/flux/flux-version.md @@ -136,6 +136,7 @@ curl --request POST \ ``` {{% /tab-content %}} +{{< /tabs-wrapper >}} {{% warn %}} #### Flux version in the Flux REPL diff --git a/content/influxdb/v2.7/query-data/influxql/explore-data/offset-and-soffset.md b/content/influxdb/v2.7/query-data/influxql/explore-data/offset-and-soffset.md index 1ba295a50..014681b0c 100644 --- a/content/influxdb/v2.7/query-data/influxql/explore-data/offset-and-soffset.md +++ b/content/influxdb/v2.7/query-data/influxql/explore-data/offset-and-soffset.md @@ -128,7 +128,7 @@ query results](https://github.com/influxdata/influxdb/issues/7578). ### Examples -{{% expand-wrapper %}} +{{< expand-wrapper >}} {{% expand "Paginate series" %}} @@ -195,6 +195,7 @@ Output: {{% influxql/table-meta %}} name: h2o_feet tags: location=coyote_creek +{{% /influxql/table-meta %}} | time | mean | | :------------------ | ---------------------:| diff --git a/content/influxdb/v2.7/reference/syntax/line-protocol.md b/content/influxdb/v2.7/reference/syntax/line-protocol.md index 307af2f66..e25cc92b7 100644 --- a/content/influxdb/v2.7/reference/syntax/line-protocol.md +++ b/content/influxdb/v2.7/reference/syntax/line-protocol.md @@ -44,12 +44,7 @@ Line protocol does not support the newline character `\n` in tag or field values ## Elements of line protocol -``` -measurementName,tagKey=tagValue fieldKey="fieldValue" 1465839830100400200 ---------------- --------------- --------------------- ------------------- - | | | | - Measurement Tag set Field set Timestamp -``` +{{< influxdb/line-protocol commas=false whitespace=false >}} ### Measurement ({{< req >}}) @@ -110,11 +105,7 @@ Whitespace in line protocol determines how InfluxDB interprets the data point. The **first unescaped space** delimits the measurement and the tag set from the field set. The **second unescaped space** delimits the field set from the timestamp. -``` -measurementName,tagKey=tagValue fieldKey="fieldValue" 1465839830100400200 - | | - 1st space 2nd space -``` +{{< influxdb/line-protocol elements=false commas=false >}} ## Data types and format diff --git a/data/notifications.yaml b/data/notifications.yaml index f6287151a..8ae35111b 100644 --- a/data/notifications.yaml +++ b/data/notifications.yaml @@ -58,13 +58,13 @@ For more information, see the [Linux Package Signing Key Rotation blog post](https://www.influxdata.com/blog/linux-package-signing-key-rotation/). -- id: iox-wip +- id: serverless-wip level: warn scope: - - /influxdb/cloud-iox/ - title: State of the InfluxDB Cloud (IOx) documentation + - /influxdb/cloud-serverless/ + title: State of the InfluxDB Cloud Serverless documentation message: | - The new documentation for **InfluxDB Cloud backed by InfluxDB IOx** is a work + The new documentation for **InfluxDB Cloud Serverless** is a work in progress. We are adding new information and content almost daily. Thank you for your patience! diff --git a/data/products.yml b/data/products.yml index 3215417eb..3bde3da77 100644 --- a/data/products.yml +++ b/data/products.yml @@ -2,7 +2,8 @@ influxdb: name: InfluxDB altname: InfluxDB OSS namespace: influxdb - list_order: 3 + menu_category: self-managed + list_order: 4 versions: - v2.7 - v2.6 @@ -44,27 +45,38 @@ influxdb: "2.1": 2.1.0 influxdb_cloud: - name: InfluxDB Cloud - altname: InfluxDB Cloud + name: InfluxDB Cloud (TSM) + altname: InfluxDB Cloud (TSM) namespace: influxdb + menu_category: managed versions: [cloud] - list_order: 2 - latest: cloud - link: "https://cloud2.influxdata.com/signup" - -influxdb_cloud_iox: - name: InfluxDB Cloud (IOx) - altname: InfluxDB Cloud (IOx) - namespace: influxdb - versions: [cloud-iox] list_order: 1 - latest: cloud-iox - link: "https://cloud2.influxdata.com/signup" + latest: cloud + +influxdb_cloud_serverless: + name: InfluxDB Cloud Serverless + altname: InfluxDB Cloud Serverless + namespace: influxdb + menu_category: managed + versions: [cloud-serverless] + list_order: 2 + latest: cloud-serverless + +influxdb_cloud_dedicated: + name: InfluxDB Cloud Dedicated + altname: InfluxDB Cloud Dedicated + namespace: influxdb + menu_category: managed + versions: [cloud-dedicated] + list_order: 3 + latest: cloud-dedicated + link: "https://www.influxdata.com/contact-sales-form/" telegraf: name: Telegraf namespace: telegraf - list_order: 5 + menu_category: other + list_order: 6 versions: - v1.26 - v1.25 @@ -105,7 +117,8 @@ telegraf: chronograf: name: Chronograf namespace: chronograf - list_order: 6 + menu_category: other + list_order: 7 versions: - v1.10 - v1.9 @@ -123,6 +136,7 @@ chronograf: kapacitor: name: Kapacitor namespace: kapacitor + menu_category: other list_order: 7 versions: - v1.6 @@ -137,7 +151,8 @@ kapacitor: enterprise_influxdb: name: "InfluxDB Enterprise" namespace: enterprise_influxdb - list_order: 4 + menu_category: self-managed + list_order: 5 versions: - v1.10 - v1.9 @@ -157,6 +172,7 @@ enterprise_influxdb: flux: name: Flux namespace: flux + menu_category: languages list_order: 8 versions: [v0.x] latest: v0.x diff --git a/deploy/edge.js b/deploy/edge.js index 83edf6aad..113077566 100644 --- a/deploy/edge.js +++ b/deploy/edge.js @@ -79,7 +79,6 @@ exports.handler = (event, context, callback) => { '.zip': true, '.md5': true, '.sha256': true, - '.sh':true, }; // Remove index.html from path @@ -97,6 +96,9 @@ exports.handler = (event, context, callback) => { ///////////////////////// Force v in version numbers ///////////////////////// permanentRedirect(/(^\/[\w]*\/)(\d\.)/.test(request.uri), request.uri.replace(/(^\/[\w]*\/)(\d\.)/, `$1v$2`)); + + /////////////////// cloud-iox to cloud-serverless redirect ////////////////// + permanentRedirect(/\/influxdb\/cloud-iox/.test(request.uri), request.uri.replace(/\/influxdb\/cloud-iox/, '/influxdb/cloud-serverless')); ////////////// CLI InfluxQL link (catch before latest redirect) ////////////// permanentRedirect(/\/influxdb\/latest\/query_language\/spec/.test(request.uri), request.uri.replace(/latest/, 'v1.8')); diff --git a/layouts/index.html b/layouts/index.html index a92daf624..ec39d257a 100644 --- a/layouts/index.html +++ b/layouts/index.html @@ -27,35 +27,68 @@
-
-
-

Get started with InfluxDB

-

The time series platform

- -
-
-

View the InfluxDB documentation

- +

Get started with InfluxDB

+

The time series platform

+
+
+

Self-managed

+
+
+

InfluxDB OSS {{ replaceRE "v" "" $influxdbVersionV2 }}

+

The open source time series platform designed to store, query, and process time series data.

+
-
- +
+

InfluxDB Enterprise {{ replaceRE "v" "" $enterpriseVersion }}

+

Highly available InfluxDB built for high write and query workloads.

+ +
+
+
+
+

Managed by InfluxData

+
+
+

InfluxDB Cloud TSM

+

Managed InfluxDB powered by the InfluxDB TSM storage engine deployed in the cloud.

+ +
+
+

InfluxDB Cloud Serverless

+

Managed InfluxDB powered by the InfluxDB IOx storage engine deployed in the cloud.

+ +
+
+

InfluxDB Cloud Dedicated

+

Managed InfluxDB powered by the InfluxDB IOx storage engine deployed in the cloud and dedicated to your workload.

+
-
-

Develop with the InfluxDB API

-

Build your application using the InfluxDB Cloud and InfluxDB OSS APIs.

+

Develop with the InfluxDB v2 API

+

Build your application using the InfluxDB Cloud and InfluxDB OSS v2 APIs.

diff --git a/layouts/partials/footer.html b/layouts/partials/footer.html index d93ce8971..a33bcbe9c 100644 --- a/layouts/partials/footer.html +++ b/layouts/partials/footer.html @@ -17,7 +17,7 @@ {{ partial "footer/custom-time-trigger" . }} - {{ if in (slice "cloud" "cloud-iox") $currentVersion }} + {{ if in (slice "cloud" "cloud-serverless") $currentVersion }} {{ partial "footer/iox-wayfinding.html" . }} {{ end }} diff --git a/layouts/partials/footer/iox-wayfinding.html b/layouts/partials/footer/iox-wayfinding.html index 99959e33f..9efbab195 100644 --- a/layouts/partials/footer/iox-wayfinding.html +++ b/layouts/partials/footer/iox-wayfinding.html @@ -1,24 +1,24 @@ {{ $scratch := newScratch }} {{ $productPathData := findRE "[^/]+.*?" .RelPermalink }} {{ $version := index $productPathData 1 }} -{{ $altVersion := cond (ne $version "cloud-iox") "cloud-iox" "cloud" }} -{{ $engine := cond (eq $version "cloud-iox") "IOx" "TSM" }} -{{ $altEngine := cond (eq $version "cloud-iox") "TSM" "IOx" }} +{{ $altVersion := cond (ne $version "cloud-serverless") "cloud-serverless" "cloud" }} +{{ $engine := cond (eq $version "cloud-serverless") "IOx" "TSM" }} +{{ $altEngine := cond (eq $version "cloud-serverless") "TSM" "IOx" }} {{ $altDoc := .Page.Params.alt_engine | default "" }} {{ $altLink := cond (ne $altDoc "") $altDoc (print "/influxdb/" $altVersion "/") }} {{ $isCloud := eq $version "cloud" }} -{{ $isIOx := eq $version "cloud-iox" }} +{{ $isIOx := eq $version "cloud-serverless" }} {{ $scratch.Set "link" "" }} {{ if $isCloud }} - {{ $altIOxPage := $.GetPage ((replaceRE "influxdb/cloud" "influxdb/cloud-iox" $.Page.RelPermalink) | replaceRE `\/$` "") }} + {{ $altIOxPage := $.GetPage ((replaceRE "influxdb/cloud" "influxdb/cloud-serverless" $.Page.RelPermalink) | replaceRE `\/$` "") }} {{ if ne $altDoc "" }} {{ $scratch.Set "link" $altDoc }} {{ else if gt (len $altIOxPage.Title) 0 }} {{ $scratch.Set "link" $altIOxPage.RelPermalink }} {{ end }} {{ else if $isIOx }} - {{ $altCloudPage := $.GetPage ((replaceRE "influxdb/cloud-iox" "influxdb/cloud" $.Page.RelPermalink) | replaceRE `\/$` "") }} + {{ $altCloudPage := $.GetPage ((replaceRE "influxdb/cloud-serverless" "influxdb/cloud" $.Page.RelPermalink) | replaceRE `\/$` "") }} {{ if ne $altDoc "" }} {{ $scratch.Set "link" $altDoc }} {{ else if gt (len $altCloudPage.Title) 0 }} @@ -31,14 +31,16 @@
-

InfluxDB Cloud powered by {{ $engine }}

+

InfluxDB Cloud{{ if $isIOx }} Serverless{{ end }} powered by {{ $engine }}

+{{ end }} + -

For more information, see {{ $modalRefLinks | markdownify }}.

+ {{ if not $isDedicated }}

For more information, see {{ $modalRefLinks | markdownify }}.

{{ end }}
diff --git a/layouts/partials/footer/search.html b/layouts/partials/footer/search.html index 9488ad64c..e2a5cf329 100644 --- a/layouts/partials/footer/search.html +++ b/layouts/partials/footer/search.html @@ -5,6 +5,7 @@ {{ $fluxSupported := slice "influxdb" "enterprise_influxdb" }} {{ $influxdbFluxSupport := slice "v1.7" "v1.8" "v1.9" "cloud" }} {{ $includeFlux := cond (and (in $fluxSupported $product) (or (in $influxdbFluxSupport $currentVersion) (gt (len (findRE `v2\.` $currentVersion)) 0))) true false }} +{{ $includeResources := not (in (slice "cloud-serverless" "cloud-dedicated") $currentVersion) }}