createDatabase

Last updated: January 27, 2026

Creates a new database in Snowflake. Supports creating standard databases, transient databases, and replica databases from primary databases in other accounts.

Note: Automatic rollback drops the database.

Known limitation: This change type does not support database inspection features (snapshot, diff, diff-changelog, and generate-changelog commands).

Available attributes

Attribute

Type

Description

Required

databaseName

String

Name of the database to create

Yes

replaceIfExists

Boolean

Replace the database if it already exists using OR REPLACE

No

ifNotExists

Boolean

Only create the database if it doesn't exist using IF NOT EXISTS*

No

comment

String

Comment describing the database

No

standardDatabase

Nested

Configuration for standard/transient database

No*

replicaDatabase

Nested

Configuration for replica database

No*

* replaceIfExists and ifNotExists are mutually exclusive. Exactly one of standardDatabase or replicaDatabase must be specified.

standardDatabase attributes

Attribute

Type

Description

Required

isTransient

Boolean

Create a transient database

No

dataRetentionTimeInDays

Integer

Days to retain data for Time Travel (0-90)

No

maxDataExtensionTimeInDays

Integer

Maximum days Time Travel retention can be extended

No

defaultDdlCollation

String

Default collation for objects in the database

No

storageSerializationPolicy

String

Storage format policy (COMPATIBLE or OPTIMIZED)

No

externalVolume

String

External volume for Iceberg tables

No

catalog

String

Catalog integration for Iceberg tables

No

replaceInvalidCharacters

String

Replace invalid UTF-8 characters in Iceberg tables

No

tags

Nested

Key-value pairs of tags to apply

No

contacts

Nested

Key-value pairs mapping contact purposes to names

No

standardDatabase nested elements

tags - Key-value pairs of tags to apply:

Attribute

Type

Description

Required

key

String

Tag name (simple, schema-qualified, or fully-qualified)

Yes

value

String

Tag value

Yes

Contacts - Key-value pairs mapping contact purposes to contact names:

Attribute

Type

Description

Required

key

String

Contact purpose: `steward`, `support`, or `approver`

Yes

value

String

Name of existing contact object (simple, schema, or fully qualified)

Yes

replicaDatabase attributes

Attribute

Type

Description

Required

primaryAccount

String

Account identifier of the primary database

Yes

primaryDatabase

String

Name of the primary database to replicate

Yes

dataRetentionTimeInDays

Integer

Days to retain data for Time Travel

No

maxDataExtensionTimeInDays

Integer

Maximum days Time Travel retention can be extended

No

loading

loading

loading

loading