Skip to content

Commit

Permalink
Add alt_name (fivetran#13)
Browse files Browse the repository at this point in the history
  • Loading branch information
jmongerlyra authored Mar 12, 2024
1 parent ee069c5 commit 1ac8455
Show file tree
Hide file tree
Showing 5 changed files with 9 additions and 0 deletions.
1 change: 1 addition & 0 deletions macros/get_customers_columns.sql
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@
{"name": "externalid", "datatype": dbt.type_string()},
{"name": "parent", "datatype": dbt.type_int()},
{"name": "isperson", "datatype": dbt.type_string()},
{"name": "altname", "datatype": dbt.type_string()},
{"name": "companyname", "datatype": dbt.type_string()},
{"name": "firstname", "datatype": dbt.type_string()},
{"name": "lastname", "datatype": dbt.type_string()},
Expand Down
2 changes: 2 additions & 0 deletions models/docs.md
Original file line number Diff line number Diff line change
Expand Up @@ -61,6 +61,8 @@

{% docs vendor_id %} The unique identifier of the vendor. {% enddocs %}

{% docs alt_name %} Name of the person or company. {% enddocs %}

{% docs company_name %} Name of the company. {% enddocs %}

{% docs create_date_at %} Timestamp of the record creation. {% enddocs %}
Expand Down
1 change: 1 addition & 0 deletions models/netsuite2/stg_netsuite2__customers.sql
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@ final as (
externalid as customer_external_id,
parent as parent_id,
isperson = 'T' as is_person,
altname as alt_name,
companyname as company_name,
firstname as first_name,
lastname as last_name,
Expand Down
1 change: 1 addition & 0 deletions models/netsuite2/stg_netsuite2__vendors.sql
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@ final as (
select
_fivetran_synced,
id as vendor_id,
altname as alt_name,
companyname as company_name,
datecreated as create_date_at,
category as vendor_category_id
Expand Down
4 changes: 4 additions & 0 deletions models/stg_netsuite2.yml
Original file line number Diff line number Diff line change
Expand Up @@ -246,6 +246,8 @@ models:
description: Reference to the parent customer.
- name: is_person
description: Boolean indicating if the customer is an individual person.
- name: alt_name
description: "{{ doc('alt_name') }}"
- name: company_name
description: "{{ doc('company_name') }}"
- name: first_name
Expand Down Expand Up @@ -642,6 +644,8 @@ models:
tests:
- unique
- not_null
- name: alt_name
description: "{{ doc('alt_name') }}"
- name: company_name
description: "{{ doc('company_name') }}"
- name: create_date_at
Expand Down

0 comments on commit 1ac8455

Please sign in to comment.