Skip to content

Commit

Permalink
add models
Browse files Browse the repository at this point in the history
  • Loading branch information
btkcodedev committed Sep 8, 2024
1 parent 02cb7f8 commit d18eb78
Show file tree
Hide file tree
Showing 3 changed files with 51 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -105,3 +105,4 @@ vars:
engagement_email_identifier: "engagement_emails"
ticket_pipeline_identifier: "ticket_pipelines"
tickets_identifier: "tickets"
engagement_note_identifier: "engagement_notes"
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
SELECT
{{ dbt.type_timestamp() }} AS _fivetran_synced,
'FALSE' AS _fivetran_deleted,
properties_hs_note_body AS note,
'note' AS engagement_type,
id AS engagement_id,
properties_hs_createdate AS created_timestamp,
properties_hs_timestamp AS occurred_timestamp,
properties_hs_created_by AS owner_id,
properties_hubspot_team_id AS team_id,
properties_hs_body_preview AS body_preview,
properties_hs_lastmodifieddate AS lastmodifieddate,
properties_hs_note_body AS note_body
FROM
{{ source('source_hubspot', 'engagements_notes') }}
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
version: 2

models:
- name: engagement_note
schema: "{{ var('airbyte_schema', target.schema) }}"
database: "{{ var('airbyte_database', target.database) }}"
identifier: "{{ var('engagement_note_identifier', 'engagement_note') }}"
description: All fields and field values associated with HubSpot engagement notes.
config:
+enabled: "{{ var('using_fivetran_model', False) }}"
columns:
- name: _fivetran_synced
description: Timestamp of when Fivetran synced a record
- name: _fivetran_deleted
description: Boolean to mark rows that were deleted in the source database
- name: note
description: The body of the note. The body has a limit of 65536 characters.
- name: engagement_type
description: The type of the engagement
- name: engagement_id
description: The ID of the engagement
- name: created_timestamp
description: This field marks the note's time of creation and determines where the note sits on the record timeline
- name: occurred_timestamp
description: This field marks the note's time of occurrence and determines where the note sits on the record timeline
- name: owner_id
description: The ID of the owner associated with the note
- name: team_id
description: The ID of the team associated with the note
- name: body_preview
description: A preview of the note body
- name: lastmodifieddate
description: The date the note was last modified
- name: note_body
description: The full body of the note

0 comments on commit d18eb78

Please sign in to comment.