great-expectations / great_expectations_action

A GitHub Action that makes it easy to use Great Expectations to validate your data pipelines in your CI workflows.
MIT License
78 stars 12 forks source link

Validating Checkpoint: Checkpoint_name : {'checkpoint_store_name': ['Unknown field.']} #78

Open ashishtele opened 2 years ago

ashishtele commented 2 years ago

Hi Team,

I am new to Github Actions. When I am pushing the files to Github, I am getting error as mentioned:

my_base_check.yml

validation_operator_name: action_list_operator batches:

ge_workflow.yml

name: Great Expectations push

on: push: branches:

jobs: great_expectations_validation: runs-on: ubuntu-latest steps:

  # Clone the contents of the repository
- name: Copy Repository contents
  uses: actions/checkout@v2

  # Run Great Expectations and deploy Data Docs to Netlify
  # In this example, we have configured a Checkpoint called "locations.rds.chk".
- name: Run Great Expectation Checkpoints
  id: ge
  # Use @v0.x instead of @main to pin to a specific version, e.g. @v0.2
  uses: great-expectations/great_expectations_action@main
  with:
    CHECKPOINTS: "my_base_check"

  # Comment on PR with link to deployed Data Docs if there is a failed Checkpoint, otherwise don't comment.
- name: Comment on PR 
  if: ${{ always() }}
  uses: actions/github-script@v2
  with:
    github-token: ${{ secrets.GITHUB_TOKEN }}
    script: |
        if (process.env.FAILURE_FLAG == 1 ) {
          msg = `Failed Great Expectations Checkpoint(s) \`${process.env.FAILED_CHECKPOINTS}\` detected for: ${process.env.SHA}.  Corresponding Data Docs have been generated and can be viewed [here](${process.env.URL}).`;
          console.log(`Message to be emitted: ${msg}`);
          github.issues.createComment({
             issue_number: context.issue.number,
             owner: context.repo.owner,
             repo: context.repo.repo,
             body: msg 
           });
        }
  env:
    URL: "${{ steps.ge.outputs.netlify_docs_url }}"
    FAILED_CHECKPOINTS: ${{ steps.ge.outputs.failing_checkpoints }}
    SHA: ${{ github.sha }}
    FAILURE_FLAG: ${{ steps.ge.outputs.checkpoint_failure_flag }}

great_expectations.yml

config_version: 3.0

datasources: data_dir: module_name: great_expectations.datasource batch_kwargs_generators: subdir_reader: class_name: SubdirReaderBatchKwargsGenerator base_directory: ../data/raw data_asset_type: module_name: great_expectations.dataset class_name: PandasDataset class_name: PandasDatasource

validation_operators: action_list_operator:

To learn how to configure sending Slack notifications during evaluation

# (and other customizations), read: https://docs.greatexpectations.io/en/latest/autoapi/great_expectations/validation_operators/index.html#great_expectations.validation_operators.ActionListValidationOperator
class_name: ActionListValidationOperator
action_list:
- name: store_validation_result
  action:
    class_name: StoreValidationResultAction
- name: update_data_docs
  action:
    class_name: UpdateDataDocsAction

image