<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0">
  <channel>
    <title>InfluxData Blog - Russ Savage</title>
    <description>Posts by Russ Savage on the InfluxData Blog</description>
    <link>https://www.influxdata.com/blog/author/russ/</link>
    <language>en-us</language>
    <lastBuildDate>Fri, 22 Oct 2021 11:43:45 -0700</lastBuildDate>
    <pubDate>Fri, 22 Oct 2021 11:43:45 -0700</pubDate>
    <ttl>1800</ttl>
    <item>
      <title>Release Announcement: InfluxDB CLI 2.2.0</title>
      <description>&lt;p&gt;A new release for InfluxDB Command Line Tools (CLI) is now available.&lt;/p&gt;
&lt;ul&gt;
 	&lt;li&gt;&lt;strong&gt;InfluxDB CLI 2.2.0&lt;/strong&gt; — &lt;a href="https://docs.influxdata.com/influxdb/cloud/reference/release-notes/influx-cli/"&gt;release notes&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;This release includes the following new features and bug fixes.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Features&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;This release makes it easier to create API tokens with the &lt;code class="language-markup"&gt;influx&lt;/code&gt; CLI, adds support for viewing more than 20 buckets using &lt;code class="language-markup"&gt;influx bucket list&lt;/code&gt;, and adds a shorthand flag for bucket (&lt;code class="language-markup"&gt;-b&lt;/code&gt;) to &lt;code class="language-markup"&gt;influx delete&lt;/code&gt;.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Create an All-Access token in the Influx CLI&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;We added the ability to use the Influx CLI to create an &lt;a href="https://docs.influxdata.com/influxdb/cloud/security/tokens/create-token/#create-a-token-using-the-influx-cli"&gt;All-Access API token&lt;/a&gt; with read and write permissions to all resources in an Organization.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;View more buckets in the Influx CLI&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;We updated &lt;code class="language-markup"&gt;influx bucket list&lt;/code&gt; with pagination to support displaying more than 20 buckets. By default, buckets are fetched in batches of 20; set &lt;code class="language-markup"&gt;--page-size&lt;/code&gt; to override this default value. You may also limit the total number of buckets to display with &lt;code class="language-markup"&gt;--limit&lt;/code&gt; (by default, there’s no limit).&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;New bucket shorthand for &lt;/strong&gt;&lt;code class="language-markup"&gt;influx delete&lt;/code&gt;&lt;/p&gt;

&lt;p&gt;Add the shorthand flag &lt;code class="language-markup"&gt;-b&lt;/code&gt; for &lt;code class="language-markup"&gt;--bucket&lt;/code&gt; to &lt;code class="language-markup"&gt;influx delete&lt;/code&gt;.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Bug fixes&lt;/strong&gt;&lt;/p&gt;
&lt;ul&gt;
 	&lt;li&gt;We now detect and warn when the Operator token is changed using &lt;code class="language-markup" style="font-style: inherit; font-weight: inherit;"&gt;influx restore&lt;/code&gt; (either setting a new &lt;code class="language-markup" style="font-style: inherit; font-weight: inherit;"&gt;--active&lt;/code&gt; config or updating the &lt;code class="language-markup" style="font-style: inherit; font-weight: inherit;"&gt;INFLUX_TOKEN&lt;/code&gt; variable).&lt;/li&gt;
 	&lt;li&gt;The CLI now automatically sets the newly-created connection configuration as active in &lt;code class="language-markup" style="font-style: inherit; font-weight: inherit;"&gt;influx setup&lt;/code&gt;.&lt;/li&gt;
 	&lt;li&gt;We have embedded the timezone data into Windows builds to avoid errors.&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;The latest open source release can be found on our&lt;a href="https://portal.influxdata.com/downloads"&gt; downloads page&lt;/a&gt;.&lt;/p&gt;

&lt;p&gt;If you find issues or have questions, please join our&lt;a href="https://influxdata.com/slack"&gt; InfluxDB Community Slack&lt;/a&gt;, post them in our&lt;a href="https://github.com/influxdata/influxdb/issues"&gt; InfluxDB GitHub Repo&lt;/a&gt; or our&lt;a href="https://community.influxdata.com/c/influxdb2"&gt; Community Site&lt;/a&gt; and we will take a look.&lt;/p&gt;
</description>
      <pubDate>Fri, 22 Oct 2021 11:43:45 -0700</pubDate>
      <link>https://www.influxdata.com/blog/release-announcement-influxdb-cli-2-2-0/</link>
      <guid isPermaLink="true">https://www.influxdata.com/blog/release-announcement-influxdb-cli-2-2-0/</guid>
      <category>Product</category>
      <author>Russ Savage (InfluxData)</author>
    </item>
    <item>
      <title>Release Announcement: InfluxDB OSS 2.0.9</title>
      <description>&lt;p&gt;A new maintenance release for InfluxDB OSS is&lt;a href="https://portal.influxdata.com/downloads"&gt; available now&lt;/a&gt;. Thank you to all the community members who have downloaded and used this latest release.&lt;/p&gt;
&lt;ul&gt;
 	&lt;li&gt;&lt;strong&gt;InfluxDB 2.0.9&lt;/strong&gt; —&lt;a href="https://docs.influxdata.com/influxdb/v2.0/reference/release-notes/influxdb/"&gt; release notes&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;h3&gt;Upcoming changes to CLI packaging&lt;/h3&gt;
&lt;p&gt;Beginning with the next minor version (2.1.0), the InfluxDB CLI (&lt;code class="language-markup"&gt;influx&lt;/code&gt; command) will no longer be packaged in releases from the InfluxDB repository (influxdata/influxdb). Future versions of the InfluxDB CLI will instead be released from the &lt;a href="https://github.com/influxdata/influx-cli"&gt;influx-cli repository&lt;/a&gt;. Users who wish to adopt the new InfluxDB CLI today can download the latest release from the &lt;a href="https://portal.influxdata.com/downloads/"&gt;InfluxData Downloads Portal&lt;/a&gt;.&lt;/p&gt;
&lt;h3&gt;Breaking change for Mac OS Users&lt;/h3&gt;
&lt;ul&gt;
 	&lt;li&gt;This release upgrades the project to &lt;a href="https://golang.org/doc/go1.16"&gt;go version 1.16&lt;/a&gt;. Because of the version bump to go, the macOS build for this release requires at least version 10.12 Sierra to run.&lt;/li&gt;
&lt;/ul&gt;
&lt;h3&gt;Features&lt;/h3&gt;
&lt;ul&gt;
 	&lt;li&gt;&lt;strong&gt;New Resources API&lt;/strong&gt; - Added a new route &lt;code class="language-markup" style="font-style: inherit; font-weight: inherit;"&gt;/api/v2/resources&lt;/code&gt; that returns a list of known resources to the platform. This makes it easier to automate token creation.&lt;/li&gt;
 	&lt;li&gt;&lt;strong&gt;Flux Updates&lt;/strong&gt; - Updated to &lt;a href="https://docs.influxdata.com/flux/v0.x/release-notes/#v01300-2021-09-15"&gt;Flux v0.130.0&lt;/a&gt;. Also added support for &lt;code class="language-markup" style="font-style: inherit; font-weight: inherit;"&gt;influxdb.cardinality()&lt;/code&gt; function. We also added &lt;code class="language-markup" style="font-style: inherit; font-weight: inherit;"&gt;--flux-log-enabled&lt;/code&gt; option to &lt;code class="language-markup" style="font-style: inherit; font-weight: inherit;"&gt;influxd&lt;/code&gt; to show detailed logs for Flux queries.&lt;/li&gt;
 	&lt;li&gt;&lt;strong&gt;Performance Improvements&lt;/strong&gt; - We optimized series iteration for queries that can be answered without inspecting TSM data and for queries with predicates that contain multiple measurements.&lt;/li&gt;
