Is there a recommended approach for using YAML configurations to automate the creation of spaces, containers, views, and data models in Cognite Data Fusion? How can we incorporate customizable parameters (e.g., space names, descriptions, and container properties) in the YAML files to make the process more flexible?
Example YAML configuration for containers:
containers:
- name: "example_container_1"
description: "First sample container"
external_id: "example_container_1_id"
properties:
name:
type: "Text"
nullable: false
parent:
type: "DirectRelation"
nullable: true
isValid:
type: "Boolean"
nullable: true
indexes:
- index_name: "entity_name"
type: "BTree"
properties: ["name"]
- name: "example_container_2"
description: "Second sample container"
external_id: "example_container_2_id"
properties:
identifier:
type: "Text"
nullable: false
indexes:
- index_name: "identifier_index"
type: "BTree"
properties: ["identifier"]
Each container is defined with the following:
- Properties: Each property has a defined type (e.g., "Text") and a nullable flag, ensuring flexibility in field definitions.
- Indexes: Each container includes index definitions with a specific index type (e.g., "BTree") and the properties to be indexed.
Though this example only focuses on containers, a similar structure is required for other resources like spaces, views, and data models. How can these configurations be used with the Python SDK?