Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-17-2023 01:44 AM
Code without collect, which should not be used in production:
if df.filter("count > 0").count() > 0: dbutils.notebook.exit('Notebook Failed')you can also use a more aggressive version:
if df.filter("count > 0").count() > 0: raise Exception("count bigger than 0")
My blog: https://databrickster.medium.com/