&lt;/ul&gt;
&lt;h3&gt;Fixes and improvements&lt;/h3&gt;
&lt;p&gt;This maintenance release of InfluxDB OSS includes the following fixes and improvements:&lt;/p&gt;
&lt;ul&gt;
 	&lt;li&gt;We now correctly filter requests to &lt;code class="language-markup" style="font-style: inherit; font-weight: inherit;"&gt;/api/v2/authorizations&lt;/code&gt; by organization and user parameters.&lt;/li&gt;
 	&lt;li&gt;Updated to include &lt;code class="language-markup" style="font-style: inherit; font-weight: inherit;"&gt;curl&lt;/code&gt; as a dependency in &lt;code class="language-markup" style="font-style: inherit; font-weight: inherit;"&gt;influxdb2&lt;/code&gt; packages.&lt;/li&gt;
 	&lt;li&gt;Added a message to set the Flux content-type when a query fails to parse as JSON.&lt;/li&gt;
 	&lt;li&gt;Discarded excessive errors over &lt;code class="language-markup" style="font-style: inherit; font-weight: inherit;"&gt;DefaultMaxSavedErrors&lt;/code&gt; (100) to prevent out-of-memory crashes.&lt;/li&gt;
 	&lt;li&gt;Upgraded &lt;code class="language-markup" style="font-style: inherit; font-weight: inherit;"&gt;golang.org/x/sys&lt;/code&gt; to avoid panics on Macs.&lt;/li&gt;
 	&lt;li&gt;Implemented hard limits on field size (&lt;code class="language-markup" style="font-style: inherit; font-weight: inherit;"&gt;MaxFieldValueLength = 1048576&lt;/code&gt;) while parsing line protocol.&lt;/li&gt;
 	&lt;li&gt;Resolved the compaction queue stats flutter issue.&lt;/li&gt;
 	&lt;li&gt;We now ensure the TSI index compacts log files that meet one of the following criteria:
&lt;ul class="a"&gt;
 	&lt;li&gt;The log file hasn't been updated (no new series have been added to the shard) for 4 (or more) hours (to change this duration, specify a new &lt;code class="language-markup" style="font-style: inherit; font-weight: inherit;"&gt;storage-compact-full-write-cold-duration&lt;/code&gt;)&lt;/li&gt;
 	&lt;li&gt;The log file is one (or more) megabytes (to update this size, specify a new &lt;code class="language-markup" style="font-style: inherit; font-weight: inherit;"&gt;storage-max-index-log-file-size&lt;/code&gt;)&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
 	&lt;li&gt;Repaired bad port dropping return value names.&lt;/li&gt;
 	&lt;li&gt;We now use consistent path separator in permission string representation.&lt;/li&gt;
 	&lt;li&gt;(&lt;strong&gt;Windows only&lt;/strong&gt;) Added a copy for snapshot files being backed up.&lt;/li&gt;
 	&lt;li&gt;Fixed an issue where updating an inactive task no longer schedules it. Thanks &lt;a href="https://github.com/raffs"&gt;@raffs&lt;/a&gt;!&lt;/li&gt;
 	&lt;li&gt;We now preserve comments in Flux queries when saving task definitions.&lt;/li&gt;
 	&lt;li&gt;Fixed &lt;code class="language-markup" style="font-style: inherit; font-weight: inherit;"&gt;X-Influxdb-Build&lt;/code&gt; and &lt;code class="language-markup" style="font-style: inherit; font-weight: inherit;"&gt;X-Influxdb-Version&lt;/code&gt; response headers for the &lt;code class="language-markup" style="font-style: inherit; font-weight: inherit;"&gt;/ping&lt;/code&gt; endpoint.&lt;/li&gt;
 	&lt;li&gt;Upgraded &lt;code class="language-markup" style="font-style: inherit; font-weight: inherit;"&gt;influxql&lt;/code&gt; to latest version and fixed predicate handling for &lt;code class="language-markup" style="font-style: inherit; font-weight: inherit;"&gt;SHOW TAG VALUES&lt;/code&gt; meta queries.&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;If you find issues or have questions, please join our&lt;a href="https://influxdata.com/slack"&gt; InfluxDB Community Slack&lt;/a&gt;, post them in our&lt;a href="https://github.com/influxdata/influxdb/issues"&gt; InfluxDB GitHub Repo&lt;/a&gt; or our&lt;a href="https://community.influxdata.com/c/influxdb2"&gt; Community Site&lt;/a&gt; and we will take a look.&lt;/p&gt;
</description>
      <pubDate>Mon, 11 Oct 2021 15:50:13 -0700</pubDate>
      <link>https://www.influxdata.com/blog/release-announcement-influxdb-oss-2-0-9/</link>
      <guid isPermaLink="true">https://www.influxdata.com/blog/release-announcement-influxdb-oss-2-0-9/</guid>
      <category>Product</category>
      <author>Russ Savage (InfluxData)</author>
    </item>
    <item>
      <title>Release Announcement: InfluxDB CLI 2.1.1</title>
      <description>&lt;p&gt;&lt;span style="font-weight: 400;"&gt;A new release for InfluxDB Command Line Tools (CLI) is now available.&lt;/span&gt;&lt;/p&gt;
&lt;ul&gt;
 	&lt;li&gt;&lt;span style="font-weight: 400;"&gt;&lt;strong&gt;InfluxDB CLI 2.1.1&lt;/strong&gt; — &lt;/span&gt;&lt;a href="https://docs.influxdata.com/influxdb/cloud/reference/release-notes/influx-cli/"&gt;&lt;span style="font-weight: 400;"&gt;release notes&lt;/span&gt;&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;Key highlights for this InfluxDB CLI release include:&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Features&lt;/strong&gt;&lt;/p&gt;
&lt;ul&gt;
 	&lt;li&gt;This release upgrades the project to Go version 1.17.&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;&lt;strong&gt;Bug fixes&lt;/strong&gt;&lt;/p&gt;
&lt;ul&gt;
 	&lt;li&gt;Fixed the shell completion for top-level &lt;code&gt;influx&lt;/code&gt; commands.&lt;/li&gt;
 	&lt;li&gt;Added global &lt;code&gt;--http-debug&lt;/code&gt; flag to the help text.&lt;/li&gt;
 	&lt;li&gt;Resolved an issue where we were incorrectly setting empty strings for IDs in permission resources.&lt;/li&gt;
 	&lt;li&gt;Added some detection and erroring out when we see incorrect positional args.&lt;/li&gt;
 	&lt;li&gt;We now respect value of &lt;code&gt;--host&lt;/code&gt; flag when writing CLI configs during setup.&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;The latest open source release can be found on our&lt;a href="https://portal.influxdata.com/downloads"&gt; downloads page&lt;/a&gt;.&lt;/p&gt;

&lt;p&gt;If you find issues or have questions, please join our&lt;a href="https://influxdata.com/slack"&gt; InfluxDB Community Slack&lt;/a&gt;, post them in our&lt;a href="https://github.com/influxdata/influxdb/issues"&gt; InfluxDB GitHub Repo&lt;/a&gt; or our&lt;a href="https://community.influxdata.com/c/influxdb2"&gt; Community Site&lt;/a&gt; and we will take a look.&lt;/p&gt;
</description>
      <pubDate>Fri, 24 Sep 2021 11:27:52 -0700</pubDate>
      <link>https://www.influxdata.com/blog/release-announcement-influxdb-cli-2-1-1/</link>
      <guid isPermaLink="true">https://www.influxdata.com/blog/release-announcement-influxdb-cli-2-1-1/</guid>
      <category>Product</category>
      <author>Russ Savage (InfluxData)</author>
    </item>
    <item>
      <title>New Bucket Schema Option Can Protect You From Unwanted Schema Changes</title>
      <description>&lt;p&gt;One of the best things about getting started with &lt;a href="https://www.influxdata.com/products/influxdb/"&gt;InfluxDB&lt;/a&gt; over traditional relational databases is the fact that you don’t need to pre-define your schema in order to write data. This means you can create a bucket and write data in seconds, which can be pretty powerful to developers who care way more about the application they’re building than the mechanics of storing the data.&lt;/p&gt;

