Skip to content
This repository has been archived by the owner on Dec 4, 2024. It is now read-only.

Commit

Permalink
Merge pull request #30 from fishtown-analytics/bump/dbt-0-17-0
Browse files Browse the repository at this point in the history
Bump/dbt 0 17 0
  • Loading branch information
sanjanasen96 authored Jun 26, 2020
2 parents 703dd3c + 6698162 commit 97dfc71
Show file tree
Hide file tree
Showing 7 changed files with 17 additions and 9 deletions.
4 changes: 2 additions & 2 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ version: 2.1
jobs:
build:
docker:
- image: circleci/python:3.6.2-stretch
- image: circleci/python:3.6.3-stretch
- image: circleci/postgres:9.6.5-alpine-ram

steps:
Expand All @@ -20,7 +20,7 @@ jobs:
. venv/bin/activate
pip install --upgrade pip setuptools
pip install dbt==0.16.1
pip install dbt
mkdir -p ~/.dbt
cp integration_tests/ci/sample.profiles.yml ~/.dbt/profiles.yml
Expand Down
1 change: 1 addition & 0 deletions .github/ISSUE_TEMPLATE/CODEOWNERS
Validating CODEOWNERS rules …
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
* @clrcrl
5 changes: 4 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
> this package, especially as a post-hook. Please consider if this package is
> appropriate for your use case before using it.
Requires dbt >= 0.16.0
Requires dbt >= 0.17.0

This package provides out-of-the-box functionality to log events for all dbt
invocations, including run start, run end, model start, and model end. It
Expand Down Expand Up @@ -63,3 +63,6 @@ New columns were added in v0.2.0:
- **event_is_full_refresh as is_full_refresh** - `boolean` whether the DBT run was a full refresh

These will be added to your existing audit table automatically in the `on-run-start` DBT hook, and added to the staging tables deployed by this table when they are ran. The existing `event_schema` column will also be propagated into to `stg_dbt_model_deployments` as `schema`.

###Contributing
Additional contributions to this repo are very welcome! Check out [this](https://discourse.getdbt.com/t/contributing-to-an-external-dbt-package/657) post on the best workflow for contributing to a package. All PRs should only include functionality that is contained within all Segment deployments; no implementation-specific details should be included.
7 changes: 5 additions & 2 deletions dbt_project.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,8 @@
name: 'logging'
version: '1.0'
version: '0.3.0'
config-version: 2

require-dbt-version: [">=0.17.0"]

source-paths: ["models"]
analysis-paths: ["analysis"]
Expand Down Expand Up @@ -27,4 +30,4 @@ on-run-end:

models:
logging:
schema: meta
+schema: meta
4 changes: 2 additions & 2 deletions integration_tests/dbt_project.yml
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@

name: 'event_logging_integration_tests'
version: '1.0'
version: '0.3.0'
config-version: 2

profile: 'integration_tests'

require-dbt-version: ">=0.15.0"

models:
pre-hook: "{{ logging.log_model_start_event() }}"
Expand Down
3 changes: 2 additions & 1 deletion integration_tests/macros/drop_audit_schema.sql
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,8 @@
{% set audit_schema=logging.get_audit_schema() %}

{% if adapter.check_schema_exists(target.database, audit_schema) %}
{% do drop_schema(target.database, audit_schema) %}
{% set audit_schema_relation = api.Relation.create(database=target.database, schema=audit_schema).without_identifier() %}
{% do drop_schema(audit_schema_relation) %}
{% do run_query("commit;") %}
{{ dbt_utils.log_info("Audit schema dropped")}}

Expand Down
2 changes: 1 addition & 1 deletion packages.yml
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
packages:
- package: fishtown-analytics/dbt_utils
version: [">=0.2.4", "<0.4.0"]
version: [">=0.2.4", "<0.5.0"]

0 comments on commit 97dfc71

Please sign in to comment.