Skip to content

Commit

Permalink
Add an example that shows how to implement a filter with or conditions
Browse files Browse the repository at this point in the history
  • Loading branch information
guvra committed Feb 8, 2024
1 parent c84da47 commit e2ca998
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions app/config/example.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -22,12 +22,12 @@ tables:
filters:
- ['created_at', 'gt', 'expr: date_sub(now(), interval 60 day)']

# Dump only recent orders
# Dump only recent orders or orders with specific emails (this example shows how to implement OR conditions)
sales_order:
filters:
- ['created_at', 'gt', 'expr: date_sub(now(), interval 60 day)']
- ['entity_id', 'in', 'expr: select entity_id from sales_order where updated_at > date_sub(now(), interval 60 day) or email like "%@acme.fr"']

# Dump only CMS pages without "FAQ" in their meta title
# Dump only CMS pages without "FAQ" in their meta title (COALESCE keeps null values)
cms_page:
filters:
- ["expr: COALESCE(meta_title, '')", 'notLike', '%FAQ%']
Expand Down

0 comments on commit e2ca998

Please sign in to comment.