&lt;p&gt;As your application grows, and more users are adding their own data, it can become tricky to ensure that the schema doesn’t get muddled up with junk. Some customers actually end up developing some sort of protection service to ensure only the right points make it to their production databases.&lt;/p&gt;

&lt;p&gt;To help solve this problem for our users, we have introduced a new option to explicitly define the schema of the data that can be written to a bucket. The schema is specific to each measurement written to a bucket, which allows it to grow as new measurements are added.&lt;/p&gt;

&lt;p&gt;In this post, I’m going to walk you through some of the concepts of the new explicit schema feature using one of my favorite datasets, the USGS Earthquake data. If you’re feeling antsy, feel free to jump directly to &lt;a href="https://docs.influxdata.com/influxdb/cloud/organizations/buckets/bucket-schema/"&gt;our documentation&lt;/a&gt; to learn all the details.&lt;/p&gt;

&lt;p&gt;To follow along with this post, you’ll need a &lt;a href="https://www.influxdata.com/products/influxdb-cloud/"&gt;free InfluxDB Cloud account&lt;/a&gt; as well as the latest InfluxDB Cloud Command Line Tool (CLI) available on our &lt;a href="https://portal.influxdata.com/downloads/"&gt;Downloads&lt;/a&gt; page. You can quickly set up your CLI to work with cloud by following the &lt;a href="https://docs.influxdata.com/influxdb/cloud/sign-up/#optional-download-install-and-use-the-influx-cli"&gt;instructions here&lt;/a&gt; — just make sure the  version of the CLI is 2.1 or greater. You can check using &lt;code class="language-bash"&gt;explicit&lt;/code&gt;.&lt;/p&gt;
&lt;h2&gt;Creating a bucket with an explicit schema&lt;/h2&gt;
&lt;p&gt;In order to work with an explicit bucket schema, you need to make sure that you create a new bucket with the schema type set to &lt;code class="language-bash"&gt;explicit&lt;/code&gt; (the default for new buckets is to allow any schema, aka implicit). You can do this using the influx command line tool.&lt;/p&gt;
&lt;pre class="line-numbers"&gt;&lt;code class="language-bash"&gt;influx bucket create \
--name usgs \
--description "Only USGS data allowed in here" \
--retention 7d \
--schema-type explicit

ID			Name			Retention	Shard group duration	Organization ID		Schema Type
6f5781a53eed10f5	usgs	168h0m0s	n/a			03921cbebef90000	explicit&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;When you log into your InfluxDB Cloud account through your browser, you can see the new Bucket created with the &lt;code class="language-bash"&gt;Explicit Schema Type&lt;/code&gt;.&lt;/p&gt;

&lt;p&gt;&lt;img class="alignnone size-full wp-image-258139 aligncenter" src="/images/legacy-uploads/load-data-bucket-usgs-earthquake.png" alt="InfluxDB Cloud - creating new bucket" width="1096" height="572" /&gt;&lt;/p&gt;
&lt;h2&gt;Adding measurement schemas to your bucket&lt;/h2&gt;
&lt;p&gt;Now that the bucket is created, we can start to add schemas for each of the measurements we want to store in that bucket. Any data that doesn’t match one of the measurement schemas will be rejected from the bucket.&lt;/p&gt;

&lt;p&gt;Measurement schemas are just text files in either CSV, JSON, or &lt;a href="http://ndjson.org/"&gt;NDJSON&lt;/a&gt; formats that tell InfluxDB what tags, fields, and types to allow in the measurement. Some example files are in &lt;a href="https://docs.influxdata.com/influxdb/cloud/organizations/buckets/bucket-schema/#create-a-bucket-schema"&gt;the documentation&lt;/a&gt;. For this USGS dataset, you can find the &lt;a href="https://github.com/influxdata/influxdb2-sample-data/tree/master/usgs-earthquake-data#schemas"&gt;schema files in our sample data repository&lt;/a&gt;. Here’s the one for the &lt;code class="language-bash"&gt;earthquake&lt;/code&gt; measurement in NDJSON format.&lt;/p&gt;
&lt;pre class="line-numbers"&gt;&lt;code class="language-json"&gt;{"name": "time", "type": "timestamp"}
{"name": "alert", "type": "field", "dataType": "string"}
{"name": "cdi", "type": "field", "dataType": "float"}
{"name": "depth", "type": "field", "dataType": "float"}
{"name": "detail", "type": "field", "dataType": "string"}
{"name": "dmin", "type": "field", "dataType": "float"}
{"name": "felt", "type": "field", "dataType": "integer"}
{"name": "gap", "type": "field", "dataType": "float"}
{"name": "ids", "type": "field", "dataType": "string"}
{"name": "lat", "type": "field", "dataType": "float"}
{"name": "lon", "type": "field", "dataType": "float"}
{"name": "mag", "type": "field", "dataType": "float"}
{"name": "mmi", "type": "field", "dataType": "float"}
{"name": "nst", "type": "field", "dataType": "integer"}
{"name": "place", "type": "field", "dataType": "string"}
{"name": "rms", "type": "field", "dataType": "float"}
{"name": "sig", "type": "field", "dataType": "integer"}
{"name": "sources", "type": "field", "dataType": "string"}
{"name": "status", "type": "field", "dataType": "string"}
{"name": "tsunami", "type": "field", "dataType": "integer"}
{"name": "types", "type": "field", "dataType": "string"}
{"name": "url", "type": "field", "dataType": "string"}
{"name": "code", "type": "tag"}
{"name": "id", "type": "tag"}
{"name": "magType", "type": "tag"}
{"name": "net", "type": "tag"}
{"name": "title", "type": "tag"}&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;The format here is pretty straightforward. The three types are &lt;code class="language-json"&gt;timestamp&lt;/code&gt;, &lt;code class="language-json"&gt;field&lt;/code&gt;, and &lt;code class="language-json"&gt;tag&lt;/code&gt; and the only type you will need to add the data type to are the fields, since tags are always strings.&lt;/p&gt;

&lt;p&gt;To create these schema files, I’ve found that it’s useful to ingest the data into a temporary bucket with an implicit schema type, then use the &lt;a href="https://docs.influxdata.com/influxdb/cloud/reference/flux/stdlib/influxdb-schema/"&gt;schema package&lt;/a&gt; in Flux to inspect the tags (&lt;code class="language-json"&gt;&lt;a href="https://docs.influxdata.com/influxdb/cloud/reference/flux/stdlib/influxdb-schema/measurementtagkeys/"&gt;schema.measurementTagKey&lt;/a&gt;s&lt;/code&gt;) and field keys (&lt;code class="language-json"&gt;&lt;a href="https://docs.influxdata.com/influxdb/cloud/reference/flux/stdlib/influxdb-schema/measurementfieldkeys/"&gt;schema.measurementFieldKeys&lt;/a&gt;&lt;/code&gt;) in the data.&lt;/p&gt;

&lt;p&gt;If you aren’t sure about the data types for the fields, you can also run a simple Flux query to fetch that information.&lt;/p&gt;
&lt;pre class="line-numbers"&gt;&lt;code class="language-javascript"&gt;import "influxdata/influxdb/schema"
from(bucket: "temp_bucket")
  |&amp;gt; range(start: v.timeRangeStart, stop: v.timeRangeStop)
  |&amp;gt; filter(fn: (r) =&amp;gt; r._measurement == "earthquake")
  |&amp;gt; schema.fieldsAsCols()
  |&amp;gt; group()
  |&amp;gt; limit(n: 1)&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;&lt;img class="size-full wp-image-258133 aligncenter" src="/images/legacy-uploads/bucket-schema-option-influxdb.png" alt="Learn how the new bucket schema option can protect you from unwanted schema changes" width="1156" height="682" /&gt;&lt;/p&gt;

