fivetran / fivetran/dbt_netsuite

[Feature] Cast date-fields that are converted to timestamps by Netsuite Metadata/FT Connector back to dates

Open
#175 0 comments 0 reactions 0 assignees View on GitHub
Dominant language
No language data
Stars
57
Forks
42
Avg merge
6d 9h
Merged PRs (30d)
2

Description

### Is there an existing feature request for this?

- [X] I have searched the existing issues

### Describe the Feature

There are a few fields that are explicitly `dates` in **Netsuite2** according to the [Records Catalog](https://system.netsuite.com/app/recordscatalog/rcbrowser.nl). However, these get converted to timestamps in the connector due to Netsuite's metadata calling these date fields `instants`

Affected fields based on this [code search](https://github.com/search?q=repo%3Afivetran%2Fdbt_netsuite_source+date+language%3ASQL&type=code) and the Records Catalog data type:
- transactions.trandate
- transactions.duedate
- transactions.closedate
- customers.firstOrderDate
- accountingperiods.startdate
- accountingperiods.enddate
- accountingperiods.closedOnDate

the following fields come up in the code search but are confirmed true `datetimes` (so don't change these):
- transactions.closedOnDate
- vendors.datecreated

For the relevant fields, we should
1. Cast them as dates in the staging models (before doing so will we need to convert timezones?)
2. (probably) change their aliases from `*_at` to `*_on` or `*_date`. This would be a breaking change though!!!!

### Describe alternatives you've considered

_No response_

### Are you interested in contributing this feature?

- [X] Yes.
- [ ] Yes, but I will need assistance and will schedule time during your [office hours](https://calendly.com/fivetran-solutions-team/fivetran-solutions-team-office-hours) for guidance.
- [ ] No.

### Anything else?

originated from https://getdbt.slack.com/archives/C01D1R2JLLA/p1709549154256589

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.