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 occuring 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 within acceptedValues. In this example, this is an empty dictionary ({}).

Solving Validation Errors

Using the example again, let's solve these errors.

We can see that there are two errors in the LINEITEM node.

  1. operation.dataset Expected string, received array
  2. operation.metadata.columns.0.acceptedValues.values Expected array, received object.

The errors tell you where the the issue is occuring 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 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, [].