dataengref migrate

Home / Redshift

Redshift GETDATE in Snowflake, Databricks and BigQuery

Snowflake and Databricks accept GETDATE() unchanged. BigQuery has no GETDATE; use CURRENT_DATETIME(). Redshift returns the session time zone, UTC by default, so most clusters already run on UTC.

Redshift function: GETDATE() · Redshift docs

Equivalents

TargetSupportSyntaxNotesSource
SnowflakeSame nameGETDATE()Alias of CURRENT_TIMESTAMP, returned in the session time zone (TIMEZONE parameter) as TIMESTAMP_LTZ.Snowflake docs
DatabricksSame namegetdate()Synonym of current_timestamp(), evaluated once at the start of the query.Databricks docs
BigQueryRewriteCURRENT_DATETIME([time_zone])DATETIME in UTC unless a time zone is passed.BigQuery docs

Behavior differences to check

Examples

Rows loaded today (UTC)

Redshift
SELECT * FROM events WHERE loaded_at >= TRUNC(GETDATE());
Snowflake
SELECT * FROM events WHERE loaded_at >= CURRENT_DATE;
Databricks
SELECT * FROM events WHERE loaded_at >= current_date();
BigQuery
SELECT * FROM events WHERE DATE(loaded_at) = CURRENT_DATE('UTC');

Other Redshift functions

Last checked: · Paste a whole query into the SQL checker to find every function that needs a change.