79425901

Date: 2025-02-10 00:35:37
Score: 1
Natty:
Report link

And I get this error: Unexpected error Error: Custom SQL fields cannot contain sub-queries.

A workaround for this is by enabling the ALLOW_ADHOC_SUBQUERY feature flag. For example, in your superset_config.py, ensure this is present:

FEATURE_FLAGS = {
  "ALLOW_ADHOC_SUBQUERY": True
}

(source: superset github issue #25072).

Note that this flag was disabled by default for security reason, so use it with caution. You can read more about this here:

Reasons:
  • RegEx Blacklisted phrase (1): I get this error
  • Has code block (-0.5):
  • Low reputation (0.5):
Posted by: nktnet