Coder Social home page Coder Social logo

Comments (3)

aaguilarguero avatar aaguilarguero commented on July 24, 2024

Hi, is this an issue that maintainers are aware of? Is there some sort of workaround for this? Possibly preventing the great_expectations.yml from being overwritten when a GreatExpectationOperator task is run in Airflow?

from airflow-provider-great-expectations.

pankajastro avatar pankajastro commented on July 24, 2024

Hey @antelmoa I haven't encountered the issue you mentioned. Could you please share the error stack trace? Additionally, it would be great if you could provide some details on how you're using it. This information would be helpful for debugging. Thank you!

from airflow-provider-great-expectations.

antelmoa avatar antelmoa commented on July 24, 2024

Hi, sorry for the wait on this.

Could you please share the error stack trace? Additionally, it would be great if you could provide some details on how you're using it.

This is in my local environment. I have a DAG that is running three GreatExpectationsOperator tasks at the same time. Please see my attached image.
Screenshot 2024-03-22 at 4 50 25 PM

If you notice the runs on the left, two runs were successful, but then the latest run failed. The failed tasks had the following error:

[2024-03-22, 20:49:57 UTC] {{base.py:1716}} ERROR - Error while processing DataContextConfig: n_result
[2024-03-22, 20:49:57 UTC] {{base.py:145}} ERROR - Encountered errors during loading config.  See ValidationError for more details.
[2024-03-22, 20:49:57 UTC] {{taskinstance.py:2728}} ERROR - Task failed with exception
Traceback (most recent call last):
  File "/venv/lib/python3.9/site-packages/airflow/models/taskinstance.py", line 444, in _execute_task
    result = _execute_callable(context=context, **execute_callable_kwargs)
  File "/venv/lib/python3.9/site-packages/airflow/models/taskinstance.py", line 414, in _execute_callable
    return execute_callable(context=context, **execute_callable_kwargs)
  File "/venv/lib/python3.9/site-packages/great_expectations_provider/operators/great_expectations.py", line 586, in execute
    self.data_context = ge.data_context.FileDataContext(
  File "/venv/lib/python3.9/site-packages/great_expectations/data_context/data_context/file_data_context.py", line 66, in __init__
    self._project_config = self._init_project_config(project_config)
  File "/venv/lib/python3.9/site-packages/great_expectations/data_context/data_context/file_data_context.py", line 111, in _init_project_config
    project_config = FileDataContext._load_file_backed_project_config(
  File "/venv/lib/python3.9/site-packages/great_expectations/data_context/data_context/file_data_context.py", line 213, in _load_file_backed_project_config
    return DataContextConfig.from_commented_map(
  File "/venv/lib/python3.9/site-packages/great_expectations/data_context/types/base.py", line 139, in from_commented_map
    config: Union[dict, BYC] = schema_instance.load(commented_map)
  File "/venv/lib/python3.9/site-packages/marshmallow/schema.py", line 722, in load
    return self._do_load(
  File "/venv/lib/python3.9/site-packages/marshmallow/schema.py", line 908, in _do_load
    self.handle_error(exc, data, many=many, partial=partial)
  File "/venv/lib/python3.9/site-packages/great_expectations/data_context/types/base.py", line 1717, in handle_error
    raise gx_exceptions.InvalidDataContextConfigError(
great_expectations.exceptions.exceptions.InvalidDataContextConfigError: Error while processing DataContextConfig: n_result

I went to the great_expectations.yml file and these were the contents at the end of the file:

anonymous_usage_statistics:
  data_context_id: 23027672-4b48-4dc5-9b58-59d10d75164a
  enabled: false
notebooks:
include_rendered_content:
  globally: false
  expectation_suite: false
  expectation_validation_result: false
n_result: false

Not the n_result:false at the end which is what the stack trace mentioned as the issue. I suspect since this file gets updated dynamically, eventually the tasks corrupt the configuration.

from airflow-provider-great-expectations.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.