&lt;p&gt;You can see the column types in the raw data view of the Data Explorer, just under the grouping information.&lt;/p&gt;

&lt;p&gt;Once you have your schema files ready to go, you can use the InfluxDB Cloud CLI tool to add that measurement schema to the bucket.&lt;/p&gt;
&lt;pre class="line-numbers"&gt;&lt;code class="language-bash"&gt;influx bucket-schema create --bucket usgs --name "earthquake" --columns-file ./schemas/earthquake-schema.ndjson --columns-format ndjson
ID			Measurement Name	Bucket ID
0808dd6fa216b000	earthquake		923f47af748a6453&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;For full documentation of the command, you can use the &lt;code class="language-bash"&gt;-h&lt;/code&gt; option or check out &lt;a href="https://docs.influxdata.com/influxdb/cloud/reference/cli/influx/bucket-schema/"&gt;our documentation&lt;/a&gt;. You can repeat the process to add additional measurement schemas to the same bucket. For this example, there are five measurements for the USGS data, and once they’re all added, you can verify them using the list command. If you need the full output, you can add the &lt;code class="language-bash"&gt;--json&lt;/code&gt; flag to the end of the command as well, which is also useful for automation.&lt;/p&gt;
&lt;pre class="line-numbers"&gt;&lt;code class="language-bash"&gt;influx bucket-schema list -n usgs
ID			Measurement Name	Bucket ID
0808dd50522a1000	chemical explosion	923f47af748a6453
0808dd6fa216b000	earthquake		923f47af748a6453
0808dd84f0551000	explosion		923f47af748a6453
0808dd96d876c000	ice quake		923f47af748a6453
0808ddaf8156a000	quarry blast		923f47af748a6453&lt;/code&gt;&lt;/pre&gt;
&lt;h2&gt;Writing data to an explicit schema bucket&lt;/h2&gt;
&lt;p&gt;Once the schemas are set up and ready to go, you can test that things are working by first trying to write some invalid line protocol to the bucket, to verify it is rejected.&lt;/p&gt;
&lt;pre class="line-numbers"&gt;&lt;code class="language-bash"&gt;influx write --bucket usgs "m,f=f1 v=1"
Error: failed to write data: 400 Bad Request: unable to parse 'm,f=f1 v=1': schema: measurement "m" not permitted by schema&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;This verifies that incorrect data will get rejected from the bucket, but let’s write some data as well to make sure our schemas are correct. Then we can query to verify that data was written.&lt;/p&gt;
&lt;pre class="line-numbers"&gt;&lt;code class="language-bash"&gt;influx write -b usgs -u https://raw.githubusercontent.com/influxdata/influxdb2-sample-data/master/usgs-earthquake-data/all_week.lp

influx query 'from(bucket: "usgs") |&amp;gt; range(start: -1d) |&amp;gt; count() |&amp;gt; group() |&amp;gt; sum()'
Result: _result
Table: keys: []
                _value:int
--------------------------
                      5076&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;You might get a different number of results, but anything greater than zero means things are working.&lt;/p&gt;

&lt;p&gt;As you start to write more data to the same bucket, you can add additional measurement schemas or update existing ones, as long as you are only adding tags or fields. You can’t edit a measurement schema in such a way that it invalidates the existing data in the bucket.&lt;/p&gt;
&lt;h2&gt;Conclusion&lt;/h2&gt;
&lt;p&gt;Using explicit bucket schemas can help protect your bucket against unwanted writes. Once you go through the process of creating the schema files, you can manage the bucket schemas quickly and easily using the latest influx CLI tooling. These explicit schemas are also compatible with &lt;a href="https://www.influxdata.com/products/influxdb-templates/"&gt;InfluxDB Templates&lt;/a&gt;, so you can also manage these as part of your GitOps workflows.&lt;/p&gt;

&lt;p&gt;If you have any questions or comments about explicit schema buckets, please join us on our &lt;a href="https://influxdata.com/slack"&gt;Community Slack workspace&lt;/a&gt; or you can file issues directly in &lt;a href="https://github.com/influxdata/influxdb/issues"&gt;GitHub&lt;/a&gt;.&lt;/p&gt;
</description>
      <pubDate>Thu, 26 Aug 2021 02:00:34 -0700</pubDate>
      <link>https://www.influxdata.com/blog/new-bucket-schema-option-protect-from-unwanted-schema-changes/</link>
      <guid isPermaLink="true">https://www.influxdata.com/blog/new-bucket-schema-option-protect-from-unwanted-schema-changes/</guid>
      <category>Use Cases</category>
      <category>Product</category>
      <category>Developer</category>
      <author>Russ Savage (InfluxData)</author>
    </item>
    <item>
      <title>Managing Secrets in the Browser in InfluxDB Cloud</title>
      <description>&lt;p&gt;Directly embedding passwords and API keys into the code you write is a bad practice. Of course, everyone knows this, but I’ll be the first to admit that it still happens now and then. In the world of source control and shared codebases, leaking a password can be a huge problem that costs your team time and money.&lt;/p&gt;

&lt;p&gt;Of course, today many companies leverage a secrets management system to lower the probability of something like this happening.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://www.influxdata.com/products/influxdb-cloud/"&gt;InfluxDB Cloud&lt;/a&gt; ships with a built-in secrets management system powered by the industry-leading &lt;a href="https://www.vaultproject.io/"&gt;Vault secret store&lt;/a&gt; to provide every customer with a secure secret store. Users can store secrets, list their keys, and delete secrets using our &lt;a href="https://docs.influxdata.com/influxdb/cloud/api/#tag/Secrets"&gt;fully documented API&lt;/a&gt;.&lt;/p&gt;

&lt;p&gt;Now, that capability is available directly in the InfluxDB Cloud web interface so that you can quickly add or update secrets for your &lt;a href="https://www.influxdata.com/products/flux/"&gt;Flux&lt;/a&gt; scripts without having to work with the API.&lt;/p&gt;

&lt;p&gt;&lt;img class="alignnone size-full wp-image-257968 aligncenter" src="/images/legacy-uploads/influxdb-flux-secrets.png" alt="influxdb flux secrets" width="939" height="698" /&gt;&lt;/p&gt;
&lt;h2&gt;Use cases for storing secrets&lt;/h2&gt;
&lt;p&gt;Users usually use InfluxDB Cloud secrets store for keeping track of sensitive connection information such as passwords, 3rd party API keys, and other security credentials when writing Flux scripts.&lt;/p&gt;

&lt;p&gt;For example, suppose you need to bring data into InfluxDB Cloud that is stored in Snowflake. Flux has a &lt;code class="language-javascript"&gt;sql.from&lt;/code&gt; function that allows you to &lt;a href="https://docs.influxdata.com/influxdb/cloud/reference/flux/stdlib/sql/from/#drivername"&gt;connect to many popular SQL databases&lt;/a&gt;, including Snowflake. When doing so, you will need to provide credentials for that connection. Those credentials should be stored in the secrets store and fetched by the Flux script directly.&lt;/p&gt;
&lt;pre class="line-numbers"&gt;&lt;code class="language-javascript"&gt;import "sql"
import "influxdata/influxdb/secrets"

username = secrets.get(key: "SNOWFLAKE_USER")
password = secrets.get(key: "SNOWFLAKE_PASS")
account = secrets.get(key: "SNOWFLAKE_ACCT")

