Great Expectations Export¶
Export rules to Great Expectations ExpectationSuite format.
export_ruleset_to_great_expectations_json ¶
Export a RuleSet to a Great Expectations ExpectationSuite as JSON string.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
ruleset
|
RuleSet
|
RuleSet to export |
required |
suite_name
|
str | None
|
Name for the expectation suite (defaults to ruleset name) |
None
|
indent
|
int
|
JSON indentation level |
2
|
Returns:
| Type | Description |
|---|---|
str
|
JSON string representation of the ExpectationSuite |
Raises:
| Type | Description |
|---|---|
ImportError
|
If great_expectations is not installed |
ValueError
|
If unsupported rule types are encountered |
Source code in lavendertown/export/great_expectations.py
export_ruleset_to_great_expectations_file ¶
Export a RuleSet to a Great Expectations ExpectationSuite and save as JSON file.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
ruleset
|
RuleSet
|
RuleSet to export |
required |
filepath
|
str
|
Path to save the JSON file |
required |
suite_name
|
str | None
|
Name for the expectation suite (defaults to ruleset name) |
None
|
indent
|
int
|
JSON indentation level |
2
|
Raises:
| Type | Description |
|---|---|
ImportError
|
If great_expectations is not installed |
ValueError
|
If unsupported rule types are encountered |