# Cannot drop or create external tables since upgrade to dbt-1.5.0

**URL:** <https://discourse.getdbt.com/t/cannot-drop-or-create-external-tables-since-upgrade-to-dbt-1-5-0/8265>\
**Category:** Help\
**Tags:** redshift, dbt-core\
**Created:** [May 12, 2023, 2:22pm UTC](https://discourse.getdbt.com/t/cannot-drop-or-create-external-tables-since-upgrade-to-dbt-1-5-0/8265 "2023-05-12T14:22:41Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![Igstar](https://avatars.discourse-cdn.com/v4/letter/i/6bbea6/32.png) [@Igstar](https://discourse.getdbt.com/u/Igstar)\
**Post date:** [May 12, 2023, 2:22pm UTC](https://discourse.getdbt.com/t/cannot-drop-or-create-external-tables-since-upgrade-to-dbt-1-5-0/8265/1 "2023-05-12T14:22:41Z")

</div>

## The problem I’m having

I was using the command

```auto

dbt run-operation stage_external_sources --vars "ext_full_refresh: true"

```

to drop and create external tables defined in my sources.yml  
However since upgrading to dbt-1.5.0 and redshift 1.5.1 - this no longer works and I get the following error

```auto

 DROP EXTERNAL TABLE cannot run inside a transaction block

```

It was working prior to the upgrade of dbt-core

## The context of why I’m trying to do this

This was working with previous version of dbt. I am defining my source table in my sources.yml

## What I’ve already tried

I have tried updating dbt\_external\_tables package

## Some example code or error messages

```auto
Encountered an error while running operation: Database Error
  DROP EXTERNAL TABLE cannot run inside a transaction block

```

my sources.yml looks like this

```auto

sources:
  - name: dwh
    description: '{{ doc("source_desc") }}'
    database: my_db
    schema: my_schema
    tables:
      - name: my_table
        description: my_desc
        external:
          location: my_s3_location
          file_format: parquet
        columns:
          - name: some_col
            data_type: varchar(64)
Etc

```

If this is no longer supported can you show me an alternative way of doing this

---

<div class="post-metadata">

**Author:** ![Igstar](https://avatars.discourse-cdn.com/v4/letter/i/6bbea6/32.png) [@Igstar](https://discourse.getdbt.com/u/Igstar)\
**Post date:** [May 17, 2023, 8:37pm UTC](https://discourse.getdbt.com/t/cannot-drop-or-create-external-tables-since-upgrade-to-dbt-1-5-0/8265/2 "2023-05-17T20:37:24Z")

</div>

i have just found out that this is related to the following bug - [[ADAP-504] [Regression] cannot run inside a transaction block · Issue #425 · dbt-labs/dbt-redshift · GitHub](https://github.com/dbt-labs/dbt-redshift/issues/425)