sql.from(
  driverName: "snowflake",
  dataSourceName: "${username}:${password}@${account}/db/exampleschema?warehouse=wh",
  query: "SELECT * FROM example_table"
)&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;Examples for working with the Flux secrets package are available &lt;a href="https://docs.influxdata.com/influxdb/cloud/security/secrets/"&gt;in our documentation&lt;/a&gt;.&lt;/p&gt;
&lt;h2&gt;Adding a new secret&lt;/h2&gt;
&lt;p&gt;To get to the secrets management page in your browser, simply log into your &lt;a href="https://cloud2.influxdata.com"&gt;InfluxDB Cloud account&lt;/a&gt; and navigate to the setting page (the gearbox icon in the left navigation menu) and look for the “Secrets” tab. From there, adding a secret is as easy as clicking the “Add Secret” button.&lt;/p&gt;

&lt;p&gt;&lt;img class="size-full wp-image-257969 aligncenter" src="/images/legacy-uploads/add-secret-influxdb.png" alt="add secret influxdb" width="940" height="291" /&gt;&lt;/p&gt;

&lt;p&gt;Keep in mind that once a secret is created, it cannot be viewed or updated again. In order to change the value, you will need to delete and create a new secret. Any Flux scripts that were using that secret will need to be updated as well with the new secret key.&lt;/p&gt;

&lt;p&gt;You can then leverage that secret in any Flux script or Task that runs on our InfluxDB Cloud platform.&lt;/p&gt;
&lt;h2&gt;Conclusion&lt;/h2&gt;
&lt;p&gt;One of the major goals of InfluxDB is to be secure by default, and we aim to give developers the right tools to ensure that the code they write and the applications they build on our platform can be secure as well.&lt;/p&gt;

&lt;p&gt;As we move forward, we are looking for ways to make it easy to access these secret keys from anywhere you write Flux code in our platform.&lt;/p&gt;

&lt;p&gt;If you have any questions or feedback, please join us on our &lt;a href="https://influxdata.com/slack"&gt;Community Slack Workspace&lt;/a&gt; or on &lt;a href="https://github.com/influxdata/ui"&gt;GitHub&lt;/a&gt;.&lt;/p&gt;
</description>
      <pubDate>Thu, 19 Aug 2021 02:00:43 -0700</pubDate>
      <link>https://www.influxdata.com/blog/managing-secrets-in-browser-in-influxdb-cloud/</link>
      <guid isPermaLink="true">https://www.influxdata.com/blog/managing-secrets-in-browser-in-influxdb-cloud/</guid>
      <category>Use Cases</category>
      <category>Product</category>
      <category>Developer</category>
      <author>Russ Savage (InfluxData)</author>
    </item>
    <item>
      <title>Release Announcement: InfluxDB OSS 2.0.8</title>
      <description>&lt;p&gt;A new maintenance release for InfluxDB OSS is&lt;a href="https://portal.influxdata.com/downloads"&gt; available now&lt;/a&gt;. Thank you to all the community members who have downloaded and used this latest release.&lt;/p&gt;
&lt;ul&gt;
 	&lt;li&gt;&lt;strong&gt;InfluxDB 2.0.8&lt;/strong&gt; —&lt;a href="https://docs.influxdata.com/influxdb/v2.0/reference/release-notes/influxdb/"&gt; release notes&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;h3&gt;Upcoming changes to CLI packaging&lt;/h3&gt;
&lt;p&gt;Beginning with the next minor version (2.1.0), the InfluxDB CLI (&lt;code&gt;influx&lt;/code&gt; command) will no longer be packaged in releases from the InfluxDB repository (influxdata/influxdb). Future versions of the InfluxDB CLI will instead be released from the &lt;a href="https://github.com/influxdata/influx-cli"&gt;influx-cli repository&lt;/a&gt;. Users who wish to adopt the new InfluxDB CLI today can download the latest release from the &lt;a href="https://portal.influxdata.com/downloads/"&gt;InfluxData Downloads Portal&lt;/a&gt;.&lt;/p&gt;
&lt;h3&gt;Breaking change for Mac OS Users&lt;/h3&gt;
&lt;ul&gt;
 	&lt;li&gt;This release upgrades the project to &lt;a href="https://golang.org/doc/go1.16"&gt;go version 1.16&lt;/a&gt;. Because of the version bump to go, the macOS build for this release requires at least version 10.12 Sierra to run.&lt;/li&gt;
&lt;/ul&gt;
&lt;h3&gt;Features&lt;/h3&gt;
&lt;ul&gt;
 	&lt;li&gt;&lt;strong&gt;Disable the Browser UI&lt;/strong&gt; - Added &lt;code&gt;--ui-disabled&lt;/code&gt; option to &lt;code&gt;influxd&lt;/code&gt; to allow for running with the UI disabled.&lt;/li&gt;
&lt;/ul&gt;
&lt;h3&gt;Fixes and improvements&lt;/h3&gt;
&lt;p&gt;This maintenance release of InfluxDB OSS includes the following fixes and improvements:&lt;/p&gt;
&lt;ul&gt;
 	&lt;li&gt;Upgraded to latest version of influxdata/cron so that tasks can be created with interval of every: 1w.&lt;/li&gt;
 	&lt;li&gt;We now return an error instead of panicking when InfluxQL statement rewrites fail.&lt;/li&gt;
 	&lt;li&gt;Added migration for restored KV snapshots to latest schema before using them.&lt;/li&gt;
 	&lt;li&gt;We now specify which fields are missing when rejecting an incomplete onboarding request.&lt;/li&gt;
 	&lt;li&gt;&lt;code&gt;systemd&lt;/code&gt; unit should block on startup until http endpoint is ready&lt;/li&gt;
 	&lt;li&gt;Fixed display and parsing of &lt;code&gt;influxd&lt;/code&gt; upgrade CLI prompts in Windows PowerShell.&lt;/li&gt;
 	&lt;li&gt;Prevented silently dropped writes when there are overlapping shards.&lt;/li&gt;
 	&lt;li&gt;Invalid requests to &lt;code&gt;/api/v2&lt;/code&gt; subroutes now return 404 instead of a list of links.&lt;/li&gt;
 	&lt;li&gt;Flux metaqueries for &lt;code&gt;_field&lt;/code&gt; take fast path if &lt;code&gt;_measurement&lt;/code&gt; is the only predicate.&lt;/li&gt;
 	&lt;li&gt;Copy names from mmapped memory before closing iterator.&lt;/li&gt;
 	&lt;li&gt;Flux has been upgraded to &lt;a href="https://docs.influxdata.com/influxdb/v2.0/reference/release-notes/flux/#v01171-2021-06-01"&gt;v0.124.0&lt;/a&gt;.&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;If you find issues or have questions, please join our&lt;a href="https://influxdata.com/slack"&gt; InfluxDB Community Slack&lt;/a&gt;, post them in our&lt;a href="https://github.com/influxdata/influxdb/issues"&gt; InfluxDB GitHub Repo&lt;/a&gt; or our&lt;a href="https://community.influxdata.com/c/influxdb2"&gt; Community Site&lt;/a&gt; and we will take a look.&lt;/p&gt;
</description>
      <pubDate>Fri, 13 Aug 2021 14:19:37 -0700</pubDate>
      <link>https://www.influxdata.com/blog/release-announcement-influxdb-oss-2-0-8/</link>
      <guid isPermaLink="true">https://www.influxdata.com/blog/release-announcement-influxdb-oss-2-0-8/</guid>
      <category>Product</category>
      <author>Russ Savage (InfluxData)</author>
    </item>
    <item>
      <title>Introducing Ranged Annotations in InfluxDB Cloud</title>
      <description>&lt;p&gt;Adding annotations to your data is a great way to share context with other members of your team. In May, we added the ability to &lt;a href="https://docs.influxdata.com/influxdb/cloud/visualize-data/annotations/"&gt;annotate individual points in your data&lt;/a&gt;. Today, we have added the ability to add ranged annotations to your dashboard graphs.&lt;/p&gt;

