Skip to content

Commit

Permalink
Merge branch 'main' into test-limit-in-show-sql
Browse files Browse the repository at this point in the history
  • Loading branch information
colin-rogers-dbt authored Sep 26, 2023
2 parents 3863982 + 7f73309 commit 23d1879
Show file tree
Hide file tree
Showing 3 changed files with 37 additions and 1 deletion.
6 changes: 6 additions & 0 deletions .changes/unreleased/Fixes-20230923-091155.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
kind: Fixes
body: avoid nested loop in query planner execution of redshift__get_relations
time: 2023-09-23T09:11:55.2152725-04:00
custom:
Author: slin30
Issue: "609"
30 changes: 30 additions & 0 deletions .github/workflows/repository-cleanup.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
# **what?**
# Cleanup branches left over from automation and testing. Also cleanup
# draft releases from release testing.

# **why?**
# The automations are leaving behind branches and releases that clutter
# the repository. Sometimes we need them to debug processes so we don't
# want them immediately deleted. Running on Saturday to avoid running
# at the same time as an actual release to prevent breaking a release
# mid-release.

# **when?**
# Mainly on a schedule of 12:00 Saturday.
# Manual trigger can also run on demand

name: Repository Cleanup

on:
schedule:
- cron: '0 12 * * SAT' # At 12:00 on Saturday - details in `why` above

workflow_dispatch: # for manual triggering

permissions:
contents: write

jobs:
cleanup-repo:
uses: dbt-labs/actions/.github/workflows/repository-cleanup.yml@main
secrets: inherit
2 changes: 1 addition & 1 deletion dbt/include/redshift/macros/relations.sql
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@ with
from pg_depend
left join pg_rewrite
on pg_depend.objid = pg_rewrite.oid
where coalesce(pg_rewrite.ev_class, pg_depend.objid) != pg_depend.refobjid
)

select distinct
Expand All @@ -36,7 +37,6 @@ join relation ref
on dependency.ref_relation_id = ref.relation_id
join relation dep
on dependency.dep_relation_id = dep.relation_id
where ref.relation_name != dep.relation_name

{%- endcall -%}

Expand Down

0 comments on commit 23d1879

Please sign in to comment.