Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Timestamp Test #32

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion dbt_project.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
config-version: 2
name: 'asana_source'
version: 0.8.0
version: 0.8.1
require-dbt-version: [">=1.3.0", "<2.0.0"]
models:
asana_source:
Expand Down
2 changes: 1 addition & 1 deletion integration_tests/dbt_project.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
config-version: 2
name: 'asana_source_integration_tests'
version: 0.8.0
version: 0.8.1
profile: 'integration_tests'
vars:
asana_schema: asana_source_integrations_tests_02
Expand Down
8 changes: 4 additions & 4 deletions macros/get_project_columns.sql
Original file line number Diff line number Diff line change
Expand Up @@ -2,14 +2,14 @@

{% set columns = [
{"name": "_fivetran_deleted", "datatype": "boolean"},
{"name": "_fivetran_synced", "datatype": dbt.type_timestamp()},
{"name": "_fivetran_synced", "datatype": dbt.timestamp()},
{"name": "archived", "datatype": "boolean"},
{"name": "color", "datatype": dbt.type_string()},
{"name": "created_at", "datatype": dbt.type_timestamp()},
{"name": "created_at", "datatype": dbt.timestamp()},
{"name": "current_status", "datatype": dbt.type_string()},
{"name": "due_date", "datatype": dbt.type_timestamp()},
{"name": "due_date", "datatype": dbt.timestamp()},
{"name": "id", "datatype": dbt.type_string()},
{"name": "modified_at", "datatype": dbt.type_timestamp()},
{"name": "modified_at", "datatype": dbt.timestamp()},
{"name": "name", "datatype": dbt.type_string()},
{"name": "notes", "datatype": dbt.type_string()},
{"name": "owner_id", "datatype": dbt.type_string()},
Expand Down
2 changes: 1 addition & 1 deletion macros/get_project_task_columns.sql
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{% macro get_project_task_columns() %}

{% set columns = [
{"name": "_fivetran_synced", "datatype": dbt.type_timestamp()},
{"name": "_fivetran_synced", "datatype": dbt.timestamp()},
{"name": "project_id", "datatype": dbt.type_string()},
{"name": "task_id", "datatype": dbt.type_string()}
] %}
Expand Down
4 changes: 2 additions & 2 deletions macros/get_section_columns.sql
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
{% macro get_section_columns() %}

{% set columns = [
{"name": "_fivetran_synced", "datatype": dbt.type_timestamp()},
{"name": "created_at", "datatype": dbt.type_timestamp()},
{"name": "_fivetran_synced", "datatype": dbt.timestamp()},
{"name": "created_at", "datatype": dbt.timestamp()},
{"name": "id", "datatype": dbt.type_string()},
{"name": "name", "datatype": dbt.type_string()},
{"name": "project_id", "datatype": dbt.type_string()}
Expand Down
4 changes: 2 additions & 2 deletions macros/get_story_columns.sql
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
{% macro get_story_columns() %}

{% set columns = [
{"name": "_fivetran_synced", "datatype": dbt.type_timestamp()},
{"name": "created_at", "datatype": dbt.type_timestamp()},
{"name": "_fivetran_synced", "datatype": dbt.timestamp()},
{"name": "created_at", "datatype": dbt.timestamp()},
{"name": "created_by_id", "datatype": dbt.type_string()},
{"name": "hearted", "datatype": "boolean"},
{"name": "id", "datatype": dbt.type_string()},
Expand Down
4 changes: 2 additions & 2 deletions macros/get_tag_columns.sql
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,9 @@

{% set columns = [
{"name": "_fivetran_deleted", "datatype": "boolean"},
{"name": "_fivetran_synced", "datatype": dbt.type_timestamp()},
{"name": "_fivetran_synced", "datatype": dbt.timestamp()},
{"name": "color", "datatype": dbt.type_string()},
{"name": "created_at", "datatype": dbt.type_timestamp()},
{"name": "created_at", "datatype": dbt.timestamp()},
{"name": "id", "datatype": dbt.type_string()},
{"name": "message", "datatype": dbt.type_string()},
{"name": "name", "datatype": dbt.type_string()},
Expand Down
14 changes: 7 additions & 7 deletions macros/get_task_columns.sql
Original file line number Diff line number Diff line change
@@ -1,22 +1,22 @@
{% macro get_task_columns() %}

{% set columns = [
{"name": "_fivetran_synced", "datatype": dbt.type_timestamp()},
{"name": "_fivetran_synced", "datatype": dbt.timestamp()},
{"name": "assignee_id", "datatype": dbt.type_string()},
{"name": "completed", "datatype": "boolean"},
{"name": "completed_at", "datatype": dbt.type_timestamp()},
{"name": "completed_at", "datatype": dbt.timestamp()},
{"name": "completed_by_id", "datatype": dbt.type_string()},
{"name": "created_at", "datatype": dbt.type_timestamp()},
{"name": "due_at", "datatype": dbt.type_timestamp()},
{"name": "due_on", "datatype": dbt.type_timestamp()},
{"name": "created_at", "datatype": dbt.timestamp()},
{"name": "due_at", "datatype": dbt.timestamp()},
{"name": "due_on", "datatype": dbt.timestamp()},
{"name": "id", "datatype": dbt.type_string()},
{"name": "modified_at", "datatype": dbt.type_timestamp()},
{"name": "modified_at", "datatype": dbt.timestamp()},
{"name": "name", "datatype": dbt.type_string()},
{"name": "notes", "datatype": dbt.type_string()},
{"name": "liked", "datatype": "boolean"},
{"name": "num_likes", "datatype": dbt.type_int()},
{"name": "parent_id", "datatype": dbt.type_string()},
{"name": "start_on", "datatype": dbt.type_timestamp()},
{"name": "start_on", "datatype": dbt.timestamp()},
{"name": "workspace_id", "datatype": dbt.type_string()}
] %}

Expand Down
2 changes: 1 addition & 1 deletion macros/get_task_follower_columns.sql
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{% macro get_task_follower_columns() %}

{% set columns = [
{"name": "_fivetran_synced", "datatype": dbt.type_timestamp()},
{"name": "_fivetran_synced", "datatype": dbt.timestamp()},
{"name": "task_id", "datatype": dbt.type_string()},
{"name": "user_id", "datatype": dbt.type_string()}
] %}
Expand Down
2 changes: 1 addition & 1 deletion macros/get_task_section_columns.sql
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{% macro get_task_section_columns() %}

{% set columns = [
{"name": "_fivetran_synced", "datatype": dbt.type_timestamp()},
{"name": "_fivetran_synced", "datatype": dbt.timestamp()},
{"name": "section_id", "datatype": dbt.type_string()},
{"name": "task_id", "datatype": dbt.type_string()}
] %}
Expand Down
2 changes: 1 addition & 1 deletion macros/get_task_tag_columns.sql
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{% macro get_task_tag_columns() %}

{% set columns = [
{"name": "_fivetran_synced", "datatype": dbt.type_timestamp()},
{"name": "_fivetran_synced", "datatype": dbt.timestamp()},
{"name": "tag_id", "datatype": dbt.type_string()},
{"name": "task_id", "datatype": dbt.type_string()}
] %}
Expand Down
2 changes: 1 addition & 1 deletion macros/get_team_columns.sql
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

{% set columns = [
{"name": "_fivetran_deleted", "datatype": "boolean"},
{"name": "_fivetran_synced", "datatype": dbt.type_timestamp()},
{"name": "_fivetran_synced", "datatype": dbt.timestamp()},
{"name": "id", "datatype": dbt.type_string()},
{"name": "name", "datatype": dbt.type_string()},
{"name": "organization_id", "datatype": dbt.type_string()}
Expand Down
2 changes: 1 addition & 1 deletion macros/get_user_columns.sql
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

{% set columns = [
{"name": "_fivetran_deleted", "datatype": "boolean"},
{"name": "_fivetran_synced", "datatype": dbt.type_timestamp()},
{"name": "_fivetran_synced", "datatype": dbt.timestamp()},
{"name": "email", "datatype": dbt.type_string()},
{"name": "id", "datatype": dbt.type_string()},
{"name": "name", "datatype": dbt.type_string()}
Expand Down
6 changes: 3 additions & 3 deletions models/stg_asana__project.sql
Original file line number Diff line number Diff line change
Expand Up @@ -24,10 +24,10 @@ final as (
select
id as project_id,
archived as is_archived,
cast(created_at as {{ dbt.type_timestamp() }}) as created_at,
cast(created_at as {{ dbt.timestamp() }}) as created_at,
current_status,
cast(due_date as {{ dbt.type_timestamp() }}) as due_date,
cast(modified_at as {{ dbt.type_timestamp() }}) as modified_at,
cast(due_date as {{ dbt.timestamp() }}) as due_date,
cast(modified_at as {{ dbt.timestamp() }}) as modified_at,
name as project_name,
owner_id as owner_user_id,
public as is_public,
Expand Down
2 changes: 1 addition & 1 deletion models/stg_asana__section.sql
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ final as (

select
id as section_id,
cast(created_at as {{ dbt.type_timestamp() }}) as created_at,
cast(created_at as {{ dbt.timestamp() }}) as created_at,
name as section_name,
project_id
from fields
Expand Down
2 changes: 1 addition & 1 deletion models/stg_asana__story.sql
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ final as (

select
id as story_id,
cast(created_at as {{ dbt.type_timestamp() }}) as created_at,
cast(created_at as {{ dbt.timestamp() }}) as created_at,
created_by_id as created_by_user_id,
target_id as target_task_id,
text as story_content,
Expand Down
2 changes: 1 addition & 1 deletion models/stg_asana__tag.sql
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ final as (
select
id as tag_id,
name as tag_name,
cast(created_at as {{ dbt.type_timestamp() }}) as created_at
cast(created_at as {{ dbt.timestamp() }}) as created_at
from fields
where not _fivetran_deleted
)
Expand Down
10 changes: 5 additions & 5 deletions models/stg_asana__task.sql
Original file line number Diff line number Diff line change
Expand Up @@ -32,14 +32,14 @@ final as (
id as task_id,
assignee_id as assignee_user_id,
completed as is_completed,
cast(completed_at as {{ dbt.type_timestamp() }}) as completed_at,
cast(completed_at as {{ dbt.timestamp() }}) as completed_at,
completed_by_id as completed_by_user_id,
cast(created_at as {{ dbt.type_timestamp() }}) as created_at,
cast(coalesce(due_on, due_at) as {{ dbt.type_timestamp() }}) as due_date,
cast(modified_at as {{ dbt.type_timestamp() }}) as modified_at,
cast(created_at as {{ dbt.timestamp() }}) as created_at,
cast(coalesce(due_on, due_at) as {{ dbt.timestamp() }}) as due_date,
cast(modified_at as {{ dbt.timestamp() }}) as modified_at,
name as task_name,
parent_id as parent_task_id,
cast(start_on as {{ dbt.type_timestamp() }}) as start_date,
cast(start_on as {{ dbt.timestamp() }}) as start_date,
notes as task_description,
liked as is_liked,
num_likes as number_of_likes,
Expand Down