&lt;p&gt;We’ve also reworked some of the interactions with annotations based on user feedback so that they can be added quickly and easily. To learn more about working with annotations, check out our &lt;a href="https://docs.influxdata.com/influxdb/cloud/visualize-data/annotations/"&gt;documentation&lt;/a&gt;.&lt;/p&gt;

&lt;p&gt;&lt;img class="wp-image-257843 aligncenter" src="/images/legacy-uploads/annotations-influxdb-cloud.png" alt="annotations influxdb cloud" width="1371" height="760" /&gt;&lt;/p&gt;
&lt;h2&gt;Adding ranged annotations&lt;/h2&gt;
&lt;p&gt;Adding ranged annotations to your data is simple. To get started, open any of your &lt;a href="https://www.influxdata.com/products/influxdb-cloud/"&gt;InfluxDB Cloud&lt;/a&gt; dashboards and look for the &lt;strong&gt;Annotations&lt;/strong&gt; button at the top.&lt;/p&gt;

&lt;p&gt;&lt;img class="size-full wp-image-257845 aligncenter" src="/images/legacy-uploads/ranged-annotations-influxdb-cloud-screenshot.png" alt="ranged annotations influxdb cloud screenshot" width="1369" height="402" /&gt;&lt;/p&gt;

&lt;p&gt;As the informational popover says, to add an annotation to a graph, simply hold down the shift key and click where you’d like to place the annotation. A box should open that allows you to enter a message. If you’d like to add a ranged annotation, simply hold down shift, then click and drag across an area of a graph you’d like to annotate.&lt;/p&gt;

&lt;p&gt;&lt;img class="size-full wp-image-257846 aligncenter" src="/images/legacy-uploads/add-annotations-influxdb-cloud.png" alt="add annotations influxdb cloud" width="1367" height="810" /&gt;&lt;/p&gt;

&lt;p&gt;The annotations you add will be visible to anyone else in your organization when they have the annotations button turned on in their dashboard. Annotations can be added to any line graph.&lt;/p&gt;
&lt;h2&gt;Conclusion&lt;/h2&gt;
&lt;p&gt;Annotations are a quick and easy way to share additional contextual information about the data being shown in a graph. This can help a team triage and troubleshoot faster because the important insights, hints, and information is available on the dashboard itself.&lt;/p&gt;

&lt;p&gt;We’d love to hear what you think about the new annotations feature of InfluxDB Cloud. Join us in our &lt;a href="https://influxdata.com/slack"&gt;Community Slack workspace&lt;/a&gt; and let us know!&lt;/p&gt;
</description>
      <pubDate>Mon, 09 Aug 2021 04:00:42 -0700</pubDate>
      <link>https://www.influxdata.com/blog/introducing-ranged-annotations-in-influxdb-cloud/</link>
      <guid isPermaLink="true">https://www.influxdata.com/blog/introducing-ranged-annotations-in-influxdb-cloud/</guid>
      <category>Use Cases</category>
      <category>Product</category>
      <category>Developer</category>
      <author>Russ Savage (InfluxData)</author>
    </item>
    <item>
      <title>Use InfluxDB with GitHub Actions for GitOps, CI/CD, and Data Transformation</title>
      <description>&lt;p&gt;GitHub Actions are a powerful way to add automation to any source code repository. When you take that power and connect it with InfluxDB, you get an amazing combination that allows you to automate data generation, manage GitOps workflows, and a whole lot more.&lt;/p&gt;

&lt;p&gt;This post will highlight some of the interesting ways to use &lt;a href="https://www.influxdata.com/products/influxdb/"&gt;InfluxDB&lt;/a&gt; and GitHub Actions.&lt;/p&gt;
&lt;h2&gt;Introducing the InfluxDB GitHub Action&lt;/h2&gt;
&lt;p&gt;I’ve been playing around with GitHub Actions a ton lately and noticed that the marketplace was missing one for working with InfluxDB. So I decided to remedy that and create a new &lt;a href="https://github.com/marketplace/actions/influxdb-action"&gt;InfluxDB Action&lt;/a&gt; that anyone can use. The process was very simple, and the documentation to create new actions is robust.&lt;/p&gt;

&lt;p&gt;&lt;img class="aligncenter wp-image-257748" style="border: 1px solid #e1e3e6; padding: 20px;" src="/images/legacy-uploads/InfluxDB-GitHub-Action.png" alt="InfluxDB GitHub Action" width="1200" height="972" /&gt;&lt;/p&gt;

&lt;p&gt;There are a few examples of how to set it up in the &lt;a href="https://github.com/influxdata/influxdb-action#readme"&gt;readme&lt;/a&gt; on the project. You can configure a specific version of InfluxDB, or use the keywords “latest” or “nightly” to always grab new versions (not recommended for production). The action will download InfluxDB and the InfluxDB CLI Tooling, unzip and move it into your path, then start and configure InfluxDB (unless you tell it not to). From there, you can run any influx command you would normally run.&lt;/p&gt;

&lt;p&gt;So we have an InfluxDB instance up and running, but what can we do with it? Well, turns out, we can do a lot.&lt;/p&gt;
&lt;h2&gt;GitOps integrations&lt;/h2&gt;
&lt;p&gt;I’ve written previously about how to &lt;a href="https://thenewstack.io/make-a-gitops-workflow-using-influxdb-templates/"&gt;set up a GitOps workflow with InfluxDB&lt;/a&gt;, but with this GitHub action, it’s even easier. I’ve updated the version of the &lt;a href="https://gist.github.com/russorat/11506d6ab8d08ae361329fb2dcf3076b/revisions"&gt;GitHub action configuration&lt;/a&gt; from that blog post to use the new InfluxDB Action.&lt;/p&gt;

&lt;p&gt;&lt;img class="aligncenter wp-image-257752" src="/images/legacy-uploads/GitOps-integrations.png" alt="GitOps integrations" width="1200" height="747" /&gt;&lt;/p&gt;

&lt;p&gt;For these GitOps flows, I don’t need a local instance of InfluxDB running, since all I’m doing is using the CLI tooling to deploy resources into &lt;a href="https://www.influxdata.com/products/influxdb-cloud/"&gt;InfluxDB Cloud&lt;/a&gt;, so I’ve set &lt;code class="language-bash"&gt;influxdb_start: false&lt;/code&gt; on line 28. It moves the &lt;code class="language-bash"&gt;influx&lt;/code&gt; command into the path so I can leverage it as I normally would.&lt;/p&gt;

&lt;p&gt;Another way the InfluxDB Action can help in your GitOps workflows is through validating that the changes you’ve made to your &lt;a href="https://docs.influxdata.com/influxdb/cloud/influxdb-templates/"&gt;InfluxDB Template&lt;/a&gt; files are valid. We do this internally with our Community Templates repository, where all changes to a Template are validated by loading a local InfluxDB instance and installing the template. If the template installs without issue, then it is assumed to be correct, and the test passes. Check it out here in our &lt;a href="https://github.com/influxdata/community-templates/blob/master/.github/workflows/main.yml#L37"&gt;Community Templates repository&lt;/a&gt;.&lt;/p&gt;

&lt;p&gt;&lt;img class="aligncenter wp-image-257750" src="/images/legacy-uploads/verify-templates.png" alt="verify-templates" width="1200" height="218" /&gt;&lt;/p&gt;
&lt;h2&gt;Data validation and conversion&lt;/h2&gt;
&lt;p&gt;Recently, I’ve been playing around with &lt;a href="https://octo.github.com/projects/flat-data"&gt;GitHub’s Flat Data project&lt;/a&gt; and looking for ways to leverage it for projects and demos. In a nutshell, GitHub Flat Data allows you to quickly configure a GitHub action to fetch and commit a public data feed into your GitHub repository at a regular interval. The example they use is Bitcoin data.&lt;/p&gt;

