Skip to content

Commit

Permalink
Update README
Browse files Browse the repository at this point in the history
  • Loading branch information
clausherther committed Sep 14, 2022
1 parent c99b2a8 commit 39f0b1f
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -552,6 +552,7 @@ tests:
### [expect_column_values_to_match_regex](macros/schema_tests/string_matching/expect_column_values_to_match_regex.sql)

Expect column entries to be strings that match a given regular expression. Valid matches can be found anywhere in the string, for example "[at]+" will identify the following strings as expected: "cat", "hat", "aa", "a", and "t", and the following strings as unexpected: "fish", "dog".
Optionally, `is_raw` indicates the `regex` pattern is a "raw" string and should be escaped. The default is `False`.

*Applies to:* Column

Expand All @@ -560,11 +561,13 @@ tests:
- dbt_expectations.expect_column_values_to_match_regex:
regex: "[at]+"
row_condition: "id is not null" # (Optional)
is_raw: True # (Optional)
```

### [expect_column_values_to_not_match_regex](macros/schema_tests/string_matching/expect_column_values_to_not_match_regex.sql)

Expect column entries to be strings that do NOT match a given regular expression. The regex must not match any portion of the provided string. For example, "[at]+" would identify the following strings as expected: "fish”, "dog”, and the following as unexpected: "cat”, "hat”.
Optionally, `is_raw` indicates the `regex` pattern is a "raw" string and should be escaped. The default is `False`.

*Applies to:* Column

Expand All @@ -573,11 +576,13 @@ tests:
- dbt_expectations.expect_column_values_to_not_match_regex:
regex: "[at]+"
row_condition: "id is not null" # (Optional)
is_raw: True # (Optional)
```

### [expect_column_values_to_match_regex_list](macros/schema_tests/string_matching/expect_column_values_to_match_regex_list.sql)

Expect the column entries to be strings that can be matched to either any of or all of a list of regular expressions. Matches can be anywhere in the string.
Optionally, `is_raw` indicates the `regex` patterns are "raw" strings and should be escaped. The default is `False`.

*Applies to:* Column

Expand All @@ -587,11 +592,13 @@ tests:
regex_list: ["@[^.]*", "&[^.]*"]
match_on: any # (Optional. Default is 'any', which applies an 'OR' for each regex. If 'all', it applies an 'AND' for each regex.)
row_condition: "id is not null" # (Optional)
is_raw: True # (Optional)
```

### [expect_column_values_to_not_match_regex_list](macros/schema_tests/string_matching/expect_column_values_to_not_match_regex_list.sql)

Expect the column entries to be strings that do not match any of a list of regular expressions. Matches can be anywhere in the string.
Optionally, `is_raw` indicates the `regex` patterns are "raw" strings and should be escaped. The default is `False`.

*Applies to:* Column

Expand All @@ -601,6 +608,7 @@ tests:
regex_list: ["@[^.]*", "&[^.]*"]
match_on: any # (Optional. Default is 'any', which applies an 'OR' for each regex. If 'all', it applies an 'AND' for each regex.)
row_condition: "id is not null" # (Optional)
is_raw: True # (Optional)
```

### [expect_column_values_to_match_like_pattern](macros/schema_tests/string_matching/expect_column_values_to_match_like_pattern.sql)
Expand Down

0 comments on commit 39f0b1f

Please sign in to comment.