Disable spark transformations inside try except warning
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Thursday
I'm also a little confused what it's actually coming from. It says it's from databricks-flint, which sounds like a linter, but searching it is giving me a time-series library?
Warning message:
Spark transformations inside try/except are lazy and will not raise exceptions. Move the triggering action (e.g., .count(), .show(), .collect()) inside the try block instead.databricks-flint(SCPAP005)
- Labels:
-
Spark
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Thursday
Can u try this in your toml file?
[tool.databricks.flint]
ignore = ["SCPAP005"]
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Friday
So...I don't have one of those? Guessing you mean pyproject.toml which I just added with your suggestion, and no change.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Friday
If your action (count(), collect(), show(), etc.) is already inside the try block, this sounds like a false positive. The warning is likely from a Databricks inspection rather than the Flint time-series library. Check if inspection SCPAP005 can be disabled or its severity changed in your IDE, and if not, consider reporting it with a small reproducible example so the maintainers can investigate.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Saturday
I'm seeing this in the Databricks web editor, not my own IDE environment.
I'd disable it if I knew how, but I can't find any documentation for what it's coming from. If you google SCPAP005, all you get is this post and CPAP machines. Likewise, I'd report it to the maintainers if I knew who they were.