Documentation

Create a table

Use the influxctl table create command to create a table in a specified database in your InfluxDB Cloud Dedicated cluster.

With InfluxDB Cloud Dedicated, tables and measurements are synonymous. Typically, tables are created automatically on write using the measurement name specified in line protocol written to InfluxDB. However, to apply a custom partition template to a table, you must manually create the table before you write any data to it.

  1. If you haven’t already, download and install the influxctl CLI.

  2. Run the influxctl table create command and provide the following:

    • Optional: InfluxDB tags to use in the partition template
    • Optional: InfluxDB tag buckets to use in the partition template
    • Optional: A supported Rust strftime date and time string that specifies the time format in the partition template and determines the time interval to partition by (default is %Y-%m-%d)
    • The name of the database to create the table in
    • The name of the table to create

    InfluxDB Cloud Dedicated supports up to 7 total tags or tag buckets in the partition template.

influxctl table create \
  --template-tag tag1 \
  --template-tag tag2 \
  --template-tag-bucket tag3,100 \
  --template-tag-bucket tag4,300 \
  --template-timeformat '%Y-%m-%d' \
  
DATABASE_NAME
\
TABLE_NAME

Custom partitioning

InfluxDB Cloud Dedicated lets you define a custom partitioning strategy for each table. A partition is a logical grouping of data stored in Apache Parquet format in the InfluxDB v3 storage engine. By default, data is partitioned by day, but, depending on your schema and workload, customizing the partitioning strategy can improve query performance.

Use the --template-tag, --template-tag-bucket, and --template-timeformat flags to define partition template parts used to generate partition keys for the table. If no template flags are provided, the table uses the partition template of the target database. For more information, see Manage data partitioning.

Partition templates can only be applied on create

You can only apply a partition template when creating a table. There is no way to update a partition template on an existing table.


Was this page helpful?

Thank you for your feedback!


The future of Flux

Flux is going into maintenance mode. You can continue using it as you currently are without any changes to your code.

Read more

InfluxDB v3 enhancements and InfluxDB Clustered is now generally available

New capabilities, including faster query performance and management tooling advance the InfluxDB v3 product line. InfluxDB Clustered is now generally available.

InfluxDB v3 performance and features

The InfluxDB v3 product line has seen significant enhancements in query performance and has made new management tooling available. These enhancements include an operational dashboard to monitor the health of your InfluxDB cluster, single sign-on (SSO) support in InfluxDB Cloud Dedicated, and new management APIs for tokens and databases.

Learn about the new v3 enhancements


InfluxDB Clustered general availability

InfluxDB Clustered is now generally available and gives you the power of InfluxDB v3 in your self-managed stack.

Talk to us about InfluxDB Clustered