&lt;p&gt;So I updated the &lt;a href="https://github.com/influxdata/influxdb2-sample-data"&gt;InfluxDB Data Examples repository&lt;/a&gt; and started loading in some public data streams that I had used in the past, namely, &lt;a href="https://github.com/influxdata/influxdb2-sample-data/tree/master/noaa-ndbc-data"&gt;NOAA National Buoy Data Center data&lt;/a&gt; and &lt;a href="https://github.com/influxdata/influxdb2-sample-data/tree/master/usgs-earthquake-data"&gt;USGS Earthquake data&lt;/a&gt;.&lt;/p&gt;

&lt;p&gt;&lt;img class="aligncenter wp-image-257749" src="/images/legacy-uploads/loading-data-to-InfluxDB-Data-Examples-repository.png" alt="loading data to InfluxDB Data Examples repository" width="1200" height="726" /&gt;&lt;/p&gt;

&lt;p&gt;Next, I created a few post processing scripts to convert the data files into something that was usable for InfluxDB. For the buoy data, I enriched the data with the active station information and converted it into a &lt;a href="https://github.com/influxdata/influxdb2-sample-data/blob/master/noaa-ndbc-data/latest-observations.csv"&gt;CSV file&lt;/a&gt;, and for the Earthquake data, I converted it directly into &lt;a href="https://github.com/influxdata/influxdb2-sample-data/blob/master/usgs-earthquake-data/all_week.lp"&gt;line protocol&lt;/a&gt;.&lt;/p&gt;

&lt;p&gt;Now that I had these data feeds regularly being updated and in a format that InfluxDB could read easily, I started playing around with using GitHub actions for doing some data conversions.&lt;/p&gt;

&lt;p&gt;First, I grabbed the CSV file and used the InfluxDB command line interface (CLI)  to parse and generate a line protocol version of the data. Here’s the command for converting that CSV data into line protocol.&lt;/p&gt;
&lt;pre class="line-numbers"&gt;&lt;code class="language-bash"&gt;/usr/local/bin/influx write dryrun -f $GITHUB_WORKSPACE/noaa-ndbc-data/latest-observations.csv --format csv --header "#constant measurement,ndbc" --header "#datatype double,double,double,double,double,double,long,double,double,double,double,double,double,double,tag,double,double,double,tag,tag,tag,tag,string,string,string,string,dateTime:number" &amp;gt; $GITHUB_WORKSPACE/noaa-ndbc-data/latest-observations.lp&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;I’m using the &lt;code class="language-bash"&gt;dryrun&lt;/code&gt; command here to spit out the line protocol data to a file. Check out our documentation for more information and examples about &lt;a href="https://docs.influxdata.com/influxdb/cloud/write-data/developer-tools/csv/"&gt;parsing CSV data with the InfluxDB Command Line Tooling&lt;/a&gt;.&lt;/p&gt;

