i have a error when i run the liquibase update command for Azure Synapse(SQLDW). But runbubf updatesql and status successfully. Can you help to deal with this?
--liquibase formatted sql
--changeset 41:2 labels:example-label context:test
--comment: example comment
CREATE TABLE [A].[B]
(
[COUNTRY_CD] [varchar](20) NULL,
[FILE_TYPE] [varchar](20) NULL,
[PIPELINE_NAME] [varchar](100) NOT NULL
)
WITH
(
DISTRIBUTION = ROUND_ROBIN,
CLUSTERED COLUMNSTORE INDEX
)
--rollback DROP TABLE [A].[B];
error datails when run the liquibase update command:
Operation cannot be performed within a transaction. [Failed SQL: (111212) CREATE TABLE [A].[B]
(
[COUNTRY_CD] [varchar](20) NULL,
[FILE_TYPE] [varchar](20) NULL,
[PIPELINE_NAME] [varchar](100) NOT NULL
)
WITH
(
DISTRIBUTION = ROUND_ROBIN,
CLUSTERED COLUMNSTORE INDEX
)]
By default, Liquibase will attempt to run every changeset within a transaction, committing at the end.
It looks like azure doesn’t allow your “create table” to be ran in a transaction. You can add runInTransaction:false to the changesets that can’t run in a transaction. For example:
The create table statement can be run successfully. But the Liquibase tracking table DATABASECHANGELOG occurs a new error of Azure Synapse(SQLDW).
Do you have any idea about this?