Validation Errors
Validation errors occur when there are semantic errors. Such an something being an array when it should be an object. These types of errors tend to be introduced outside of Coalesce.
When you get a validation error, the Coalesce App will open a drawer showing a list of where the errors are occurring in your repository. You can resolve them by going to the repository and fixing the errors listed.
Reading a YAML File
It's important to understand how to read a YAML(.yml) before solving errors.
When reading a YAML file, Coalesce will use dot notation like operation.dataset
or operation.metadata.columns.0.acceptedValues.values
, the notation refers to specific paths within the hierarchical structure of the YAML file.
fileVersion: 1
id: 45ef876a-91d8-4db3-8bc6-27d96889be53
name: LINEITEM
operation: <------
database: ""
dataset: [] <----- operation.dataset
deployEnabled: true
description: Lineitem data as defined by TPC-H
locationName: SAMPLE
metadata: <---------
columns: <--------
- acceptedValues: <-------
strictMatch: true
values: {} <-------- operation.metadata.columns.0.acceptedValues.values
appliedColumnTests: {}
columnReference:
columnCounter: e9ea1254-edec-460e-895c-c3439fcf6b51
stepCounter: 45ef876a-91d8-4db3-8bc6-27d96889be53
config: {}
operation.dataset
: This refers to the dataset key under the operation section. In this example, dataset is an empty list ([]
).operation.metadata.columns.0.acceptedValues.values
:operation.metadata
refers to the metadata section within operation.columns.0
indicates the first item in the columns list (index 0).acceptedValues.values
refers to the values key withinacceptedValues
. In this example, this is an empty dictionary ({}
).
Solving Validation Errors
Using the example again, let's solve these errors.
These examples use GitHub, but can be applied to any Git provider.
We can see that there are two errors in the LINEITEM
node.
operation.dataset Expected string, received array
operation.metadata.columns.0.acceptedValues.values Expected array, received object
.
The errors tell you where the issue is occurring and the data type it expects.
For the first error:operation.dataset Expected string, received array
. In GitHub, go to the node and review the file. The first part of the error operation
points to the operation on line 4, then within operation, the second part, dataset, points to line 6. Finally, the message, Expected string, received array, means that the array []
should be changed to a string value, or ""
.
The second error: operation.metadata.columns.0.acceptedValues.values Expected array, received object
. In GitHub, go the node and review the file. Starting in operation
on line 4, then metadata
on line 10, then columns
on line 11, then acceptedValues
, and then values
on line 14. You can see the value is an empty object, {}
and it should be changed to an array, []
.
Protected File Paths
In Coalesce, certain file paths are protected and should not be modified directly by users. These files are critical to the system’s operation, and altering them can lead to unexpected behavior or errors. The protected file paths are:
./environments/*
./jobs/*
./macros/*
./nodeTypes/*
./nodes/*
./subgraphs/*
./data.yml
./locations.yml
./packagesV1.yml
Attempting to modify these files directly can result in validation errors or system instability.
Understanding Protected Files
Protected files contain essential configurations, definitions, and metadata that Coalesce relies on for proper functioning. For example:
- Nodes and Node Types (
./nodes/*
,./nodeTypes/*
): Define the structure and behavior of data transformations. - Macros (
./macros/*
): Contain reusable code snippets or functions. - Environments and Locations (
./environments/*
,./locations.yml
): Specify different runtime environments and data locations. - Jobs and Subgraphs (
./jobs/*
,./subgraphs/*
): Define job sequences and data processing workflows. - Configuration Files (
./data.yml
,./packagesV1.yml
): Hold global settings and package information.
Resolving Errors Related to Protected Files
If you encounter validation errors due to modifications of protected file paths:
- Do Not Edit Protected Files Directly: Refrain from making manual changes to the files listed above.
- Revert Unauthorized Changes: If changes were made, revert them to the original state from the repository’s history.
- Use the Coalesce Interface: Make any necessary changes through the Coalesce application, which ensures that modifications comply with system requirements.
- Consult Documentation: Refer to specific sections of the documentation for guidance on how to perform desired actions without altering protected files.
- Contact Support: If you’re unsure how to proceed, reach out to the Coalesce support team for assistance.