☁️ Loving our new documentation website? Provide feedback in the CloudCannon Community! ✨

data_config.*

Table of contents

Description:

This key defines what data sets are available to populate Select Inputs.

Appears in:
└── data_config
    └── *
Type:
Object
Properties:
pathstring Required#

This key defines the path to a file or folder of files containing data.

Show examplesHide examples

In this example, we have configured data config paths for both a CSV file and a folder of files.

Copied to clipboard
data_config:
  authors:
    path: data/authors.csv
  offices:
    path: data/offices
{
  "data_config": {
    "authors": {
      "path": "data/authors.csv"
    },
    "offices": {
      "path": "data/offices"
    }
  }
}

Configure all data files or folders under the data_config key in your CloudCannon configuration file.

Select Inputs and Multiselect Inputs which use the authors key are populated by the contents of the authors.csv file.

Select Inputs and Multiselect Inputs which use the offices key are populated by the contents of each file in the offices folder.

Examples:

In this example, we have configured data config entries for both a CSV file and a folder of files.

Copied to clipboard
data_config:
  authors:
    path: data/authors.csv
  offices:
    path: data/offices
{
  "data_config": {
    "authors": {
      "path": "data/authors.csv"
    },
    "offices": {
      "path": "data/offices"
    }
  }
}

Configure all data files or folders under the data_config key in your CloudCannon configuration file.

Select Inputs and Multiselect Inputs which use the authors key are populated by the contents of the authors.csv file.

Select Inputs and Multiselect Inputs which use the offices key are populated by the contents of each file in the offices folder.

Open in a new tab