&lt;p&gt;The line protocol data is helpful, but I didn’t see any Flux capabilities for reading it directly, so I wanted to convert that to Flux’s Annotated CSV format so that I could leverage the &lt;code class="language-bash"&gt;csv.from(url: ""&lt;/code&gt; capability to pull the data into my InfluxDB Cloud account.&lt;/p&gt;

&lt;p&gt;The quickest way to do that is to just ingest the data into the InfluxDB OSS instance running in the background and then query it back out again into its own file.&lt;/p&gt;
&lt;pre class="line-numbers"&gt;&lt;code class="language-bash"&gt;/usr/local/bin/influx write -f $GITHUB_WORKSPACE/noaa-ndbc-data/latest-observations.lp -b dummy
          /usr/local/bin/influx query "from(bucket: \"dummy\") |&amp;gt; range(start: -1y) |&amp;gt; drop(columns: [\"_start\",\"_stop\"])" --raw &amp;gt; $GITHUB_WORKSPACE/noaa-ndbc-data/latest-observations-annotated.csv&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;The range of 1y (one year) here is just a fake range since I know this data is all very recent.&lt;/p&gt;

&lt;p&gt;Now, with this annotated CSV file, it’s really easy to pull that data into my InfluxDB Cloud account with the following query:&lt;/p&gt;
&lt;pre class="line-numbers"&gt;&lt;code class="language-javascript"&gt;import "experimental/csv"
csv.from(url: "https://raw.githubusercontent.com/influxdata/influxdb2-sample-data/master/noaa-ndbc-data/latest-observations-annotated.csv")
  |&amp;gt; filter(fn: (r) =&amp;gt; r._field == "dewpoint_temp_degc")&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;And visualize it with the &lt;a href="https://www.influxdata.com/blog/visualize-geotemporal-data-influxdb-cloud-new-map-graph/"&gt;Map graph&lt;/a&gt; type:&lt;/p&gt;

&lt;p&gt;&lt;img class="aligncenter wp-image-257751" src="/images/legacy-uploads/Earthquake-Data.png" alt="Earthquake Data" width="1200" height="1120" /&gt;&lt;/p&gt;

&lt;p&gt;I did a similar thing for the USGS earthquake data.&lt;/p&gt;

&lt;p&gt;This data is also now available in your InfluxDB Cloud instance using the new &lt;a href="https://docs.influxdata.com/influxdb/cloud/reference/flux/stdlib/influxdb-sample/"&gt;Sample Data library&lt;/a&gt;.&lt;/p&gt;
&lt;h2&gt;Conclusion&lt;/h2&gt;
&lt;p&gt;GitHub Actions are a powerful way to automate CI/CD pipelines for your projects, but it can also be used to automate data collection and transformation. We are using it internally in a variety of ways, and we’d love to hear how you’re using it.&lt;/p&gt;

&lt;p&gt;Please join us on our &lt;a href="https://influxdata.com/slack"&gt;Community Slack channel&lt;/a&gt; and let us know what you think!&lt;/p&gt;
</description>
      <pubDate>Thu, 05 Aug 2021 01:00:25 -0700</pubDate>
      <link>https://www.influxdata.com/blog/use-influxdb-with-github-actions-for-gitops-ci-cd-and-data-transformation/</link>
      <guid isPermaLink="true">https://www.influxdata.com/blog/use-influxdb-with-github-actions-for-gitops-ci-cd-and-data-transformation/</guid>
      <category>Product</category>
      <category>Use Cases</category>
      <category>Developer</category>
      <author>Russ Savage (InfluxData)</author>
    </item>
    <item>
      <title>Visualize Geotemporal Data with InfluxDB Cloud's New Map Graph</title>
      <description>&lt;p&gt;We recently introduced a new Map graph type into InfluxDB Cloud to help users visualize time series data that includes position.&lt;/p&gt;

&lt;p&gt;&lt;img class="aligncenter wp-image-257559" src="/images/legacy-uploads/Map-graph-type-InfluxDB-Cloud.png" alt="Map graph type - InfluxDB Cloud" width="1200" height="610" /&gt;&lt;/p&gt;

&lt;p&gt;Above is a graph showing the most recent earthquakes in California, where the color of the marker indicates their magnitude.&lt;/p&gt;

&lt;p&gt;In this post, I’m going to walk through the ways to ingest geotemporal data into InfluxDB Cloud, and how to use the new Maps visualization type.&lt;/p&gt;

&lt;p&gt;Before we continue, you’ll need to sign up for a &lt;a href="https://cloud2.influxdata.com"&gt;free InfluxDB Cloud account&lt;/a&gt; if you haven’t already.&lt;/p&gt;
&lt;h2&gt;Ingesting geotemporal data&lt;/h2&gt;
&lt;p&gt;There are many different ways to ingest geotemporal data into InfluxDB Cloud, but there are recommended schema design considerations to think about.&lt;/p&gt;

&lt;p&gt;If you are ingesting data with latitude and longitude information that changes over time, we recommend storing those values as fields within InfluxDB, so that it doesn’t continually increase your cardinality. This can also make it easier to track the same object moving over time, since you can group by the name of the object stored as defined by one or more tags such as sensor name, device ID, MAC address, etc.&lt;/p&gt;

&lt;p&gt;Even if the latitude and longitude values never change, and have the same cardinality as your other tags like sensor name, we would still recommend you store the information as fields, so that you don’t need to worry about converting the values when doing calculations, since all tags are stored as strings.&lt;/p&gt;

&lt;p&gt;If you do many queries where you need to group by the coordinates of the data, then we recommend you encode the latitude and longitude values using &lt;a href="https://s2geometry.io/devguide/s2cell_hierarchy.html"&gt;S2 Geometry&lt;/a&gt;. S2 takes the planet, and divides it into cells of customizable size (known as levels), such that you have a bounded set of values when working with the data. This way, the cell identifier (commonly tagged as &lt;code class="language-javascript"&gt;s2_cell_id&lt;/code&gt;) can be added as a tag to the dataset without leading to runaway cardinality.&lt;/p&gt;

&lt;p&gt;The &lt;a href="https://docs.influxdata.com/influxdb/cloud/query-data/flux/geo/shape-geo-data/"&gt;Flux geo package&lt;/a&gt; and the new Maps graph type are designed to work with either latitude and longitude stored as fields, or the S2 cells stored as tags in your dataset. Adding the &lt;code class="language-javascript"&gt;s2_cell_id&lt;/code&gt; as a single tag provides a performance boost when working with geotemporal data as all tag values are indexed. When ingesting your data, you can pre-calculate the S2 cell ids using the &lt;a href="https://github.com/influxdata/telegraf/tree/master/plugins/processors/s2geo"&gt;s2geo processor&lt;/a&gt; in Telegraf and store it with the dataset.&lt;/p&gt;

&lt;p&gt;If you aren’t using Telegraf, the Flux geo package provides the ability to calculate the &lt;code class="language-javascript"&gt;s2_cell_id&lt;/code&gt; on the fly, but the performance of the resulting query will be slightly slower as a result. If you’ve already been ingesting geotemporal data without this s2 cell information, don’t worry. You can also leverage Tasks to define a background process that would pre-calculate the s2 cells at different levels and store them with your dataset.&lt;/p&gt;

&lt;p&gt;For playing with the Map type, we offer a few different sample datasets you can use. You can leverage the USGS Earthquake dataset (usgs) or the NOAA National Buoy Data Center dataset (noaa). You can access them using the &lt;a href="https://docs.influxdata.com/influxdb/cloud/reference/flux/stdlib/influxdb-sample/"&gt;new Sample data Flux package&lt;/a&gt;.&lt;/p&gt;
&lt;pre&gt;&lt;code class="language-javascript"&gt;import "influxdata/influxdb/sample"

sample.data(set: "usgs")&lt;/code&gt;&lt;/pre&gt;
&lt;h2&gt;Graphing the data with the maps&lt;/h2&gt;
&lt;p&gt;Once the data has been ingested into InfluxDB Cloud, you can begin working with that data when building out visualizations.&lt;/p&gt;

&lt;p&gt;Simply select the series that you are interested in, ensure that you have selected either the latitude and longitude fields in your data, or the &lt;code class="language-javascript"&gt;s2_cell_id&lt;/code&gt; tag, and select the Map visualization type from the graph options dropdown.&lt;/p&gt;

&lt;p&gt;&lt;img class="aligncenter wp-image-257557" src="/images/legacy-uploads/Data-Explorer-Graphing-the-data-with-the-maps.png" alt="Data Explorer-Graphing the data with the maps" width="1200" height="607" /&gt;&lt;/p&gt;

&lt;p&gt;If all goes well, you should see a Map display with your points displayed. You might see an error if your fields are not named lat and lon or your tag isn’t named &lt;code class="language-javascript"&gt;s2_cell_id&lt;/code&gt;. That’s ok. You can open the config options for the graph type and select the correct column or fields to use for the display.&lt;/p&gt;

&lt;p&gt;&lt;img class="size-full wp-image-257556 aligncenter" src="/images/legacy-uploads/Data-Explorer-Map-options.png" alt="Data Explorer -Map options" width="954" height="894" /&gt;&lt;/p&gt;
&lt;h2&gt;Changing Map Marker colors&lt;/h2&gt;
&lt;p&gt;The Map graph type allows you to configure a value to use to change the colors of the markers on the map. In order for this to work, the data will need to use the &lt;code class="language-javascript"&gt;s2_cell_id&lt;/code&gt; tag for the coordinates, so that you can use the specific field value to set the marker colors.&lt;/p&gt;

&lt;p&gt;If your data already includes the &lt;code class="language-javascript"&gt;s2_cell_id&lt;/code&gt; column, you can just use that. If you only have the latitude and longitude values as fields, you can leverage the &lt;a href="https://docs.influxdata.com/influxdb/cloud/reference/flux/stdlib/experimental/geo/shapedata/"&gt;&lt;code class="language-javascript"&gt;shapeData&lt;/code&gt;&lt;/a&gt;&lt;a href="https://docs.influxdata.com/influxdb/cloud/reference/flux/stdlib/experimental/geo/shapedata/"&gt; function&lt;/a&gt; in the Geo package to calculate &lt;code class="language-javascript"&gt;s2_cell_id&lt;/code&gt; you need. Finally, you can map the value column you would like to use in your threshold back to the &lt;code class="language-javascript"&gt;_value&lt;/code&gt; column. The example below provides a sample query using this approach.&lt;/p&gt;

&lt;p&gt;&lt;img class="aligncenter wp-image-257558" src="/images/legacy-uploads/Data-Explorer-sample-query.png" alt="Data Explorer-sample query" width="1200" height="608" /&gt;&lt;/p&gt;

&lt;p&gt;Once you have your data in the correct format, you can then configure threshold values to adjust the colors of the markers on the graph.&lt;/p&gt;

&lt;p&gt;Here is an example of using the magnitude field of the earthquake to change the marker colors of the map.&lt;/p&gt;

&lt;p&gt;&lt;img class="aligncenter wp-image-257555" src="/images/legacy-uploads/An-example-of-using-the-magnitude-field-of-the-earthquake.png" alt="An example of using the magnitude field of the earthquake" width="1200" height="533" /&gt;&lt;/p&gt;
&lt;h2&gt;Conclusion&lt;/h2&gt;
&lt;p&gt;We hope you enjoy this new ability to analyze your data using the Map graph type. Looking at the data geographically can unlock new insights or allow you to find patterns that you may have otherwise overlooked.&lt;/p&gt;

&lt;p&gt;We are always looking for feedback on how you are using the capabilities of our product, or how we can improve. Please join us in our &lt;a href="https://influxdata.com/slack"&gt;community Slack workspace&lt;/a&gt; or open &lt;a href="https://github.com/influxdata/ui/issues"&gt;feature requests directly in GitHub&lt;/a&gt; to let us know what you are interested in.&lt;/p&gt;
</description>
      <pubDate>Mon, 02 Aug 2021 02:00:40 -0700</pubDate>
      <link>https://www.influxdata.com/blog/visualize-geotemporal-data-influxdb-cloud-new-map-graph/</link>
      <guid isPermaLink="true">https://www.influxdata.com/blog/visualize-geotemporal-data-influxdb-cloud-new-map-graph/</guid>
      <category>Use Cases</category>
      <category>Product</category>
      <category>Developer</category>
      <author>Russ Savage (InfluxData)</author>
    </item>
  </channel>
</rss>
