-
Notifications
You must be signed in to change notification settings - Fork 34
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #74 from fivetran/bugfix/consolidate-exch-account-…
…book-add Bugfix/consolidate exch account book add
- Loading branch information
Showing
15 changed files
with
44 additions
and
61 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Large diffs are not rendered by default.
Oops, something went wrong.
Large diffs are not rendered by default.
Oops, something went wrong.
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
10 changes: 5 additions & 5 deletions
10
integration_tests/seeds/netsuite2_accounting_period_data.csv
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,6 @@ | ||
id,_fivetran_deleted,_fivetran_synced,alllocked,allownonglchanges,aplocked,arlocked,closed,closedondate,date_deleted,enddate,isadjust,isinactive,isposting,isquarter,isyear,lastmodifieddate,parent,periodname,startdate | ||
5,FALSE,2022-07-10 23:00:33,T,F,T,T,T,2002-03-31 0:00:00,,2002-03-31 0:00:00,F,F,T,F,F,2019-02-20 12:32:15,2,Mar 2002,2002-03-01 00:00:00 | ||
8,FALSE,2022-07-10 23:00:33,T,F,T,T,T,2002-05-31 0:00:00,,2002-05-31 0:00:00,F,F,T,F,F,2019-02-20 12:32:15,6,May 2002,2002-05-01 00:00:00 | ||
9,FALSE,2022-07-10 23:00:33,T,F,T,T,T,2002-06-30 0:00:00,,2002-06-30 0:00:00,F,F,T,F,F,2019-02-20 12:32:15,6,Jun 2002,2002-06-01 00:00:00 | ||
21,FALSE,2022-07-10 23:00:33,T,F,T,T,T,2001-02-28 0:00:00,,2001-02-28 0:00:00,F,F,T,F,F,2019-02-20 12:32:15,19,Feb 2001,2001-02-01 00:00:00 | ||
20,FALSE,2022-07-10 23:00:33,T,F,T,T,T,2001-01-31 0:00:00,,2001-01-31 0:00:00,F,F,T,F,F,2019-02-20 12:32:15,19,Jan 2001,2001-01-01 00:00:00 | ||
5,FALSE,2022-07-10 23:00:33,T,F,T,T,T,2002-03-31 0:00:00,,2002-03-31 0:00:00,F,F,T,F,F,2019-02-20 12:32:15,2,Mar 2002,2002-03-01 0:00:00 | ||
8,FALSE,2022-07-10 23:00:33,T,F,T,T,T,2002-05-31 0:00:00,,2002-05-31 0:00:00,F,F,T,F,F,2019-02-20 12:32:15,6,May 2002,2002-05-01 0:00:00 | ||
9,FALSE,2022-07-10 23:00:33,T,F,T,T,T,2002-06-30 0:00:00,,2002-06-30 0:00:00,F,F,T,F,F,2019-02-20 12:32:15,6,Jun 2002,2002-06-01 0:00:00 | ||
21,FALSE,2022-07-10 23:00:33,T,F,T,T,T,2001-02-28 0:00:00,,2001-02-28 0:00:00,F,F,T,F,F,2019-02-20 12:32:15,19,Feb 2001,2001-02-01 0:00:00 | ||
20,FALSE,2022-07-10 23:00:33,T,F,T,T,T,2001-01-31 0:00:00,,2001-01-31 0:00:00,F,F,T,F,F,2019-02-20 12:32:15,19,Jan 2001,2001-01-01 0:00:00 |
12 changes: 6 additions & 6 deletions
12
integration_tests/seeds/netsuite2_consolidated_exchange_rate_data.csv
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,6 @@ | ||
id,_fivetran_deleted,_fivetran_synced,averagerate,currentrate,date_deleted,externalid,fromcurrency,fromsubsidiary,historicalrate,postingperiod,tocurrency,tosubsidiary | ||
1979,FALSE,2022-07-10 22:16:59,1,1,,,1,1,1,289,1,1 | ||
1944,FALSE,2022-07-10 22:16:59,1,1,,,1,1,1,282,1,1 | ||
1930,FALSE,2022-07-10 22:16:59,1,1,,,1,1,1,280,1,1 | ||
1958,FALSE,2022-07-10 22:16:59,1,1,,,1,1,1,285,1,1 | ||
1951,FALSE,2022-07-10 22:16:59,1,1,,,1,1,1,284,1,1 | ||
id,_fivetran_deleted,_fivetran_synced,averagerate,currentrate,date_deleted,externalid,fromcurrency,fromsubsidiary,historicalrate,postingperiod,tocurrency,tosubsidiary,accountingbook | ||
1979,FALSE,2022-07-10 22:16:59,1,1,,,1,1,1,289,1,1,1 | ||
1944,FALSE,2022-07-10 22:16:59,1,1,,,1,1,1,282,1,1,1 | ||
1930,FALSE,2022-07-10 22:16:59,1,1,,,1,1,1,280,1,1,1 | ||
1958,FALSE,2022-07-10 22:16:59,1,1,,,1,1,1,285,1,1,1 | ||
1951,FALSE,2022-07-10 22:16:59,1,1,,,1,1,1,284,1,1,1 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,5 @@ | ||
id,_fivetran_deleted,_fivetran_synced,accountnumber,actualtime,allowallresourcesfortasks,allowexpenses,allowtime,alternatecontact,altname,billingschedule,calculatedenddate,calculatedenddatebaseline,category,comments,companyname,contact,contactlist,currency,currencyprecision,custentity1,custentity4,custentity5,customer,date_deleted,datecreated,defaultbillingaddress,defaultshippingaddress,enddate,entityid,entitynumber,entitystatus,entitytitle,estimatedcost,estimatedgrossprofit,estimatedgrossprofitpercent,estimatedlaborcost,estimatedlaborcostbaseline,estimatedlaborrevenue,estimatedrevenue,estimatedtime,estimatedtimeoverride,estimatedtimeoverridebaseline,externalid,files,forecastchargerunondemand,fxrate,includecrmtasksintotals,isexempttime,isinactive,isproductivetime,isutilizedtime,jobbillingtype,jobitem,jobprice,jobtype,lastbaselinedate,lastmodifieddate,limittimetoassignees,materializetime,parent,percentcomplete,percenttimecomplete,primarycontact,projectedenddate,projectedenddatebaseline,projectmanager,startdate,startdatebaseline,timeapproval,timeremaining | ||
1548,FALSE,2022-05-27 13:12:02,,,F,T,T,,Another Cat Name,,,,,,Another Cat Name,,,1,2,,,,1547,,2017-05-19 01:02:54,731,731,,Another Cat Name,,,Another Cat Name,,,,,,,,,,,,,,1,F,F,F,T,T,,,,,,2017-05-19 19:34:44,F,F,1547,,0,,2017-06-30 0:00:00,,,2017-05-01 00:00:00,,1,0 | ||
1499,FALSE,2022-05-27 13:12:02,,,F,T,T,,Should this be a dog name,,,,,,Should this be a dog name,,,1,2,,,,465,,2017-05-13 22:03:58,1042,1042,,Should this be a dog name,,,Should this be a dog name,,,,,,,,,,,,,,1,F,F,F,T,T,,,,,,2017-05-14 21:05:43,F,F,465,,0,,,,,2017-05-13 00:00:00,,1,0 | ||
1502,FALSE,2022-05-27 13:12:02,,,F,T,T,,Nah only cats here,,,,,,Nah only cats here,,,1,2,,,,1491,,2017-05-21 14:06:47,944,944,,Nah only cats here,,2,Nah only cats here,,,,,,,,,,,,,,1,F,F,F,T,T,,,,,,2017-05-03 22:14:14,F,F,1491,,0,,,,,2017-03-01 00:00:00,,1,0 | ||
1504,FALSE,2022-05-27 13:12:02,,,F,T,T,,You still reading these?,,,,,,You still reading these?,,,1,2,,,,1491,,2017-05-22 01:52:36,498,498,,You still reading these?,,2,You still reading these?,,,,,,,,,,,,,,1,F,F,F,T,T,,,,,,2017-05-03 22:07:58,F,F,1491,,0,,,,,2017-05-21 00:00:00,,1,0 | ||
1548,FALSE,2022-05-27 13:12:02,,,F,T,T,,Another Cat Name,,,,,,Another Cat Name,,,1,2,,,,1547,,2017-05-19 1:02:54,731,731,,Another Cat Name,,,Another Cat Name,,,,,,,,,,,,,,1,F,F,F,T,T,,,,,,2017-05-19 19:34:44,F,F,1547,,0,,2017-06-30 0:00:00,,,2017-05-01 0:00:00,,1,0 | ||
1499,FALSE,2022-05-27 13:12:02,,,F,T,T,,Should this be a dog name,,,,,,Should this be a dog name,,,1,2,,,,465,,2017-05-13 22:03:58,1042,1042,,Should this be a dog name,,,Should this be a dog name,,,,,,,,,,,,,,1,F,F,F,T,T,,,,,,2017-05-14 21:05:43,F,F,465,,0,,,,,2017-05-13 0:00:00,,1,0 | ||
1502,FALSE,2022-05-27 13:12:02,,,F,T,T,,Nah only cats here,,,,,,Nah only cats here,,,1,2,,,,1491,,2017-05-21 14:06:47,944,944,,Nah only cats here,,2,Nah only cats here,,,,,,,,,,,,,,1,F,F,F,T,T,,,,,,2017-05-03 22:14:14,F,F,1491,,0,,,,,2017-03-01 0:00:00,,1,0 | ||
1504,FALSE,2022-05-27 13:12:02,,,F,T,T,,You still reading these?,,,,,,You still reading these?,,,1,2,,,,1491,,2017-05-22 1:52:36,498,498,,You still reading these?,,2,You still reading these?,,,,,,,,,,,,,,1,F,F,F,T,T,,,,,,2017-05-03 22:07:58,F,F,1491,,0,,,,,2017-05-21 0:00:00,,1,0 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
27 changes: 0 additions & 27 deletions
27
models/netsuite2/intermediate/base/int_netsuite2__consolidated_exchange_rates.sql
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,27 +0,0 @@ | ||
{{ config(enabled=(var('netsuite_data_model', 'netsuite') == var('netsuite_data_model_override','netsuite2') and var('netsuite2__multibook_accounting_enabled', true) and var('netsuite2__using_exchange_rate', true))) }} | ||
|
||
with consolidated_exchange_rates as ( | ||
|
||
select * | ||
from {{ var('netsuite2_consolidated_exchange_rates') }} | ||
), | ||
|
||
accounting_book_subsidiaries as ( | ||
|
||
select * | ||
from {{ var('netsuite2_accounting_book_subsidiaries') }} | ||
), | ||
|
||
joined as ( | ||
|
||
select | ||
consolidated_exchange_rates.*, | ||
accounting_book_subsidiaries.accounting_book_id | ||
|
||
from consolidated_exchange_rates | ||
left join accounting_book_subsidiaries | ||
on consolidated_exchange_rates.to_subsidiary_id = accounting_book_subsidiaries.subsidiary_id | ||
) | ||
|
||
select * | ||
from joined | ||
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,3 @@ | ||
packages: | ||
- package: fivetran/netsuite_source | ||
version: [">=0.6.0", "<0.7.0"] | ||
version: [">=0.7.0", "<0.8.0"] |