datacontract / datacontract-cli

CLI to manage your datacontract.yaml files
https://cli.datacontract.com
Other
484 stars 94 forks source link

SodaCL checks in separate file using $ref in specification object #365

Open kohldninja opened 3 months ago

kohldninja commented 3 months ago

This may be a misunderstanding on my part but it appears I am unable to import a checks.yaml file with a SodaCL type.

The quality portion of my contract looks as follows:

quality:
  type: SodaCL
  specification:
    $ref: ./driver_checks.yaml

The checks file is in the correct SodaCL YAML notation:

checks for driver:
      - row_count >= 1
      - duplicate_count(driver_id) = 0

These checks run fine if I paste them within the specification object in the contract file itself.

However, the error I receive that comes from soda scan when running datacontract test driver_datacontract.yaml is Invalid section header "$ref"