Atlas Characterization error: Empty SQL Statement

Hi, we have been banging our heads on an issue with the Atlas characterization feature. It seems we are getting an SQL Parse error about an unexpected empty statement. I have tried several different cohorts and tried to make them as simple as possible with single simple cohort and features.
We are running on Azure containers and databricks for the CDM/Results. But the logging system for the azure containers and our security policies for the managed environment leave much to be desired. I don’t have direct access to the tomcat and other logs inside the container.
I am attaching the Characterization json and the piece of logs from the log viewer, but it is pretty useless. I am assuming this is a configuration issue somewhere since WebAPI is producing empty SQL statements instead of wrong SQL statements. The cohort definitions are executing and gathering the patients correctly…
We are on atlas 2.14 (and we aren’t getting the permissions error trying to view the results, so it is not that issue).

org.ohdsi.webapi.exception.AtlasException: java.lang.RuntimeException: java.util.concurrent.ExecutionException: org.springframework.jdbc.BadSqlGrammarException: StatementCallback; bad SQL grammar []; nested exception is java.sql.SQLException:
[Databricks][DatabricksJDBCDriver](500051) ERROR processing query/statement. Error Code: 0, SQL state: org.apache.hive.service.cli.HiveSQLException: Error running query: [PARSE_EMPTY_STATEMENT] org.apache.spark.sql.catalyst.parser.ParseException:
[PARSE_EMPTY_STATEMENT] Syntax error, unexpected empty statement. SQLSTATE: 42617 (line 1, pos 0)
 
== SQL ==
 
^^^
 
              at org.apache.spark.sql.hive.thriftserver.HiveThriftServerErrors$.runningQueryError(HiveThriftServerErrors.scala:49)
              at org.apache.spark.sql.hive.thriftserver.SparkExecuteStatementOperation.$anonfun$execute$1(SparkExecuteStatementOperation.scala:723)
              at scala.runtime.java8.JFunction0$mcV$sp.apply(JFunction0$mcV$sp.java:23)
              at com.databricks.unity.UCSEphemeralState$Handle.runWith(UCSEphemeralState.scala:45)
              at com.databricks.unity.HandleImpl.runWith(UCSHandle.scala:104)
              at org.apache.spark.sql.hive.thriftserver.SparkExecuteStatementOperation.org$apache$spark$sql$hive$thriftserver$SparkExecuteStatementOperation$$execute(SparkExecuteStatementOperation.scala:567)
              at org.apache.spark.sql.hive.thriftserver.SparkExecuteStatementOperation$$anon$2$$anon$3.$anonfun$run$2(SparkExecuteStatementOperation.scala:411)
              at scala.runtime.java8.JFunction0$mcV$sp.apply(JFunction0$mcV$sp.java:23)
              at com.databricks.logging.UsageLogging.withAttributionContext(UsageLogging.scala:420)
              at com.databricks.logging.UsageLogging.withAttributionContext$(UsageLogging.scala:418)
              at com.databricks.spark.util.PublicDBLogging.withAttributionContext(DatabricksSparkUsageLogger.scala:27)
              at com.databricks.logging.UsageLogging.withAttributionTags(UsageLogging.scala:472)
              at com.databricks.logging.UsageLogging.withAttributionTags$(UsageLogging.scala:455)
              at com.databricks.spark.util.PublicDBLogging.withAttributionTags(DatabricksSparkUsageLogger.scala:27)
              at com.databricks.spark.util.PublicDBLogging.withAttributionTags0(DatabricksSparkUsageLogger.scala:72)
              at com.databricks.spark.util.DatabricksSparkUsageLogger.withAttributionTags(DatabricksSparkUsageLogger.scala:173)
              at com.databricks.spark.util.UsageLogging.$anonfun$withAttributionTags$1(UsageLogger.scala:491)
              at com.databricks.spark.util.UsageLogging$.withAttributionTags(UsageLogger.scala:603)
              at com.databricks.spark.util.UsageLogging

Characterization json export:


{
  "id": 9,
  "name": "hypert",
  "cohorts": [
    {
      "id": 27,
      "name": "HyperT",
      "description": "hypertension cohort",
      "expression": {
        "cdmVersionRange": ">=5.0.0",
        "PrimaryCriteria": {
          "CriteriaList": [
            {
              "ConditionOccurrence": {
                "CodesetId": 0
              }
            }
          ],
          "ObservationWindow": {
            "PriorDays": 30,
            "PostDays": 90
          },
          "PrimaryCriteriaLimit": {
            "Type": "First"
          }
        },
        "ConceptSets": [
          {
            "id": 0,
            "name": "hypert",
            "expression": {
              "items": [
                {
                  "concept": {
                    "CONCEPT_ID": 320128,
                    "CONCEPT_NAME": "Essential hypertension",
                    "STANDARD_CONCEPT": "S",
                    "STANDARD_CONCEPT_CAPTION": "Standard",
                    "INVALID_REASON": "V",
                    "INVALID_REASON_CAPTION": "Valid",
                    "CONCEPT_CODE": "59621000",
                    "DOMAIN_ID": "Condition",
                    "VOCABULARY_ID": "SNOMED",
                    "CONCEPT_CLASS_ID": "Clinical Finding"
                  },
                  "isExcluded": false,
                  "includeDescendants": false,
                  "includeMapped": false
                }
              ]
            }
          }
        ],
        "QualifiedLimit": {
          "Type": "First"
        },
        "ExpressionLimit": {
          "Type": "First"
        },
        "InclusionRules": [],
        "CensoringCriteria": [],
        "CollapseSettings": {
          "CollapseType": "ERA",
          "EraPad": 0
        },
        "CensorWindow": {}
      }
    }
  ],
  "featureAnalyses": [
    {
      "id": 71,
      "type": "PRESET",
      "name": "Demographics Age Group",
      "domain": "DEMOGRAPHICS",
      "statType": "PREVALENCE",
      "descr": "Age of the subject on the index date (in 5 year age groups)",
      "design": "DemographicsAgeGroup",
      "description": "Age of the subject on the index date (in 5 year age groups)"
    },
    {
      "id": 77,
      "type": "PRESET",
      "name": "Demographics Age",
      "domain": "DEMOGRAPHICS",
      "statType": "DISTRIBUTION",
      "descr": "Age of the subject on the index date (in years).",
      "design": "DemographicsAge",
      "description": "Age of the subject on the index date (in years)."
    }
  ],
  "parameters": [],
  "stratas": [],
  "strataOnly": false,
  "strataConceptSets": [],
  "skeletonType": "CohortCharacterizationStudy",
  "skeletonVersion": "v0.0.1",
  "organizationName": "OHDSI"
}