greatexpectationslabs / ge_tutorials

Learn how to add data validation and documentation to a data pipeline built with dbt and Airflow.
166 stars 83 forks source link

No module named `custom_module` #22

Open roger-yu-ds opened 3 years ago

roger-yu-ds commented 3 years ago

I'm trying to import the ExpectColumnMaxToBeBetweenCustom Expectation from this tutorial, but No module named 'custom_module'.

I have copied the file from Complete Example into the great_expectations/plugins directory. image

For the suggested line from custom_module import ExpectColumnMaxToBeBetweenCustom to work there are few more steps required:

  1. The column_custom_max_expectation.py file should be in great_expectations/plugins/custom_module instead of great_expectations/plugins
  2. In great_expectations/plugins/custom_module, there should be an __init__.py file
  3. In the __init__.py file there should be the line from .column_custom_max_expectation import ExpectColumnMaxToBeBetweenCustom