Key differences
| Area | Databricks SQL | BigQuery | Notes |
|---|---|---|---|
| Array indexing | 1-based | 0-based (offset) | This affects array access and positional logic (for example, element_at(x, 1) vs x[OFFSET(0)]). |
| Regex engine | Java regex | RE2 | BigQuery’s RE2 engine does not support backtracking or some advanced patterns available in Java regex. |
| Casting behavior | cast (may error on invalid input) | cast and safe_cast | safe_cast returns null instead of failing on invalid conversions. |
| Function naming | substring, locate | substr, strpos | Function names and signatures may differ slightly between engines. |
At a glance
| Area | Databricks SQL | BigQuery |
|---|---|---|
| Object naming | Uses catalog.schema.table structure | Uses project.dataset.table structure |
| SQL dialect | Based on Spark SQL | Uses GoogleSQL |
| Data types | Spark-compatible types | GoogleSQL types |
| Temporary objects | Temporary views and tables supported | Temporary tables with dataset rules |
| Query execution | Runs on Databricks compute clusters or SQL warehouses | Runs on BigQuery managed execution environment |
| Array indexing | 1-based | 0-based (OFFSET) |
| Regex engine | Java regex | RE2 (limited features) |
| Casting behavior | CAST, some workarounds | SAFE_CAST available |
| Function naming | substring, locate | substr, strpos |
Naming and object references
Different engines organize database objects differently. Databricks SQL typically references tables using a hierarchical structure:Type coercion and casting
Both Databricks SQL and BigQuery support implicit type conversions, but the exact casting rules and supported data types may differ. Examples include:- Differences in how numeric precision and scale are handled.
- Variations in timestamp precision and timezone behavior.
- Differences in string-to-number conversions.
Date and time behavior
Date and timestamp handling may vary across SQL engines. Potential differences include:- Default timezone behavior.
- Timestamp precision.
- Available date/time functions.
NULL handling and comparisons
SQL engines may differ in how they treatNULL values in expressions, comparisons, and sorting.
Examples include:
- Ordering behavior for
NULLvalues inORDER BY. - Conditional logic involving
NULLcomparisons. - Differences in functions that handle missing values.
Table creation and write behavior
Imported workflows may create or overwrite tables depending on the configuration of Target gems. Table creation semantics may vary between SQL engines. For example:- Some engines support CREATE OR REPLACE TABLE semantics.
- Some require explicit dataset or schema specification.
- Some enforce stricter constraints on table overwrites or merges.
create or replace table.
BigQuery supports similar semantics but requires:
- dataset specification
- stricter overwrite behavior in some cases
Performance considerations
Execution models differ between engines, which may affect pipeline performance or cost. For example:- Databricks queries execute on clusters or SQL warehouses.
- BigQuery queries execute using a serverless model with usage-based pricing.
Cost considerations
Databricks:- cluster-based execution.
- performance depends on cluster size/configuration.
- serverless execution.
- cost based on data scanned.
What remains consistent
Despite dialect differences, most aspects of imported workflows remain the same:- Tool mappings from Alteryx to Prophecy SQL remain consistent across engines.
- Pipeline structure and transformations remain unchanged.
- The Prophecy authoring experience is identical regardless of execution engine.

