fivetran / fivetran/dbt_salesforce
[Feature] Update reserved word handling
- Dominant language
- No language data
- Stars
- 53
- Forks
- 38
- PR merge metrics
- No merged PRs in 30d
Description
### Is there an existing feature request for this?
- [X] I have searched the existing issues
### Describe the Feature
Revise logic to better accommodate different user setups and add documentation to readme to account to give instructions on what to do when our yml settings get overridden.
Things to update:
1. Update [src yml ](https://github.com/fivetran/dbt_zendesk_source/blob/main/models/src_zendesk.yml)
from:
```yml
- name: order
identifier: >
{% if target.type == 'snowflake' %}{{ var('salesforce_order_identifier', '"ORDER"') }}
{% else %}{{ var('salesforce_order_identifier', 'order') }}{% endif %}
```
to
```yml
- name: order
# remove double quotes and add necessary whitespace control
identifier: >
{% if target.type == 'snowflake' %}{{ var('salesforce_order_identifier', 'ORDER') }}
{%- else %}{{ var('salesforce_order_identifier', 'order') }}{% endif %}
# turn on quoting for the identifier in this table
quoting:
identifier: true
```
2. Update our [intergration_test dbt_project.yml ](https://github.com/fivetran/dbt_zendesk_source/blob/main/integration_tests/dbt_project.yml)vars
from:
```yml
salesforce_order_identifier: "sf_order_data"
```
to
```yml
order: "{{ ref('sf_order_data') }}"
```
3. Update [Snowflake Users Section](https://github.com/fivetran/dbt_salesforce_source#-snowflake-users) of README to add (something like):
If you have sources defined in your project's yml, instead you will need to add the below where your order table is defined in your yaml:
```yml
tables:
- name: order
# Add the below
identifier: ORDER # Or what your order table is named, being mindful of casing
quoting:
identifier: true
```
### 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?
_No response_
Contributor guide
No contributing guide indexed for this repository
Research direction
Start with models/src_zendesk.yml to understand the current reserved-word handling, then inspect integration_tests/dbt_project.yml and the README Snowflake Users section. Update the referenced source configuration, integration variables, and user guidance as described, and verify that the integration configuration and documented quoting instructions are consistent.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- yaml
- Domain
- data-engineering, documentation
- Issue type
- Feature
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 42/100