├── .buildkite
├── hooks
│ └── pre-command
├── pipeline.yml
└── scripts
│ └── run_models.sh
├── .github
├── ISSUE_TEMPLATE
│ ├── bug-report.yml
│ ├── config.yml
│ └── feature-request.yml
├── PULL_REQUEST_TEMPLATE
│ └── maintainer_pull_request_template.md
├── pull_request_template.md
└── workflows
│ └── auto-release.yml
├── .gitignore
├── .quickstart
└── quickstart.yml
├── CHANGELOG.md
├── DECISIONLOG.md
├── LICENSE
├── README.md
├── dbt_project.yml
├── docs
├── catalog.json
├── index.html
└── manifest.json
├── integration_tests
├── .gitignore
├── ci
│ └── sample.profiles.yml
├── dbt_project.yml
├── packages.yml
├── requirements.txt
├── seeds
│ ├── sf_account_data.csv
│ ├── sf_account_history_data.csv
│ ├── sf_contact_data.csv
│ ├── sf_contact_history_data.csv
│ ├── sf_event_data.csv
│ ├── sf_lead_data.csv
│ ├── sf_opportunity_data.csv
│ ├── sf_opportunity_history_data.csv
│ ├── sf_opportunity_line_item_data.csv
│ ├── sf_order_data.csv
│ ├── sf_product_2_data.csv
│ ├── sf_task_data.csv
│ ├── sf_user_data.csv
│ └── sf_user_role_data.csv
└── tests
│ ├── consistency
│ ├── consistency_columns.sql
│ ├── consistency_daily_activity.sql
│ └── consistency_daily_activity_count.sql
│ └── integrity
│ └── integrity_daily_activity.sql
├── macros
└── custom_persist_pass_through_columns.sql
├── models
├── salesforce.md
├── salesforce
│ ├── intermediate
│ │ ├── int_salesforce__date_spine.sql
│ │ └── int_salesforce__opportunity_aggregation_by_owner.sql
│ ├── salesforce.yml
│ ├── salesforce__contact_enhanced.sql
│ ├── salesforce__daily_activity.sql
│ ├── salesforce__manager_performance.sql
│ ├── salesforce__opportunity_enhanced.sql
│ ├── salesforce__opportunity_line_item_enhanced.sql
│ ├── salesforce__owner_performance.sql
│ └── salesforce__sales_snapshot.sql
└── salesforce_history
│ ├── salesforce__account_daily_history.sql
│ ├── salesforce__contact_daily_history.sql
│ ├── salesforce__opportunity_daily_history.sql
│ └── salesforce_history.yml
└── packages.yml
/.buildkite/hooks/pre-command:
--------------------------------------------------------------------------------
1 | #!/bin/bash
2 |
3 | set -e
4 |
5 | # Export secrets for Docker containers.
6 | # Restrict exposing secrets only to the steps that need them
7 | export GCLOUD_SERVICE_KEY=$(gcloud secrets versions access latest --secret="GCLOUD_SERVICE_KEY" --project="dbt-package-testing-363917")
8 | export CI_POSTGRES_DBT_HOST=$(gcloud secrets versions access latest --secret="CI_POSTGRES_DBT_HOST" --project="dbt-package-testing-363917")
9 | export CI_POSTGRES_DBT_USER=$(gcloud secrets versions access latest --secret="CI_POSTGRES_DBT_USER" --project="dbt-package-testing-363917")
10 | export CI_POSTGRES_DBT_PASS=$(gcloud secrets versions access latest --secret="CI_POSTGRES_DBT_PASS" --project="dbt-package-testing-363917")
11 | export CI_POSTGRES_DBT_DBNAME=$(gcloud secrets versions access latest --secret="CI_POSTGRES_DBT_DBNAME" --project="dbt-package-testing-363917")
12 | export CI_REDSHIFT_DBT_DBNAME=$(gcloud secrets versions access latest --secret="CI_REDSHIFT_DBT_DBNAME" --project="dbt-package-testing-363917")
13 | export CI_REDSHIFT_DBT_HOST=$(gcloud secrets versions access latest --secret="CI_REDSHIFT_DBT_HOST" --project="dbt-package-testing-363917")
14 | export CI_REDSHIFT_DBT_PASS=$(gcloud secrets versions access latest --secret="CI_REDSHIFT_DBT_PASS" --project="dbt-package-testing-363917")
15 | export CI_REDSHIFT_DBT_USER=$(gcloud secrets versions access latest --secret="CI_REDSHIFT_DBT_USER" --project="dbt-package-testing-363917")
16 | export CI_SNOWFLAKE_DBT_ACCOUNT=$(gcloud secrets versions access latest --secret="CI_SNOWFLAKE_DBT_ACCOUNT" --project="dbt-package-testing-363917")
17 | export CI_SNOWFLAKE_DBT_DATABASE=$(gcloud secrets versions access latest --secret="CI_SNOWFLAKE_DBT_DATABASE" --project="dbt-package-testing-363917")
18 | export CI_SNOWFLAKE_DBT_PASS=$(gcloud secrets versions access latest --secret="CI_SNOWFLAKE_DBT_PASS" --project="dbt-package-testing-363917")
19 | export CI_SNOWFLAKE_DBT_ROLE=$(gcloud secrets versions access latest --secret="CI_SNOWFLAKE_DBT_ROLE" --project="dbt-package-testing-363917")
20 | export CI_SNOWFLAKE_DBT_USER=$(gcloud secrets versions access latest --secret="CI_SNOWFLAKE_DBT_USER" --project="dbt-package-testing-363917")
21 | export CI_SNOWFLAKE_DBT_WAREHOUSE=$(gcloud secrets versions access latest --secret="CI_SNOWFLAKE_DBT_WAREHOUSE" --project="dbt-package-testing-363917")
22 | export CI_DATABRICKS_DBT_HOST=$(gcloud secrets versions access latest --secret="CI_DATABRICKS_DBT_HOST" --project="dbt-package-testing-363917")
23 | export CI_DATABRICKS_DBT_HTTP_PATH=$(gcloud secrets versions access latest --secret="CI_DATABRICKS_DBT_HTTP_PATH" --project="dbt-package-testing-363917")
24 | export CI_DATABRICKS_DBT_TOKEN=$(gcloud secrets versions access latest --secret="CI_DATABRICKS_DBT_TOKEN" --project="dbt-package-testing-363917")
25 | export CI_DATABRICKS_DBT_CATALOG=$(gcloud secrets versions access latest --secret="CI_DATABRICKS_DBT_CATALOG" --project="dbt-package-testing-363917")
--------------------------------------------------------------------------------
/.buildkite/pipeline.yml:
--------------------------------------------------------------------------------
1 | steps:
2 | - label: ":postgres: Run Tests - Postgres"
3 | key: "run-dbt-postgres"
4 | plugins:
5 | - docker#v3.13.0:
6 | image: "python:3.8"
7 | shell: [ "/bin/bash", "-e", "-c" ]
8 | environment:
9 | - "BASH_ENV=/tmp/.bashrc"
10 | - "CI_POSTGRES_DBT_DBNAME"
11 | - "CI_POSTGRES_DBT_HOST"
12 | - "CI_POSTGRES_DBT_PASS"
13 | - "CI_POSTGRES_DBT_USER"
14 | commands: |
15 | bash .buildkite/scripts/run_models.sh postgres
16 |
17 | - label: ":snowflake-db: Run Tests - Snowflake"
18 | key: "run_dbt_snowflake"
19 | plugins:
20 | - docker#v3.13.0:
21 | image: "python:3.8"
22 | shell: [ "/bin/bash", "-e", "-c" ]
23 | environment:
24 | - "BASH_ENV=/tmp/.bashrc"
25 | - "CI_SNOWFLAKE_DBT_ACCOUNT"
26 | - "CI_SNOWFLAKE_DBT_DATABASE"
27 | - "CI_SNOWFLAKE_DBT_PASS"
28 | - "CI_SNOWFLAKE_DBT_ROLE"
29 | - "CI_SNOWFLAKE_DBT_USER"
30 | - "CI_SNOWFLAKE_DBT_WAREHOUSE"
31 | commands: |
32 | bash .buildkite/scripts/run_models.sh snowflake
33 |
34 | - label: ":gcloud: Run Tests - BigQuery"
35 | key: "run_dbt_bigquery"
36 | plugins:
37 | - docker#v3.13.0:
38 | image: "python:3.8"
39 | shell: [ "/bin/bash", "-e", "-c" ]
40 | environment:
41 | - "BASH_ENV=/tmp/.bashrc"
42 | - "GCLOUD_SERVICE_KEY"
43 | commands: |
44 | bash .buildkite/scripts/run_models.sh bigquery
45 |
46 | - label: ":amazon-redshift: Run Tests - Redshift"
47 | key: "run_dbt_redshift"
48 | plugins:
49 | - docker#v3.13.0:
50 | image: "python:3.8"
51 | shell: [ "/bin/bash", "-e", "-c" ]
52 | environment:
53 | - "BASH_ENV=/tmp/.bashrc"
54 | - "CI_REDSHIFT_DBT_DBNAME"
55 | - "CI_REDSHIFT_DBT_HOST"
56 | - "CI_REDSHIFT_DBT_PASS"
57 | - "CI_REDSHIFT_DBT_USER"
58 | commands: |
59 | bash .buildkite/scripts/run_models.sh redshift
60 |
61 | - label: ":databricks: Run Tests - Databricks"
62 | key: "run_dbt_databricks"
63 | plugins:
64 | - docker#v3.13.0:
65 | image: "python:3.8"
66 | shell: [ "/bin/bash", "-e", "-c" ]
67 | environment:
68 | - "BASH_ENV=/tmp/.bashrc"
69 | - "CI_DATABRICKS_DBT_HOST"
70 | - "CI_DATABRICKS_DBT_HTTP_PATH"
71 | - "CI_DATABRICKS_DBT_TOKEN"
72 | - "CI_DATABRICKS_DBT_CATALOG"
73 | commands: |
74 | bash .buildkite/scripts/run_models.sh databricks
--------------------------------------------------------------------------------
/.buildkite/scripts/run_models.sh:
--------------------------------------------------------------------------------
1 | #!/bin/bash
2 |
3 | set -euo pipefail
4 |
5 | apt-get update
6 | apt-get install libsasl2-dev
7 |
8 | python3 -m venv venv
9 | . venv/bin/activate
10 | pip install --upgrade pip setuptools
11 | pip install -r integration_tests/requirements.txt
12 | mkdir -p ~/.dbt
13 | cp integration_tests/ci/sample.profiles.yml ~/.dbt/profiles.yml
14 |
15 | db=$1
16 | echo `pwd`
17 | cd integration_tests
18 | dbt deps
19 | dbt seed --target "$db" --full-refresh
20 | dbt run --target "$db" --full-refresh
21 | dbt test --target "$db"
22 | dbt run --vars '{salesforce__account_history_enabled: true, salesforce__contact_history_enabled: true, salesforce__opportunity_history_enabled: true}' --target "$db" --full-refresh
23 | dbt test --target "$db"
24 | dbt run --vars '{salesforce__account_history_enabled: true, salesforce__contact_history_enabled: true, salesforce__opportunity_history_enabled: true}' --target "$db"
25 | dbt test --target "$db"
26 | dbt run-operation fivetran_utils.drop_schemas_automation --target "$db"
27 |
--------------------------------------------------------------------------------
/.github/ISSUE_TEMPLATE/bug-report.yml:
--------------------------------------------------------------------------------
1 | name: 🐞 Bug
2 | description: Report a bug or an issue you've found within the dbt package
3 | title: "[Bug]
"
4 | labels: ["type:bug"]
5 | body:
6 | - type: markdown
7 | attributes:
8 | value: |
9 | Thanks for using the Fivetran dbt package and for taking the time to fill out this bug report. Your contributions help improve this package for the entire community of users!
10 | - type: checkboxes
11 | attributes:
12 | label: Is there an existing issue for this?
13 | description: Please search to see if an issue already exists for the bug you encountered.
14 | options:
15 | - label: I have searched the existing issues
16 | required: true
17 | - type: textarea
18 | attributes:
19 | label: Describe the issue
20 | description: A concise description of the problem you're experiencing. Also, please provide the steps to reproduce the issue if applicable.
21 | validations:
22 | required: true
23 | - type: textarea
24 | id: logs
25 | attributes:
26 | label: Relevant error log or model output
27 | description: |
28 | If applicable, provide the relevant error log or describe the problematic model output.
29 | render: shell
30 | validations:
31 | required: false
32 | - type: textarea
33 | attributes:
34 | label: Expected behavior
35 | description: A concise description of what you expected to happen.
36 | validations:
37 | required: true
38 | - type: textarea
39 | attributes:
40 | label: Possible solution
41 | description: Were you able to investigate and/or discover a potential fix to this bug in your investigation? If so, it would be much appreciated if you could submit code samples to show us how your fix resolved this issue.
42 | validations:
43 | required: false
44 | - type: textarea
45 | attributes:
46 | label: dbt Project configurations
47 | description: Please provide the variables and any other project specific configurations from your `dbt_project.yml`.
48 | validations:
49 | required: true
50 | - type: textarea
51 | attributes:
52 | label: Package versions
53 | description: Please provide the contents of your `packages.yml`.
54 | validations:
55 | required: true
56 | - type: dropdown
57 | id: database
58 | attributes:
59 | label: What database are you using dbt with?
60 | multiple: true
61 | options:
62 | - postgres
63 | - redshift
64 | - snowflake
65 | - bigquery
66 | - databricks
67 | - other (mention it in "Additional Context")
68 | validations:
69 | required: true
70 | - type: dropdown
71 | id: orchestration_type
72 | attributes:
73 | label: How are you running this dbt package?
74 | multiple: true
75 | options:
76 | - Fivetran Quickstart Data Model
77 | - Fivetran Transformations
78 | - dbt Core™
79 | - dbt Cloud™
80 | - other (mention it in "Additional Context")
81 | validations:
82 | required: true
83 | - type: textarea
84 | attributes:
85 | label: dbt Version
86 | description: Run `dbt --version` in your CLI or dbt cloud environment and copy the contents. Additionally, if you are using Fivetran dbt Transformations, provide the contents of the `dbtVersion` configuration in your `deployment.yml`.
87 | validations:
88 | required: true
89 | - type: textarea
90 | attributes:
91 | label: Additional Context
92 | description: |
93 | Links? References? Anything that will give us more context about the issue you are encountering!
94 |
95 | Tip: You can attach images or log files by clicking this area to highlight it and then dragging files in.
96 | validations:
97 | required: false
98 | - type: checkboxes
99 | id: pr
100 | attributes:
101 | label: Are you willing to open a PR to help address this issue?
102 | description: Our team will assess this issue and let you know if we will add it to a future sprint. However, if you would like to expedite the solution, we encourage you to contribute to the package via a PR. Our team will then work with you to approve and merge your contributions as soon as possible.
103 | options:
104 | - label: Yes.
105 | - label: Yes, but I will need assistance.
106 | - label: No.
107 | required: false
--------------------------------------------------------------------------------
/.github/ISSUE_TEMPLATE/config.yml:
--------------------------------------------------------------------------------
1 | contact_links:
2 | - name: Provide feedback to our dbt package team
3 | url: https://www.surveymonkey.com/r/DQ7K7WW
4 | about: Fill out our survey form to provide valuable feedback to the Fivetran team developing and maintaining the dbt packages.
5 | - name: Fivetran connector question
6 | url: https://support.fivetran.com/hc
7 | about: Have a question about your connector? Check out the Fivetran support portal for more details.
8 | - name: What is dbt
9 | url: https://docs.getdbt.com/docs/introduction
10 | about: Check out the dbt docs for all dbt related information
11 | - name: Hang out in dbt Slack
12 | url: https://www.getdbt.com/community/
13 | about: Have a question or just want to chat with fellow data friends, join dbt Slack and hangout in the tools-fivetran channel with us!
14 |
--------------------------------------------------------------------------------
/.github/ISSUE_TEMPLATE/feature-request.yml:
--------------------------------------------------------------------------------
1 | name: 🎉 Feature
2 | description: Suggest a new feature for the Fivetran dbt package
3 | title: "[Feature] "
4 | labels: ["type:enhancement"]
5 | body:
6 | - type: markdown
7 | attributes:
8 | value: |
9 | Thanks for using the Fivetran dbt package and for taking the time to fill out this feature request. Your contributions help improve this package for the entire community of users!
10 | - type: checkboxes
11 | attributes:
12 | label: Is there an existing feature request for this?
13 | description: Please search to see if an issue already exists for the feature you would like.
14 | options:
15 | - label: I have searched the existing issues
16 | required: true
17 | - type: textarea
18 | attributes:
19 | label: Describe the Feature
20 | description: A clear and concise description of what you want to happen and why you want the new feature.
21 | validations:
22 | required: true
23 | - type: textarea
24 | attributes:
25 | label: How would you implement this feature?
26 | description: |
27 | How would you build out this feature with your existing data? Any code examples you can provide to help accelerate development on this issue?
28 | validations:
29 | required: true
30 | - type: textarea
31 | attributes:
32 | label: Describe alternatives you've considered
33 | description: |
34 | A clear and concise description of any alternative solutions or features you've considered.
35 | validations:
36 | required: false
37 | - type: checkboxes
38 | id: contributing
39 | attributes:
40 | label: Are you interested in contributing this feature?
41 | description: Our team will assess this feature and let you know if we will add it to a future sprint. However, if you would like to expedite the feature, we encourage you to contribute to the package via a PR. Our team will then work with you to approve and merge your contributions as soon as possible.
42 | options:
43 | - label: Yes.
44 | - label: Yes, but I will need assistance.
45 | - label: No.
46 | required: false
47 | - type: textarea
48 | attributes:
49 | label: Anything else?
50 | description: |
51 | Links? References? Anything that will give us more context about the feature you are suggesting!
52 | validations:
53 | required: false
54 |
--------------------------------------------------------------------------------
/.github/PULL_REQUEST_TEMPLATE/maintainer_pull_request_template.md:
--------------------------------------------------------------------------------
1 |
12 |
13 | ## PR Overview
14 | **Package version introduced in this PR:**
15 |
16 | **This PR addresses the following Issue/Feature(s):**
17 |
18 |
19 | **Summary of changes:**
20 |
21 |
22 |
23 | ### Submission Checklist
24 | - [ ] Alignment meeting with the reviewer (if needed)
25 | - [ ] Timeline and validation requirements discussed
26 | - [ ] Provide validation details:
27 | - [ ] **Validation Steps:** Check for unintentional effects (e.g., add/run consistency & integrity tests)
28 | - [ ] **Testing Instructions:** Confirm the change addresses the issue(s)
29 | - [ ] **Focus Areas:** Complex logic or queries that need extra attention
30 |
31 | ### Changelog
32 |
34 | - [ ] Draft changelog for PR
35 | - [ ] Final changelog for release review
--------------------------------------------------------------------------------
/.github/pull_request_template.md:
--------------------------------------------------------------------------------
1 | **Please provide your name and company**
2 |
3 | **Link the issue/feature request which this PR is meant to address**
4 |
5 |
6 | **Detail what changes this PR introduces and how this addresses the issue/feature request linked above.**
7 |
8 | **How did you validate the changes introduced within this PR?**
9 |
10 | **Which warehouse did you use to develop these changes?**
11 |
12 | **Did you update the CHANGELOG?**
13 |
14 |
15 | - [ ] Yes
16 |
17 | **Did you update the dbt_project.yml files with the version upgrade (please leverage standard semantic versioning)? (In both your main project and integration_tests)**
18 |
19 |
20 | - [ ] Yes
21 |
22 | **Typically there are additional maintenance changes required before this will be ready for an upcoming release. Are you comfortable with the Fivetran team making a few commits directly to your branch?**
23 |
24 |
25 | - [ ] Yes
26 | - [ ] No
27 |
28 | **If you had to summarize this PR in an emoji, which would it be?**
29 |
30 | :dancer:
31 |
32 | **Feedback**
33 |
34 | We are so excited you decided to contribute to the Fivetran community dbt package! We continue to work to improve the packages and would greatly appreciate your [feedback](https://www.surveymonkey.com/r/DQ7K7WW) on our existing dbt packages or what you'd like to see next.
35 |
36 | **PR Template**
37 | - [Community Pull Request Template](?expand=1&template=pull_request_template.md) (default)
38 |
39 | - [Maintainer Pull Request Template](?expand=1&template=maintainer_pull_request_template.md) (to be used by maintainers)
40 |
--------------------------------------------------------------------------------
/.github/workflows/auto-release.yml:
--------------------------------------------------------------------------------
1 | name: 'auto release'
2 | on:
3 | pull_request:
4 | types:
5 | - closed
6 | branches:
7 | - main
8 |
9 | jobs:
10 | call-workflow-passing-data:
11 | if: github.event.pull_request.merged
12 | uses: fivetran/dbt_package_automations/.github/workflows/auto-release.yml@main
13 | secrets: inherit
--------------------------------------------------------------------------------
/.gitignore:
--------------------------------------------------------------------------------
1 |
2 | target/
3 | dbt_modules/
4 | logs/
5 | keyfile.json
6 | .DS_Store
7 | develop/
8 | dbt_packages/
9 | env/
--------------------------------------------------------------------------------
/.quickstart/quickstart.yml:
--------------------------------------------------------------------------------
1 | database_key: salesforce_database
2 | schema_key: salesforce_schema
3 |
4 | dbt_versions: ">=1.3.0 <2.0.0"
5 |
6 | table_variables:
7 | salesforce__user_role_enabled:
8 | - UserRole
9 | salesforce__lead_enabled:
10 | - Lead
11 | salesforce__event_enabled:
12 | - Event
13 | salesforce__task_enabled:
14 | - Task
15 | salesforce__opportunity_line_item_enabled:
16 | - OpportunityLineItem
17 | salesforce__order_enabled:
18 | - Order
19 | salesforce__product_2_enabled:
20 | - Product2
21 |
22 | destination_configurations:
23 | databricks:
24 | dispatch:
25 | - macro_namespace: dbt_utils
26 | search_order: [ 'spark_utils', 'dbt_utils' ]
27 | public_models: [
28 | "salesforce__contact_enhanced",
29 | "salesforce__daily_activity",
30 | "salesforce__manager_performance",
31 | "salesforce__opportunity_enhanced",
32 | "salesforce__opportunity_line_item_enhanced",
33 | "salesforce__owner_performance",
34 | "salesforce__sales_snapshot"
35 | ]
--------------------------------------------------------------------------------
/CHANGELOG.md:
--------------------------------------------------------------------------------
1 | # dbt_salesforce v1.2.1
2 | This release includes the following updates:
3 |
4 | ## Under the Hood
5 | - Prepends `materialized` configs in the package's `dbt_project.yml` file with `+` to improve compatibility with the newer versions of dbt-core starting with v1.10.0. ([PR #62](https://github.com/fivetran/dbt_salesforce/pull/62))
6 | - Updates the package maintainer pull request template. ([PR #63](https://github.com/fivetran/dbt_salesforce/pull/63))
7 |
8 | ## Contributors
9 | - [@b-per](https://github.com/b-per) ([PR #62](https://github.com/fivetran/dbt_salesforce/pull/62))
10 |
11 | # dbt_salesforce v1.2.0
12 | This release includes the following updates:
13 |
14 | ## Quickstart Fixes
15 | - Fixed casing syntax in `quickstart.yml` to match the default options in the Salesforce connector schema tab. Source tables are now in upper case, and snake casing is updated to camel casing. ([#61](https://github.com/fivetran/dbt_salesforce/pull/61))
16 |
17 | ## Documentation
18 | - Added Quickstart model counts to README. ([#59](https://github.com/fivetran/dbt_salesforce/pull/59))
19 | - Corrected references to connectors and connections in the README. ([#59](https://github.com/fivetran/dbt_salesforce/pull/59))
20 | - Moved badges at top of the README below the H1 header to be consistent with popular README formats. ([#61](https://github.com/fivetran/dbt_salesforce/pull/61))
21 |
22 | # dbt_salesforce v1.1.1
23 | [PR #56](https://github.com/fivetran/dbt_salesforce/pull/56) includes the following updates:
24 | ## Bugfix
25 | - Updated the logic for model `int_salesforce__date_spine` to reference the `stg_*` staging models instead of the source tables.
26 | - This was necessary since the staging models account for multiple spellings of column names while the source tables do not.
27 |
28 | ## Under the hood
29 | - Added `--depends_on:` comments to `int_salesforce__date_spine` to prevent errors during `dbt run`.
30 | - Added `flags.WHICH in ('run', 'build')` as a condition in `int_salesforce__date_spine` to prevent call statements from querying the staging models during a `dbt compile`.
31 |
32 | # dbt_salesforce v1.1.0
33 | [PR #55](https://github.com/fivetran/dbt_salesforce/pull/55) includes the following updates:
34 |
35 | ## 🚨 Breaking Change 🚨
36 | - This change is made breaking due to changes made in the source package. See the [v1.1.0 dbt_salesforce_source release notes](https://github.com/fivetran/dbt_salesforce_source/releases/tag/v1.1.0) for more details.
37 | - Added logic to support user-specified scenarios where the Fivetran Salesforce connector syncs column names using the original Salesforce API naming convention. For example, while Fivetran typically provides the column as `created_date`, some users might choose to receive it as `CreatedDate` according to the API naming. This update ensures the package is automatically compatible with both naming conventions.
38 | - Specifically, the package now performs a COALESCE, preferring the original Salesforce API naming. If the original naming is not present, the Fivetran version is used instead.
39 | - Renamed columns are now explicitly cast to prevent conflicts during the COALESCE.
40 | - ❗This change is considered breaking since the resulting column types may differ from prior versions of this package.
41 |
42 | ## Under the hood
43 | - Added validation test to ensure the final column names generated before and after this update remain the same.
44 |
45 | # dbt_salesforce v1.0.2
46 | [PR #52](https://github.com/fivetran/dbt_salesforce/pull/52) includes the following updates:
47 |
48 | ## Bug fixes
49 | - Updated model `int_salesforce__date_spine` to accommodate when the Salesforce `lead` object exists but has no records. In this case, the model now defaults to a range of one-month from the current date.
50 |
51 | ## Under the hood
52 | - Updated structure of model `int_salesforce__date_spine` for improved performance and maintainability.
53 | - Updated maintainer pull request template.
54 |
55 | # dbt_salesforce v1.0.1
56 | [PR #48](https://github.com/fivetran/dbt_salesforce/pull/48) includes the following updates:
57 |
58 | ## Bug Fix
59 | - Aligns the `last_date_query` logic in the `int_salesforce__date_spine` model with the `first_date_query` logic. This ensures that users with empty `opportunity` tables will have a valid end-date (based on `lead` instead of `opportunity`) for the `salesforce__daily_activity` end model.
60 | - Also adds coalesce-logic to `int_salesforce__date_spine` to ensure a succesful run without `lead` data.
61 |
62 | ## Documentation
63 | - Documents how users without an `opportunity` table can still have the package run successfully for them. See [README](https://github.com/fivetran/dbt_salesforce?tab=readme-ov-file#working-without-an-opportunity-table) for details.
64 |
65 | ## Under the Hood
66 | - Included auto-releaser GitHub Actions workflow to automate future releases.
67 |
68 | # 🚨 Notice for Quickstart Data Model Users Only 🚨
69 | Please note that this data model will now create a new transformation for **all** your Salesforce objects (tables) to replicate and include the relevant Salesforce formula fields. With the addition of formula fields, your transformation schema will change to + `_quickstart`, rather than inheriting the schema from your connector. Please make sure you adjust downstream queries accordingly. If you wish to disable any of these new transformations you may remove them within the UI.
70 |
71 | If you are not already a Quickstart Data Model user, you can find out more information [here](https://fivetran.com/docs/transformations/quickstart)!
72 |
73 | # dbt_salesforce v1.0.0
74 |
75 | **📣 THIS IS A MAJOR PACKAGE RELEASE! 📣** More details below.
76 |
77 | [PR #45](https://github.com/fivetran/dbt_salesforce/pull/45) includes the following updates:
78 |
79 | ## 🚨 Breaking Change 🚨
80 | - We have removed all `tmp` models in the dependent `dbt_salesforce_source` package, and will use the `fivetran_utils.fill_staging_column` macro to compare directly to our source models in your schemas.
81 |
82 | ## 🚀 Feature Updates 🚀
83 | - We have added daily history mode models in the [`models/salesforce_history`](https://github.com/fivetran/dbt_salesforce/tree/main/models/salesforce_history) folder [based off of Fivetran's history mode feature](https://fivetran.com/docs/core-concepts/sync-modes/history-mode), pulling from source models in `dbt_salesforce_source`. This will allow customers to utilize the Fivetran history mode feature, which records every version of each record in the source table from the moment this mode is activated in the equivalent tables.
84 |
85 | - **IMPORTANT: All fields in your Salesforce history mode connector that are being synced are being included in the end models**. To change which fields are brought in via end models, you will need to update the fields you are bringing in via your history mode connector in Fivetran and then run a `dbt run --full-refresh`. [See the DECISIONLOG for more details](https://github.com/fivetran/dbt_salesforce_source/blob/main/DECISIONLOG.md).
86 |
87 | - Below are the new models included in this update:
88 |
89 | |**Model added**|**Description**
90 | -----|-----
91 | | [salesforce__account_daily_history](https://fivetran.github.io/dbt_salesforce/#!/model/model.salesforce.salesforce__account_daily_history) | Each record is a daily record in an account, starting with its first active date and updating up toward either the current date (if still active) or its last active date.
92 | | [salesforce__contact_daily_history](https://fivetran.github.io/dbt_salesforce/#!/model/model.salesforce.salesforce__contact_daily_history) | Each record is a daily record in an contact, starting with its first active date and updating up toward either the current date (if still active) or its last active date.
93 | | [salesforce__opportunity_daily_history](https://fivetran.github.io/dbt_salesforce/#!/model/model.salesforce.salesforce__opportunity_daily_history) | Each record is a daily record in an opportunity, starting with its first active date and updating up toward either the current date (if still active) or its last active date.
94 |
95 | - All history models are incremental due to the volume of data being ingested.
96 |
97 | - We support the option to pull from both your standard Salesforce and History Mode connectors simultaneously from their specific database/schemas. We also support pulling from just your History Mode connector on its own and bypassing the standard connector on its own. [See more detailed instructions for configuring your history mode database and schema variables in the README](https://github.com/fivetran/dbt_salesforce/blob/main/README.md#configuring-your-salesforce-history-mode-database-and-schema-variables).
98 |
99 | - These models are disabled by default due to their size, so you will need to set the below variable configurations for each of the individual models you want to utilize in your `dbt_project.yml`. [More details are available in the README](https://github.com/fivetran/dbt_salesforce/blob/main/README.md#enabling-salesforce-history-mode-models).
100 |
101 | ```yml
102 | vars:
103 | salesforce__[history_model]_enabled: true ##Ex: salesforce__account_history_enabled: true
104 | ```
105 |
106 | - We've added variable configuration that will allow you to filter the history start and end dates to filter down the data you ingest in each model. See the `Setting the date range for the Salesforce Daily History models` [section in the README](https://github.com/fivetran/dbt_salesforce/blob/main/README.md#filter-your-salesforce-history-mode-models-with-field-variable-conditionals) for more details.
107 |
108 | ## 🔎 Under The Hood 🔎
109 | - We have deprecated the `using_[source]_history_mode_active_records` variables. The introduction of the new history mode capabilities in this package made these variables redundant.
110 |
111 | # dbt_salesforce v0.9.3
112 | ## 🪲 Bug Fix ⚒️
113 | [PR #44](https://github.com/fivetran/dbt_salesforce/pull/44) introduces the following update:
114 |
115 | - Updated the `first_date_query` logic in `int_salesforce__date_spine` to select first date from the minimum `created_date` on the `opportunity` source when the `lead` source is not available.
116 |
117 | # dbt_salesforce v0.9.2
118 | ## Documentation and Notice Updates
119 | [PR #42](https://github.com/fivetran/dbt_salesforce/pull/42) includes the following update:
120 |
121 | - Notices were added to both the top of the CHANGELOG and within the README to alert users of the Quickstart Data Model that Salesforce formulas will be replicated in the Fivetran transformation. For non Quickstart Data Model users there will be no change following this update.
122 | - If you would like to learn more about the Quickstart Data Model for Salesforce you can find more information [here](https://fivetran.com/docs/transformations/quickstart).
123 |
124 | # dbt_salesforce v0.9.1
125 | ## Bug Fixes
126 | [PR #40](https://github.com/fivetran/dbt_salesforce/pull/40) includes the following bug fixes.
127 | - The `salesforce__opportunity_pass_through_columns` passthrough variable config has been removed from the `salesforce__opportunity_enhanced` to ensure duplicate columns are not introduced when leveraging the opportunity passthrough functionality.
128 | - When using the `salesforce__opportunity_pass_through_columns` variable, you will still see the results populated in the `salesforce__opportunity_enhanced`. The fields are already introduced via the `opportunity.*` in the select statement.
129 |
130 | # dbt_salesforce v0.9.0
131 |
132 | ## 🚨 Breaking Changes 🚨:
133 | [PR #38](https://github.com/fivetran/dbt_salesforce/pull/38) includes the following breaking changes:
134 |
135 | - Updates the old passthrough column methodology to allow for aliasing and/or transformations of any field names brought in. This is useful, for example, if you wish to bring in fields across different Salesforce objects that may have the same names and wish to alias them to avoid confusion, particularly if any of the objects are joined together.
136 |
137 | - Additionally, in the `salesforce__opportunity_enhanced` model, the old `opportunity_enhanced_pass_through_columns` variable has been replaced with the existing variables from the staging models (see below). This is because we updated the `salesforce__opportunity_enhanced` model with regards to how custom fields passed through from the `user` table are dealt with. Since the `user` model is joined in two times, once as information about an opportunity owner and the other about an opportunity manager, to avoid ambiguity, custom fields passed through from the user table will be suffixed based on whether it belongs to a user who is an `_owner` or a `_manager`.
138 |
139 | - Finally, we have added the `salesforce__` prefix to all the passthrough variables:
140 |
141 | |**Old**|**New**
142 | -----|-----
143 | | account_pass_through_columns | salesforce__account_pass_through_columns
144 | | contact_pass_through_columns | salesforce__contact_pass_through_columns
145 | | event_pass_through_columns | salesforce__event_pass_through_columns
146 | | lead_pass_through_columns | salesforce__lead_pass_through_columns
147 | | opportunity_pass_through_columns | salesforce__opportunity_pass_through_columns
148 | | opportunity_line_item_pass_through_columns | salesforce__opportunity_line_item_pass_through_columns
149 | | order_pass_through_columns | salesforce__order_pass_through_columns
150 | | product_2_pass_through_columns | salesforce__product_2_pass_through_columns
151 | | task_pass_through_columns | salesforce__task_pass_through_columns
152 | | user_role_pass_through_columns | salesforce__user_role_pass_through_columns
153 | | user_pass_through_columns | salesforce__user_pass_through_columns
154 |
155 | ## Under the Hood:
156 |
157 | - Incorporated the new `fivetran_utils.drop_schemas_automation` macro into the end of each Buildkite integration test job.
158 | - Updated the pull request [templates](/.github).
159 |
160 |
161 | # dbt_salesforce v0.8.0
162 |
163 | ## 🚨 Breaking Changes 🚨:
164 | [PR #36](https://github.com/fivetran/dbt_salesforce/pull/36) includes the following breaking changes:
165 | - Dispatch update for dbt-utils to dbt-core cross-db macros migration. Specifically `{{ dbt_utils. }}` have been updated to `{{ dbt. }}` for the below macros:
166 | - `any_value`
167 | - `bool_or`
168 | - `cast_bool_to_text`
169 | - `concat`
170 | - `date_trunc`
171 | - `dateadd`
172 | - `datediff`
173 | - `escape_single_quotes`
174 | - `except`
175 | - `hash`
176 | - `intersect`
177 | - `last_day`
178 | - `length`
179 | - `listagg`
180 | - `position`
181 | - `replace`
182 | - `right`
183 | - `safe_cast`
184 | - `split_part`
185 | - `string_literal`
186 | - `type_bigint`
187 | - `type_float`
188 | - `type_int`
189 | - `type_numeric`
190 | - `type_string`
191 | - `type_timestamp`
192 | - `array_append`
193 | - `array_concat`
194 | - `array_construct`
195 | - For `current_timestamp` and `current_timestamp_in_utc` macros, the dispatch AND the macro names have been updated to the below, respectively:
196 | - `dbt.current_timestamp_backcompat`
197 | - `dbt.current_timestamp_in_utc_backcompat`
198 | - Dependencies on `fivetran/fivetran_utils` have been upgraded, previously `[">=0.3.0", "<0.4.0"]` now `[">=0.4.0", "<0.5.0"]`.
199 |
200 | # dbt_salesforce v0.7.2
201 | PR [#35](https://github.com/fivetran/dbt_salesforce/pull/35) incorporates the following updates:
202 | ## Bug Fixes
203 | - Add all model variables to the README "Disabling Models" section
204 | - Remove model variables from this package's `dbt_project.yml` to avoid potential conflict with a user's settings.
205 |
206 |
207 | # dbt_salesforce v0.7.1
208 | ## Features
209 | - Resolving bug in `salesforce__contact_enhanced` when using user passthrough columns.
210 | - Resolving bug in `salesforce__opportunity_line_item_enhanced` when using user passthrough columns.
211 |
212 | ## Contributors
213 | - [@calder-holt](https://github.com/calder-holt) ([#32](https://github.com/fivetran/dbt_salesforce/pull/32))
214 |
215 | # dbt_salesforce v0.7.0
216 | 🎉 Salesforce Package Updates 🎉
217 |
218 | PR [#30](https://github.com/fivetran/dbt_salesforce/pull/30) includes various updates to the Salesforce package! To improve its utility, the changes include the following:
219 | ## Features
220 | - Creating a new `salesforce__contact_enhanced`, `salesforce__daily_activity`, and `salesforce__opportunity_line_item_enhanced` model as well as updating the `salesforce__opportunity_enhanced` model.
221 | - Allowing [formula fields](https://github.com/fivetran/dbt_salesforce#adding-formula-fields-as-pass-through-columns) to be added as passthrough columns. We added integration with the Salesforce Formula package by embedding the macro outputs as part of our staging models so that your custom formula fields can be included.
222 | - Add [enable/disable configs](https://github.com/fivetran/dbt_salesforce#disabling-models) for tables that you may not be syncing
223 | - Add [identifier variables](https://github.com/fivetran/dbt_salesforce#change-the-source-table-references) in case a source table has a different name from the default
224 | - Add [history mode configs](https://github.com/fivetran/dbt_salesforce#salesforce-history-mode) for the new source tables
225 | - Add [passthrough column configs](https://github.com/fivetran/dbt_salesforce#adding-passthrough-columns) for additional columns that you wish to populate in the end models
226 |
227 |
228 |
229 | # dbt_salesforce v0.6.0
230 | ## Features
231 | - Updated package to align with most recent standards:
232 | - Updated formatting in our `sql` files.
233 | - The README has been updated to reflect our rehaul of our documentation style to make it more straightforward.
234 | ([#28](https://github.com/fivetran/dbt_salesforce/pull/28))
235 | # dbt_salesforce v0.5.1
236 | ## Features
237 | - Support for Databricks compatibility! ([#24](https://github.com/fivetran/dbt_salesforce/pull/24))
238 | - Added feature to disable `user_role` table if not being synced. This will build the models while ignoring metrics depending on the `user_role` table.
239 |
240 | # dbt_salesforce v0.5.0
241 | 🎉 dbt v1.0.0 Compatibility 🎉
242 | ## 🚨 Breaking Changes 🚨
243 | - Adjusts the `require-dbt-version` to now be within the range [">=1.0.0", "<2.0.0"]. Additionally, the package has been updated for dbt v1.0.0 compatibility. If you are using a dbt version <1.0.0, you will need to upgrade in order to leverage the latest version of the package.
244 | - For help upgrading your package, I recommend reviewing this GitHub repo's Release Notes on what changes have been implemented since your last upgrade.
245 | - For help upgrading your dbt project to dbt v1.0.0, I recommend reviewing dbt-labs [upgrading to 1.0.0 docs](https://docs.getdbt.com/docs/guides/migration-guide/upgrading-to-1-0-0) for more details on what changes must be made.
246 | - Upgrades the package dependency to refer to the latest `dbt_salesforce_source`. Additionally, the latest `dbt_salesforce_source` package has a dependency on the latest `dbt_fivetran_utils`. Further, the latest `dbt_fivetran_utils` package also has a dependency on `dbt_utils` [">=0.8.0", "<0.9.0"].
247 | - Please note, if you are installing a version of `dbt_utils` in your `packages.yml` that is not in the range above then you will encounter a package dependency error.
248 |
249 | # dbt_salesforce v0.1.0 -> v0.4.0
250 | Refer to the relevant release notes on the Github repository for specific details for the previous releases. Thank you!
251 |
--------------------------------------------------------------------------------
/DECISIONLOG.md:
--------------------------------------------------------------------------------
1 | ## Syncing all of your fields from the Salesforce History Mode connector
2 | When creating these new History Mode models, our hypothesis was that the primary reason customers would leverage this data would be to view changes in historical records.
3 |
4 | Our normal process is to allow customers to pick and choose the custom fields they bring into their end models. However, omitting any fields that are being synced will lead to new rows of historical records having duplicate data, thus missing out on the potentially.
5 |
6 | Our conclusion was that there is more value for a customer to leverage the history tables if they are syncing all fields they are using, and can thus view all the historical changes in the records they are using.
7 |
8 | There is the drawback of a significant amount of data processing and very large tables with a huge number of columnar values, but we felt this version made the most sense for customers who really want to unlock historical data on their Salesforce tables.
9 |
10 | We are open to feedback on how to improve these history models at all time, [so please contact us directly via our many channels](https://github.com/fivetran/dbt_salesforce_source#-how-is-this-package-maintained-and-can-i-contribute)!
--------------------------------------------------------------------------------
/LICENSE:
--------------------------------------------------------------------------------
1 | Apache License
2 | Version 2.0, January 2004
3 | http://www.apache.org/licenses/
4 |
5 | TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
6 |
7 | 1. Definitions.
8 |
9 | "License" shall mean the terms and conditions for use, reproduction,
10 | and distribution as defined by Sections 1 through 9 of this document.
11 |
12 | "Licensor" shall mean the copyright owner or entity authorized by
13 | the copyright owner that is granting the License.
14 |
15 | "Legal Entity" shall mean the union of the acting entity and all
16 | other entities that control, are controlled by, or are under common
17 | control with that entity. For the purposes of this definition,
18 | "control" means (i) the power, direct or indirect, to cause the
19 | direction or management of such entity, whether by contract or
20 | otherwise, or (ii) ownership of fifty percent (50%) or more of the
21 | outstanding shares, or (iii) beneficial ownership of such entity.
22 |
23 | "You" (or "Your") shall mean an individual or Legal Entity
24 | exercising permissions granted by this License.
25 |
26 | "Source" form shall mean the preferred form for making modifications,
27 | including but not limited to software source code, documentation
28 | source, and configuration files.
29 |
30 | "Object" form shall mean any form resulting from mechanical
31 | transformation or translation of a Source form, including but
32 | not limited to compiled object code, generated documentation,
33 | and conversions to other media types.
34 |
35 | "Work" shall mean the work of authorship, whether in Source or
36 | Object form, made available under the License, as indicated by a
37 | copyright notice that is included in or attached to the work
38 | (an example is provided in the Appendix below).
39 |
40 | "Derivative Works" shall mean any work, whether in Source or Object
41 | form, that is based on (or derived from) the Work and for which the
42 | editorial revisions, annotations, elaborations, or other modifications
43 | represent, as a whole, an original work of authorship. For the purposes
44 | of this License, Derivative Works shall not include works that remain
45 | separable from, or merely link (or bind by name) to the interfaces of,
46 | the Work and Derivative Works thereof.
47 |
48 | "Contribution" shall mean any work of authorship, including
49 | the original version of the Work and any modifications or additions
50 | to that Work or Derivative Works thereof, that is intentionally
51 | submitted to Licensor for inclusion in the Work by the copyright owner
52 | or by an individual or Legal Entity authorized to submit on behalf of
53 | the copyright owner. For the purposes of this definition, "submitted"
54 | means any form of electronic, verbal, or written communication sent
55 | to the Licensor or its representatives, including but not limited to
56 | communication on electronic mailing lists, source code control systems,
57 | and issue tracking systems that are managed by, or on behalf of, the
58 | Licensor for the purpose of discussing and improving the Work, but
59 | excluding communication that is conspicuously marked or otherwise
60 | designated in writing by the copyright owner as "Not a Contribution."
61 |
62 | "Contributor" shall mean Licensor and any individual or Legal Entity
63 | on behalf of whom a Contribution has been received by Licensor and
64 | subsequently incorporated within the Work.
65 |
66 | 2. Grant of Copyright License. Subject to the terms and conditions of
67 | this License, each Contributor hereby grants to You a perpetual,
68 | worldwide, non-exclusive, no-charge, royalty-free, irrevocable
69 | copyright license to reproduce, prepare Derivative Works of,
70 | publicly display, publicly perform, sublicense, and distribute the
71 | Work and such Derivative Works in Source or Object form.
72 |
73 | 3. Grant of Patent License. Subject to the terms and conditions of
74 | this License, each Contributor hereby grants to You a perpetual,
75 | worldwide, non-exclusive, no-charge, royalty-free, irrevocable
76 | (except as stated in this section) patent license to make, have made,
77 | use, offer to sell, sell, import, and otherwise transfer the Work,
78 | where such license applies only to those patent claims licensable
79 | by such Contributor that are necessarily infringed by their
80 | Contribution(s) alone or by combination of their Contribution(s)
81 | with the Work to which such Contribution(s) was submitted. If You
82 | institute patent litigation against any entity (including a
83 | cross-claim or counterclaim in a lawsuit) alleging that the Work
84 | or a Contribution incorporated within the Work constitutes direct
85 | or contributory patent infringement, then any patent licenses
86 | granted to You under this License for that Work shall terminate
87 | as of the date such litigation is filed.
88 |
89 | 4. Redistribution. You may reproduce and distribute copies of the
90 | Work or Derivative Works thereof in any medium, with or without
91 | modifications, and in Source or Object form, provided that You
92 | meet the following conditions:
93 |
94 | (a) You must give any other recipients of the Work or
95 | Derivative Works a copy of this License; and
96 |
97 | (b) You must cause any modified files to carry prominent notices
98 | stating that You changed the files; and
99 |
100 | (c) You must retain, in the Source form of any Derivative Works
101 | that You distribute, all copyright, patent, trademark, and
102 | attribution notices from the Source form of the Work,
103 | excluding those notices that do not pertain to any part of
104 | the Derivative Works; and
105 |
106 | (d) If the Work includes a "NOTICE" text file as part of its
107 | distribution, then any Derivative Works that You distribute must
108 | include a readable copy of the attribution notices contained
109 | within such NOTICE file, excluding those notices that do not
110 | pertain to any part of the Derivative Works, in at least one
111 | of the following places: within a NOTICE text file distributed
112 | as part of the Derivative Works; within the Source form or
113 | documentation, if provided along with the Derivative Works; or,
114 | within a display generated by the Derivative Works, if and
115 | wherever such third-party notices normally appear. The contents
116 | of the NOTICE file are for informational purposes only and
117 | do not modify the License. You may add Your own attribution
118 | notices within Derivative Works that You distribute, alongside
119 | or as an addendum to the NOTICE text from the Work, provided
120 | that such additional attribution notices cannot be construed
121 | as modifying the License.
122 |
123 | You may add Your own copyright statement to Your modifications and
124 | may provide additional or different license terms and conditions
125 | for use, reproduction, or distribution of Your modifications, or
126 | for any such Derivative Works as a whole, provided Your use,
127 | reproduction, and distribution of the Work otherwise complies with
128 | the conditions stated in this License.
129 |
130 | 5. Submission of Contributions. Unless You explicitly state otherwise,
131 | any Contribution intentionally submitted for inclusion in the Work
132 | by You to the Licensor shall be under the terms and conditions of
133 | this License, without any additional terms or conditions.
134 | Notwithstanding the above, nothing herein shall supersede or modify
135 | the terms of any separate license agreement you may have executed
136 | with Licensor regarding such Contributions.
137 |
138 | 6. Trademarks. This License does not grant permission to use the trade
139 | names, trademarks, service marks, or product names of the Licensor,
140 | except as required for reasonable and customary use in describing the
141 | origin of the Work and reproducing the content of the NOTICE file.
142 |
143 | 7. Disclaimer of Warranty. Unless required by applicable law or
144 | agreed to in writing, Licensor provides the Work (and each
145 | Contributor provides its Contributions) on an "AS IS" BASIS,
146 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
147 | implied, including, without limitation, any warranties or conditions
148 | of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
149 | PARTICULAR PURPOSE. You are solely responsible for determining the
150 | appropriateness of using or redistributing the Work and assume any
151 | risks associated with Your exercise of permissions under this License.
152 |
153 | 8. Limitation of Liability. In no event and under no legal theory,
154 | whether in tort (including negligence), contract, or otherwise,
155 | unless required by applicable law (such as deliberate and grossly
156 | negligent acts) or agreed to in writing, shall any Contributor be
157 | liable to You for damages, including any direct, indirect, special,
158 | incidental, or consequential damages of any character arising as a
159 | result of this License or out of the use or inability to use the
160 | Work (including but not limited to damages for loss of goodwill,
161 | work stoppage, computer failure or malfunction, or any and all
162 | other commercial damages or losses), even if such Contributor
163 | has been advised of the possibility of such damages.
164 |
165 | 9. Accepting Warranty or Additional Liability. While redistributing
166 | the Work or Derivative Works thereof, You may choose to offer,
167 | and charge a fee for, acceptance of support, warranty, indemnity,
168 | or other liability obligations and/or rights consistent with this
169 | License. However, in accepting such obligations, You may act only
170 | on Your own behalf and on Your sole responsibility, not on behalf
171 | of any other Contributor, and only if You agree to indemnify,
172 | defend, and hold each Contributor harmless for any liability
173 | incurred by, or claims asserted against, such Contributor by reason
174 | of your accepting any such warranty or additional liability.
175 |
176 | END OF TERMS AND CONDITIONS
177 |
178 | APPENDIX: How to apply the Apache License to your work.
179 |
180 | To apply the Apache License to your work, attach the following
181 | boilerplate notice, with the fields enclosed by brackets "[]"
182 | replaced with your own identifying information. (Don't include
183 | the brackets!) The text should be enclosed in the appropriate
184 | comment syntax for the file format. We also recommend that a
185 | file or class name and description of purpose be included on the
186 | same "printed page" as the copyright notice for easier
187 | identification within third-party archives.
188 |
189 | Copyright [yyyy] [name of copyright owner]
190 |
191 | Licensed under the Apache License, Version 2.0 (the "License");
192 | you may not use this file except in compliance with the License.
193 | You may obtain a copy of the License at
194 |
195 | http://www.apache.org/licenses/LICENSE-2.0
196 |
197 | Unless required by applicable law or agreed to in writing, software
198 | distributed under the License is distributed on an "AS IS" BASIS,
199 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
200 | See the License for the specific language governing permissions and
201 | limitations under the License.
202 |
--------------------------------------------------------------------------------
/dbt_project.yml:
--------------------------------------------------------------------------------
1 | config-version: 2
2 | name: 'salesforce'
3 | version: '1.2.1'
4 | require-dbt-version: [">=1.3.0", "<2.0.0"]
5 | models:
6 | salesforce:
7 | +materialized: table
8 | intermediate:
9 | +materialized: ephemeral
10 |
11 | vars:
12 | salesforce:
13 | account: "{{ ref('stg_salesforce__account') }}"
14 | opportunity: "{{ ref('stg_salesforce__opportunity') }}"
15 | user: "{{ ref('stg_salesforce__user') }}"
16 | user_role: "{{ ref('stg_salesforce__user_role') }}"
17 | contact: "{{ ref('stg_salesforce__contact') }}"
18 | lead: "{{ ref('stg_salesforce__lead') }}"
19 | task: "{{ ref('stg_salesforce__task') }}"
20 | event: "{{ ref('stg_salesforce__event') }}"
21 | product_2: "{{ ref('stg_salesforce__product_2') }}"
22 | order: "{{ ref('stg_salesforce__order') }}"
23 | opportunity_line_item: "{{ ref('stg_salesforce__opportunity_line_item') }}"
24 |
25 | account_history: "{{ ref('stg_salesforce__account_history') }}"
26 | contact_history: "{{ ref('stg_salesforce__contact_history') }}"
27 | opportunity_history: "{{ ref('stg_salesforce__opportunity_history') }}"
28 |
29 | salesforce__account_pass_through_columns: []
30 | salesforce__contact_pass_through_columns: []
31 | salesforce__event_pass_through_columns: []
32 | salesforce__lead_pass_through_columns: []
33 | salesforce__opportunity_pass_through_columns: []
34 | salesforce__opportunity_line_item_pass_through_columns: []
35 | salesforce__order_pass_through_columns: []
36 | salesforce__product_2_pass_through_columns: []
37 | salesforce__task_pass_through_columns: []
38 | salesforce__user_role_pass_through_columns: []
39 | salesforce__user_pass_through_columns: []
40 |
41 | clean-targets:
42 | - target
43 | - dbt_modules
44 | - dbt_packages
--------------------------------------------------------------------------------
/integration_tests/.gitignore:
--------------------------------------------------------------------------------
1 |
2 | target/
3 | dbt_modules/
4 | logs/
5 | env/
6 | package-lock.yml
--------------------------------------------------------------------------------
/integration_tests/ci/sample.profiles.yml:
--------------------------------------------------------------------------------
1 |
2 | # HEY! This file is used in the dbt package integrations tests with Buildkite.
3 | # You should __NEVER__ check credentials into version control. Thanks for reading :)
4 |
5 | config:
6 | send_anonymous_usage_stats: False
7 | use_colors: True
8 |
9 | integration_tests:
10 | target: redshift
11 | outputs:
12 | redshift:
13 | type: redshift
14 | host: "{{ env_var('CI_REDSHIFT_DBT_HOST') }}"
15 | user: "{{ env_var('CI_REDSHIFT_DBT_USER') }}"
16 | pass: "{{ env_var('CI_REDSHIFT_DBT_PASS') }}"
17 | dbname: "{{ env_var('CI_REDSHIFT_DBT_DBNAME') }}"
18 | port: 5439
19 | schema: salesforce_integrations_tests_4
20 | threads: 8
21 | bigquery:
22 | type: bigquery
23 | method: service-account-json
24 | project: 'dbt-package-testing'
25 | schema: salesforce_integrations_tests_4
26 | threads: 8
27 | keyfile_json: "{{ env_var('GCLOUD_SERVICE_KEY') | as_native }}"
28 | snowflake:
29 | type: snowflake
30 | account: "{{ env_var('CI_SNOWFLAKE_DBT_ACCOUNT') }}"
31 | user: "{{ env_var('CI_SNOWFLAKE_DBT_USER') }}"
32 | password: "{{ env_var('CI_SNOWFLAKE_DBT_PASS') }}"
33 | role: "{{ env_var('CI_SNOWFLAKE_DBT_ROLE') }}"
34 | database: "{{ env_var('CI_SNOWFLAKE_DBT_DATABASE') }}"
35 | warehouse: "{{ env_var('CI_SNOWFLAKE_DBT_WAREHOUSE') }}"
36 | schema: salesforce_integrations_tests_4
37 | threads: 8
38 | postgres:
39 | type: postgres
40 | host: "{{ env_var('CI_POSTGRES_DBT_HOST') }}"
41 | user: "{{ env_var('CI_POSTGRES_DBT_USER') }}"
42 | pass: "{{ env_var('CI_POSTGRES_DBT_PASS') }}"
43 | dbname: "{{ env_var('CI_POSTGRES_DBT_DBNAME') }}"
44 | port: 5432
45 | schema: salesforce_integrations_tests_4
46 | threads: 8
47 | databricks:
48 | catalog: "{{ env_var('CI_DATABRICKS_DBT_CATALOG') }}"
49 | host: "{{ env_var('CI_DATABRICKS_DBT_HOST') }}"
50 | http_path: "{{ env_var('CI_DATABRICKS_DBT_HTTP_PATH') }}"
51 | schema: salesforce_integrations_tests_4
52 | threads: 8
53 | token: "{{ env_var('CI_DATABRICKS_DBT_TOKEN') }}"
54 | type: databricks
--------------------------------------------------------------------------------
/integration_tests/dbt_project.yml:
--------------------------------------------------------------------------------
1 | name: 'salesforce_integration_tests'
2 | version: '1.2.1'
3 | config-version: 2
4 |
5 | profile: 'integration_tests'
6 |
7 | models:
8 | +materialized: table
9 | +schema: "salesforce_{{ var('directed_schema','dev') }}"
10 |
11 | vars:
12 | # enable history models when generating docs!
13 | # salesforce__contact_history_enabled: true
14 | # salesforce__account_history_enabled: true
15 | # salesforce__opportunity_history_enabled: true
16 |
17 | salesforce_source:
18 | salesforce_schema: salesforce_integrations_tests_4
19 | salesforce_history_schema: salesforce_integrations_tests_4
20 |
21 | salesforce_account_identifier: "sf_account_data"
22 | salesforce_opportunity_identifier: "sf_opportunity_data"
23 | salesforce_user_identifier: "sf_user_data"
24 | salesforce_user_role_identifier: "sf_user_role_data"
25 | salesforce_contact_identifier: "sf_contact_data"
26 | salesforce_lead_identifier: "sf_lead_data"
27 | salesforce_task_identifier: "sf_task_data"
28 | salesforce_event_identifier: "sf_event_data"
29 | salesforce_product_2_identifier: "sf_product_2_data"
30 | salesforce_order_identifier: "sf_order_data"
31 | salesforce_opportunity_line_item_identifier: "sf_opportunity_line_item_data"
32 |
33 | ##history mode identifiers
34 | salesforce_account_history_identifier: "sf_account_history_data"
35 | salesforce_contact_history_identifier: "sf_contact_history_data"
36 | salesforce_opportunity_history_identifier: "sf_opportunity_history_data"
37 |
38 | seeds:
39 | salesforce_integration_tests:
40 | +quote_columns: "{{ true if target.type in ('redshift', 'postgres') else false }}"
41 | +column_types:
42 | _fivetran_synced: timestamp
43 | _fivetran_active: boolean
44 | sf_account_data:
45 | +column_types:
46 | last_activity_date: timestamp
47 | last_referenced_date: timestamp
48 | last_viewed_date: timestamp
49 | annual_revenue: float
50 | billing_latitude: float
51 | billing_longitude: float
52 | shipping_latitude: float
53 | shipping_longitude: float
54 | sf_opportunity_data:
55 | +column_types:
56 | close_date: timestamp
57 | created_date: timestamp
58 | last_activity_date: timestamp
59 | last_referenced_date: timestamp
60 | last_viewed_date: timestamp
61 | amount: float
62 | probability: float
63 | sf_user_data:
64 | +column_types:
65 | last_login_date: timestamp
66 | last_referenced_date: timestamp
67 | last_viewed_date: timestamp
68 | offline_trial_expiration_date: timestamp
69 | latitude: float
70 | longitude: float
71 | sf_user_data:
72 | +column_types:
73 | last_login_date: timestamp
74 | last_referenced_date: timestamp
75 | last_viewed_date: timestamp
76 | offline_trial_expiration_date: timestamp
77 | latitude: float
78 | longitude: float
79 | sf_contact_data:
80 | +column_types:
81 | birthdate: timestamp
82 | created_date: timestamp
83 | email_bounced_date: timestamp
84 | last_activity_date: timestamp
85 | last_curequest_date: timestamp
86 | last_cuupdate_date: timestamp
87 | last_modified_date: timestamp
88 | last_referenced_date: timestamp
89 | last_viewed_date: timestamp
90 | system_modstamp: timestamp
91 | is_deleted: boolean
92 | sf_lead_data:
93 | +column_types:
94 | converted_date: timestamp
95 | created_date: timestamp
96 | email_bounced_date: timestamp
97 | last_activity_date: timestamp
98 | last_modified_date: timestamp
99 | last_referenced_date: timestamp
100 | last_viewed_date: timestamp
101 | system_modstamp: timestamp
102 | is_deleted: boolean
103 | sf_task_data:
104 | +column_types:
105 | activity_date: timestamp
106 | completed_date_time: timestamp
107 | created_date: timestamp
108 | last_modified_date: timestamp
109 | recurrence_end_date_only: timestamp
110 | recurrence_start_date_only: timestamp
111 | reminder_date_time: timestamp
112 | system_modstamp: timestamp
113 | is_deleted: boolean
114 | sf_event_data:
115 | +column_types:
116 | activity_date: timestamp
117 | activity_date_time: timestamp
118 | created_date: timestamp
119 | end_date: timestamp
120 | end_date_time: timestamp
121 | last_modified_date : timestamp
122 | recurrence_2_pattern_start_date : timestamp
123 | recurrence_end_date_only: timestamp
124 | recurrence_start_date_time: timestamp
125 | reminder_date_time: timestamp
126 | start_date_time: timestamp
127 | system_modstamp: timestamp
128 | is_deleted: boolean
129 | sf_product_2_data:
130 | +column_types:
131 | created_date: timestamp
132 | last_modified_date: timestamp
133 | last_referenced_date: timestamp
134 | last_viewed_date: timestamp
135 | system_modstamp: timestamp
136 | is_deleted: boolean
137 | sf_order_data:
138 | +column_types:
139 | activated_date: timestamp
140 | created_date: timestamp
141 | effective_date: timestamp
142 | end_date: timestamp
143 | last_modified_date: timestamp
144 | last_referenced_date: timestamp
145 | last_viewed_date: timestamp
146 | system_modstamp: timestamp
147 | is_deleted: boolean
148 | sf_opportunity_line_item_data:
149 | +column_types:
150 | created_date: timestamp
151 | last_modified_date: timestamp
152 | last_referenced_date: timestamp
153 | last_viewed_date: timestamp
154 | service_date: timestamp
155 | system_modstamp: timestamp
156 | is_deleted: boolean
157 |
158 | sf_account_history_data:
159 | +column_types:
160 | annual_revenue: float
161 | last_activity_date: timestamp
162 | last_referenced_date: timestamp
163 | last_viewed_date: timestamp
164 | annual_revenue: float
165 | is_deleted: boolean
166 | sf_contact_history_data:
167 | +column_types:
168 | birthdate: timestamp
169 | last_activity_date: timestamp
170 | last_modified_date: timestamp
171 | last_viewed_date: timestamp
172 | is_deleted: boolean
173 | sf_opportunity_history_data:
174 | +column_types:
175 | close_date: timestamp
176 | created_date: timestamp
177 | last_activity_date: timestamp
178 | last_referenced_date: timestamp
179 | last_viewed_date: timestamp
180 | amount: float
181 | expected_revenue: float
182 | is_deleted: boolean
183 |
184 | dispatch:
185 | - macro_namespace: dbt_utils
186 | search_order: ['spark_utils', 'dbt_utils']
187 |
188 | clean-targets:
189 | - target
190 | - dbt_modules
191 | - dbt_packages
192 |
--------------------------------------------------------------------------------
/integration_tests/packages.yml:
--------------------------------------------------------------------------------
1 |
2 | packages:
3 | - local: ../
--------------------------------------------------------------------------------
/integration_tests/requirements.txt:
--------------------------------------------------------------------------------
1 | dbt-snowflake>=1.3.0,<2.0.0
2 | dbt-bigquery>=1.3.0,<2.0.0
3 | dbt-redshift>=1.3.0,<2.0.0
4 | dbt-postgres>=1.3.0,<2.0.0
5 | dbt-spark>=1.3.0,<2.0.0
6 | dbt-spark[PyHive]>=1.3.0,<2.0.0
7 | dbt-databricks>=1.3.0,<2.0.0
8 | certifi==2025.1.31
--------------------------------------------------------------------------------
/integration_tests/seeds/sf_account_data.csv:
--------------------------------------------------------------------------------
1 | _fivetran_synced,account_number,account_source,annual_revenue,billing_city,billing_country,billing_country_code,billing_geocode_accuracy,billing_latitude,billing_longitude,billing_postal_code,billing_state,billing_state_code,billing_street,description,fax,id,industry,is_deleted,jigsaw_company_id,last_activity_date,last_referenced_date,last_viewed_date,master_record_id,name,number_of_employees,owner_id,ownership,parent_id,phone,photo_url,rating,record_type_id,shipping_city,shipping_country,shipping_country_code,shipping_geocode_accuracy,shipping_latitude,shipping_longitude,shipping_postal_code,shipping_state,shipping_state_code,shipping_street,sic,sic_desc,site,ticker_symbol,type,website,_fivetran_active
2 | 2019-10-17 21:10:19,,,,,,,,,,,,,,,,0015500000Xyy06AAB,,false,,,,,,Eric's Test,,tqs6UXPA/Lm7W+0dX0+syw==,,,,cHWjfsf2Ht8rqw1PfJJQAw==,,ulhLv5btm8B/N7JURh1/+w==,,,,,,,,,,,,,,,ziZgHawN6hOLcpXwK3Ygpw==,,true
3 | 2019-10-17 21:33:00,,TDK+SgtPSM3Vk67zX9aeRA==,,,,,,,,,,,,,,0015500000Ygpq1AAB,,true,,,,,L4izOo4yZpLq5io5YM8pvA==,Seinfeld,,soS8gWpPTwLhsepmOnEc0w==,,,,UYCWM7QeZFg3GdlAkhe9fg==,,ulhLv5btm8B/N7JURh1/+w==,,,,,,,,,,,,,,,ziZgHawN6hOLcpXwK3Ygpw==,,true
4 | 2019-04-04 18:36:06,,,,n9oradGMpYOT/QxsY/psmw==,8lPv4wLTKrJkp24M5lvnaQ==,dRb9Q62qXguKZaZyw5hF0g==,,,,gnzLDuqKcGxMNKFokfhOew==,mAzuwdui02wrqGf2g7R4OA==,uOqY3hqD9h0ZdgJ3QaRYvg==,2YEqg12uvpIXyu6aR9mQlg==,,,001q000000wW9BeAAK,,true,,,,,,Blue Test,,Air1Prg9Tsiw3UANemom6g==,,,WIDCNIeVb5iHBWziEBitQw==,uiHRGP2vPD84LdjD3hMTrw==,,ulhLv5btm8B/N7JURh1/+w==,,8lPv4wLTKrJkp24M5lvnaQ==,dRb9Q62qXguKZaZyw5hF0g==,,,,,,,,,,,,iFbCAfBS66w7LWV2PbAhCg==,ye4O0TtPzpTBUyS5TfSNig==,true
5 | 2019-04-04 18:36:06,,4sUcAmMzCJTMD0K4Qnsiog==,,n9oradGMpYOT/QxsY/psmw==,8lPv4wLTKrJkp24M5lvnaQ==,dRb9Q62qXguKZaZyw5hF0g==,,,,gnzLDuqKcGxMNKFokfhOew==,mAzuwdui02wrqGf2g7R4OA==,uOqY3hqD9h0ZdgJ3QaRYvg==,2YEqg12uvpIXyu6aR9mQlg==,,,001q000000wW9BZAA0,,true,,,,,,Blue Test,,Air1Prg9Tsiw3UANemom6g==,,,WIDCNIeVb5iHBWziEBitQw==,5KRYOy6rMW5wXVulkbNi1w==,,ulhLv5btm8B/N7JURh1/+w==,,8lPv4wLTKrJkp24M5lvnaQ==,dRb9Q62qXguKZaZyw5hF0g==,,,,,,,,,,,,iFbCAfBS66w7LWV2PbAhCg==,ye4O0TtPzpTBUyS5TfSNig==,true
6 | 2019-04-04 18:36:06,,MfuqnemFQBY2RwqM7YBkKA==,,ZxAK+LCOBzw7p/TeJwdYSw==,8lPv4wLTKrJkp24M5lvnaQ==,dRb9Q62qXguKZaZyw5hF0g==,,,,bnxaENqWaHK61C0CuTdesA==,FeSUdeQlOf7tk/xcziXTyw==,Qpg7BeLyzCKCLjC+t73WaA==,qvC68WCtjj4ClzOUWJSkCw==,wf9VogLxiOoQJExQ13q6Vw==,,001q0000010PXTEAA4,,true,,,,,,Rick Thomas Company,,Air1Prg9Tsiw3UANemom6g==,,,pixghWKhHJrqHD4kBeM6Gw==,GweXup29BdjkT9BjcSkzPQ==,,ulhLv5btm8B/N7JURh1/+w==,,8lPv4wLTKrJkp24M5lvnaQ==,dRb9Q62qXguKZaZyw5hF0g==,,,,,,,,,,,,iFbCAfBS66w7LWV2PbAhCg==,+6N+ddY6amrzExJicFCd3w==,false
7 | 2019-04-04 18:36:06,,Fbu50LvyXo0peN4RaMdJ3A==,,W08cDivYvBunJs1R3XDBpg==,8lPv4wLTKrJkp24M5lvnaQ==,dRb9Q62qXguKZaZyw5hF0g==,,,,auObPzjeIkCwKijyu7QQCw==,NWd5qaFpZxRID1f6P7ZtTA==,Po0RXrSzK56UefOH2+FO4Q==,UisBzX5S+vz7B0xHE4v4bg==,,,001q0000013WMSUAA4,yCBcdjbnKNRIwndOakqUSw==,true,,,,,,Testins Opp Close,120210,nqxS50kwRjtOYb9ZB4/PoQ==,,,,J/YOmfl+qwv6i4jsHY+ujQ==,,ulhLv5btm8B/N7JURh1/+w==,,8lPv4wLTKrJkp24M5lvnaQ==,dRb9Q62qXguKZaZyw5hF0g==,,,,,,,,,,,,ziZgHawN6hOLcpXwK3Ygpw==,HVkg9LRLJ6gCvXfE8FNvWg==,true
8 | 2019-04-04 18:36:06,,MfuqnemFQBY2RwqM7YBkKA==,,ZxAK+LCOBzw7p/TeJwdYSw==,8lPv4wLTKrJkp24M5lvnaQ==,dRb9Q62qXguKZaZyw5hF0g==,,,,,FeSUdeQlOf7tk/xcziXTyw==,Qpg7BeLyzCKCLjC+t73WaA==,,,,001q0000010Pe9xAAC,,true,,,,,,Test 1234,,AwxR76rxgr77EfSnTHH57Q==,,,zYXs9P+yNjgg8uwZvFV8PQ==,1fQ7foJAfJKZX7Ndu+Celg==,,ulhLv5btm8B/N7JURh1/+w==,,8lPv4wLTKrJkp24M5lvnaQ==,dRb9Q62qXguKZaZyw5hF0g==,,,,,,,,,,,,iFbCAfBS66w7LWV2PbAhCg==,jcDRlq9Jxi7l0+tk1aTTdg==,true
9 | 2019-04-04 18:36:06,,4sUcAmMzCJTMD0K4Qnsiog==,,,8lPv4wLTKrJkp24M5lvnaQ==,dRb9Q62qXguKZaZyw5hF0g==,,,,,,,,,,001q0000010QZZ7AAO,,true,,,,,,allbound ID test,,AwxR76rxgr77EfSnTHH57Q==,,,,gbEQmTQh/HHUsuesIq+NFw==,,ulhLv5btm8B/N7JURh1/+w==,,8lPv4wLTKrJkp24M5lvnaQ==,dRb9Q62qXguKZaZyw5hF0g==,,,,,,,,,,,,iFbCAfBS66w7LWV2PbAhCg==,,false
10 | 2019-04-04 18:36:06,,4sUcAmMzCJTMD0K4Qnsiog==,,,8lPv4wLTKrJkp24M5lvnaQ==,dRb9Q62qXguKZaZyw5hF0g==,,,,,,,,,,001q0000010PiFMAA0,,true,,,,,,Test 123,,AwxR76rxgr77EfSnTHH57Q==,,,,3RgfHUrW6KCagqoD/sdXyA==,,ulhLv5btm8B/N7JURh1/+w==,,8lPv4wLTKrJkp24M5lvnaQ==,dRb9Q62qXguKZaZyw5hF0g==,,,,,,,,,,,,iFbCAfBS66w7LWV2PbAhCg==,,false
11 | 2019-04-04 18:36:06,,MfuqnemFQBY2RwqM7YBkKA==,,ZxAK+LCOBzw7p/TeJwdYSw==,8lPv4wLTKrJkp24M5lvnaQ==,dRb9Q62qXguKZaZyw5hF0g==,,,,bnxaENqWaHK61C0CuTdesA==,FeSUdeQlOf7tk/xcziXTyw==,Qpg7BeLyzCKCLjC+t73WaA==,XBbaBQNtkym1SAcPiKF1UA==,,,001q0000010kZLuAAM,yCBcdjbnKNRIwndOakqUSw==,true,,,,,,Balto Dog,,AwxR76rxgr77EfSnTHH57Q==,,,pixghWKhHJrqHD4kBeM6Gw==,sibCUUkOHR2dqeGf+xov+A==,,ulhLv5btm8B/N7JURh1/+w==,,8lPv4wLTKrJkp24M5lvnaQ==,dRb9Q62qXguKZaZyw5hF0g==,,,,,,,,,,,,iFbCAfBS66w7LWV2PbAhCg==,+Z00MuxehkeqPQlcxh/nBA==,true
--------------------------------------------------------------------------------
/integration_tests/seeds/sf_account_history_data.csv:
--------------------------------------------------------------------------------
1 | _fivetran_active,_fivetran_start,_fivetran_end,_fivetran_synced,account_number,account_source,annual_revenue,billing_city,billing_country,billing_postal_code,billing_state,billing_street,description,id,industry,is_deleted,last_activity_date,last_referenced_date,last_viewed_date,master_record_id,name,number_of_employees,owner_id,ownership,parent_id,rating,record_type_id,shipping_city,shipping_country,shipping_postal_code,shipping_state,shipping_street,type,website
2 | true,2019-10-17 21:10:19,9999-12-31 23:59:59,2019-10-17 21:10:19,,,,,,,,,,0015500000Xyy06AAB,,false,,,,,Eric's Test,,tqs6UXPA/Lm7W+0dX0+syw==,,,,ulhLv5btm8B/N7JURh1/+w==,,,,,,ziZgHawN6hOLcpXwK3Ygpw==,
3 | true,2019-10-17 21:33:00,9999-12-31 23:59:59,2019-10-17 21:33:00,,TDK+SgtPSM3Vk67zX9aeRA==,,,,,,,,0015500000Ygpq1AAB,,true,,,,L4izOo4yZpLq5io5YM8pvA==,Seinfeld,,soS8gWpPTwLhsepmOnEc0w==,,,,ulhLv5btm8B/N7JURh1/+w==,,,,,,ziZgHawN6hOLcpXwK3Ygpw==,
4 | true,2019-04-04 18:36:06,9999-12-31 23:59:59,2019-04-04 18:36:06,,,,n9oradGMpYOT/QxsY/psmw==,8lPv4wLTKrJkp24M5lvnaQ==,gnzLDuqKcGxMNKFokfhOew==,mAzuwdui02wrqGf2g7R4OA==,2YEqg12uvpIXyu6aR9mQlg==,,001q000000wW9BeAAK,,true,,,,,Blue Test,,Air1Prg9Tsiw3UANemom6g==,,,,ulhLv5btm8B/N7JURh1/+w==,,8lPv4wLTKrJkp24M5lvnaQ==,,,,iFbCAfBS66w7LWV2PbAhCg==,ye4O0TtPzpTBUyS5TfSNig==
5 | true,2019-04-04 18:36:06,9999-12-31 23:59:59,2019-04-04 18:36:06,,4sUcAmMzCJTMD0K4Qnsiog==,,n9oradGMpYOT/QxsY/psmw==,8lPv4wLTKrJkp24M5lvnaQ==,gnzLDuqKcGxMNKFokfhOew==,mAzuwdui02wrqGf2g7R4OA==,2YEqg12uvpIXyu6aR9mQlg==,,001q000000wW9BZAA0,,true,,,,,Blue Test,,Air1Prg9Tsiw3UANemom6g==,,,,ulhLv5btm8B/N7JURh1/+w==,,8lPv4wLTKrJkp24M5lvnaQ==,,,,iFbCAfBS66w7LWV2PbAhCg==,ye4O0TtPzpTBUyS5TfSNig==
6 | false,2019-04-04 18:36:06,2019-04-04 18:36:07,2019-04-04 18:36:06,,MfuqnemFQBY2RwqM7YBkKA==,,ZxAK+LCOBzw7p/TeJwdYSw==,8lPv4wLTKrJkp24M5lvnaQ==,bnxaENqWaHK61C0CuTdesA==,FeSUdeQlOf7tk/xcziXTyw==,qvC68WCtjj4ClzOUWJSkCw==,wf9VogLxiOoQJExQ13q6Vw==,001q0000010PXTEAA4,,true,,,,,Rick Thomas Company,,Air1Prg9Tsiw3UANemom6g==,,,,ulhLv5btm8B/N7JURh1/+w==,,8lPv4wLTKrJkp24M5lvnaQ==,,,,iFbCAfBS66w7LWV2PbAhCg==,+6N+ddY6amrzExJicFCd3w==
7 | true,2019-04-04 18:36:06,9999-12-31 23:59:59,2019-04-04 18:36:06,,Fbu50LvyXo0peN4RaMdJ3A==,,W08cDivYvBunJs1R3XDBpg==,8lPv4wLTKrJkp24M5lvnaQ==,auObPzjeIkCwKijyu7QQCw==,NWd5qaFpZxRID1f6P7ZtTA==,UisBzX5S+vz7B0xHE4v4bg==,,001q0000013WMSUAA4,yCBcdjbnKNRIwndOakqUSw==,true,,,,,Testins Opp Close,120210,nqxS50kwRjtOYb9ZB4/PoQ==,,,,ulhLv5btm8B/N7JURh1/+w==,,8lPv4wLTKrJkp24M5lvnaQ==,,,,ziZgHawN6hOLcpXwK3Ygpw==,HVkg9LRLJ6gCvXfE8FNvWg==
8 | true,2019-04-04 18:36:06,9999-12-31 23:59:59,2019-04-04 18:36:06,,MfuqnemFQBY2RwqM7YBkKA==,,ZxAK+LCOBzw7p/TeJwdYSw==,8lPv4wLTKrJkp24M5lvnaQ==,,FeSUdeQlOf7tk/xcziXTyw==,,,001q0000010Pe9xAAC,,true,,,,,Test 1234,,AwxR76rxgr77EfSnTHH57Q==,,,,ulhLv5btm8B/N7JURh1/+w==,,8lPv4wLTKrJkp24M5lvnaQ==,,,,iFbCAfBS66w7LWV2PbAhCg==,jcDRlq9Jxi7l0+tk1aTTdg==
9 | false,2019-04-04 18:36:06,2019-04-04 18:36:07,2019-04-04 18:36:06,,4sUcAmMzCJTMD0K4Qnsiog==,,,8lPv4wLTKrJkp24M5lvnaQ==,,,,,001q0000010QZZ7AAO,,true,,,,,allbound ID test,,AwxR76rxgr77EfSnTHH57Q==,,,,ulhLv5btm8B/N7JURh1/+w==,,8lPv4wLTKrJkp24M5lvnaQ==,,,,iFbCAfBS66w7LWV2PbAhCg==,
10 | false,2019-04-04 18:36:06,2019-04-04 18:36:07,2019-04-04 18:36:06,,4sUcAmMzCJTMD0K4Qnsiog==,,,8lPv4wLTKrJkp24M5lvnaQ==,,,,,001q0000010PiFMAA0,,true,,,,,Test 123,,AwxR76rxgr77EfSnTHH57Q==,,,,ulhLv5btm8B/N7JURh1/+w==,,8lPv4wLTKrJkp24M5lvnaQ==,,,,iFbCAfBS66w7LWV2PbAhCg==,
11 | true,2019-04-04 18:36:06,9999-12-31 23:59:59,2019-04-04 18:36:06,,MfuqnemFQBY2RwqM7YBkKA==,,ZxAK+LCOBzw7p/TeJwdYSw==,8lPv4wLTKrJkp24M5lvnaQ==,bnxaENqWaHK61C0CuTdesA==,FeSUdeQlOf7tk/xcziXTyw==,XBbaBQNtkym1SAcPiKF1UA==,,001q0000010kZLuAAM,yCBcdjbnKNRIwndOakqUSw==,true,,,,,Balto Dog,,AwxR76rxgr77EfSnTHH57Q==,,,,ulhLv5btm8B/N7JURh1/+w==,,8lPv4wLTKrJkp24M5lvnaQ==,,,,iFbCAfBS66w7LWV2PbAhCg==,+Z00MuxehkeqPQlcxh/nBA==
--------------------------------------------------------------------------------
/integration_tests/seeds/sf_contact_data.csv:
--------------------------------------------------------------------------------
1 | id,_fivetran_synced,account_id,cbit_clearbit_c,cbit_clearbit_ready_c,created_by_id,created_date,department,email,email_bounced_date,email_bounced_reason,fax,first_name,is_deleted,is_email_bounced,jigsaw_contact_id,last_activity_date,last_curequest_date,last_cuupdate_date,last_modified_by_id,last_modified_date,last_name,last_referenced_date,last_viewed_date,mailing_city,mailing_country,mailing_country_code,mailing_geocode_accuracy,mailing_latitude,mailing_longitude,mailing_postal_code,mailing_state,mailing_state_code,mailing_street,master_record_id,mc_4_sf_mc_subscriber_c,mobile_phone,name,owner_id,phone,photo_url,reports_to_id,salutation,system_modstamp,title,email_bounced_c,email_quality_unknown_c,gclid_c,referral_account_c,referral_contact_c,has_opted_out_of_email,act_on_lead_score_c,cbit_created_by_clearbit_c,fivetran_user_id_c,no_longer_at_company_c,pi_campaign_c,pi_comments_c,pi_conversion_date_c,pi_conversion_object_name_c,pi_conversion_object_type_c,pi_created_date_c,pi_first_activity_c,pi_first_search_term_c,pi_first_search_type_c,pi_first_touch_url_c,pi_grade_c,pi_last_activity_c,pi_needs_score_synced_c,pi_notes_c,pi_pardot_hard_bounced_c,pi_pardot_last_scored_at_c,pi_score_c,pi_url_c,pi_utm_campaign_c,pi_utm_content_c,pi_utm_medium_c,pi_utm_source_c,pi_utm_term_c,lead_source,contact_status_c,region_c,competitor_c,bt_stripe_gender_c,bt_stripe_ssn_last_4_encrypted_c,bt_stripe_personal_id_number_c,bt_stripe_personal_id_number_encrypted_c,bt_stripe_maiden_name_c,bt_stripe_languages_c,bt_stripe_default_payment_method_c,bt_stripe_ssn_last_4_c,bt_stripe_personal_id_type_c,bt_stripe_default_payment_gateway_c,bt_stripe_level_c,lean_data_routing_action_c,lean_data_matched_buyer_persona_c,lean_data_ld_segment_c,lean_data_tag_c,lean_data_modified_score_c,do_not_route_lead_c,technical_contact_c,allbound_id_c,notes_c,netsuite_conn_sync_in_progress_c,netsuite_conn_celigo_update_c,netsuite_conn_net_suite_id_c,netsuite_conn_net_suite_sync_err_c,netsuite_conn_push_to_net_suite_c,netsuite_conn_pushed_from_opportunity_c,description,lid_linked_in_company_id_c,lid_linked_in_member_token_c,is_eu_resident_c,do_not_call,sales_loft_1_most_recent_cadence_next_step_due_date_c,sales_loft_1_most_recent_last_completed_step_c,sales_loft_1_most_recent_cadence_name_c,source_detail_c,utm_source_c,utm_content_c,utm_term_c,utm_medium_c,utm_campaign_c,network_c,matchtype_c,device_c,creative_c,adgroupid_c,keyword_c,campaignid_c,partner_rep_email_c,partner_rep_name_c,contact_type_c,old_lead_source_c,old_lead_source_detail_c,contact_stage_c,original_utm_campaign_c,original_utm_content_c,original_utm_medium_c,original_utm_source_c,original_utm_term_c,es_app_escreated_timestamp_c,es_app_esecid_c,es_app_esenriched_c,es_app_esenriched_timestamp_c,es_app_esintent_aggregate_score_c,es_app_esintent_timestamp_c,es_app_esintent_topics_c,es_app_esoverall_fit_score_c,es_app_essource_c,individual_id,marketing_process_c,automation_tracking_c,user_gems_has_changed_job_c,email_opt_in_explicit_c,email_opt_in_implicit_c,gdpr_opt_in_explicit_c,user_gems_is_a_user_gem_c,user_gems_past_account_c,user_gems_past_company_c,user_gems_past_contact_c,user_gems_past_title_c,partner_contact_c,promotion_id_c,referral_exists_c,referral_first_name_c,referral_last_name_c,mkto_71_contact_acquisition_date_c,mkto_71_contact_acquisition_program_c,mkto_71_contact_acquisition_program_id_c,mkto_71_contact_inferred_city_c,mkto_71_contact_inferred_company_c,mkto_71_contact_inferred_country_c,mkto_71_contact_inferred_metropolitan_a_c,mkto_71_contact_inferred_phone_area_cod_c,mkto_71_contact_inferred_postal_code_c,mkto_71_contact_inferred_state_region_c,mkto_71_contact_lead_score_c,mkto_71_contact_original_referrer_c,mkto_71_contact_original_search_engine_c,mkto_71_contact_original_search_phrase_c,mkto_71_contact_original_source_info_c,mkto_71_contact_original_source_type_c,mkto_si_hide_date_c,mkto_si_last_interesting_moment_date_c,mkto_si_last_interesting_moment_desc_c,mkto_si_last_interesting_moment_source_c,mkto_si_last_interesting_moment_type_c,mkto_si_mkto_lead_score_c,mkto_si_priority_c,mkto_si_relative_score_value_c,mkto_si_urgency_value_c,cloudingo_agent_ces_c,cloudingo_agent_mar_c,cloudingo_agent_mas_c,cloudingo_agent_mav_c,cloudingo_agent_mrdi_c,cloudingo_agent_mtz_c,cloudingo_agent_oar_c,cloudingo_agent_oas_c,cloudingo_agent_oav_c,cloudingo_agent_ordi_c,cloudingo_agent_otz_c,do_not_sync_marketo_c,phone_extension_c,job_function_c,job_level_c,direct_office_c,city_c,country_c,state_c,secondary_email_c,es_seniority_c,source_last_lead_source_c,source_last_lead_source_category_c,source_last_lead_source_detail_c,drift_cql_c,hot_contact_c,behavioral_score_c,unique_email_c,is_emea_event_routing_c,csi_code_c,clearbit_role_c,clearbit_seniority_c,clearbit_sub_role_c,rh_2_currency_test_c,rh_2_describe_c,rh_2_integer_test_c,created_by_role_c,demographic_score_c,country_code_c,state_code_c,attended_event_c,zoominfo_technologies_c,mql_date_c,user_gems_user_gems_id_c,dozisf_zoom_info_company_id_c,dozisf_zoom_info_first_updated_c,dozisf_zoom_info_id_c,dozisf_zoom_info_last_updated_c,lean_data_manual_route_trigger_c,first_mql_date_c,active_relationship_c,clarus_date_c,clarus_editor_c,clarus_notes_c,clarus_project_c,clarus_status_c,historical_contact_status_c,fivetran_account_association_date_c,fivetran_account_user_role_s_c,mql_reason_c,attempting_contact_date_time_c,linked_in_url_c,trial_contact_start_date_c,contact_holdover_c,bill_to_contact_hidden_c,enrichment_request_c,meta_data_create_date_c,primary_se_c,unqualified_reason_c,opp_handoff_ae_c,marketing_connector_interest_c,recent_marketing_campaign_status_c,salesloft_cadence_trigger_c,last_ae_activity_owner_c,last_bdr_activity_owner_c,last_manual_ae_activity_date_c,last_manual_bdr_activity_date_c,leandata_contact_owner_override_c,potential_fivetran_use_case_c,lean_data_router_completion_date_time_c,partner_territory_c,partner_company_c,bizible_2_ad_campaign_name_ft_c,bizible_2_ad_campaign_name_lc_c,bizible_2_bizible_id_c,bizible_2_landing_page_ft_c,bizible_2_landing_page_lc_c,bizible_2_marketing_channel_ft_c,bizible_2_marketing_channel_lc_c,bizible_2_touchpoint_date_ft_c,bizible_2_touchpoint_date_lc_c,bizible_2_touchpoint_source_ft_c,bizible_2_touchpoint_source_lc_c,sales_email_opt_out_c,sales_email_opt_out_date_time_c,celigo_sfnsio_net_suite_id_c,celigo_sfnsio_net_suite_record_c,celigo_sfnsio_net_suite_sync_error_c,celigo_sfnsio_skip_export_to_net_suite_c,celigo_sfnsio_test_mode_record_c,ironclad_workflow_c,last_sales_activity_date_time_c,user_activity_logged_by_c,first_activity_after_mql_date_c,last_sdr_activity_owner_c,last_sdr_activity_date_c,beta_connector_interest_c,first_manual_activity_after_mql_date_c,user_gems_ug_past_infos_c,user_gems_ug_current_infos_c,user_gems_ug_created_by_ug_c,free_trial_email_confirmed_date_c,routed_from_manual_bdr_ae_activity_c,dnboptimizer_dn_bcontact_record_c,i_sell_avention_id_c,persona_c,last_marketing_interesting_moment_date_c,verified_c,salesloft_owner_c,salesloft_owner_sf_c,email_opt_out_date_time_c,pbf_startup_primary_role_c,pbf_startup_certify_eligibility_c,engagio_intent_minutes_last_30_days_c,engagio_engagement_minutes_last_3_months_c,engagio_engagement_minutes_last_7_days_c,engagio_first_engagement_date_c,engagio_department_c,engagio_role_c,mql_date_changed_c,first_activity_after_mql_changed_c,birthdate,legacy_hvr_id_c,has_opted_out_of_fax,other_latitude,username_c,assistant_name,created_at_c,partner_contact_deprecate_c,other_street,other_state,home_phone,other_city,company_c,opportunity_c,hvr_update_c,other_phone,other_geocode_accuracy,other_postal_code,other_country,assistant_phone,jigsaw,avatar_c,other_longitude,lean_data_status_info_c,analytics_id_c,dnb_primary_address_postal_code_c,dnb_contact_phone_c,dnb_email_deliverability_score_c,dnb_job_title_c,dnb_email_c,dnb_primary_address_city_c,dnb_phone_accuracy_score_c,dnb_primary_address_state_province_c,dnb_primary_address_state_province_abbre_c,dnb_primary_address_country_region_code_c,email_opt_in_double_c,phone_number_catch_all_c,contact_owners_manager_stamped_c,fivetran_account_id_c,contacts_domain_exists_c,utm_id_c,self_service_routing_c,no_geo_data_c,to_be_deleted_salesloft_backfill_c,do_not_sync_reason_marketo_c,_fivetran_active
2 | 0033700000JmrFPAA,2017-08-24 12:51:56,,,,,2019-11-11 17:23:34,,,,,,,,,,,,,,2019-11-11 17:23:34,,,,,,,,,,,,,,,,,,,,,,,2019-11-11 17:23:34,,,,,,,,,,,,,,,,,2019-11-11 17:23:34,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,
3 | 0031G00000q9jPQAQ,2018-11-12 19:53:00,0011G00000eM9wvQAC,,FALSE,00537000004jeWMAAY,2019-11-11 17:23:34,,,,,,x,,FALSE,,,,,0051G000005MreQAC,2019-11-11 17:23:34,G,,,,Unied Saes,US,,,,,,,,,,,Janet Yellen,0051G000005MreQAC,(555) 555-5555,/services/images/phoo/0031G00000q9jPQAQ,,,2019-11-11 17:23:34,Daa Science Direcor,FALSE,FALSE,,,,FALSE,,FALSE,,FALSE,,,,,,2019-11-11 17:23:34,,,,,,,FALSE,,FALSE,,,,,,,,,oominfo,Aemping Conac,,,,,,,,,,,,,,convered - new accoun,,,,,FALSE,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,
4 | 0031G00000rfAvuQAE,2019-04-04 17:44:47,0011G00000f8NwQAU,,FALSE,00537000004jeWMAAY,2019-11-11 17:23:34,,,,,,x,,FALSE,,,,,0051G000005MreQAC,2019-11-11 17:23:34,G,,,,Unied Saes,US,,,,,,,,,,,Jerome Powell,0051G000005MreQAC,,/services/images/phoo/0031G00000rfAvuQAE,,,2019-11-11 17:23:34,"Direcor, Business Insighs & Sraegy",FALSE,FALSE,,,,FALSE,,FALSE,,FALSE,,,,,,2019-11-11 17:23:34,,,,,,,FALSE,,FALSE,,,,,,,,,Vendor Lis,Aemping Conac,,,,,,,,,,,,,,convered,,,,,FALSE,,,,FALSE,FALSE,,,FALSE,FALSE,"Buy our things.",,,FALSE,FALSE,,,,ryProspec,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,
5 | 0031G00000qAfq1QAC,2019-01-03 19:53:01,0011G00000eNyiXQAS,a2G1G000000pJs8UAE,,00537000004jeWMAAY,2019-11-11 17:23:34,,hi@google.com,,,,x,,FALSE,,,,,0051G000005MreQAC,2019-11-11 17:23:34,G,,,Chicago,Unied Saes,US,,,,55555,Illinois,IL,123 Ave,,,,Jerome,0051G000005MreQAC,(555) 555-5555,/services/images/phoo/0031G00000qAfq1QAC,,,2019-11-11 17:23:34,Markeing Direcor,FALSE,FALSE,,,,FALSE,,FALSE,,FALSE,Salesforce Creaed,,,,,2019-11-11 17:23:34,,,,,,,FALSE,,FALSE,,,hp://pi.pardo.com/prospec/read?id=396093715,,,,,,oominfo,Aemping Conac,,,,,,,,,,,,,,convered,,,,,FALSE,,,,FALSE,FALSE,,,FALSE,FALSE,"Buy more.",,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,
--------------------------------------------------------------------------------
/integration_tests/seeds/sf_contact_history_data.csv:
--------------------------------------------------------------------------------
1 | _fivetran_active,_fivetran_start,_fivetran_end,id,_fivetran_synced,account_id,email,first_name,is_deleted,last_activity_date,last_modified_by_id,last_modified_date,last_name,last_referenced_date,last_viewed_date,mailing_city,mailing_country,mailing_country_code,mailing_postal_code,mailing_state,mailing_street,master_record_id,mobile_phone,name,owner_id,phone,reports_to_id,title,lead_source,description,individual_id,home_phone
2 | true,2020-07-07 12:51:56,9999-12-31 23:59:59,0033700000JmrFPAA,2017-08-24 12:51:56,,,,,2020-07-07 00:00:00,,2019-11-11 17:23:34,,,2020-08-07 00:00:00,,,,,,,,,,,,,,,,,
3 | true,2018-11-12 19:53:00,9999-12-31 23:59:59,0031G00000q9jPQAQ,2018-11-12 19:53:00,0011G00000eM9wvQAC,,x,,2018-11-12 19:53:00,0051G000005MreQAC,2019-11-11 17:23:34,G,,2018-11-13 19:53:00,,Unied Saes,US,,,,,,Janet Yellen,0051G000005MreQAC,(555) 555-5555,,Daa Science Direcor,oominfo,,,
4 | true,2019-04-04 17:44:47,9999-12-31 23:59:59,0031G00000rfAvuQAE,2019-04-04 17:44:47,0011G00000f8NwQAU,,x,,2019-04-04 17:44:47,0051G000005MreQAC,2019-11-11 17:23:34,G,,2019-04-13 17:44:47,,Unied Saes,US,,,,,,Jerome Powell,0051G000005MreQAC,,,"Direcor, Business Insighs & Sraegy",Vendor Lis,Buy our things.,,
5 | true,2019-01-03 19:53:01,9999-12-31 23:59:59,0031G00000qAfq1QAC,2019-01-03 19:53:01,0011G00000eNyiXQAS,hi@google.com,x,,2019-01-03 19:53:01,0051G000005MreQAC,2019-11-11 17:23:34,G,,2019-01-13 19:53:01,Chicago,Unied Saes,US,55555,Illinois,123 Ave,,,Jerome,0051G000005MreQAC,(555) 555-5555,,Markeing Direcor,oominfo,Buy more.,,
--------------------------------------------------------------------------------
/integration_tests/seeds/sf_event_data.csv:
--------------------------------------------------------------------------------
1 | id,_fivetran_synced,account_id,activity_date,activity_date_time,created_by_id,created_date,description,duration_in_minutes,end_date_time,event_subtype,group_event_type,invitee_uuid_c,is_child,is_deleted,is_group_event,is_private,is_recurrence,is_reminder_set,last_modified_by_id,last_modified_date,location,no_show_c,owner_id,recurrence_activity_id,recurrence_day_of_month,recurrence_day_of_week_mask,recurrence_end_date_only,recurrence_instance,recurrence_interval,recurrence_month_of_year,recurrence_start_date_time,recurrence_time_zone_sid_key,recurrence_type,referral_account_c,referral_contact_c,reminder_date_time,show_as,start_date_time,subject,system_modstamp,type,what_count,what_id,who_count,who_id,first_meeting_held_c,associated_sdr_c,first_meeting_c,call_recording_c,affectlayer_chorus_call_id_c,affectlayer_affect_layer_call_id_c,last_rep_activity_date_c,lid_url_c,lid_date_sent_c,sales_loft_step_id_c,sales_loft_step_name_c,sales_loft_step_type_c,sales_loft_email_template_id_c,sales_loft_external_identifier_c,sales_loft_cadence_id_c,sales_loft_clicked_count_c,sales_loft_cadence_name_c,sales_loft_reply_count_c,call_disposition_c,sales_loft_email_template_title_c,sales_loft_step_day_new_c,call_disposition_2_c,sales_loft_viewed_count_c,sales_loft_1_sales_loft_step_day_c,sales_loft_1_sales_loft_clicked_count_c,sales_loft_1_sales_loft_view_count_c,sales_loft_1_call_disposition_c,sales_loft_1_sales_loft_replies_count_c,sales_loft_1_sales_loft_cadence_name_c,sales_loft_1_call_sentiment_c,sales_loft_1_sales_loft_email_template_title_c,is_recurrence_2,is_recurrence_2_exception,is_recurrence_2_exclusion,recurrence_2_pattern_start_date,recurrence_2_pattern_text,recurrence_2_pattern_time_zone,recurrence_2_pattern_version,co_selling_activity_c,is_a_co_sell_activity_c,partner_contact_c,description_c,campaign_c,event_name_c,partner_account_c,topic_c,attendance_number_c,partner_activity_type_c,how_did_you_bring_value_or_create_trust_c,proof_of_referral_c,how_did_you_bring_value_or_earn_trust_c,duration_in_minutes_c,vidyard_c,collections_hold_c,execute_collections_plan_activity_c,expected_payment_date_c,end_date,opportunity_c,meeting_type_c,meeting_name_c,bizible_2_bizible_id_c,bizible_2_bizible_touchpoint_date_c,assigned_to_role_c,assigned_to_name_c,legacy_hvr_id_c,is_archived,_fivetran_active
2 | 00U1G00000DEaypUAD,2019-11-11 17:23:34,0011G00000eLwuWQAS,2019-11-11 17:23:34,2019-11-11 17:23:34,0051G000007Ez4XQAS,2019-11-11 17:23:34,description,15,2019-11-11 17:23:34,Event,1,,FALSE,FALSE,TRUE,FALSE,FALSE,FALSE,0051G000007Ez4XQAS,2019-11-11 17:23:34,,FALSE,0051G000007Ez4XQAS,,,,,,,,,,,,,,Busy,2019-11-11 17:23:34,subject,2019-11-11 17:23:34,Call,1,0011G00000eLwuWQAS,1,0031G00001Pji7ZQAR,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,FALSE,FALSE,FALSE,,,,,,,,,,,,,,,,,,,FALSE,FALSE,FALSE,,2019-11-11 17:23:34,,,,,,,,,FALSE,
3 | 00U1G00000DEaxXUAT,2019-11-11 17:23:34,0011G00000gXz9HQAS,2019-11-11 17:23:34,2019-11-11 17:23:34,0051G000007EpSPQA0,2019-11-11 17:23:34,description,30,2019-11-11 17:23:34,Event,1,,FALSE,FALSE,TRUE,FALSE,FALSE,FALSE,0051G000007EpSPQA0,2019-11-11 17:23:34,,FALSE,0051G000007EpSPQA0,,,,,,,,,,,,,,Busy,2019-11-11 17:23:34,subject,2019-11-11 17:23:34,Call,0,,1,0031G00000xRXHBQA4,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,FALSE,FALSE,FALSE,,,,,,,,,,,,,,,,,,,FALSE,FALSE,FALSE,,2019-11-11 17:23:34,,,,,,,,,FALSE,
4 | 00U1G00000DEQNmUAP,2019-11-11 17:23:34,0011G00000f8MOkQAM,2019-11-11 17:23:34,2019-11-11 17:23:34,0051G0000060zsHQAQ,2019-11-11 17:23:34,description,30,2019-11-11 17:23:34,Event,,,FALSE,FALSE,FALSE,FALSE,FALSE,FALSE,0051G0000060zsHQAQ,2019-11-11 17:23:34,,FALSE,0051G000007F8lCQAS,,,,,,,,,,,,,,Busy,2019-11-11 17:23:34,subject,2019-11-11 17:23:34,Meeting,0,,1,0031G00001QY4G5QAL,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,FALSE,FALSE,FALSE,,,,,,,,,,,,,,,,,,,FALSE,FALSE,FALSE,,2019-11-11 17:23:34,,,,,,,,,FALSE,
5 | 00U1G00000DEQP2UAP,2019-11-11 17:23:34,0011G00000vVDWsQAO,2019-11-11 17:23:34,2019-11-11 17:23:34,0051G0000060zsHQAQ,2019-11-11 17:23:34,description,30,2019-11-11 17:23:34,Event,,,FALSE,FALSE,FALSE,FALSE,FALSE,FALSE,0051G0000060zsHQAQ,2019-11-11 17:23:34,,FALSE,0051G000007F8lCQAS,,,,,,,,,,,,,,Busy,2019-11-11 17:23:34,subject,2019-11-11 17:23:34,Meeting,0,,1,0031G00001QXl7WQAT,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,FALSE,FALSE,FALSE,,,,,,,,,,,,,,,,,,,FALSE,FALSE,FALSE,,2019-11-11 17:23:34,,,,,,,,,FALSE,
6 | 00U1G00000DEQYxUAP,2019-11-11 17:23:34,0011G00000vVSANQA4,2019-11-11 17:23:34,2019-11-11 17:23:34,0051G000007F94iQAC,2019-11-11 17:23:34,description,15,2019-11-11 17:23:34,Event,1,,FALSE,FALSE,TRUE,FALSE,FALSE,FALSE,0051G000007F94iQAC,2019-11-11 17:23:34,,FALSE,0051G000007F94iQAC,,,,,,,,,,,,,,Busy,2019-11-11 17:23:34,subject,2019-11-11 17:23:34,Call,1,0011G00000vVSANQA4,1,0031G00001QY6c0QAD,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,FALSE,FALSE,FALSE,,,,,,,,,,,,,,,,,,,FALSE,FALSE,FALSE,,2019-11-11 17:23:34,,,,,,,,,FALSE,
7 | 00U1G00000DEQYEUA5,2019-11-11 17:23:34,0011G00000vVS79QAG,2019-11-11 17:23:34,2019-11-11 17:23:34,0051G000007F94iQAC,2019-11-11 17:23:34,description,15,2019-11-11 17:23:34,Event,1,,FALSE,FALSE,TRUE,FALSE,FALSE,FALSE,0051G000007F94iQAC,2019-11-11 17:23:34,,FALSE,0051G000007F94iQAC,,,,,,,,,,,,,,Busy,2019-11-11 17:23:34,subject,2019-11-11 17:23:34,Call,1,0011G00000vVS79QAG,1,0031G00001QY5TTQA1,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,FALSE,FALSE,FALSE,,,,,,,,,,,,,,,,,,,FALSE,FALSE,FALSE,,2019-11-11 17:23:34,,,,,,,,,FALSE,
8 | 00U1G00000DEQL7UAP,2019-11-11 17:23:34,0013700000JwwRJAAZ,2019-11-11 17:23:34,2019-11-11 17:23:34,0051G0000060zsHQAQ,2019-11-11 17:23:34,description,30,2019-11-11 17:23:34,Event,,,FALSE,FALSE,FALSE,FALSE,FALSE,FALSE,0051G0000060zsHQAQ,2019-11-11 17:23:34,,FALSE,0051G000007F8lCQAS,,,,,,,,,,,,,,Busy,2019-11-11 17:23:34,subject,2019-11-11 17:23:34,Meeting,0,,1,0031G00001QY3kmQAD,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,FALSE,FALSE,FALSE,,,,,,,,,,,,,,,,,,,FALSE,FALSE,FALSE,,2019-11-11 17:23:34,,,,,,,,,FALSE,
9 | 00U1G00000DEQM0UAP,2019-11-11 17:23:34,0011G00000gX8tDQAS,2019-11-11 17:23:34,2019-11-11 17:23:34,0051G0000060zsHQAQ,2019-11-11 17:23:34,description,15,2019-11-11 17:23:34,Event,,,FALSE,FALSE,FALSE,FALSE,FALSE,FALSE,0051G000007F2JGQA0,2019-11-11 17:23:34,,FALSE,0051G000007F94iQAC,,,,,,,,,,,,,,Busy,2019-11-11 17:23:34,subject,2019-11-11 17:23:34,Meeting,0,,1,0031G00001QXdxXQAT,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,FALSE,FALSE,FALSE,,,,,,,,,,,,,,,,,,,FALSE,FALSE,FALSE,,2019-11-11 17:23:34,,,,,,,,,FALSE,
10 | 00U1G00000DEQLvUAP,2019-11-11 17:23:34,0011G00000vVPbgQAG,2019-11-11 17:23:34,2019-11-11 17:23:34,0051G000007F94iQAC,2019-11-11 17:23:34,description,15,2019-11-11 17:23:34,Event,1,,FALSE,FALSE,TRUE,FALSE,FALSE,FALSE,0051G000007F94iQAC,2019-11-11 17:23:34,,FALSE,0051G000007F94iQAC,,,,,,,,,,,,,,Busy,2019-11-11 17:23:34,subject,2019-11-11 17:23:34,Call,1,0011G00000vVPbgQAG,1,0031G00001QXbgEQAT,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,FALSE,FALSE,FALSE,,,,,,,,,,,,,,,,,,,FALSE,FALSE,FALSE,,2019-11-11 17:23:34,,,,,,,,,FALSE,
11 | 00U1G00000DEQMtUAP,2019-11-11 17:23:34,0011G00000vVPhAQAW,2019-11-11 17:23:34,2019-11-11 17:23:34,0051G000007F94iQAC,2019-11-11 17:23:34,description,15,2019-11-11 17:23:34,Event,1,,FALSE,FALSE,TRUE,FALSE,FALSE,FALSE,0051G000007F94iQAC,2019-11-11 17:23:34,,FALSE,0051G000007F94iQAC,,,,,,,,,,,,,,Busy,2019-11-11 17:23:34,subject,2019-11-11 17:23:34,Call,1,0011G00000vVPhAQAW,1,0031G00001QXeBJQA1,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,FALSE,FALSE,FALSE,,,,,,,,,,,,,,,,,,,FALSE,FALSE,FALSE,,2019-11-11 17:23:34,,,,,,,,,FALSE,
--------------------------------------------------------------------------------
/integration_tests/seeds/sf_lead_data.csv:
--------------------------------------------------------------------------------
1 | country,email_bounced_reason,email_bounced_date,owner_id,secondary_email_c,lead_source,converted_date,last_modified_date,master_record_id,last_modified_by_id,system_modstamp,geocode_accuracy,converted_contact_id,up_region_c,id,photo_url,state,longitude,last_referenced_date,up_district_c,last_activity_date,country_code,phone,mc_4_sf_mc_subscriber_c,name,jigsaw_contact_id,lead_source_detail_c,created_by_id,salutation,is_converted,state_code,is_unread_by_owner,status,city,latitude,cbit_clearbit_c,industry,title,_fivetran_synced,last_viewed_date,converted_opportunity_id,is_deleted,street,company,first_name,email,website,last_name,number_of_employees,up_territory_c,created_date,gclid_c,active_in_sequence_c,postal_code,cbit_clearbit_ready_c,has_opted_out_of_email,converted_account_id,mobile_phone,calendly_created_c,account_c,all_connectors_c,all_data_warehouses_c,bi_tools_c,competitors_c,annual_revenue,connectors_products_c,contact_c,data_warehouse_products_c,notes_c,timeframe_c,account_all_products_c,account_bi_tools_c,account_data_warehouses_c,opportunity_competitors_c,opportunity_products_c,description,referral_account_c,referral_contact_c,volume_in_millions_c,feature_requests_c,lead_number_c,demo_scheduled_by_calenderly_c,to_delete_c,bounced_email_c,email_quality_c,email_quality_catchall_c,old_lead_source_c,email_bounced_c,old_lead_source_detail_c,utm_medium_c,utm_source_c,utm_campaign_c,utm_content_c,utm_term_c,act_on_lead_score_c,cbit_created_by_clearbit_c,fivetran_user_id_c,geo_state_acton_c,actoncountry_c,actoncity_c,actoncountrycode_c,actonpostalcode_c,actonreferrer_c,actonstate_c,geo_city_c,geo_country_c,geo_country_code_c,geo_postal_code_c,geo_state_c,company_type_c,pi_campaign_c,pi_comments_c,pi_conversion_date_c,pi_conversion_object_name_c,pi_conversion_object_type_c,pi_created_date_c,pi_first_activity_c,pi_first_search_term_c,pi_first_search_type_c,pi_first_touch_url_c,pi_grade_c,pi_last_activity_c,pi_needs_score_synced_c,pi_notes_c,pi_pardot_hard_bounced_c,pi_pardot_last_scored_at_c,pi_score_c,pi_url_c,pi_utm_campaign_c,pi_utm_content_c,pi_utm_medium_c,pi_utm_source_c,pi_utm_term_c,fax,region_c,competitor_c,source_detail_c,fivetran_account_stage_c,fivetran_account_id_c,lean_data_router_status_c,lean_data_matched_lead_c,lean_data_routing_action_c,lean_data_search_index_c,lean_data_reporting_matched_account_c,lean_data_reporting_timestamp_c,lean_data_ld_segment_c,lean_data_marketing_sys_created_date_c,lean_data_matched_account_c,lean_data_a_2_b_account_c,lean_data_search_c,lean_data_routing_status_c,lean_data_a_2_b_group_c,lean_data_matched_buyer_persona_c,lean_data_tag_c,lean_data_status_info_c,lean_data_modified_score_c,do_not_route_lead_c,partner_type_c,allbound_id_c,lid_linked_in_company_id_c,lid_linked_in_member_token_c,lean_data_re_route_c,sales_loft_1_most_recent_cadence_next_step_due_date_c,sales_loft_1_most_recent_last_completed_step_c,sales_loft_1_most_recent_cadence_name_c,network_c,matchtype_c,device_c,creative_c,adgroupid_c,keyword_c,campaignid_c,partner_rep_email_c,partner_rep_name_c,lead_type_c,contact_stage_c,original_utm_campaign_c,original_utm_content_c,original_utm_medium_c,original_utm_source_c,original_utm_term_c,es_app_esalexa_rank_c,es_app_esaudience_names_c,es_app_escity_c,es_app_escompany_phone_c,es_app_escountry_c,es_app_escreated_timestamp_c,es_app_esecid_c,es_app_esemployees_c,es_app_esenriched_c,es_app_esenriched_timestamp_c,es_app_esfacebook_c,es_app_esindustry_c,es_app_esintent_aggregate_score_c,es_app_esintent_timestamp_c,es_app_esintent_topics_c,es_app_eskeywords_c,es_app_eslinked_in_c,es_app_esoverall_fit_score_c,es_app_esrevenue_c,es_app_essource_c,es_app_esstate_c,es_app_esstreet_c,es_app_estechnologies_c,es_app_estwitter_c,es_app_eszipcode_c,marketing_prospect_routing_rules_c,individual_id,marketing_process_c,automation_tracking_c,user_gems_has_changed_job_c,user_gems_linked_in_c,email_opt_in_c,email_opt_in_explicit_c,email_opt_in_implicit_c,gdpr_opt_in_explicit_c,user_gems_is_a_user_gem_c,user_gems_past_account_c,user_gems_past_company_c,user_gems_past_contact_c,user_gems_past_title_c,promotion_id_c,previous_customer_c,referral_contact_email_c,referral_firstname_c,referral_last_name_c,mkto_71_lead_score_c,mkto_71_acquisition_date_c,mkto_71_acquisition_program_id_c,mkto_acquisition_program_c,mkto_71_inferred_city_c,mkto_71_inferred_company_c,mkto_71_inferred_country_c,mkto_71_inferred_metropolitan_area_c,mkto_71_inferred_phone_area_code_c,mkto_71_inferred_postal_code_c,mkto_71_inferred_state_region_c,mkto_71_original_referrer_c,mkto_71_original_search_engine_c,mkto_71_original_search_phrase_c,mkto_71_original_source_info_c,mkto_71_original_source_type_c,mkto_si_hide_date_c,mkto_si_last_interesting_moment_date_c,mkto_si_last_interesting_moment_desc_c,mkto_si_last_interesting_moment_source_c,mkto_si_last_interesting_moment_type_c,mkto_si_msicontact_id_c,mkto_si_priority_c,mkto_si_relative_score_value_c,mkto_si_urgency_value_c,cloudingo_agent_ar_c,cloudingo_agent_ardi_c,cloudingo_agent_as_c,cloudingo_agent_atz_c,cloudingo_agent_av_c,cloudingo_agent_les_c,do_not_sync_marketo_c,source_every_utm_campaign_c,source_every_utm_content_c,source_every_utm_medium_c,source_every_utm_source_c,source_every_utm_term_c,source_first_utm_campaign_c,source_first_utm_content_c,source_first_utm_medium_c,source_first_utm_source_c,source_first_utm_term_c,source_last_utm_campaign_c,source_last_utm_content_c,source_last_utm_medium_c,source_last_utm_source_c,source_last_utm_term_c,direct_office_c,city_c,country_c,state_c,source_first_lead_source_category_c,source_last_lead_source_c,source_last_lead_source_category_c,source_last_lead_source_detail_c,source_every_lead_source_c,source_every_lead_source_category_c,source_every_lead_source_detail_c,source_first_lead_source_c,source_first_lead_source_detail_c,behavioral_score_c,demographic_score_c,drift_cql_c,unique_email_c,is_emea_event_routing_c,csi_code_c,csi_description_c,converted_date_time_c,lead_created_date_time_reporting_c,lead_iq_country_c,lead_iq_employee_count_c,lead_iq_employee_range_c,lead_iq_state_c,lead_iq_zip_code_c,zoominfo_country_c,zoominfo_employee_count_c,zoominfo_state_c,zoominfo_technologies_c,zoominfo_zip_code_c,attended_event_c,mql_date_c,user_gems_user_gems_id_c,dozisf_zoom_info_company_id_c,dozisf_zoom_info_first_updated_c,dozisf_zoom_info_id_c,dozisf_zoom_info_last_updated_c,lean_data_manual_route_trigger_c,first_mql_date_c,fivetran_account_association_date_c,fivetran_account_user_role_s_c,mql_reason_c,trial_contact_start_date_c,enrichment_request_c,meta_data_create_date_c,clarus_date_c,clarus_editor_c,clarus_notes_c,clarus_project_c,clarus_status_c,marketing_connector_interest_c,recent_marketing_campaign_status_c,salesloft_cadence_trigger_c,datawarehouse_used_c,contact_status_c,leandata_contact_owner_override_c,potential_fivetran_use_case_c,bizible_2_account_c,bizible_2_ad_campaign_name_ft_c,bizible_2_ad_campaign_name_lc_c,bizible_2_bizible_id_c,bizible_2_landing_page_ft_c,bizible_2_landing_page_lc_c,bizible_2_marketing_channel_ft_c,bizible_2_marketing_channel_lc_c,bizible_2_touchpoint_date_ft_c,bizible_2_touchpoint_date_lc_c,bizible_2_touchpoint_source_ft_c,bizible_2_touchpoint_source_lc_c,sales_email_opt_out_c,sales_email_opt_out_date_time_c,bombora_app_bombora_surge_record_count_c,bombora_app_bombora_last_date_time_updated_c,bombora_app_bombora_total_composite_score_c,linked_in_url_c,beta_connector_interest_c,user_gems_ug_past_infos_c,user_gems_ug_current_infos_c,user_gems_ug_created_by_ug_c,free_trial_email_confirmed_date_c,dnboptimizer_dn_bcontact_record_c,dnboptimizer_dn_bcompany_record_c,dnboptimizer_dnb_d_u_n_s_number_c,i_sell_oskey_id_c,verified_c,email_opt_out_date_time_c,pbf_startup_c,pbf_startup_certify_eligibility_c,engagio_intent_minutes_last_30_days_c,engagio_engagement_minutes_last_3_months_c,engagio_engagement_minutes_last_7_days_c,engagio_matched_account_c,engagio_first_engagement_date_c,engagio_match_time_c,engagio_department_c,engagio_role_c,legacy_hvr_id_c,hvr_channel_c,email_opt_in_double_c,phone_number_catch_all_c,contacts_domain_exists_c,utm_id_c,source_every_utm_id_c,source_last_utm_id_c,source_first_utm_id_c,do_not_sync_reason_marketo_c,_fivetran_active
2 | ,,,00537000003tmTnAAI,,,2019-11-11 17:23:34,2019-11-11 17:23:34,,0051G000007F2JGQA0,2019-11-11 17:23:34,,0031G00001QtDPlQAN,,00Q1G00000nDnM5UAK,/services/images/photo/00Q1G00000nDnM5UAK,,,,,,,,,h,,,0051G0000060XhiQAE,,TRUE,,FALSE,Converted,,,,Internet Software & Services,,2019-11-11 17:23:34,,,FALSE,,Z,H,h@gmail.com,,Croc,,,2019-11-11 17:23:34,,FALSE,,FALSE,FALSE,0011G00000tLWKnQAO,,,,,,,,280522000,,,,,,,,,,,,,,0,,1305025,FALSE,FALSE,,FALSE,,,FALSE,,,,,,,,FALSE,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,FALSE,,,,,,converted,geomecyvdvhj amazon,0011G00000fV7vHQAS,2019-11-11 17:23:34,,,,,,converted,,,,,,FALSE,,,,,,,,,,,,,,,,,,,Prospect,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,FALSE,,,,,,,TRUE,FALSE,FALSE,FALSE,,,,,,,,,,,,,,,,,,,,,,,,,,,2019-11-11 17:23:34,Metadata Lead Conversion - 04 ADS-2022-MetadataADS-Q1Y22-EMEA-DACH-ETLTools,Lead action,Milestone,,60,,3,,,0,,,0,FALSE,,,,,,,,,,,Q122-EMEA-DACH-ETLTools_SFDC,LinkedIn,paid_social,metadata,Q122 EMEA_Germany-SFDC,,,,,,,,,,,,,,0,,,,FALSE,,RAW,2019-11-11 17:23:34,2019-11-11 17:23:34,,,,,,,,,,,FALSE,,,,,,,FALSE,,,,Website,,FALSE,2019-11-11 17:23:34,,,,,,,,,,,,Unknown,,,,,,,,,,,,,FALSE,,,,,,,,,FALSE,,,,,,FALSE,,,FALSE,,,,,,,,,,,FALSE,,,,,,,,
--------------------------------------------------------------------------------
/integration_tests/seeds/sf_opportunity_data.csv:
--------------------------------------------------------------------------------
1 | _fivetran_synced,account_id,amount,campaign_id,close_date,created_date,description,expected_revenue,fiscal,fiscal_quarter,fiscal_year,forecast_category,forecast_category_name,has_open_activity,has_opportunity_line_item,has_overdue_task,id,is_closed,is_deleted,is_excluded_from_territory_2_filter,is_won,last_activity_date,last_referenced_date,last_viewed_date,lead_source,name,next_step,owner_id,pricebook_2_id,probability,record_type_id,stage_name,synced_quote_id,territory_2_id,type,_fivetran_active
2 | 2019-04-04 18:47:01,9CcfAt8qtZvCTwFvwOFLcg==,24120000,,2018-12-19 00:00:00,2018-12-19 19:51:13,,,JxJ3Au0JjyhOOUE/UvIeOw==,4,2018,A/SkeDD5c3ejUyEFFoUHHg==,A/SkeDD5c3ejUyEFFoUHHg==,false,true,false,006q000000HddohAAB,true,true,,true,,,,TDK+SgtPSM3Vk67zX9aeRA==,$1m deal,,rQhle3uwQbFgFmLTF1WByg==,lNUPfU1ue2nQimeN6QVNKQ==,1000,3QOHd+Q7F28PJtnwztV09Q==,GavUFuuf4DrnQAoiRGlWpQ==,,,+Gkf6SQ2fhAONAiFelNKVw==,true
3 | 2019-04-04 18:47:01,wfQo3+JVfsNIdcz/mUkZkA==,,,2018-12-18 00:00:00,2018-12-18 21:21:17,,,JxJ3Au0JjyhOOUE/UvIeOw==,4,2018,A/SkeDD5c3ejUyEFFoUHHg==,A/SkeDD5c3ejUyEFFoUHHg==,false,false,false,006q000000HdPzpAAF,true,true,,true,,,,Fbu50LvyXo0peN4RaMdJ3A==,Testing Opp Close,,nqxS50kwRjtOYb9ZB4/PoQ==,,100,3QOHd+Q7F28PJtnwztV09Q==,GavUFuuf4DrnQAoiRGlWpQ==,,,+Gkf6SQ2fhAONAiFelNKVw==,true
4 | 2018-12-18 18:20:30.829,wIXkC/s93lDAT+HVkwv6+A==,,,2018-12-18 00:00:00,2018-12-10 17:03:22,,,JxJ3Au0JjyhOOUE/UvIeOw==,4,2018,A/SkeDD5c3ejUyEFFoUHHg==,A/SkeDD5c3ejUyEFFoUHHg==,false,false,false,006q000000Hbmd1AAB,true,true,,true,,,,TDK+SgtPSM3Vk67zX9aeRA==,Test,,dVDxbGz10nJ2mKU213GZRQ==,,100,14mxIBMk0YX2Gz0r1Ktsuw==,GavUFuuf4DrnQAoiRGlWpQ==,,,+Gkf6SQ2fhAONAiFelNKVw==,true
5 | 2019-04-04 18:47:01,78HpxISq4/eSw+ycDPqSwA==,,,2018-12-13 00:00:00,2018-12-13 18:02:55,,,JxJ3Au0JjyhOOUE/UvIeOw==,4,2018,A/SkeDD5c3ejUyEFFoUHHg==,A/SkeDD5c3ejUyEFFoUHHg==,false,false,false,006q000000HcZXrAAN,true,true,,true,,,,pOz8cFdDlJkM8XvYPfSZ9w==,lu test 3,,9B1r0vK1wAVGaERpMleKGg==,,100,14mxIBMk0YX2Gz0r1Ktsuw==,GavUFuuf4DrnQAoiRGlWpQ==,,,+Gkf6SQ2fhAONAiFelNKVw==,true
6 | 2019-04-04 18:47:01,wfQo3+JVfsNIdcz/mUkZkA==,,,2018-12-07 00:00:00,2018-12-19 20:22:58,,,JxJ3Au0JjyhOOUE/UvIeOw==,4,2018,A/SkeDD5c3ejUyEFFoUHHg==,A/SkeDD5c3ejUyEFFoUHHg==,false,false,false,006q000000HddueAAB,true,true,,true,,,,dSJC2EuRkC62f+UuBPQeVg==,Chewbaca,,nqxS50kwRjtOYb9ZB4/PoQ==,,100,3QOHd+Q7F28PJtnwztV09Q==,GavUFuuf4DrnQAoiRGlWpQ==,,,dSJC2EuRkC62f+UuBPQeVg==,true
7 | 2019-04-04 18:47:01,TK5MTSsiOYoDQoJiSbkugA==,200000,,2018-11-21 00:00:00,2018-11-14 19:12:53,,,JxJ3Au0JjyhOOUE/UvIeOw==,4,2018,AloDHjNI+wntE4Eetriz+w==,AloDHjNI+wntE4Eetriz+w==,false,false,false,006q000000HK8jdAAD,true,true,,false,,,,MfuqnemFQBY2RwqM7YBkKA==,Evergreen Test,,QEaGoY7B8nGfro2vhOCMvA==,,0,14mxIBMk0YX2Gz0r1Ktsuw==,tXi3M8u3iPxq0ggxTSxMKw==,,,+Gkf6SQ2fhAONAiFelNKVw==,true
8 | 2019-04-04 18:47:01,78HpxISq4/eSw+ycDPqSwA==,,,2018-12-13 00:00:00,2018-12-13 18:00:11,,,JxJ3Au0JjyhOOUE/UvIeOw==,4,2018,AloDHjNI+wntE4Eetriz+w==,AloDHjNI+wntE4Eetriz+w==,false,false,false,006q000000HcZXXAA3,true,true,,false,,,,UN2fttk8geFc7Db/xJzQ+A==,lu test 1,,9B1r0vK1wAVGaERpMleKGg==,,0,14mxIBMk0YX2Gz0r1Ktsuw==,tXi3M8u3iPxq0ggxTSxMKw==,,,+Gkf6SQ2fhAONAiFelNKVw==,false
9 | 2019-04-04 18:47:01,tZX+Z0iWzZHHjNvRnCJzwg==,1,,2018-10-31 00:00:00,2018-10-31 17:43:42,,,JxJ3Au0JjyhOOUE/UvIeOw==,4,2018,AloDHjNI+wntE4Eetriz+w==,AloDHjNI+wntE4Eetriz+w==,false,false,false,006q000000GoP76AAF,true,true,,false,,,,,Blue Test -,,TLZtnkcZltX8lijWYSQqRg==,,0,14mxIBMk0YX2Gz0r1Ktsuw==,tXi3M8u3iPxq0ggxTSxMKw==,,,+Gkf6SQ2fhAONAiFelNKVw==,true
10 | 2019-04-04 18:47:01,78HpxISq4/eSw+ycDPqSwA==,,,2018-12-13 00:00:00,2018-12-13 18:01:22,,,JxJ3Au0JjyhOOUE/UvIeOw==,4,2018,AloDHjNI+wntE4Eetriz+w==,AloDHjNI+wntE4Eetriz+w==,false,false,false,006q000000HcZXcAAN,true,true,,false,,,,pOz8cFdDlJkM8XvYPfSZ9w==,lu test 2,,AwxR76rxgr77EfSnTHH57Q==,,0,14mxIBMk0YX2Gz0r1Ktsuw==,tXi3M8u3iPxq0ggxTSxMKw==,,,9Q0PuStPWLYgxG/8kpvo5g==,true
11 | 2019-04-04 18:47:01,wIXkC/s93lDAT+HVkwv6+A==,210000,,2018-12-19 00:00:00,2018-12-18 17:56:05,,,JxJ3Au0JjyhOOUE/UvIeOw==,4,2018,rq6uxRtOa4gSLxCtlqjecg==,rq6uxRtOa4gSLxCtlqjecg==,false,true,false,006q000000HdOhuAAF,false,true,,false,,,,Fbu50LvyXo0peN4RaMdJ3A==,Testing Order from Process,,dVDxbGz10nJ2mKU213GZRQ==,5x2qfGToAOo3bmSNM8fPjg==,65,3QOHd+Q7F28PJtnwztV09Q==,9RN9J3tlxr89gDctReax5w==,,,+Gkf6SQ2fhAONAiFelNKVw==,false
12 |
--------------------------------------------------------------------------------
/integration_tests/seeds/sf_opportunity_history_data.csv:
--------------------------------------------------------------------------------
1 | _fivetran_active,_fivetran_start,_fivetran_end,_fivetran_synced,account_id,amount,campaign_id,close_date,created_date,description,expected_revenue,fiscal,fiscal_quarter,fiscal_year,forecast_category,forecast_category_name,has_open_activity,has_opportunity_line_item,has_overdue_task,id,is_closed,is_deleted,is_won,last_activity_date,last_referenced_date,last_viewed_date,lead_source,name,next_step,owner_id,probability,record_type_id,stage_name,synced_quote_id,type
2 | true,2019-10-17 21:10:19,9999-12-31 23:59:59,2019-04-04 18:47:01,9CcfAt8qtZvCTwFvwOFLcg==,24120000,,2018-12-19 00:00:00,2018-12-19 19:51:13,,,JxJ3Au0JjyhOOUE/UvIeOw==,4,2018,A/SkeDD5c3ejUyEFFoUHHg==,A/SkeDD5c3ejUyEFFoUHHg==,false,true,false,006q000000HddohAAB,true,true,true,,,,TDK+SgtPSM3Vk67zX9aeRA==,$1m deal,,rQhle3uwQbFgFmLTF1WByg==,1000,3QOHd+Q7F28PJtnwztV09Q==,GavUFuuf4DrnQAoiRGlWpQ==,,+Gkf6SQ2fhAONAiFelNKVw==
3 | true,2019-10-17 21:33:00,9999-12-31 23:59:59,2019-04-04 18:47:01,wfQo3+JVfsNIdcz/mUkZkA==,,,2018-12-18 00:00:00,2018-12-18 21:21:17,,,JxJ3Au0JjyhOOUE/UvIeOw==,4,2018,A/SkeDD5c3ejUyEFFoUHHg==,A/SkeDD5c3ejUyEFFoUHHg==,false,false,false,006q000000HdPzpAAF,true,true,true,,,,Fbu50LvyXo0peN4RaMdJ3A==,Testing Opp Close,,nqxS50kwRjtOYb9ZB4/PoQ==,100,3QOHd+Q7F28PJtnwztV09Q==,GavUFuuf4DrnQAoiRGlWpQ==,,+Gkf6SQ2fhAONAiFelNKVw==
4 | true,2019-04-04 18:36:08,9999-12-31 23:59:59,2018-12-18 18:20:30.829,wIXkC/s93lDAT+HVkwv6+A==,,,2018-12-18 00:00:00,2018-12-10 17:03:22,,,JxJ3Au0JjyhOOUE/UvIeOw==,4,2018,A/SkeDD5c3ejUyEFFoUHHg==,A/SkeDD5c3ejUyEFFoUHHg==,false,false,false,006q000000Hbmd1AAB,true,true,true,,,,TDK+SgtPSM3Vk67zX9aeRA==,Test,,dVDxbGz10nJ2mKU213GZRQ==,100,14mxIBMk0YX2Gz0r1Ktsuw==,GavUFuuf4DrnQAoiRGlWpQ==,,+Gkf6SQ2fhAONAiFelNKVw==
5 | true,2019-04-04 18:36:08,9999-12-31 23:59:59,2019-04-04 18:47:01,78HpxISq4/eSw+ycDPqSwA==,,,2018-12-13 00:00:00,2018-12-13 18:02:55,,,JxJ3Au0JjyhOOUE/UvIeOw==,4,2018,A/SkeDD5c3ejUyEFFoUHHg==,A/SkeDD5c3ejUyEFFoUHHg==,false,false,false,006q000000HcZXrAAN,true,true,true,,,,pOz8cFdDlJkM8XvYPfSZ9w==,lu test 3,,9B1r0vK1wAVGaERpMleKGg==,100,14mxIBMk0YX2Gz0r1Ktsuw==,GavUFuuf4DrnQAoiRGlWpQ==,,+Gkf6SQ2fhAONAiFelNKVw==
6 | true,2019-04-04 18:36:08,9999-12-31 23:59:59,2019-04-04 18:47:01,wfQo3+JVfsNIdcz/mUkZkA==,,,2018-12-07 00:00:00,2018-12-19 20:22:58,,,JxJ3Au0JjyhOOUE/UvIeOw==,4,2018,A/SkeDD5c3ejUyEFFoUHHg==,A/SkeDD5c3ejUyEFFoUHHg==,false,false,false,006q000000HddueAAB,true,true,true,,,,dSJC2EuRkC62f+UuBPQeVg==,Chewbaca,,nqxS50kwRjtOYb9ZB4/PoQ==,100,3QOHd+Q7F28PJtnwztV09Q==,GavUFuuf4DrnQAoiRGlWpQ==,,dSJC2EuRkC62f+UuBPQeVg==
7 | true,2019-04-04 18:36:08,9999-12-31 23:59:59,2019-04-04 18:47:01,TK5MTSsiOYoDQoJiSbkugA==,200000,,2018-11-21 00:00:00,2018-11-14 19:12:53,,,JxJ3Au0JjyhOOUE/UvIeOw==,4,2018,AloDHjNI+wntE4Eetriz+w==,AloDHjNI+wntE4Eetriz+w==,false,false,false,006q000000HK8jdAAD,true,true,false,,,,MfuqnemFQBY2RwqM7YBkKA==,Evergreen Test,,QEaGoY7B8nGfro2vhOCMvA==,0,14mxIBMk0YX2Gz0r1Ktsuw==,tXi3M8u3iPxq0ggxTSxMKw==,,+Gkf6SQ2fhAONAiFelNKVw==
8 | false,2019-04-03 18:36:06,2019-04-04 18:36:07,2019-04-04 18:47:01,78HpxISq4/eSw+ycDPqSwA==,,,2018-12-13 00:00:00,2018-12-13 18:00:11,,,JxJ3Au0JjyhOOUE/UvIeOw==,4,2018,AloDHjNI+wntE4Eetriz+w==,AloDHjNI+wntE4Eetriz+w==,false,false,false,006q000000HcZXXAA3,true,true,false,,,,UN2fttk8geFc7Db/xJzQ+A==,lu test 1,,9B1r0vK1wAVGaERpMleKGg==,0,14mxIBMk0YX2Gz0r1Ktsuw==,tXi3M8u3iPxq0ggxTSxMKw==,,+Gkf6SQ2fhAONAiFelNKVw==
9 | true,2019-04-04 18:36:08,9999-12-31 23:59:59,2019-04-04 18:47:01,tZX+Z0iWzZHHjNvRnCJzwg==,1,,2018-10-31 00:00:00,2018-10-31 17:43:42,,,JxJ3Au0JjyhOOUE/UvIeOw==,4,2018,AloDHjNI+wntE4Eetriz+w==,AloDHjNI+wntE4Eetriz+w==,false,false,false,006q000000GoP76AAF,true,true,false,,,,,Blue Test -,,TLZtnkcZltX8lijWYSQqRg==,0,14mxIBMk0YX2Gz0r1Ktsuw==,tXi3M8u3iPxq0ggxTSxMKw==,,+Gkf6SQ2fhAONAiFelNKVw==
10 | true,2019-04-04 18:36:08,9999-12-31 23:59:59,2019-04-04 18:47:01,78HpxISq4/eSw+ycDPqSwA==,,,2018-12-13 00:00:00,2018-12-13 18:01:22,,,JxJ3Au0JjyhOOUE/UvIeOw==,4,2018,AloDHjNI+wntE4Eetriz+w==,AloDHjNI+wntE4Eetriz+w==,false,false,false,006q000000HcZXcAAN,true,true,false,,,,pOz8cFdDlJkM8XvYPfSZ9w==,lu test 2,,AwxR76rxgr77EfSnTHH57Q==,0,14mxIBMk0YX2Gz0r1Ktsuw==,tXi3M8u3iPxq0ggxTSxMKw==,,9Q0PuStPWLYgxG/8kpvo5g==
11 | false,2019-04-03 18:36:06,2019-04-04 18:36:07,2019-04-04 18:47:01,wIXkC/s93lDAT+HVkwv6+A==,210000,,2018-12-19 00:00:00,2018-12-18 17:56:05,,,JxJ3Au0JjyhOOUE/UvIeOw==,4,2018,rq6uxRtOa4gSLxCtlqjecg==,rq6uxRtOa4gSLxCtlqjecg==,false,true,false,006q000000HdOhuAAF,false,true,false,,,,Fbu50LvyXo0peN4RaMdJ3A==,Testing Order from Process,,dVDxbGz10nJ2mKU213GZRQ==,65,3QOHd+Q7F28PJtnwztV09Q==,9RN9J3tlxr89gDctReax5w==,,+Gkf6SQ2fhAONAiFelNKVw==
--------------------------------------------------------------------------------
/integration_tests/seeds/sf_opportunity_line_item_data.csv:
--------------------------------------------------------------------------------
1 | product_2_id,quantity,total_price,description,discount,last_modified_date,list_price,product_code,unit_price,_fivetran_synced,is_deleted,opportunity_id,last_modified_by_id,service_date,system_modstamp,name,id,created_by_id,created_date,sort_order,pricebook_entry_id,one_saas_app_included_c,one_saas_app_quantity_invoiced_c,one_saas_app_quantity_not_invoiced_c,has_quantity_schedule,has_revenue_schedule,has_schedule,event_volume_c,roadmap_connections_c,row_volume_c,months_c,netsuite_conn_term_contract_pricing_type_c,netsuite_conn_discount_item_c,netsuite_conn_user_entered_sales_price_c,netsuite_conn_item_category_c,netsuite_conn_terms_c,netsuite_conn_net_suite_item_key_id_c,netsuite_conn_pushed_from_net_suite_c,netsuite_conn_end_date_c,netsuite_conn_list_rate_c,netsuite_conn_from_contract_item_id_c,netsuite_conn_start_date_c,netsuite_conn_net_suite_item_id_import_c,sbqq_parent_id_c,sbqq_quote_line_c,sbqq_subscription_type_c,product_family_c,last_referenced_date,last_viewed_date,celigo_sfnsio_contract_item_id_c,celigo_sfnsio_contract_term_c,celigo_sfnsio_end_date_c,celigo_sfnsio_list_rate_c,celigo_sfnsio_net_suite_line_id_c,celigo_sfnsio_start_date_c,product_code_stamped_c,hvr_use_case_c,_fivetran_active
2 | 01 1G000000bUE8QAM,1,0,,,2019-11-11 17:23:34,0,a,0,2019-11-11 17:23:34,FALSE,0061G00000Ja7B6QAJ,0051G000005MumpQAC,,2019-11-11 17:23:34,plan a,00k1G00000A3iyqQAB,0051G0000060rqhQAA,2019-11-11 17:23:34,,01u1G000002Ks75QAC,,,,,,,,,,12,,,,,,,FALSE,,,,,,,a4R1G000000S2a6UAC,X,Usage,,,,,,,,,,FALSE,
3 | 01 1G000000bH0WQAU,6,5100,,,2019-11-11 17:23:34,1000,b,850,2019-11-11 17:23:34,,0061G00000HhviAQAR,0051G000005MumuQAC,,2019-11-11 17:23:34,plan b,00k1G000009ar5IQAQ,0051G000005MumuQAC,2019-11-11 17:23:34,,01u1G000002Kbu5QAC,,,,,,,,,,12,,,,,,,FALSE,,,,,,,a4R1G000000XqhrUAC,X,,,,,,,,,,,,
4 | 01 1G000000bH0bQAE,50,38093,,,2019-11-11 17:23:34,1500,d,761.86,2019-11-11 17:23:34,,0061G00000HhviAQAR,0051G000005MumuQAC,,2019-11-11 17:23:34,self serve,00k1G000009a jwQAA,0051G000005MumuQAC,2019-11-11 17:23:34,,01u1G000002KbuAQAS,,,,,,,,,,12,,,,,,,FALSE,,,,,,,a4R1G000000XsCJUA0,Renewable,,,,,,,,,,,,
5 | 01 1G000000bH0bQAE,66,84250.32,,,2019-11-11 17:23:34,1500,e,1276.52,2019-11-11 17:23:34,,0061G00000HhviAQAR,0051G000005MumuQAC,,2019-11-11 17:23:34,sof serve,00k1G000009ar5JQAQ,0051G000005MumuQAC,2019-11-11 17:23:34,,01u1G000002KbuAQAS,,,,,,,,,,12,,,,,,,FALSE,,,,,,,a4R1G000000XqhsUAC,Renewable,,,,,,,,,,,,
6 | 01 1G000000bH1NQAU,4,4000,,,2019-11-11 17:23:34,1000,f,1000,2019-11-11 17:23:34,,0061G00000HhviAQAR,0051G000005MumuQAC,,2019-11-11 17:23:34,sof ware,00k1G000009ar5GQAQ,0051G000005MumuQAC,2019-11-11 17:23:34,,01u1G000002KbuwQAC,,,,,,,,,,12,,,,,,,FALSE,,,,,,,a4R1G000000XqhoUAC,Renewable,,,,,,,,,,,,
7 | 01 1G000000bH05QAE,18,162000,,,2019-11-11 17:23:34,12000,p,9000,2019-11-11 17:23:34,,0061G00000HhviAQAR,0051G000005MumuQAC,,2019-11-11 17:23:34,plan d,00k1G000009ar5HQAQ,0051G000005MumuQAC,2019-11-11 17:23:34,,01u1G000002KbvfQAC,,,,,,,,,,12,,,,,,,FALSE,,,,,,,a4R1G000000XqhqUAC,Renewable,,,,,,,,,,,,
8 | 01 1G000000bH pQAE,1,0,,,2019-11-11 17:23:34,0,l,0,2019-11-11 17:23:34,,0061G00000Is1 QAJ,0051G000005MumuQAC,,2019-11-11 17:23:34,plan e,00k1G000009al6CQAQ,0051G000005MumuQAC,2019-11-11 17:23:34,,01u1G000002Kc PQAS,,,,,,,,,,12,,,,,,,FALSE,,,,,,,a4R1G000000Xr kUAK,Renewable,,,,,,,,,,,,
9 | 01 1G000000bH pQAE,1,0,,,2019-11-11 17:23:34,0,m,0,2019-11-11 17:23:34,,0061G00000HhviAQAR,0051G000005MumuQAC,,2019-11-11 17:23:34,plan f,00k1G000009aYhMQAU,0051G000005MumuQAC,2019-11-11 17:23:34,,01u1G000002Kc PQAS,,,,,,,,,,12,,,,,,,FALSE,,,,,,,a4R1G000000XqhmUAC,Renewable,,,,,,,,,,,,
10 | 01 1G000000bH pQAE,1,0,,,2019-11-11 17:23:34,0,n,0,2019-11-11 17:23:34,,0061G00000IsgqwQAB,0051G000005MumuQAC,,2019-11-11 17:23:34,plan g,00k1G000009auVBQAY,0051G000005MumuQAC,2019-11-11 17:23:34,,01u1G000002Kc PQAS,,,,,,,,,,12,,,,,,,FALSE,,,,,,,a4R1G000000XsYWUA0,Renewable,,,,,,,,,,,,
11 | 01 1G000000bH0yQAE,1,2045.45,,,2019-11-11 17:23:34,2000,s,2045.45,2019-11-11 17:23:34,,0061G00000I L0vQAF,0051G000005MumuQAC,,2019-11-11 17:23:34,plan h,00k1G000009b6cCQAQ,0051G000005MumuQAC,2019-11-11 17:23:34,,01u1G000002Kc qQAC,,,,,,,,,,12,,,,,,,FALSE,,,,,,00k1G000009b6cAQAQ,a4R1G000000X xmUAC,Renewable,,,,,,,,,,,,
--------------------------------------------------------------------------------
/integration_tests/seeds/sf_order_data.csv:
--------------------------------------------------------------------------------
1 | id,_fivetran_synced,account_id,activated_by_id,activated_date,billing_city,billing_country,billing_country_code,billing_geocode_accuracy,billing_latitude,billing_longitude,billing_postal_code,billing_state,billing_state_code,billing_street,company_authorized_by_id,contract_id,created_by_id,created_date,customer_authorized_by_id,description,effective_date,end_date,is_deleted,is_reduction_order,last_modified_by_id,last_modified_date,last_referenced_date,last_viewed_date,order_number,original_order_id,owner_id,pricebook_2_id,shipping_city,shipping_country,shipping_country_code,shipping_geocode_accuracy,shipping_latitude,shipping_longitude,shipping_postal_code,shipping_state,shipping_state_code,shipping_street,status,status_code,system_modstamp,total_amount,type,netsuite_conn_celigo_update_c,netsuite_conn_net_suite_id_c,netsuite_conn_net_suite_sync_err_c,netsuite_conn_pushed_from_net_suite_c,netsuite_conn_opportunity_c,netsuite_conn_net_suite_order_status_c,netsuite_conn_sync_in_progress_c,netsuite_conn_tax_total_c,netsuite_conn_tracking_numbers_c,netsuite_conn_push_to_net_suite_c,netsuite_conn_document_id_c,netsuite_conn_subtotal_c,netsuite_conn_discount_total_c,netsuite_conn_total_c,netsuite_conn_net_suite_order_date_c,netsuite_conn_ship_date_c,netsuite_conn_quote_c,netsuite_conn_net_suite_order_number_c,sbqq_contracted_c,sbqq_contracting_method_c,sbqq_payment_term_c,sbqq_price_calc_status_c,sbqq_price_calc_status_message_c,sbqq_quote_c,sbqq_renewal_term_c,sbqq_renewal_uplift_rate_c,ava_sfcpq_ava_tax_message_c,ava_sfcpq_entity_use_code_c,ava_sfcpq_invoice_message_c,ava_sfcpq_is_seller_importer_of_record_c,ava_sfcpq_order_calculate_tax_c,ava_sfcpq_sales_tax_amount_c,blng_bill_now_c,blng_billing_account_c,blng_billing_day_of_month_c,blng_invoice_batch_c,amendment_type_c,credit_summary_c,evergreen_c,invoicing_type_c,legal_entity_c,prepaid_billing_frequency_c,prepaid_order_c,update_subscriptions_only_c,order_auto_activated_c,synced_to_net_suite_c,purchase_order_number_c,celigo_sfnsio_discount_total_net_suite_c,celigo_sfnsio_net_suite_id_c,celigo_sfnsio_net_suite_order_number_c,celigo_sfnsio_net_suite_order_status_c,celigo_sfnsio_net_suite_record_c,celigo_sfnsio_ship_date_c,celigo_sfnsio_skip_export_to_net_suite_c,celigo_sfnsio_sub_total_net_suite_c,celigo_sfnsio_tax_total_net_suite_c,celigo_sfnsio_test_mode_record_c,celigo_sfnsio_total_net_suite_c,amend_with_rollover_spend_type_c,customer_spend_type_c,order_spend_type_c,opportunity_id,purchase_summary_c,is_hvr_legacy_order_c,ironclad_workflow_c,_fivetran_active
2 | 8011G000000XFeOQAW,2019-11-11 17:23:34,0011G00000gY0y4QAC,0051G000005MumuQAC,2019-11-11 17:23:34,"New York, NY",United States,,,,,USA,55555-1502,,123 Ave,,,0051G000005MumuQAC,2019-11-11 17:23:34,,,2019-11-11 17:23:34,,FALSE,FALSE,0051G000005MunnQAC,2019-11-11 17:23:34,,,5392,,0051G000005MumuQAC,01s1G000001N7EKQA0,New York,United States,,,,,55555,New York,,123 Ave,Activated,Activated,2019-11-11 17:23:34,0,New,FALSE,934887,,FALSE,,,FALSE,,,FALSE,,,,,2019-11-11 17:23:34,,,SO4866,TRUE,By Subscription End Date,Net 30,Not Needed,,a4V1G000000TpflUAC,,,Tax Amount Is Up To Date,,,FALSE,FALSE,,FALSE,0011G00000gY0y4QAC,1,Domestic (US),,,FALSE,Other,a8k1G000000k9d4QAA,,FALSE,FALSE,FALSE,FALSE,,,,,,,,FALSE,,,FALSE,,FALSE,,,,,,,
3 | 8011G000000XFePQAW,2019-11-11 17:23:34,0011G00000gY0y4QAC,0051G000005MumuQAC,2019-11-11 17:23:34,"New York, NY",United States,,,,,USA,55555-1502,,123 Ave,,,0051G000005MumuQAC,2019-11-11 17:23:34,,,2019-11-11 17:23:34,,FALSE,FALSE,0051G000005MunnQAC,2019-11-11 17:23:34,,,5393,,0051G000005MumuQAC,01s1G000001N7EKQA0,New York,United States,,,,,55555,New York,,123 Ave,Activated,Activated,2019-11-11 17:23:34,27998.6,New,FALSE,1058073,,FALSE,,Pending Approval,FALSE,2000,,FALSE,,10,,10,2019-11-11 17:23:34,,,SO4871,TRUE,By Subscription End Date,Net 30,Not Needed,,a4V1G000000TpflUAC,,,Tax Amount Is Up To Date,,,FALSE,FALSE,,FALSE,0011G00000gY0y4QAC,30,Daily,,a9e1G000000KztBQAS,FALSE,Prepaid Credits,a8k1G000000k9d4QAA,Annual,FALSE,FALSE,FALSE,FALSE,,,1058073,,,,,FALSE,,,FALSE,,FALSE,,,,,,,
4 | 8011G000000XDsxQAG,2019-11-11 17:23:34,0011G00000f8IrIQAU,0051G000005MumuQAC,2019-11-11 17:23:34,New York,United States,,,,,55555,New York,,123 Ave,,,0051G000005MumuQAC,2019-11-11 17:23:34,,,2019-11-11 17:23:34,,FALSE,FALSE,0051G000005MunnQAC,2019-11-11 17:23:34,,,2597,,0051G000005MumuQAC,01s1G000001N7EKQA0,New York,United States,,,,,55555,New York,,123 Ave,Activated,Activated,2019-11-11 17:23:34,0,New,FALSE,934740,,FALSE,,,FALSE,,,FALSE,,,,,2019-11-11 17:23:34,,,SO4746,TRUE,By Subscription End Date,Net 30,Not Needed,,a4V1G000000TpGCUA0,,,Tax Amount Is Up To Date,,,FALSE,FALSE,,FALSE,0011G00000f8IrIQAU,1,Domestic (US),,,FALSE,Other,a8k1G000000k9d4QAA,,FALSE,FALSE,FALSE,FALSE,,,,,,,,FALSE,,,FALSE,,FALSE,,,,,,,
5 | 8011G000000XDsyQAG,2019-11-11 17:23:34,0011G00000f8IrIQAU,0051G000005MumuQAC,2019-11-11 17:23:34,New York,United States,,,,,55555,New York,,123 Ave,,,0051G000005MumuQAC,2019-11-11 17:23:34,,,2019-11-11 17:23:34,,FALSE,FALSE,0051G000005MunnQAC,2019-11-11 17:23:34,,,2598,,0051G000005MumuQAC,01s1G000001N7EKQA0,New York,United States,,,,,55555,New York,,123 Ave,Activated,Activated,2019-11-11 17:23:34,1200,New,FALSE,1057821,,FALSE,,Pending Billing,FALSE,0,,FALSE,,10,,10,2019-11-11 17:23:34,,,SO3983,TRUE,By Subscription End Date,Net 30,Not Needed,,a4V1G000000TpGCUA0,,,Tax Amount Is Up To Date,,,FALSE,FALSE,,FALSE,0011G00000f8IrIQAU,30,Daily,,a9e1G000000TNSGQA4,FALSE,Prepaid Credits,a8k1G000000k9d4QAA,Annual,FALSE,FALSE,FALSE,FALSE,,,1057821,,,,,FALSE,,,FALSE,,FALSE,,,,,,,
6 | 8011G000000XDseQAG,2019-11-11 17:23:34,0011G00000fIPsfQAG,0051G000005MumuQAC,2019-11-11 17:23:34,Baltimore,United States,,,,,55555,MD,,123 Ave,,,0051G000005MumuQAC,2019-11-11 17:23:34,,,2019-11-11 17:23:34,,FALSE,FALSE,0051G000005MunnQAC,2019-11-11 17:23:34,,,2591,,0051G000005MumuQAC,01s1G000001N7EKQA0,Baltimore,United States,,,,,55555,Maryland,,123 Ave,Activated,Activated,2019-11-11 17:23:34,20400,New,FALSE,1057817,,FALSE,,Pending Approval,FALSE,0,,FALSE,,10,,10,2019-11-11 17:23:34,,,SO3978,TRUE,By Subscription End Date,Net 30,Not Needed,,a4V1G000000TpCtUAK,,,No Tax Required,,,FALSE,FALSE,,FALSE,0011G00000fIPsfQAG,30,Daily,,a9e1G000000KzojQAC,FALSE,Prepaid Credits,a8k1G000000k9d4QAA,Annual,FALSE,FALSE,FALSE,FALSE,,,1057817,,,,,FALSE,,,FALSE,,FALSE,,,,,,,
7 | 8011G000000XDsdQAG,2019-11-11 17:23:34,0011G00000fIPsfQAG,0051G000005MumuQAC,2019-11-11 17:23:34,Baltimore,United States,,,,,55555,MD,,123 Ave,,,0051G000005MumuQAC,2019-11-11 17:23:34,,,2019-11-11 17:23:34,,FALSE,FALSE,0051G000005MunnQAC,2019-11-11 17:23:34,,,2590,,0051G000005MumuQAC,01s1G000001N7EKQA0,Baltimore,United States,,,,,55555,Maryland,,123 Ave,Activated,Activated,2019-11-11 17:23:34,0,New,FALSE,934761,,FALSE,,,FALSE,,,FALSE,,,,,2019-11-11 17:23:34,,,SO4763,TRUE,By Subscription End Date,Net 30,Not Needed,,a4V1G000000TpCtUAK,,,No Tax Required,,,FALSE,FALSE,,FALSE,0011G00000fIPsfQAG,1,Domestic (US),,,FALSE,Other,a8k1G000000k9d4QAA,,FALSE,FALSE,FALSE,FALSE,,,,,,,,FALSE,,,FALSE,,FALSE,,,,,,,
8 | 8011G000000XIK8QAO,2019-11-11 17:23:34,0011G00000nKDIvQAO,0051G000005MumuQAC,2019-11-11 17:23:34,Fort Lauderdale,United States,,,,,55555,Florida,,123 Ave,,,0051G000005MumuQAC,2019-11-11 17:23:34,,,2019-11-11 17:23:34,,FALSE,FALSE,0051G000005MunnQAC,2019-11-11 17:23:34,,,8359,,0051G000005MumuQAC,01s1G000001N7EKQA0,Fort Lauderdale,United States,,,,,55555,Florida,,123 Ave,Activated,Activated,2019-11-11 17:23:34,4500,New,FALSE,1058653,,FALSE,,,FALSE,0,,FALSE,,10,,10,2019-11-11 17:23:34,,,SO6556,TRUE,By Subscription End Date,Net 30,Not Needed,,a4V1G000000Tv9vUAC,,,No Tax Required,,,FALSE,FALSE,,FALSE,0011G00000nKDIvQAO,25,Daily,,a9e1G000000L1n3QAC,FALSE,Prepaid Credits,a8k1G000000k9d4QAA,,FALSE,FALSE,FALSE,FALSE,,,1058653,SO6556,,google.com,,FALSE,,,TRUE,,FALSE,,,,,,,
9 | 8011G000000XIK7QAO,2019-11-11 17:23:34,0011G00000nKDIvQAO,0051G000005MumuQAC,2019-11-11 17:23:34,Fort Lauderdale,United States,,,,,55555,Florida,,123 Ave,,,0051G000005MumuQAC,2019-11-11 17:23:34,,,2019-11-11 17:23:34,,FALSE,FALSE,0051G000005MumuQAC,2019-11-11 17:23:34,,,8358,,0051G000005MumuQAC,01s1G000001N7EKQA0,Fort Lauderdale,United States,,,,,55555,Florida,,123 Ave,Activated,Activated,2019-11-11 17:23:34,0,New,FALSE,,,FALSE,,,FALSE,,,FALSE,,,,,2019-11-11 17:23:34,,,,TRUE,By Subscription End Date,Net 30,Not Needed,,a4V1G000000Tv9vUAC,,,No Tax Required,,,FALSE,FALSE,,FALSE,0011G00000nKDIvQAO,1,Domestic (US),,,FALSE,Other,a8k1G000000k9d4QAA,,FALSE,FALSE,FALSE,FALSE,,,,,,,,FALSE,,,FALSE,,FALSE,,,,,,,
10 | 8011G000000XChLQAW,2019-11-11 17:23:34,0011G00000gZNEkQAO,0051G000005MumuQAC,2019-11-11 17:23:34,Tampa,United States,,,,,55555,Florida,,123 Ave,,,0051G000005MumuQAC,2019-11-11 17:23:34,,,2019-11-11 17:23:34,,FALSE,FALSE,0051G000005MunnQAC,2019-11-11 17:23:34,,,1354,,0051G000005MumuQAC,01s1G000001N7EKQA0,Tampa,United States,,,,,55555,Florida,,123 Ave,Activated,Activated,2019-11-11 17:23:34,702,New,FALSE,1057423,,FALSE,,Pending Approval,FALSE,0,,FALSE,,10,,10,2019-11-11 17:23:34,,,SO4466,TRUE,By Subscription End Date,Net 30,Not Needed,,a4V1G000000TnQAUA0,,,No Tax Required,,,FALSE,FALSE,,FALSE,0011G00000gZNEkQAO,28,Daily,,a9e1G000000TNOiQAO,FALSE,Prepaid Credits,a8k1G000000k9d4QAA,Annual,FALSE,FALSE,FALSE,FALSE,,,1057423,,,,,FALSE,,,FALSE,,FALSE,,,,,,,
11 | 8011G000000XChKQAW,2019-11-11 17:23:34,0011G00000gZNEkQAO,0051G000005MumuQAC,2019-11-11 17:23:34,Tampa,United States,,,,,55555,Florida,,123 Ave,,,0051G000005MumuQAC,2019-11-11 17:23:34,,,2019-11-11 17:23:34,,FALSE,FALSE,0051G000005MunnQAC,2019-11-11 17:23:34,,,1353,,0051G000005MumuQAC,01s1G000001N7EKQA0,Tampa,United States,,,,,55555,Florida,,123 Ave,Activated,Activated,2019-11-11 17:23:34,0,New,FALSE,934394,,FALSE,,,FALSE,,,FALSE,,,,,2019-11-11 17:23:34,,,SO4465,TRUE,By Subscription End Date,Net 30,Not Needed,,a4V1G000000TnQAUA0,,,No Tax Required,,,FALSE,FALSE,,FALSE,0011G00000gZNEkQAO,1,Domestic (US),,,FALSE,Other,a8k1G000000k9d4QAA,,FALSE,FALSE,FALSE,FALSE,,,,,,,,FALSE,,,FALSE,,FALSE,,,,,,,
--------------------------------------------------------------------------------
/integration_tests/seeds/sf_product_2_data.csv:
--------------------------------------------------------------------------------
1 | last_referenced_date,is_active,description,last_modified_date,record_type_id,product_code,_fivetran_synced,last_viewed_date,is_deleted,last_modified_by_id,system_modstamp,name,id,created_by_id,created_date,family,max_volume_c,min_volume_c,request_name_c,default_quantity_c,account_c,related_product_c,picklist_value_c,as_input_c,as_output_c,status_c,number_of_quantity_installments,number_of_revenue_installments,quantity_installment_period,quantity_schedule_type,revenue_installment_period,revenue_schedule_type,connections_c,event_volume_c,roadmap_connections_c,row_volume_c,display_url,external_data_source_id,external_id,quantity_unit_of_measure,stock_keeping_unit,features_c,tier_3_price_c,tier_2_price_c,tier_4_price_c,tier_1_price_c,netsuite_conn_sync_in_progress_c,netsuite_conn_celigo_update_c,netsuite_conn_term_contract_pricing_type_c,netsuite_conn_net_suite_id_c,netsuite_conn_net_suite_sync_err_c,netsuite_conn_push_to_net_suite_c,netsuite_conn_item_category_c,netsuite_conn_net_suite_item_type_c,netsuite_conn_sub_type_c,is_new_c,product_metadata_c,product_metadata_del_c,sbqq_asset_amendment_behavior_c,sbqq_asset_conversion_c,sbqq_batch_quantity_c,sbqq_billing_frequency_c,sbqq_billing_type_c,sbqq_block_pricing_field_c,sbqq_charge_type_c,sbqq_component_c,sbqq_compound_discount_rate_c,sbqq_configuration_event_c,sbqq_configuration_field_set_c,sbqq_configuration_fields_c,sbqq_configuration_form_title_c,sbqq_configuration_type_c,sbqq_configuration_validator_c,sbqq_configured_code_pattern_c,sbqq_configured_description_pattern_c,sbqq_cost_editable_c,sbqq_cost_schedule_c,sbqq_custom_configuration_page_c,sbqq_custom_configuration_required_c,sbqq_customer_community_availability_c,sbqq_default_pricing_table_c,sbqq_default_quantity_c,sbqq_description_locked_c,sbqq_discount_category_c,sbqq_discount_schedule_c,sbqq_dynamic_pricing_constraint_c,sbqq_exclude_from_maintenance_c,sbqq_exclude_from_opportunity_c,sbqq_externally_configurable_c,sbqq_generate_contracted_price_c,sbqq_has_configuration_attributes_c,sbqq_has_consumption_schedule_c,sbqq_hidden_c,sbqq_hide_price_in_search_results_c,sbqq_include_in_maintenance_c,sbqq_new_quote_group_c,sbqq_non_discountable_c,sbqq_non_partner_discountable_c,sbqq_option_layout_c,sbqq_option_selection_method_c,sbqq_optional_c,sbqq_price_editable_c,sbqq_pricing_method_c,sbqq_pricing_method_editable_c,sbqq_product_picture_id_c,sbqq_quantity_editable_c,sbqq_quantity_scale_c,sbqq_reconfiguration_disabled_c,sbqq_renewal_product_c,sbqq_sort_order_c,sbqq_specifications_c,sbqq_subscription_base_c,sbqq_subscription_category_c,sbqq_subscription_percent_c,sbqq_subscription_pricing_c,sbqq_subscription_target_c,sbqq_subscription_term_c,sbqq_subscription_type_c,sbqq_tax_code_c,sbqq_taxable_c,sbqq_term_discount_level_c,sbqq_term_discount_schedule_c,sbqq_upgrade_credit_c,sbqq_upgrade_ratio_c,sbqq_upgrade_source_c,sbqq_upgrade_target_c,connector_type_c,pbf_pro_type_discount_c,dimension_c,connector_status_c,dimension_definition_c,ava_sfcpq_tax_code_c,paid_consumption_c,is_complimentary_c,product_external_id_c,blng_billing_rule_c,blng_revenue_recognition_rule_c,blng_tax_rule_c,deployment_date_c,do_not_prorate_c,celigo_sfnsio_netsuite_id_c,sbqq_enable_large_configuration_c,sbqq_pricing_guidance_c,celigo_sfnsio_item_pricing_type_c,celigo_sfnsio_test_mode_record_c,celigo_sfnsio_celigo_last_modified_date_c,celigo_sfnsio_net_suite_record_c,celigo_sfnsio_skip_export_to_net_suite_c,celigo_sfnsio_net_suite_item_type_c,celigo_sfnsio_net_suite_id_c,promo_code_c,product_category_c,product_source_c,non_recurring_c,is_archived,_fivetran_active
2 | ,TRUE,,2019-11-11 17:23:34,012370000005lzhAAA,1,2019-11-11 17:23:34,,FALSE,0051G0000060rE7QAI,2019-11-11 17:23:34,X,01t1G000002Uf3MQAS,0051G0000060rE7QAI,2019-11-11 17:23:34,X,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,FALSE,FALSE,,,X,FALSE,,Non Inventory Sale,noninventory-Sale,FALSE,,,Default,One per quote line,,Annual,Advance,Quantity,Recurring,FALSE,,,,,,,,,,FALSE,,,FALSE,,,1,FALSE,,,,FALSE,FALSE,FALSE,,FALSE,FALSE,FALSE,FALSE,FALSE,FALSE,FALSE,FALSE,,Click,FALSE,FALSE,List,FALSE,,TRUE,,FALSE,,,,List,,,Fixed Price,,1,Renewable,,FALSE,,,,,,,chat,FALSE,Function,Alpha,,,,FALSE,12345,a1L1G000002t4LAUAY,a951G000000TQsMQAW,a9D1G000000TefyUAC,,FALSE,,,,,FALSE,2019-11-11 17:23:34,,FALSE,,,,,,TRUE,FALSE,
3 | ,FALSE,,2019-11-11 17:23:34,012370000005lzhAAA,2,2019-11-11 17:23:34,,FALSE,00537000004EpGKAA0,2019-11-11 17:23:34,X,01t1G000000bOtkQAE,0051G000005MzwaQAC,2019-11-11 17:23:34,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,FALSE,FALSE,,,,FALSE,,Non Inventory Sale,noninventory-Sale,FALSE,,,Default,One per quote line,,,,Quantity,,FALSE,,,,,,,,,,FALSE,,,FALSE,,,1,FALSE,,,,FALSE,FALSE,FALSE,,FALSE,FALSE,FALSE,FALSE,FALSE,FALSE,FALSE,FALSE,,Click,FALSE,TRUE,List,FALSE,,TRUE,,FALSE,,,,List,,,,,,Renewable,,FALSE,,,,,,,finance,FALSE,Connector,General Availability,,,,FALSE,,,,,,FALSE,,FALSE,,,FALSE,2019-11-11 17:23:34,,FALSE,,,,,,,,
--------------------------------------------------------------------------------
/integration_tests/seeds/sf_task_data.csv:
--------------------------------------------------------------------------------
1 | referral_account_c,who_id,call_disposition,recurrence_day_of_month,owner_id,recurrence_end_date_only,subject,description,last_modified_date,recurrence_time_zone_sid_key,is_recurrence,what_count,_fivetran_synced,call_object,is_deleted,recurrence_day_of_week_mask,last_modified_by_id,system_modstamp,recurrence_regenerated_type,id,recurrence_type,reminder_date_time,call_type,is_high_priority,is_closed,recurrence_month_of_year,is_reminder_set,activity_date,recurrence_instance,priority,recurrence_interval,who_count,recurrence_start_date_only,account_id,referral_contact_c,call_duration_in_seconds,created_by_id,created_date,recurrence_activity_id,what_id,task_subtype,status,invitee_uuid_c,type,no_show_c,first_meeting_held_c,associated_sdr_c,first_meeting_c,call_recording_c,affectlayer_chorus_call_id_c,affectlayer_affect_layer_call_id_c,last_rep_activity_date_c,lid_url_c,lid_date_sent_c,record_type_id,sales_loft_step_id_c,sales_loft_step_name_c,sales_loft_step_type_c,sales_loft_email_template_id_c,sales_loft_external_identifier_c,sales_loft_cadence_id_c,sales_loft_clicked_count_c,sales_loft_cadence_name_c,sales_loft_reply_count_c,call_disposition_c,sales_loft_email_template_title_c,sales_loft_step_day_new_c,call_disposition_2_c,sales_loft_viewed_count_c,sales_loft_1_sales_loft_step_day_c,sales_loft_1_sales_loft_clicked_count_c,sales_loft_1_sales_loft_view_count_c,sales_loft_1_call_disposition_c,sales_loft_1_sales_loft_replies_count_c,sales_loft_1_sales_loft_cadence_name_c,sales_loft_1_call_sentiment_c,sales_loft_1_sales_loft_email_template_title_c,completed_date_time,is_a_co_sell_activity_c,partner_contact_c,co_selling_activity_c,description_c,co_sell_partner_account_c,campaign_c,partner_account_c,topic_c,event_name_c,attendance_number_c,partner_activity_type_c,proof_of_referral_c,how_did_you_bring_value_or_create_trust_c,how_did_you_bring_value_or_earn_trust_c,duration_in_minutes_c,vidyard_c,expected_payment_date_c,execute_collections_plan_activity_c,collections_hold_c,opportunity_c,meeting_type_c,meeting_name_c,bizible_2_bizible_id_c,bizible_2_bizible_touchpoint_date_c,assigned_to_role_c,assigned_to_name_c,legacy_hvr_id_c,is_archived,_fivetran_active
2 | ,0031G00001S3ckZQAR,,,0051G000005Mun4QAC,,subject 0051G000005Mun4QAC,description,2019-11-11 17:23:34,,FALSE,1,2019-11-11 17:23:34,,FALSE,,0051G000005Mun4QAC,2019-11-11 17:23:34,,00T1G00003Ufap9UAB,,,,FALSE,TRUE,,FALSE,2019-11-11 17:23:34,,Normal,,1,,0011G00000jWVWoQAO,,,0051G000005Mun4QAC,2019-11-11 17:23:34,,0061G00000N38JZQAZ,Task,Completed,,X,FALSE,,,,,,,,,,0121G000000g1SFQAY,,,,,,,,,,,,,,,,,,,,,,,2019-11-11 17:23:34,,,,,,,,,,,,,,,,FALSE,,FALSE,FALSE,,,,,,X,fivetran ae,,FALSE,
3 | ,0031G00001S3JniQAF,,,0051G000005Mun4QAC,,subject 0051G000005Mun4QAC,description,2019-11-11 17:23:34,,FALSE,1,2019-11-11 17:23:34,,FALSE,,0051G000005Mun4QAC,2019-11-11 17:23:34,,00T1G00003UfepsUAB,,,,FALSE,TRUE,,FALSE,2019-11-11 17:23:34,,Normal,,1,,0011G00000ugZ6HQAU,,,0051G000005Mun4QAC,2019-11-11 17:23:34,,0061G00000N31HAQAZ,Task,Completed,,X,FALSE,,,,,,,,,,0121G000000g1SFQAY,,,,,,,,,,,,,,,,,,,,,,,2019-11-11 17:23:34,,,,,,,,,,,,,,,,FALSE,,FALSE,FALSE,,,,,,X,fivetran ae,,FALSE,
4 | ,0031G00000xOrznQAC,,,0051G000005Mun4QAC,,subject 0051G000005Mun4QAC,description,2019-11-11 17:23:34,,FALSE,1,2019-11-11 17:23:34,,FALSE,,0051G000005Mun4QAC,2019-11-11 17:23:34,,00T1G00003UfRU9UAN,,,,FALSE,TRUE,,FALSE,2019-11-11 17:23:34,,Normal,,1,,0011G00000hC8aMQAS,,,0051G000005Mun4QAC,2019-11-11 17:23:34,,0061G00000N32AHQAZ,Task,Completed,,,FALSE,,,,,,,,,,0121G000000g1SFQAY,,,,,,,,,,,,,,,,,,,,,,,2019-11-11 17:23:34,,,,,,,,,,,,,,,,FALSE,,FALSE,FALSE,,Default Personal Meeting,sync,,,X,fivetran ae,,FALSE,
5 | ,00Q1G00000nOMcPUAW,,,0051G000005Mun4QAC,,subject 0051G000005Mun4QAC,description,2019-11-11 17:23:34,,FALSE,0,2019-11-11 17:23:34,,FALSE,,0051G000005Mun4QAC,2019-11-11 17:23:34,,00T1G00003UffGjUAJ,,,,FALSE,TRUE,,FALSE,2019-11-11 17:23:34,,Normal,,1,,,,,0051G000005Mun4QAC,2019-11-11 17:23:34,,,Task,Completed,,,FALSE,,,,,,,,,,0121G000000g1SFQAY,,,,,,,,,,,,,,,,,,,,,,,2019-11-11 17:23:34,,,,,,,,,,,,,,,,FALSE,,FALSE,FALSE,,,,,,X,fivetran ae,,FALSE,
6 | ,0031G00001S3oefQAB,,,0051G000005Mun4QAC,,subject 0051G000005Mun4QAC,description,2019-11-11 17:23:34,,FALSE,1,2019-11-11 17:23:34,,FALSE,,0051G000005Mun4QAC,2019-11-11 17:23:34,,00T1G00003UfZPYUA3,,,,FALSE,TRUE,,FALSE,2019-11-11 17:23:34,,Normal,,1,,0011G00000qFChkQAG,,,0051G000005Mun4QAC,2019-11-11 17:23:34,,0061G00000N3DTUQA3,Task,Completed,,X,FALSE,,,,,,,,,,0121G000000g1SFQAY,,,,,,,,,,,,,,,,,,,1,,,,2019-11-11 17:23:34,,,,,,,,,,,,,,,,FALSE,,FALSE,FALSE,,,,,,X,fivetran ae,,FALSE,
7 | ,0031G00001S3oefQAB,,,0051G000005Mun4QAC,,subject 0051G000005Mun4QAC,description,2019-11-11 17:23:34,,FALSE,1,2019-11-11 17:23:34,,FALSE,,0051G000005Mun4QAC,2019-11-11 17:23:34,,00T1G00003UfZQ7UAN,,,,FALSE,TRUE,,FALSE,2019-11-11 17:23:34,,Normal,,1,,0011G00000qFChkQAG,,,0051G000005Mun4QAC,2019-11-11 17:23:34,,0061G00000N3DTUQA3,Task,Completed,,X,FALSE,,,,,,,,,,0121G000000g1SFQAY,,,,,,,,,,,,,,,,,,,,,,,2019-11-11 17:23:34,,,,,,,,,,,,,,,,FALSE,,FALSE,FALSE,,,,,,X,fivetran ae,,FALSE,
8 | ,0031G00001NTqhqQAD,,,0051G000005Mun4QAC,,subject 0051G000005Mun4QAC,description,2019-11-11 17:23:34,,FALSE,0,2019-11-11 17:23:34,,FALSE,,0051G000005Mun4QAC,2019-11-11 17:23:34,,00T1G00003UfFY2UAN,,,,FALSE,TRUE,,FALSE,2019-11-11 17:23:34,,Normal,,1,,0011G00000tM0pgQAC,,,0051G000005Mun4QAC,2019-11-11 17:23:34,,,Task,Completed,,X,FALSE,,,,,,,,,,0121G000000g1SFQAY,,,,,,,,,,,,,,,,,85,,1,,,,2019-11-11 17:23:34,,,,,,,,,,,,,,,,FALSE,,FALSE,FALSE,,,,,,X,fivetran ae,,FALSE,
9 | ,0031G00001A2cSSQAZ,,,0051G000005Mun4QAC,,subject 0051G000005Mun4QAC,description,2019-11-11 17:23:34,,FALSE,1,2019-11-11 17:23:34,,FALSE,,0051G000005Mun4QAC,2019-11-11 17:23:34,,00T1G00003UffAmUAJ,,,,FALSE,TRUE,,FALSE,2019-11-11 17:23:34,,Normal,,1,,0011G00000gY18CQAS,,,0051G000005Mun4QAC,2019-11-11 17:23:34,,0061G00000O1zGuQAJ,Task,Completed,,,FALSE,,,,,,,,,,0121G000000g1SFQAY,,,,,,,,,,,,,,,,,,,,,,,2019-11-11 17:23:34,,,,,,,,,,,,,,,,FALSE,,FALSE,FALSE,,Default Personal Meeting,reconnect,,,X,fivetran ae,,FALSE,
10 | ,0031G00001S3oefQAB,,,0051G000005Mun4QAC,,subject 0051G000005Mun4QAC,description,2019-11-11 17:23:34,,FALSE,1,2019-11-11 17:23:34,,FALSE,,0051G000005Mun4QAC,2019-11-11 17:23:34,,00T1G00003UfFP8UAN,,,,FALSE,TRUE,,FALSE,2019-11-11 17:23:34,,Normal,,1,,0011G00000qFChkQAG,,,0051G000005Mun4QAC,2019-11-11 17:23:34,,0061G00000N3D9UQAV,Task,Completed,,X,FALSE,,,,,,,,,,0121G000000g1SFQAY,,,,,,,,,,,,,,,,,,,,,,,2019-11-11 17:23:34,,,,,,,,,,,,,,,,FALSE,,FALSE,FALSE,,,,,,X,fivetran ae,,FALSE,
11 | ,0031G00001NTqhqQAD,,,0051G000005Mun4QAC,,subject 0051G000005Mun4QAC,description,2019-11-11 17:23:34,,FALSE,0,2019-11-11 17:23:34,,FALSE,,0051G000005Mun4QAC,2019-11-11 17:23:34,,00T1G00003UfFl8UAF,,,,FALSE,TRUE,,FALSE,2019-11-11 17:23:34,,Normal,,1,,0011G00000tM0pgQAC,,,0051G000005Mun4QAC,2019-11-11 17:23:34,,,Task,Completed,,X,FALSE,,,,,,,,,,0121G000000g1SFQAY,,,,,,,,,,,,,,,,,,,,,,,2019-11-11 17:23:34,,,,,,,,,,,,,,,,FALSE,,FALSE,FALSE,,,,,,X,fivetran ae,,FALSE,
--------------------------------------------------------------------------------
/integration_tests/seeds/sf_user_data.csv:
--------------------------------------------------------------------------------
1 | _fivetran_deleted,_fivetran_synced,about_me,account_id,alias,badge_text,banner_photo_url,call_center_id,city,community_nickname,company_name,contact_id,country,country_code,default_group_notification_frequency,delegated_approver_id,department,digest_frequency,division,email,email_encoding_key,email_preferences_auto_bcc,employee_number,extension,fax,federation_identifier,first_name,forecast_enabled,full_photo_url,geocode_accuracy,id,individual_id,is_active,is_profile_photo_active,language_locale_key,last_login_date,last_name,last_referenced_date,last_viewed_date,latitude,locale_sid_key,longitude,manager_id,medium_banner_photo_url,mobile_phone,name,offline_trial_expiration_date,phone,postal_code,profile_id,receives_admin_info_emails,receives_info_emails,sender_email,sender_name,signature,small_banner_photo_url,small_photo_url,state,state_code,street,time_zone_sid_key,title,user_role_id,user_type,username,_fivetran_active
2 | false,2019-11-26 20:18:23,,,D4b1Qin+gQP3CpRZBVVTzw==,1B2M2Y8AsgTpgAmY7PhCfg==,+ZTO2mf2LuH+iHMMN5CTbA==,,,zYOn49YYBw9z+c1AbjrzcA==,,,8lPv4wLTKrJkp24M5lvnaQ==,dRb9Q62qXguKZaZyw5hF0g==,jZwwfLfzxKMoIqUZItHOqg==,,,9iPnWvMOYrvXPW31tQu3tQ==,,G5JZeErb0oYU8jQrAJylYw==,Dku078MOwSnlADoY6iEDzw==,true,,,,,VL0FVo9TB+culjkuqg52bQ==,true,fm397Qb0Cp93iLEx/qKV2g==,,0051G00000600MlQAI,,true,false,cQlcVsZB8sSk8Ym53816OA==,2019-08-05 18:13:35,1NZWXYLqo5CiFyFOT2EBJA==,,,,cQlcVsZB8sSk8Ym53816OA==,,tfjEwBIFrT7IKUXp/ObBNA==,Aah0gJhzMf8W4MSufRJi5w==,,Brandon Zinn,,,,q+POjJLmN0AEkFmTx/DVmg==,false,false,,,,2ERJSzi6mHg8kR1RS4zqig==,+Rxw9GW0v2EzZhKzJjofjA==,,,,c8PRyKwR7IqEd0+3VZY6gQ==,,BK8ye8s2vCtRuIzk3Iy7Og==,622K5vICg3VbM5wNwnOYiw==,xv6xgJYOh/ZMPRNDPbzueQ==,true
3 | false,2019-11-26 20:18:23,,,gpl2aeOp9ql5nOAs+5gF9A==,1B2M2Y8AsgTpgAmY7PhCfg==,+ZTO2mf2LuH+iHMMN5CTbA==,,,busRLQgm3BlE5gft7AXW5Q==,,,8lPv4wLTKrJkp24M5lvnaQ==,dRb9Q62qXguKZaZyw5hF0g==,jZwwfLfzxKMoIqUZItHOqg==,TLZtnkcZltX8lijWYSQqRg==,,9iPnWvMOYrvXPW31tQu3tQ==,,cwB0dYdfvqwxMf4ilgNByw==,Dku078MOwSnlADoY6iEDzw==,true,,,,,d9zVVfOLll0iChOjuwgCYA==,true,fm397Qb0Cp93iLEx/qKV2g==,,0051G000005Mx8dQAC,,true,false,cQlcVsZB8sSk8Ym53816OA==,2019-11-26 19:46:44,u7D6SbUlxCZPStegatw+Bw==,,,,cQlcVsZB8sSk8Ym53816OA==,,TLZtnkcZltX8lijWYSQqRg==,Aah0gJhzMf8W4MSufRJi5w==,,Eric Welsh,,,,0XwCP3LN1EcBDVvCIK3NCw==,false,false,,,,2ERJSzi6mHg8kR1RS4zqig==,+Rxw9GW0v2EzZhKzJjofjA==,,,,eobciA3TwKWJw+xVP4bGaQ==,ieakxsZwGEBdpS1879Gv/Q==,aDWPUItc1uc9iqJvMkP82Q==,622K5vICg3VbM5wNwnOYiw==,Iqqj3G/cliOsvvTCAdP+TA==,true
4 | false,2019-11-18 21:13:39,,,decEUNZtz8K0/rVaHGGx6w==,1B2M2Y8AsgTpgAmY7PhCfg==,+ZTO2mf2LuH+iHMMN5CTbA==,,,j74RDGGp6qpCT9+y75BpbQ==,,,,,jZwwfLfzxKMoIqUZItHOqg==,,,9iPnWvMOYrvXPW31tQu3tQ==,,aJCyq0bMBmwFIa7BYuGaqg==,Dku078MOwSnlADoY6iEDzw==,true,,,,,JMGykJnIdJGUeW3++LUKQA==,false,fm397Qb0Cp93iLEx/qKV2g==,,00555000003F3Q6AAK,,true,false,cQlcVsZB8sSk8Ym53816OA==,2019-11-16 00:13:23,89+z/rKPszB4G/pKIw1fAw==,,,,cQlcVsZB8sSk8Ym53816OA==,,TLZtnkcZltX8lijWYSQqRg==,Aah0gJhzMf8W4MSufRJi5w==,,Saurabh Kapadia,,,,QvzqVksmGmwST2MANzS9Nw==,false,false,,,,2ERJSzi6mHg8kR1RS4zqig==,+Rxw9GW0v2EzZhKzJjofjA==,,,,eobciA3TwKWJw+xVP4bGaQ==,,aDWPUItc1uc9iqJvMkP82Q==,622K5vICg3VbM5wNwnOYiw==,yFjyN6ai5qiWqyS6fBWBkw==,true
5 | false,2019-11-15 21:08:40,,,prRu04oqXV0uNf6Lo1Va6w==,1B2M2Y8AsgTpgAmY7PhCfg==,+ZTO2mf2LuH+iHMMN5CTbA==,,,io7DTej1IHP8rPTJdKfOoA==,,,8lPv4wLTKrJkp24M5lvnaQ==,dRb9Q62qXguKZaZyw5hF0g==,jZwwfLfzxKMoIqUZItHOqg==,,,9iPnWvMOYrvXPW31tQu3tQ==,,ZLYqq+RDyk6Te7xVdheciA==,Dku078MOwSnlADoY6iEDzw==,true,,,,,prRu04oqXV0uNf6Lo1Va6w==,true,fm397Qb0Cp93iLEx/qKV2g==,,00537000004EpGKAA0,,true,false,cQlcVsZB8sSk8Ym53816OA==,2019-11-12 16:48:38,HqQOq8TX4AO/sIuPSgR2Ug==,,,,cQlcVsZB8sSk8Ym53816OA==,,TLZtnkcZltX8lijWYSQqRg==,Aah0gJhzMf8W4MSufRJi5w==,,Jodie Navarre,,GiIWsKPHcUq7qMJlqOKAWQ==,,QvzqVksmGmwST2MANzS9Nw==,true,true,,,,2ERJSzi6mHg8kR1RS4zqig==,+Rxw9GW0v2EzZhKzJjofjA==,,,,c8PRyKwR7IqEd0+3VZY6gQ==,,aDWPUItc1uc9iqJvMkP82Q==,622K5vICg3VbM5wNwnOYiw==,veeuTX4ZgDX/1UVD/ZGfpA==,false
6 | false,2019-11-15 21:13:33,,,RghnQ3IiPoK6c2tbUocbPw==,1B2M2Y8AsgTpgAmY7PhCfg==,+ZTO2mf2LuH+iHMMN5CTbA==,,,abkaAGpuJILYJ9hOA4Be0g==,,,8lPv4wLTKrJkp24M5lvnaQ==,dRb9Q62qXguKZaZyw5hF0g==,jZwwfLfzxKMoIqUZItHOqg==,,,9iPnWvMOYrvXPW31tQu3tQ==,,7Q1bgZpigij+8LTy229aww==,Dku078MOwSnlADoY6iEDzw==,true,,,,,/gHwN0rApZymtoP6fxl3XA==,true,fm397Qb0Cp93iLEx/qKV2g==,,00537000004jJQPAA2,,true,false,cQlcVsZB8sSk8Ym53816OA==,2019-11-12 20:09:24,/gHwN0rApZymtoP6fxl3XA==,,,,cQlcVsZB8sSk8Ym53816OA==,,TLZtnkcZltX8lijWYSQqRg==,Aah0gJhzMf8W4MSufRJi5w==,,Nomadmktg Nomadmktg,,,,QvzqVksmGmwST2MANzS9Nw==,true,true,,,,2ERJSzi6mHg8kR1RS4zqig==,+Rxw9GW0v2EzZhKzJjofjA==,,,,eobciA3TwKWJw+xVP4bGaQ==,,a21b1bWPBhKAAug5Jxk73g==,622K5vICg3VbM5wNwnOYiw==,A/y3WQRrjTc0Q6xbsGmujA==,true
7 | true,2019-04-04 18:48:20,,,hzoNezv89sMonh/jHBrCNg==,1B2M2Y8AsgTpgAmY7PhCfg==,+ZTO2mf2LuH+iHMMN5CTbA==,,,tkqLcoeCxxgs6yI4gT/9yw==,,,8lPv4wLTKrJkp24M5lvnaQ==,dRb9Q62qXguKZaZyw5hF0g==,jZwwfLfzxKMoIqUZItHOqg==,,,9iPnWvMOYrvXPW31tQu3tQ==,,46l0uz6Yx0/A9LYo0WpgXg==,Dku078MOwSnlADoY6iEDzw==,true,,,,,tkqLcoeCxxgs6yI4gT/9yw==,false,M3gnKLhZJGDc/r8mEFKtKA==,,005q0000004XRtzAAG,,true,false,cQlcVsZB8sSk8Ym53816OA==,2019-03-14 19:00:29,lmOrvYek51oJsBc+3v9rSA==,,,,cQlcVsZB8sSk8Ym53816OA==,,,Aah0gJhzMf8W4MSufRJi5w==,,Artyom Vasilyev,,,,b/9XvWwwuZ6GthzYSc/fmg==,false,false,,,,2ERJSzi6mHg8kR1RS4zqig==,2+OnpJlgo7jyGDcvqrluzA==,,,,eobciA3TwKWJw+xVP4bGaQ==,,,622K5vICg3VbM5wNwnOYiw==,sfr1qhkoa01jph0cN406sA==,true
8 | true,2019-04-04 18:48:20,,,6OrI2Np3L4GCar2dFYxWZQ==,1B2M2Y8AsgTpgAmY7PhCfg==,+ZTO2mf2LuH+iHMMN5CTbA==,,,otDd6eocvI7CTXTEE6iX8Q==,,,8lPv4wLTKrJkp24M5lvnaQ==,dRb9Q62qXguKZaZyw5hF0g==,jZwwfLfzxKMoIqUZItHOqg==,,,9iPnWvMOYrvXPW31tQu3tQ==,,6rfEElWza4sHeeyzP0TXBQ==,Dku078MOwSnlADoY6iEDzw==,true,,,,,ouSCKpgzcoPjn3tgrPheyQ==,false,M3gnKLhZJGDc/r8mEFKtKA==,,005q0000004k6QEAAY,,false,false,cQlcVsZB8sSk8Ym53816OA==,,4mhEPkPZPat+vvMDu+lkLw==,,,,cQlcVsZB8sSk8Ym53816OA==,,,Aah0gJhzMf8W4MSufRJi5w==,,empty account,,,,U4E6aqzPODD0RiUPm3B8rA==,false,false,,,,2ERJSzi6mHg8kR1RS4zqig==,2+OnpJlgo7jyGDcvqrluzA==,,,,c8PRyKwR7IqEd0+3VZY6gQ==,,,622K5vICg3VbM5wNwnOYiw==,BrgwJpKXta8Zj4di1C7DFQ==,true
9 | true,2019-04-04 18:48:20,,,Xax7nNae5oQ3kWF4QHq/rQ==,1B2M2Y8AsgTpgAmY7PhCfg==,+ZTO2mf2LuH+iHMMN5CTbA==,,,U92cYAXzzfxaacXAc4gBbQ==,,,8lPv4wLTKrJkp24M5lvnaQ==,dRb9Q62qXguKZaZyw5hF0g==,jZwwfLfzxKMoIqUZItHOqg==,,,9iPnWvMOYrvXPW31tQu3tQ==,,scEwenaKqevd6yTLT1ltpw==,Dku078MOwSnlADoY6iEDzw==,true,,,,,BkdRdNki59y7PtNMAjbb3w==,false,M3gnKLhZJGDc/r8mEFKtKA==,,005q0000004k6NjAAI,,true,false,cQlcVsZB8sSk8Ym53816OA==,,qX/tvOMOz7xfd/I3ibDuAA==,,,,cQlcVsZB8sSk8Ym53816OA==,,,Aah0gJhzMf8W4MSufRJi5w==,,Justin Clark,,,,U4E6aqzPODD0RiUPm3B8rA==,false,false,,,,2ERJSzi6mHg8kR1RS4zqig==,2+OnpJlgo7jyGDcvqrluzA==,,,,c8PRyKwR7IqEd0+3VZY6gQ==,,7IHceHBUAWjctCBt2VZXiA==,622K5vICg3VbM5wNwnOYiw==,rzM8hF45+JLWxiSDOYlwUQ==,false
10 | true,2019-04-04 18:48:20,,,HWRtNym1u++RiSIY/YATyg==,1B2M2Y8AsgTpgAmY7PhCfg==,+ZTO2mf2LuH+iHMMN5CTbA==,,,lG3Ke8bREpt0SeoDgN/3+g==,,,8lPv4wLTKrJkp24M5lvnaQ==,dRb9Q62qXguKZaZyw5hF0g==,jZwwfLfzxKMoIqUZItHOqg==,,,9iPnWvMOYrvXPW31tQu3tQ==,,AMmh7ibU+xNFUG7Q5Fc2Tw==,Dku078MOwSnlADoY6iEDzw==,true,,,,,22AXvR8nEY1ECDoXKoJAnw==,false,M3gnKLhZJGDc/r8mEFKtKA==,,005q00000053KTAAA2,,true,false,cQlcVsZB8sSk8Ym53816OA==,2019-04-01 22:38:13,E15NIN/JJbyu6RY90uJ5NQ==,2019-03-11 22:30:18,2019-03-11 22:30:18,,cQlcVsZB8sSk8Ym53816OA==,,TLZtnkcZltX8lijWYSQqRg==,Aah0gJhzMf8W4MSufRJi5w==,,Christian Kletzl,,,,QvzqVksmGmwST2MANzS9Nw==,false,false,,,,2ERJSzi6mHg8kR1RS4zqig==,2+OnpJlgo7jyGDcvqrluzA==,,,,eobciA3TwKWJw+xVP4bGaQ==,,aDWPUItc1uc9iqJvMkP82Q==,622K5vICg3VbM5wNwnOYiw==,AMmh7ibU+xNFUG7Q5Fc2Tw==,true
11 | true,2019-04-04 18:48:20,,,+PsAbGnYCR23KLQiekSsJQ==,1B2M2Y8AsgTpgAmY7PhCfg==,+ZTO2mf2LuH+iHMMN5CTbA==,,,cpjVy4nqrYDiBsDMqUD08g==,,,8lPv4wLTKrJkp24M5lvnaQ==,dRb9Q62qXguKZaZyw5hF0g==,jZwwfLfzxKMoIqUZItHOqg==,,,9iPnWvMOYrvXPW31tQu3tQ==,,nU9FSqobhYTBGN9rJR2Khw==,Dku078MOwSnlADoY6iEDzw==,true,,,,,vWwLXUQeD7u9IvmI79ThcQ==,false,M3gnKLhZJGDc/r8mEFKtKA==,,005q00000053uuWAAQ,,true,false,cQlcVsZB8sSk8Ym53816OA==,2019-03-29 18:46:02,qwtVcSBsz2/Q9KWmP9i1jA==,,,,cQlcVsZB8sSk8Ym53816OA==,,,Aah0gJhzMf8W4MSufRJi5w==,,Andrey Lukyanov,,,,QvzqVksmGmwST2MANzS9Nw==,false,false,,,,2ERJSzi6mHg8kR1RS4zqig==,2+OnpJlgo7jyGDcvqrluzA==,,,,eobciA3TwKWJw+xVP4bGaQ==,,aDWPUItc1uc9iqJvMkP82Q==,622K5vICg3VbM5wNwnOYiw==,c7ZgbZS/+xi/ESP1ey4+eA==,true
12 |
--------------------------------------------------------------------------------
/integration_tests/seeds/sf_user_role_data.csv:
--------------------------------------------------------------------------------
1 | _fivetran_deleted,_fivetran_synced,case_access_for_account_owner,contact_access_for_account_owner,developer_name,forecast_user_id,id,may_forecast_manager_share,name,opportunity_access_for_account_owner,parent_role_id,portal_type,rollup_description,_fivetran_active
2 | false,2019-04-04 18:48:27,fc4SIASWnVauLgJFy3VNNQ==,fc4SIASWnVauLgJFy3VNNQ==,gjEPJnSSl2rmO0PmZT0r/A==,,StB7ADpIfsOKUVMS9KkJWw==,false,ev8AzWxVDGisAlHLhbswRw==,fc4SIASWnVauLgJFy3VNNQ==,p7fMKkVg9kprXiWdBNBwqg==,at+X+DrPZFPUpqSxBw83VA==,ev8AzWxVDGisAlHLhbswRw==,true
3 | false,2019-04-04 18:48:27,fc4SIASWnVauLgJFy3VNNQ==,fc4SIASWnVauLgJFy3VNNQ==,kgb2Y/pX2KDN31aThxXgHg==,,Pb7q3GyRtA1b+mjhRsCisw==,false,stoIWxwAppBt1wOf0ZrEXw==,fc4SIASWnVauLgJFy3VNNQ==,p7fMKkVg9kprXiWdBNBwqg==,at+X+DrPZFPUpqSxBw83VA==,stoIWxwAppBt1wOf0ZrEXw==,true
4 | false,2019-04-04 18:48:27,fc4SIASWnVauLgJFy3VNNQ==,fc4SIASWnVauLgJFy3VNNQ==,DW8qGW+liKrQFN672JebZQ==,,M2E7lAPWS91Qs5fLzFxciQ==,false,DpYNTT8JrVEsoGY/4jQu4A==,fc4SIASWnVauLgJFy3VNNQ==,p7fMKkVg9kprXiWdBNBwqg==,at+X+DrPZFPUpqSxBw83VA==,DpYNTT8JrVEsoGY/4jQu4A==,true
5 | false,2019-04-04 18:48:27,fc4SIASWnVauLgJFy3VNNQ==,fc4SIASWnVauLgJFy3VNNQ==,iuNkhc167Xlxl98P3iZgAw==,,/UCbUKKXllVd2xJJlKrNSw==,false,F2ZX+UKPrvm19As4fX6CeQ==,fc4SIASWnVauLgJFy3VNNQ==,p7fMKkVg9kprXiWdBNBwqg==,at+X+DrPZFPUpqSxBw83VA==,F2ZX+UKPrvm19As4fX6CeQ==,true
6 | false,2019-04-04 18:48:27,fc4SIASWnVauLgJFy3VNNQ==,fc4SIASWnVauLgJFy3VNNQ==,n4VWekp/jNT2t6w9lNiAZw==,,xp0Oq/pisjhX72tBE4KOAA==,false,+my2KWVrmQnbKPv+YhiwVQ==,fc4SIASWnVauLgJFy3VNNQ==,p7fMKkVg9kprXiWdBNBwqg==,at+X+DrPZFPUpqSxBw83VA==,+my2KWVrmQnbKPv+YhiwVQ==,false
7 | false,2019-04-04 18:48:27,fc4SIASWnVauLgJFy3VNNQ==,fc4SIASWnVauLgJFy3VNNQ==,fAEAoSTZ7wrrU27I5qf2cQ==,,ymq/lUMQgqZHw/9y2pM7Cg==,false,tpCgPeRuZXAwk5cHws8dPg==,fc4SIASWnVauLgJFy3VNNQ==,M2E7lAPWS91Qs5fLzFxciQ==,at+X+DrPZFPUpqSxBw83VA==,tpCgPeRuZXAwk5cHws8dPg==,true
8 | false,2019-04-04 18:48:27,fc4SIASWnVauLgJFy3VNNQ==,fc4SIASWnVauLgJFy3VNNQ==,Z0Mk929e09pi7cgzdIz9Yw==,,wFbcjrjZKNwzPncwnz82xg==,false,zEtr4yiL7ZjlvxI8zM5sYg==,fc4SIASWnVauLgJFy3VNNQ==,Pb7q3GyRtA1b+mjhRsCisw==,at+X+DrPZFPUpqSxBw83VA==,zEtr4yiL7ZjlvxI8zM5sYg==,true
9 | false,2019-04-04 18:48:27,fc4SIASWnVauLgJFy3VNNQ==,fc4SIASWnVauLgJFy3VNNQ==,hYkEw+Jm9WQL+ojxbS7VCg==,,3xphSR7VKJYclzXoEfA1AA==,false,hYkEw+Jm9WQL+ojxbS7VCg==,fc4SIASWnVauLgJFy3VNNQ==,aDWPUItc1uc9iqJvMkP82Q==,at+X+DrPZFPUpqSxBw83VA==,hYkEw+Jm9WQL+ojxbS7VCg==,true
10 | false,2019-04-04 18:48:27,fc4SIASWnVauLgJFy3VNNQ==,fc4SIASWnVauLgJFy3VNNQ==,7TSN2+DRJ/0CXrS7htzhVQ==,,BUKMwDbqRIBsdYfaEti1VQ==,false,j+MFtw9z6uGsU88K1p90qA==,fc4SIASWnVauLgJFy3VNNQ==,StB7ADpIfsOKUVMS9KkJWw==,at+X+DrPZFPUpqSxBw83VA==,j+MFtw9z6uGsU88K1p90qA==,true
11 | false,2019-04-04 18:48:27,fc4SIASWnVauLgJFy3VNNQ==,fc4SIASWnVauLgJFy3VNNQ==,y8Us3rZt0z6bUo0S/+JAgw==,,SdtcfRp1CirkHIEFxtA2/Q==,false,qwT73r52PFdwFtgbRdOD0A==,fc4SIASWnVauLgJFy3VNNQ==,StB7ADpIfsOKUVMS9KkJWw==,at+X+DrPZFPUpqSxBw83VA==,qwT73r52PFdwFtgbRdOD0A==,false
--------------------------------------------------------------------------------
/integration_tests/tests/consistency/consistency_columns.sql:
--------------------------------------------------------------------------------
1 | {{ config(
2 | tags="fivetran_validations",
3 | enabled=var('fivetran_validation_tests_enabled', false)
4 | ) }}
5 |
6 | /* This test is to make sure the final columns produced are the same between versions.
7 | Only one test is needed since it will fetch all tables and all columns in each schema.
8 | !!! THIS TEST IS WRITTEN FOR BIGQUERY!!! */
9 | {% if target.type == 'bigquery' %}
10 | with prod as (
11 | select
12 | table_name,
13 | column_name,
14 | data_type
15 | from {{ target.schema }}_salesforce_prod.INFORMATION_SCHEMA.COLUMNS
16 | ),
17 |
18 | dev as (
19 | select
20 | table_name,
21 | column_name,
22 | data_type
23 | from {{ target.schema }}_salesforce_dev.INFORMATION_SCHEMA.COLUMNS
24 | ),
25 |
26 | prod_not_in_dev as (
27 | -- rows from prod not found in dev
28 | select * from prod
29 | except distinct
30 | select * from dev
31 | ),
32 |
33 | dev_not_in_prod as (
34 | -- rows from dev not found in prod
35 | select * from dev
36 | except distinct
37 | select * from prod
38 | ),
39 |
40 | final as (
41 | select
42 | *,
43 | 'from prod' as source
44 | from prod_not_in_dev
45 |
46 | union all -- union since we only care if rows are produced
47 |
48 | select
49 | *,
50 | 'from dev' as source
51 | from dev_not_in_prod
52 | )
53 |
54 | select *
55 | from final
56 |
57 | {% else %}
58 | {{ print('This is written to run on bigquery. If you need to run on another warehouse, add another version for that warehouse') }}
59 |
60 | {% endif %}
--------------------------------------------------------------------------------
/integration_tests/tests/consistency/consistency_daily_activity.sql:
--------------------------------------------------------------------------------
1 | {{ config(
2 | tags="fivetran_validations",
3 | enabled=var('fivetran_validation_tests_enabled', false)
4 | ) }}
5 |
6 | -- this test ensures the daily_activity end model matches the prior version
7 | with prod as (
8 | select *
9 | from {{ target.schema }}_salesforce_prod.salesforce__daily_activity
10 | where date(date_day) < date({{ dbt.current_timestamp() }})
11 | ),
12 |
13 | dev as (
14 | select *
15 | from {{ target.schema }}_salesforce_dev.salesforce__daily_activity
16 | where date(date_day) < date({{ dbt.current_timestamp() }})
17 | ),
18 |
19 | prod_not_in_dev as (
20 | -- rows from prod not found in dev
21 | select * from prod
22 | except distinct
23 | select * from dev
24 | ),
25 |
26 | dev_not_in_prod as (
27 | -- rows from dev not found in prod
28 | select * from dev
29 | except distinct
30 | select * from prod
31 | ),
32 |
33 | final as (
34 | select
35 | *,
36 | 'from prod' as source
37 | from prod_not_in_dev
38 |
39 | union all -- union since we only care if rows are produced
40 |
41 | select
42 | *,
43 | 'from dev' as source
44 | from dev_not_in_prod
45 | )
46 |
47 | select *
48 | from final
--------------------------------------------------------------------------------
/integration_tests/tests/consistency/consistency_daily_activity_count.sql:
--------------------------------------------------------------------------------
1 | {{ config(
2 | tags="fivetran_validations",
3 | enabled=var('fivetran_validation_tests_enabled', false)
4 | ) }}
5 |
6 | -- this test is to make sure the rows counts are the same between versions
7 | with prod as (
8 | select count(*) as prod_rows
9 | from {{ target.schema }}_salesforce_prod.salesforce__daily_activity
10 | ),
11 |
12 | dev as (
13 | select count(*) as dev_rows
14 | from {{ target.schema }}_salesforce_dev.salesforce__daily_activity
15 | )
16 |
17 | -- test will return values and fail if the row counts don't match
18 | select *
19 | from prod
20 | join dev
21 | on prod.prod_rows != dev.dev_rows
--------------------------------------------------------------------------------
/integration_tests/tests/integrity/integrity_daily_activity.sql:
--------------------------------------------------------------------------------
1 | {{ config(
2 | tags="fivetran_validations",
3 | enabled=var('fivetran_validation_tests_enabled', false)
4 | ) }}
5 |
6 | -- this test is to make sure there is no fanout between the spine and the daily_activity
7 | with spine as (
8 | select count(*) as spine_count
9 | from {{ target.schema }}_salesforce_dev.int_salesforce__date_spine
10 | ),
11 |
12 | daily_activity as (
13 | select count(*) as daily_activity_count
14 | from {{ target.schema }}_salesforce_dev.salesforce__daily_activity
15 | )
16 |
17 | -- test will return values and fail if the row counts don't match
18 | select *
19 | from spine
20 | join daily_activity
21 | on spine.spine_count != daily_activity.daily_activity_count
--------------------------------------------------------------------------------
/macros/custom_persist_pass_through_columns.sql:
--------------------------------------------------------------------------------
1 | {% macro custom_persist_pass_through_columns(pass_through_variable, identifier=none, transform='', append_string='') %}
2 |
3 | {% if var(pass_through_variable, none) %}
4 | {% for field in var(pass_through_variable) %}
5 | , {{ transform ~ '(' ~ (identifier ~ '.' if identifier else '') ~ (field.alias if field.alias else field.name) ~ ')' }} as {{ field.alias if field.alias else field.name }}{{ append_string }}
6 | {% endfor %}
7 | {% endif %}
8 |
9 | {% endmacro %}
--------------------------------------------------------------------------------
/models/salesforce.md:
--------------------------------------------------------------------------------
1 | {% docs avg_bookings_amount -%}
2 | The average opportunity amount, if status is won.
3 | {%- enddocs %}
4 |
5 | {% docs avg_days_open -%}
6 | The average days since created across opportunties in the pipeline.
7 | {%- enddocs %}
8 |
9 | {% docs avg_days_to_close -%}
10 | The average days to close across opportunties in that have been won.
11 | {%- enddocs %}
12 |
13 | {% docs avg_pipeline_opp_amount -%}
14 | The average opportunity amount, if status is pipeline.
15 | {%- enddocs %}
16 |
17 | {% docs bookings_amount_closed_this_month -%}
18 | The opportunity amount, if closed this month and status is won.
19 | {%- enddocs %}
20 |
21 | {% docs bookings_amount_closed_this_quarter -%}
22 | The opportunity amount, if closed this quarter and status is won.
23 | {%- enddocs %}
24 |
25 | {% docs bookings_count_closed_this_month -%}
26 | The opportunity count, if closed this month and status is won.
27 | {%- enddocs %}
28 |
29 | {% docs bookings_count_closed_this_quarter -%}
30 | The opportunity count, if closed this quarter and status is won.
31 | {%- enddocs %}
32 |
33 | {% docs largest_booking -%}
34 | The largest amount associated with a single opportunity.
35 | {%- enddocs %}
36 |
37 | {% docs largest_deal_in_pipeline -%}
38 | The largest amount associated with a single opportunity in the current pipeline.
39 | {%- enddocs %}
40 |
41 | {% docs lost_amount_this_month -%}
42 | The opportunity amount, if closed this month and status is lost.
43 | {%- enddocs %}
44 |
45 | {% docs lost_amount_this_quarter -%}
46 | The opportunity amount, if closed this quarter and status is lost.
47 | {%- enddocs %}
48 |
49 | {% docs lost_count_this_month -%}
50 | The opportunity count, if closed this month and status is lost.
51 | {%- enddocs %}
52 |
53 | {% docs lost_count_this_quarter -%}
54 | The opportunity count, if closed this quarter and status is lost.
55 | {%- enddocs %}
56 |
57 | {% docs owner_id -%}
58 | Id of the owner of this opportunity
59 | {%- enddocs %}
60 |
61 | {% docs pipeline_count_created_this_month -%}
62 | The opportunity count, if closed this month and status is pipeline.
63 | {%- enddocs %}
64 |
65 | {% docs pipeline_count_created_this_quarter -%}
66 | The opportunity count, if closed this quarter and status is pipeline.
67 | {%- enddocs %}
68 |
69 | {% docs pipeline_created_amount_this_month -%}
70 | The opportunity amount, if closed this month and status is pipeline.
71 | {%- enddocs %}
72 |
73 | {% docs pipeline_created_amount_this_quarter -%}
74 | The opportunity amount, if closed this quarter and status is pipeline.
75 | {%- enddocs %}
76 |
77 | {% docs pipeline_created_forecast_amount_this_month -%}
78 | The opportunity amount mulitplied by the forecast percentage, if closed this month and status is pipeline.
79 | {%- enddocs %}
80 |
81 | {% docs pipeline_created_forecast_amount_this_quarter -%}
82 | The opportunity amount mulitplied by the forecast percentage, if closed this quarter and status is pipeline.
83 | {%- enddocs %}
84 |
85 | {% docs total_bookings_amount -%}
86 | The opportunity amount, if status is won.
87 | {%- enddocs %}
88 |
89 | {% docs total_lost_amount -%}
90 | The opportunity amount, if status is lost.
91 | {%- enddocs %}
92 |
93 | {% docs total_number_bookings -%}
94 | The opportunity count, if status is won.
95 | {%- enddocs %}
96 |
97 | {% docs total_number_lost -%}
98 | The opportunity count, if status is lost.
99 | {%- enddocs %}
100 |
101 | {% docs total_number_pipeline -%}
102 | The opportunity count, if status is pipeline.
103 | {%- enddocs %}
104 |
105 | {% docs total_pipeline_amount -%}
106 | The opportunity amount, if status is pipeline.
107 | {%- enddocs %}
108 |
109 | {% docs total_pipeline_forecast_amount -%}
110 | The opportunity amount mulitplied by the forecast percentage, if status is pipeline.
111 | {%- enddocs %}
112 |
113 | {% docs total_win_percent -%}
114 | The booking amount closed, divided by the sum of the booking amount and the lost amount..
115 | {%- enddocs %}
116 |
117 | {% docs win_percent_this_month -%}
118 | The booking amount closed this month, divided by the sum of the booking amount closed this month and the lost amount this month.
119 | {%- enddocs %}
120 |
121 | {% docs win_percent_this_quarter -%}
122 | The booking amount closed this quarter, divided by the sum of the booking amount closed this quarter and the lost amount this quarter.
123 | {%- enddocs %}
124 |
125 | {% docs contact_id -%}
126 | Unique contact ID.
127 | {%- enddocs %}
128 |
129 | {% docs contact_name -%}
130 | Name of contact.
131 | {%- enddocs %}
132 |
133 | {% docs account_id -%}
134 | ID of contact's account.
135 | {%- enddocs %}
136 |
137 | {% docs department -%}
138 | The contact’s department.
139 | {%- enddocs %}
140 |
141 | {% docs contact_description -%}
142 | A description of the contact.
143 | {%- enddocs %}
144 |
145 | {% docs email -%}
146 | The contact’s email address.
147 | {%- enddocs %}
148 |
149 | {% docs individual_id -%}
150 | ID of the data privacy record associated with this contact. This field is available if Data Protection and Privacy is enabled. This is a relationship field.
151 | {%- enddocs %}
152 |
153 | {% docs contact_is_deleted -%}
154 | Indicates whether the object has been moved to the Recycle Bin (true) or not (false). Label is Deleted.
155 | {%- enddocs %}
156 |
157 | {% docs last_activity_date -%}
158 | Value is the most recent of either:
159 | Due date of the most recent event logged against the record.
160 | Due date of the most recently closed task associated with the record.
161 | {%- enddocs %}
162 |
163 | {% docs lead_source -%}
164 | The lead’s source.
165 | {%- enddocs %}
166 |
167 | {% docs mailing_city -%}
168 | Mailing address details.
169 | {%- enddocs %}
170 |
171 | {% docs mailing_country -%}
172 | Mailing address details.
173 | {%- enddocs %}
174 |
175 | {% docs mailing_country_code -%}
176 | Mailing address details.
177 | {%- enddocs %}
178 |
179 | {% docs mailing_postal_code -%}
180 | The ISO codes for the mailing address’s state and country.
181 | {%- enddocs %}
182 |
183 | {% docs mailing_state -%}
184 | Mailing address details.
185 | {%- enddocs %}
186 |
187 | {% docs mailing_state_code -%}
188 | The ISO codes for the mailing address’s state and country.
189 | {%- enddocs %}
190 |
191 | {% docs mailing_street -%}
192 | Street address for mailing address.
193 | {%- enddocs %}
194 |
195 | {% docs master_record_id -%}
196 | If this record was deleted as the result of a merge, this field contains the ID of the record that remains. If this record was deleted for any other reason, or has not been deleted, the value is null.
197 | {%- enddocs %}
198 |
199 | {% docs mobile_phone -%}
200 | Contact’s mobile phone number.
201 | {%- enddocs %}
202 |
203 | {% docs contact_owner_id -%}
204 | The ID of the owner of the account associated with this contact.
205 | {%- enddocs %}
206 |
207 | {% docs phone -%}
208 | Telephone number for the contact. Label is Business Phone.
209 | {%- enddocs %}
210 |
211 | {% docs reports_to_id -%}
212 | This field doesn’t appear if IsPersonAccount is true.
213 | This is a relationship field.
214 | {%- enddocs %}
215 |
216 | {% docs contact_owner_name -%}
217 | Name of owner of the account associated with this contact.
218 | {%- enddocs %}
219 |
220 | {% docs account_name -%}
221 | Name of the account.
222 | {%- enddocs %}
223 |
224 | {% docs account_number -%}
225 | Account number assigned to this account (not the unique, system-generated ID assigned during creation).
226 | {%- enddocs %}
227 |
228 | {% docs account_source -%}
229 | The source of the account record. For example, Advertisement, Data.com, or Trade Show.
230 | {%- enddocs %}
231 |
232 | {% docs account_annual_revenue -%}
233 | Estimated annual revenue of the account.
234 | {%- enddocs %}
235 |
236 | {% docs account_description -%}
237 | Text description of the account.
238 | {%- enddocs %}
239 |
240 | {% docs account_industry -%}
241 | An industry associated with this account.
242 | {%- enddocs %}
243 |
244 | {% docs account_is_deleted -%}
245 | Indicates whether the object has been moved to the Recycle Bin (true) or not (false).
246 | {%- enddocs %}
247 |
248 | {% docs account_number_of_employees -%}
249 | Number of employees working at the company represented by this account.
250 | {%- enddocs %}
251 |
252 | {% docs account_owner_id -%}
253 | The ID of the user who currently owns this account.
254 | {%- enddocs %}
255 |
256 | {% docs account_parent_id -%}
257 | ID of the account parent object, if any.
258 | {%- enddocs %}
259 |
260 | {% docs account_rating -%}
261 | The account’s prospect rating, for example Hot, Warm, or Cold.
262 | {%- enddocs %}
263 |
264 | {% docs account_type -%}
265 | Type of account, for example, Customer, Competitor, or Partner.
266 | {%- enddocs %}
267 |
268 | {% docs date_day -%}
269 | Day of event, in UTC.
270 | {%- enddocs %}
271 |
272 | {% docs leads_created -%}
273 | Number of leads created on that date.
274 | {%- enddocs %}
275 |
276 | {% docs leads_converted -%}
277 | Number of leads converted on that date.
278 | {%- enddocs %}
279 |
280 | {% docs tasks_completed -%}
281 | Number of tasks for that activity date.
282 | {%- enddocs %}
283 |
284 | {% docs events_completed -%}
285 | Number of events for that activity date.
286 | {%- enddocs %}
287 |
288 | {% docs opportunities_created -%}
289 | Number of opportunities created on that date.
290 | {%- enddocs %}
291 |
292 | {% docs opportunities_won -%}
293 | Number of opportunities won on that close date.
294 | {%- enddocs %}
295 |
296 | {% docs opportunities_lost -%}
297 | Number of opportunities lost on that close date.
298 | {%- enddocs %}
299 |
300 | {% docs opportunity_line_item_id -%}
301 | The unique ID for each opportunity line item.
302 | {%- enddocs %}
303 |
304 | {% docs opportunity_line_item_name -%}
305 | The unique name for each opportunity line item.
306 | {%- enddocs %}
307 |
308 | {% docs opportunity_line_item_description -%}
309 | Text description of the opportunity line item.
310 | {%- enddocs %}
311 |
312 | {% docs opportunity_id -%}
313 | ID of the associated Opportunity.
314 | {%- enddocs %}
315 |
316 | {% docs line_item_index -%}
317 | The index number of the specific line item, relative to all line items in that opportunity.
318 | {%- enddocs %}
319 |
320 | {% docs total_line_items -%}
321 | The total number of line items belonging to the same opportunity.
322 | {%- enddocs %}
323 |
324 | {% docs created_date -%}
325 | Created date.
326 | {%- enddocs %}
327 |
328 | {% docs last_modified_date -%}
329 | Last Modified Date.
330 | {%- enddocs %}
331 |
332 | {% docs service_date -%}
333 | Date when the product revenue will be recognized and the product quantity will be shipped. Opportunity Close Date—ServiceDate is ignored.
334 | {%- enddocs %}
335 |
336 | {% docs pricebook_entry_id -%}
337 | ID of the associated PricebookEntry. Exists only for those organizations that have Products enabled as a feature. In API versions 1.0 and 2.0, you can specify values for either this field or ProductId, but not both. For this reason, both fields are declared nillable. In API version 3.0 and later, you must specify values for this field instead of ProductId. This is a relationship field.
338 | {%- enddocs %}
339 |
340 | {% docs product_2_id -%}
341 | The ID of the related Product2 record. This is a read-only field available in API version 30.0 and later.
342 | Use the PricebookEntryId field instead, specifying the ID of the PricebookEntry record.
343 | {%- enddocs %}
344 |
345 | {% docs product_2_name -%}
346 | Default name of the product.
347 | {%- enddocs %}
348 |
349 | {% docs product_code -%}
350 | This read-only field is available in API version 30.0 and later. It references the value in the ProductCode field of the related Product2 record.
351 | {%- enddocs %}
352 |
353 | {% docs product_2_description -%}
354 | A text description of the product.
355 | {%- enddocs %}
356 |
357 | {% docs list_price -%}
358 | Corresponds to the UnitPrice on the PricebookEntry that is associated with this line item, which can be in the standard price book or a custom price book. A client application can use this information to show whether the unit price (or sales price) of the line item differs from the price book entry list price.
359 | {%- enddocs %}
360 |
361 | {% docs quantity -%}
362 | Read-only if this record has a quantity schedule, a revenue schedule, or both a quantity and a revenue schedule.
363 | When updating these records:
364 | If you specify Quantity without specifying the UnitPrice, the UnitPrice value will be adjusted to accommodate the new Quantity value, and the TotalPrice will be held constant.
365 | If you specify both Discount and Quantity, you must also specify either TotalPrice or UnitPrice so the system can determine which one to automatically adjust.
366 | {%- enddocs %}
367 |
368 | {% docs unit_price -%}
369 | The unit price for the opportunity line item. In the Salesforce user interface, this field’s value is calculated by dividing the total price of the opportunity line item by the quantity listed for that line item. Label is Sales Price.
370 | This field or TotalPrice is required. You can’t specify both.
371 |
372 | If you specify Discount and Quantity, this field or TotalPrice is required.
373 | {%- enddocs %}
374 |
375 | {% docs total_price -%}
376 | This field is available only for backward compatibility. It represents the total price of the OpportunityLineItem.
377 | If you do not specify UnitPrice, this field is required. If you specify Discount and Quantity, this field or UnitPrice is required. When updating these records, you can change either this value or the UnitPrice, but not both at the same time.
378 |
379 | This field is nullable, but you can’t set both TotalPrice and UnitPrice to null in the same update request. To insert the TotalPrice via the API (given only a unit price and the quantity), calculate this field as the unit price multiplied by the quantity. This field is read-only if the opportunity line item has a revenue schedule. If the opportunity line item does not have a schedule or only has quantity schedule, this field can be updated.
380 | {%- enddocs %}
381 |
382 | {% docs has_quantity_schedule -%}
383 | Indicates whether a quantity schedule has been created for this object (true) or not (false).
384 | {%- enddocs %}
385 |
386 | {% docs has_revenue_schedule -%}
387 | Indicates whether a revenue schedule has been created for this object (true) or not (false). If this object has a revenue schedule, the Quantity and TotalPrice fields can’t be updated. In addition, the Quantity field can’t be updated if this object has a quantity schedule. Update requests aren’t rejected but the updated values are ignored.
388 | {%- enddocs %}
389 |
390 | {% docs product_external_id -%}
391 | The unique identifier of the product in the linked external data source. For example, ID #123.
392 | {%- enddocs %}
393 |
394 | {% docs product_family -%}
395 | Name of the product family associated with this record. Product families are configured as picklists in the user interface. To obtain a list of valid values, call describeSObjects() and process the DescribeSObjectResult for the values associated with the Family field. Label is Product Family.
396 | {%- enddocs %}
397 |
398 | {% docs product_is_active -%}
399 | Indicates whether product is active (true) or not (false). Inactive Product2 records are hidden in many areas in the user interface. You can change the IsActive flag on a Product2 object as often as necessary. Label is Active.
400 | {%- enddocs %}
401 |
402 | {% docs product_is_archived -%}
403 | Describes whether the product is archived. The default value is false.
404 | {%- enddocs %}
405 |
406 | {% docs product_is_deleted -%}
407 | Indicates whether the object has been moved to the Recycle Bin (true) or not (false). Label is Deleted.
408 | {%- enddocs %}
409 |
410 | {% docs product_number_of_quantity_installments -%}
411 | If the product has a quantity schedule, the number of installments.
412 | {%- enddocs %}
413 |
414 | {% docs product_quantity_installment_period -%}
415 | If the product has a quantity schedule, the amount of time covered by the schedule.
416 | {%- enddocs %}
417 |
418 | {% docs product_quantity_schedule_type -%}
419 | The type of the quantity schedule, if the product has one.
420 | {%- enddocs %}
421 |
422 | {% docs product_quantity_unit_of_measure -%}
423 | Unit of the product; for example, kilograms, liters, or cases. This field comes with only one value, Each, so consider creating your own. The QuantityUnitOfMeasure field on ProductItem inherits this field’s values.
424 | {%- enddocs %}
425 |
426 | {% docs product_number_of_revenue_installments -%}
427 | If the product has a revenue schedule, the number of installments.
428 | {%- enddocs %}
429 |
430 | {% docs product_revenue_installment_period -%}
431 | If the product has a revenue schedule, the time period covered by the schedule.
432 | {%- enddocs %}
433 |
434 | {% docs product_revenue_schedule_type -%}
435 | The type of the revenue schedule, if the product has one.
436 | {%- enddocs %}
437 |
438 | {% docs opportunities_created_amount -%}
439 | The dollar amount of all opportunities created for this day.
440 | {%- enddocs %}
441 |
442 | {% docs opportunities_won_amount -%}
443 | The dollar amount of all opportunities won for this day.
444 | {%- enddocs %}
445 |
446 | {% docs opportunities_lost_amount -%}
447 | The dollar amount of all opportunities lost for this day.
448 | {%- enddocs %}
449 |
450 | {% docs pipeline_amount -%}
451 | The dollar amount of all opportunities in the pipeline for this day.
452 | {%- enddocs %}
--------------------------------------------------------------------------------
/models/salesforce/intermediate/int_salesforce__date_spine.sql:
--------------------------------------------------------------------------------
1 | {% if var('salesforce__lead_enabled', True) -%}
2 | -- depends_on: {{ var('lead') }}
3 | {% else -%}
4 | -- depends_on: {{ var('opportunity') }}
5 | {% endif %}
6 | with spine as (
7 |
8 | {% if execute and flags.WHICH in ('run', 'build') %}
9 |
10 | {%- set first_date_query %}
11 | select
12 | coalesce(
13 | min(cast(created_date as date)),
14 | cast({{ dbt.dateadd("month", -1, "current_date") }} as date)
15 | ) as min_date
16 | {% if var('salesforce__lead_enabled', True) %}
17 | from {{ var('lead') }}
18 | {% else %}
19 | from {{ var('opportunity') }}
20 | {% endif %}
21 | {% endset -%}
22 |
23 | {% set last_date_query %}
24 | select
25 | coalesce(
26 | greatest(max(cast(created_date as date)), cast(current_date as date)),
27 | cast(current_date as date)
28 | ) as max_date
29 | {% if var('salesforce__lead_enabled', True) %}
30 | from {{ var('lead') }}
31 | {% else %}
32 | from {{ var('opportunity') }}
33 | {% endif %}
34 | {% endset -%}
35 |
36 | {% else %}
37 |
38 | {%- set first_date_query%}
39 | select cast({{ dbt.dateadd("month", -1, "current_date") }} as date)
40 | {% endset -%}
41 |
42 | {% set last_date_query %}
43 | select cast({{ dbt.current_timestamp_backcompat() }} as date)
44 | {% endset -%}
45 |
46 | {% endif %}
47 |
48 | {%- set first_date = dbt_utils.get_single_value(first_date_query) %}
49 | {%- set last_date = dbt_utils.get_single_value(last_date_query) %}
50 |
51 | {{ dbt_utils.date_spine(
52 | datepart="day",
53 | start_date="cast('" ~ first_date ~ "' as date)",
54 | end_date=dbt.dateadd("day", 1, "cast('" ~ last_date ~ "' as date)")
55 | )
56 | }}
57 | )
58 |
59 | select *
60 | from spine
--------------------------------------------------------------------------------
/models/salesforce/intermediate/int_salesforce__opportunity_aggregation_by_owner.sql:
--------------------------------------------------------------------------------
1 | with salesforce_opportunity_enhanced as (
2 |
3 | select *
4 | from {{ ref('salesforce__opportunity_enhanced') }}
5 | ),
6 |
7 | salesforce_user as (
8 |
9 | select *
10 | from {{ var('user') }}
11 | ),
12 |
13 | booking_by_owner as (
14 |
15 | select
16 | opportunity_manager_id as b_manager_id,
17 | opportunity_owner_id as b_owner_id,
18 | round(sum(closed_amount_this_month)) as bookings_amount_closed_this_month,
19 | round(sum(closed_amount_this_quarter)) as bookings_amount_closed_this_quarter,
20 | count(*) as total_number_bookings,
21 | round(sum(amount)) as total_bookings_amount,
22 | sum(closed_count_this_month) as bookings_count_closed_this_month,
23 | sum(closed_count_this_quarter) as bookings_count_closed_this_quarter,
24 | round(avg(amount)) as avg_bookings_amount,
25 | max(amount) as largest_booking,
26 | avg(days_to_close) as avg_days_to_close
27 | from salesforce_opportunity_enhanced
28 | where status = 'Won'
29 | group by 1, 2
30 | ),
31 |
32 | lost_by_owner as (
33 |
34 | select
35 | opportunity_manager_id as l_manager_id,
36 | opportunity_owner_id as l_owner_id,
37 | round(sum(closed_amount_this_month)) as lost_amount_this_month,
38 | round(sum(closed_amount_this_quarter)) as lost_amount_this_quarter,
39 | count(*) as total_number_lost,
40 | round(sum(amount)) as total_lost_amount,
41 | sum(closed_count_this_month) as lost_count_this_month,
42 | sum(closed_count_this_quarter) as lost_count_this_quarter
43 | from salesforce_opportunity_enhanced
44 | where status = 'Lost'
45 | group by 1, 2
46 | ),
47 |
48 | pipeline_by_owner as (
49 |
50 | select
51 | opportunity_manager_id as p_manager_id,
52 | opportunity_owner_id as p_owner_id,
53 | round(sum(created_amount_this_month)) as pipeline_created_amount_this_month,
54 | round(sum(created_amount_this_quarter)) as pipeline_created_amount_this_quarter,
55 | round(sum(created_amount_this_month * probability)) as pipeline_created_forecast_amount_this_month,
56 | round(sum(created_amount_this_quarter * probability)) as pipeline_created_forecast_amount_this_quarter,
57 | sum(created_count_this_month) as pipeline_count_created_this_month,
58 | sum(created_count_this_quarter) as pipeline_count_created_this_quarter,
59 | count(*) as total_number_pipeline,
60 | round(sum(amount)) as total_pipeline_amount,
61 | round(sum(amount * probability)) as total_pipeline_forecast_amount,
62 | round(avg(amount)) as avg_pipeline_opp_amount,
63 | max(amount) as largest_deal_in_pipeline,
64 | avg(days_since_created) as avg_days_open
65 | from salesforce_opportunity_enhanced
66 | where status = 'Pipeline'
67 | group by 1, 2
68 | )
69 |
70 | select
71 | salesforce_user.user_id as owner_id,
72 | coalesce(p_manager_id, b_manager_id, l_manager_id) as manager_id,
73 | booking_by_owner.*,
74 | lost_by_owner.*,
75 | pipeline_by_owner.*
76 | from salesforce_user
77 | left join booking_by_owner
78 | on booking_by_owner.b_owner_id = salesforce_user.user_id
79 | left join lost_by_owner
80 | on lost_by_owner.l_owner_id = salesforce_user.user_id
81 | left join pipeline_by_owner
82 | on pipeline_by_owner.p_owner_id = salesforce_user.user_id
--------------------------------------------------------------------------------
/models/salesforce/salesforce__contact_enhanced.sql:
--------------------------------------------------------------------------------
1 | with contact as (
2 |
3 | select *
4 | from {{ var('contact') }}
5 | ),
6 |
7 | account as (
8 |
9 | select *
10 | from {{ var('account') }}
11 | ),
12 |
13 | salesforce_user as (
14 |
15 | select *
16 | from {{ var('user') }}
17 | )
18 |
19 | select
20 | contact.contact_id,
21 | contact.contact_name,
22 | contact.account_id,
23 | contact.department,
24 | contact.contact_description,
25 | contact.email,
26 | contact.individual_id,
27 | contact.is_deleted as contact_is_deleted,
28 | contact.last_activity_date,
29 | contact.lead_source,
30 | contact.mailing_city,
31 | contact.mailing_country,
32 | contact.mailing_country_code,
33 | contact.mailing_postal_code,
34 | contact.mailing_state,
35 | contact.mailing_state_code,
36 | contact.mailing_street,
37 | contact.master_record_id,
38 | contact.mobile_phone,
39 | contact.owner_id as contact_owner_id,
40 | contact.phone,
41 | contact.reports_to_id,
42 | salesforce_user.user_name as contact_owner_name,
43 | account.account_name,
44 | account.account_number,
45 | account.account_source,
46 | account.annual_revenue as account_annual_revenue,
47 | account.account_description,
48 | account.industry as account_industry,
49 | account.is_deleted as account_is_deleted,
50 | account.number_of_employees as account_number_of_employees,
51 | account.owner_id as account_owner_id,
52 | account.parent_id as account_parent_id,
53 | account.rating as account_rating,
54 | account.type as account_type
55 |
56 | --The below scripts allows for pass through columns.
57 | {{ fivetran_utils.persist_pass_through_columns(pass_through_variable='salesforce__contact_pass_through_columns', identifier='contact') }}
58 | {{ fivetran_utils.persist_pass_through_columns(pass_through_variable='salesforce__account_pass_through_columns', identifier='account') }}
59 | {{ fivetran_utils.persist_pass_through_columns(pass_through_variable='salesforce__user_pass_through_columns', identifier='salesforce_user') }}
60 |
61 | from contact
62 | left join account
63 | on contact.account_id = account.account_id
64 | left join salesforce_user
65 | on contact.owner_id = salesforce_user.user_id
--------------------------------------------------------------------------------
/models/salesforce/salesforce__daily_activity.sql:
--------------------------------------------------------------------------------
1 | with date_spine as (
2 |
3 | select
4 | {{ dbt.date_trunc('day', 'date_day') }} as date_day
5 | from {{ ref('int_salesforce__date_spine') }}
6 | ),
7 |
8 | {% if var('salesforce__task_enabled', True) %}
9 | task as (
10 |
11 | select
12 | {{ dbt.date_trunc('day', 'activity_date') }} as activity_date,
13 | count(task_id) as tasks_completed
14 | from {{ var('task') }}
15 | group by 1
16 | ),
17 | {% endif %}
18 |
19 | {% if var('salesforce__event_enabled', True) %}
20 | salesforce_event as (
21 |
22 | select
23 | coalesce({{ dbt.date_trunc('day', 'activity_date') }}, {{ dbt.date_trunc('day', 'activity_date_time') }}) as activity_date,
24 | count(event_id) as events_completed
25 | from {{ var('event') }}
26 | group by 1
27 | ),
28 | {% endif %}
29 |
30 | {% if var('salesforce__lead_enabled', True) %}
31 | salesforce_lead as (
32 |
33 | select
34 | {{ dbt.date_trunc('day', 'created_date') }} as created_date,
35 | count(lead_id) as leads_created
36 | from {{ var('lead') }}
37 | group by 1
38 | ),
39 |
40 | salesforce_converted_lead as (
41 |
42 | select
43 | {{ dbt.date_trunc('day', 'converted_date') }} as converted_date,
44 | count(lead_id) as leads_converted
45 | from {{ var('lead') }}
46 | where is_converted
47 | group by 1
48 | ),
49 | {% endif %}
50 |
51 | opportunity as (
52 |
53 | select
54 | opportunity_id,
55 | {{ dbt.date_trunc('day', 'created_date') }} as created_date,
56 | account_id,
57 | {{ dbt.date_trunc('day', 'close_date') }} as close_date,
58 | is_closed,
59 | is_deleted,
60 | is_won,
61 | owner_id,
62 | stage_name,
63 | type,
64 | amount,
65 | case
66 | when is_won then 'Won'
67 | when not is_won and is_closed then 'Lost'
68 | when not is_closed and lower(forecast_category) in ('pipeline','forecast','bestcase') then 'Pipeline'
69 | else 'Other'
70 | end as status
71 | from {{ var('opportunity') }}
72 | ),
73 |
74 | opportunities_created as (
75 |
76 | select
77 | created_date,
78 | count(opportunity_id) as opportunities_created,
79 | round(sum(amount)) as opportunities_created_amount
80 | from opportunity
81 | group by 1
82 | ),
83 |
84 | opportunities_closed as (
85 |
86 | select
87 | close_date,
88 | count(case when status = 'Won' then opportunity_id else null end) as opportunities_won,
89 | round(sum(case when status = 'Won' then amount else 0 end)) as opportunities_won_amount,
90 | count(case when status = 'Lost' then opportunity_id else null end) as opportunities_lost,
91 | round(sum(case when status = 'Lost' then amount else null end)) as opportunities_lost_amount,
92 | round(sum(case when status = 'Pipeline' then amount else null end)) as pipeline_amount
93 | from opportunity
94 | group by 1
95 | )
96 |
97 | select
98 | date_spine.date_day,
99 |
100 | {% if var('salesforce__lead_enabled', True) %}
101 | salesforce_lead.leads_created,
102 | salesforce_converted_lead.leads_converted,
103 | {% endif %}
104 |
105 | {% if var('salesforce__task_enabled', True) %}
106 | task.tasks_completed,
107 | {% endif %}
108 |
109 | {% if var('salesforce__event_enabled', True) %}
110 | salesforce_event.events_completed,
111 | {% endif %}
112 |
113 | opportunities_created.opportunities_created,
114 | opportunities_created.opportunities_created_amount,
115 | opportunities_closed.opportunities_won,
116 | opportunities_closed.opportunities_won_amount,
117 | opportunities_closed.opportunities_lost,
118 | opportunities_closed.opportunities_lost_amount,
119 | opportunities_closed.pipeline_amount
120 | from date_spine
121 |
122 | {% if var('salesforce__lead_enabled', True) %}
123 | left join salesforce_lead
124 | on date_spine.date_day = salesforce_lead.created_date
125 | left join salesforce_converted_lead
126 | on date_spine.date_day = salesforce_converted_lead.converted_date
127 | {% endif %}
128 |
129 | {% if var('salesforce__task_enabled', True) %}
130 | left join task
131 | on date_spine.date_day = task.activity_date
132 | {% endif %}
133 |
134 | {% if var('salesforce__event_enabled', True) %}
135 | left join salesforce_event
136 | on date_spine.date_day = salesforce_event.activity_date
137 | {% endif %}
138 |
139 | left join opportunities_created
140 | on date_spine.date_day = opportunities_created.created_date
141 | left join opportunities_closed
142 | on date_spine.date_day = opportunities_closed.close_date
143 |
--------------------------------------------------------------------------------
/models/salesforce/salesforce__manager_performance.sql:
--------------------------------------------------------------------------------
1 | with opportunity_aggregation_by_owner as (
2 |
3 | select *
4 | from {{ ref('int_salesforce__opportunity_aggregation_by_owner') }}
5 | ),
6 |
7 | -- If using user_role table, the following will be included, otherwise it will not.
8 | {% if var('salesforce__user_role_enabled', True) %}
9 | user_role as (
10 |
11 | select *
12 | from {{ var('user_role') }}
13 | ),
14 | {% endif %}
15 |
16 | salesforce_user as (
17 |
18 | select *
19 | from {{ var('user') }}
20 | )
21 |
22 | select
23 | coalesce(manager.user_id, 'No Manager Assigned') as manager_id,
24 | coalesce(manager.user_name, 'No Manager Assigned') as manager_name,
25 | manager.city as manager_city,
26 | manager.state as manager_state,
27 |
28 | -- If using user_role table, the following will be included, otherwise it will not.
29 | {% if var('salesforce__user_role_enabled', True) %}
30 | user_role.user_role_name as manager_position,
31 | {% endif %}
32 |
33 | count(distinct owner_id) as number_of_direct_reports,
34 | coalesce(sum(bookings_amount_closed_this_month), 0) as bookings_amount_closed_this_month,
35 | coalesce(sum(bookings_amount_closed_this_quarter), 0) as bookings_amount_closed_this_quarter,
36 | coalesce(sum(total_number_bookings), 0) as total_number_bookings,
37 | coalesce(sum(total_bookings_amount), 0) as total_bookings_amount,
38 | coalesce(sum(bookings_count_closed_this_month), 0) as bookings_count_closed_this_month,
39 | coalesce(sum(bookings_count_closed_this_quarter), 0) as bookings_count_closed_this_quarter,
40 | coalesce(max(largest_booking), 0) as largest_booking,
41 | coalesce(sum(lost_amount_this_month), 0) as lost_amount_this_month,
42 | coalesce(sum(lost_amount_this_quarter), 0) as lost_amount_this_quarter,
43 | coalesce(sum(total_number_lost), 0) as total_number_lost,
44 | coalesce(sum(total_lost_amount), 0) as total_lost_amount,
45 | coalesce(sum(lost_count_this_month), 0) as lost_count_this_month,
46 | coalesce(sum(lost_count_this_quarter), 0) as lost_count_this_quarter,
47 | coalesce(sum(pipeline_created_amount_this_month), 0) as pipeline_created_amount_this_month,
48 | coalesce(sum(pipeline_created_amount_this_quarter), 0) as pipeline_created_amount_this_quarter,
49 | coalesce(sum(pipeline_created_forecast_amount_this_month), 0) as pipeline_created_forecast_amount_this_month,
50 | coalesce(sum(pipeline_created_forecast_amount_this_quarter), 0) as pipeline_created_forecast_amount_this_quarter,
51 | coalesce(sum(pipeline_count_created_this_month), 0) as pipeline_count_created_this_month,
52 | coalesce(sum(pipeline_count_created_this_quarter), 0) as pipeline_count_created_this_quarter,
53 | coalesce(sum(total_number_pipeline), 0) as total_number_pipeline,
54 | coalesce(sum(total_pipeline_amount), 0) as total_pipeline_amount,
55 | coalesce(sum(total_pipeline_forecast_amount), 0) as total_pipeline_forecast_amount,
56 | coalesce(max(largest_deal_in_pipeline), 0) as largest_deal_in_pipeline,
57 | round(case
58 | when sum(bookings_amount_closed_this_month + lost_amount_this_month) > 0 then
59 | sum(bookings_amount_closed_this_month) / sum(bookings_amount_closed_this_month + lost_amount_this_month) * 100
60 | else 0
61 | end, 2) as win_percent_this_month,
62 | round(case
63 | when sum(bookings_amount_closed_this_quarter + lost_amount_this_quarter) > 0 then
64 | sum(bookings_amount_closed_this_quarter) / sum(bookings_amount_closed_this_quarter + lost_amount_this_quarter) * 100
65 | else 0
66 | end, 2) as win_percent_this_quarter,
67 | round(case
68 | when sum(total_bookings_amount + total_lost_amount) > 0 then
69 | sum(total_bookings_amount) / sum(total_bookings_amount + total_lost_amount) * 100
70 | else 0
71 | end, 2) as total_win_percent
72 |
73 | from opportunity_aggregation_by_owner
74 | left join salesforce_user as manager
75 | on manager.user_id = opportunity_aggregation_by_owner.manager_id
76 |
77 | -- If using user_role table, the following will be included, otherwise it will not.
78 | {% if var('salesforce__user_role_enabled', True) %}
79 | left join user_role
80 | on manager.user_role_id = user_role.user_role_id
81 |
82 | group by 1, 2, 3, 4, 5
83 |
84 | {% else %}
85 | group by 1, 2, 3, 4
86 |
87 | {% endif %}
88 |
89 | having count(distinct owner_id) > 0
--------------------------------------------------------------------------------
/models/salesforce/salesforce__opportunity_enhanced.sql:
--------------------------------------------------------------------------------
1 | with opportunity as (
2 |
3 | select *
4 | from {{ var('opportunity') }}
5 | ),
6 |
7 | salesforce_user as (
8 |
9 | select *
10 | from {{ var('user') }}
11 | ),
12 |
13 | -- If using user_role table, the following will be included, otherwise it will not.
14 | {% if var('salesforce__user_role_enabled', True) %}
15 | user_role as (
16 |
17 | select *
18 | from {{ var('user_role') }}
19 | ),
20 | {% endif %}
21 |
22 | account as (
23 |
24 | select *
25 | from {{ var('account') }}
26 | ),
27 |
28 | add_fields as (
29 |
30 | select
31 | opportunity.*,
32 | account.account_number,
33 | account.account_source,
34 | account.industry,
35 | account.account_name,
36 | account.number_of_employees,
37 | account.type as account_type,
38 | opportunity_owner.user_id as opportunity_owner_id,
39 | opportunity_owner.user_name as opportunity_owner_name,
40 | opportunity_owner.user_role_id as opportunity_owner_role_id,
41 | opportunity_owner.city opportunity_owner_city,
42 | opportunity_owner.state as opportunity_owner_state,
43 | opportunity_manager.user_id as opportunity_manager_id,
44 | opportunity_manager.user_name as opportunity_manager_name,
45 | opportunity_manager.city opportunity_manager_city,
46 | opportunity_manager.state as opportunity_manager_state,
47 |
48 | -- If using user_role table, the following will be included, otherwise it will not.
49 | {% if var('salesforce__user_role_enabled', True) %}
50 | user_role.user_role_name as opportunity_owner_position,
51 | user_role.developer_name as opportunity_owner_developer_name,
52 | user_role.parent_role_id as opportunity_owner_parent_role_id,
53 | user_role.rollup_description as opportunity_owner_rollup_description,
54 | {% endif %}
55 |
56 | case
57 | when opportunity.is_won then 'Won'
58 | when not opportunity.is_won and opportunity.is_closed then 'Lost'
59 | when not opportunity.is_closed and lower(opportunity.forecast_category) in ('pipeline','forecast','bestcase') then 'Pipeline'
60 | else 'Other'
61 | end as status,
62 | case when is_created_this_month then amount else 0 end as created_amount_this_month,
63 | case when is_created_this_quarter then amount else 0 end as created_amount_this_quarter,
64 | case when is_created_this_month then 1 else 0 end as created_count_this_month,
65 | case when is_created_this_quarter then 1 else 0 end as created_count_this_quarter,
66 | case when is_closed_this_month then amount else 0 end as closed_amount_this_month,
67 | case when is_closed_this_quarter then amount else 0 end as closed_amount_this_quarter,
68 | case when is_closed_this_month then 1 else 0 end as closed_count_this_month,
69 | case when is_closed_this_quarter then 1 else 0 end as closed_count_this_quarter
70 |
71 | --The below script allows for pass through columns.
72 | {{ fivetran_utils.persist_pass_through_columns(pass_through_variable='salesforce__account_pass_through_columns', identifier='account') }}
73 | {{ custom_persist_pass_through_columns(pass_through_variable='salesforce__user_pass_through_columns', identifier='opportunity_owner', append_string= '_owner') }}
74 | {{ custom_persist_pass_through_columns(pass_through_variable='salesforce__user_pass_through_columns', identifier='opportunity_manager', append_string= '_manager') }}
75 |
76 | -- If using user_role table, the following will be included, otherwise it will not.
77 | {% if var('salesforce__user_role_enabled', True) %}
78 | {{ fivetran_utils.persist_pass_through_columns(pass_through_variable='salesforce__user_role_pass_through_columns', identifier='user_role') }}
79 | {% endif %}
80 |
81 | from opportunity
82 | left join account
83 | on opportunity.account_id = account.account_id
84 | left join salesforce_user as opportunity_owner
85 | on opportunity.owner_id = opportunity_owner.user_id
86 | left join salesforce_user as opportunity_manager
87 | on opportunity_owner.manager_id = opportunity_manager.user_id
88 |
89 | -- If using user_role table, the following will be included, otherwise it will not.
90 | {% if var('salesforce__user_role_enabled', True) %}
91 | left join user_role
92 | on opportunity_owner.user_role_id = user_role.user_role_id
93 | {% endif %}
94 | )
95 |
96 | select *
97 | from add_fields
98 |
--------------------------------------------------------------------------------
/models/salesforce/salesforce__opportunity_line_item_enhanced.sql:
--------------------------------------------------------------------------------
1 | --This model will only run if you have the underlying opportunity line item table.
2 | {{ config(enabled=var('salesforce__opportunity_line_item_enabled', True))}}
3 | with opportunity_line_item as (
4 |
5 | select *
6 | from {{ var('opportunity_line_item') }}
7 | ),
8 |
9 | -- If using product_2 table, the following will be included, otherwise it will not.
10 | {% if var('salesforce__product_2_enabled', True) %}
11 | product_2 as (
12 |
13 | select *
14 | from {{ var('product_2') }}
15 | ),
16 | {% endif %}
17 |
18 |
19 | final as (
20 |
21 | select
22 | oli.opportunity_line_item_id,
23 | oli.opportunity_line_item_name,
24 | oli.opportunity_line_item_description,
25 | oli.opportunity_id,
26 | row_number() over (partition by oli.opportunity_id order by oli.created_date) as line_item_index,
27 | count(opportunity_line_item_id) over (partition by oli.opportunity_id) as total_line_items,
28 | oli.created_date,
29 | oli.last_modified_date,
30 | oli.service_date,
31 | oli.pricebook_entry_id,
32 | oli.product_2_id,
33 | oli.list_price,
34 | oli.quantity,
35 | oli.unit_price,
36 | oli.total_price,
37 | oli.has_quantity_schedule,
38 | oli.has_revenue_schedule
39 |
40 | {% if var('salesforce__product_2_enabled', True) %}
41 | ,
42 | product_2.product_2_name,
43 | product_2.product_code,
44 | product_2.product_2_description,
45 | product_2.external_id as product_external_id,
46 | product_2.family as product_family,
47 | product_2.is_active as product_is_active,
48 | product_2.is_archived as product_is_archived,
49 | product_2.is_deleted as product_is_deleted,
50 | product_2.number_of_quantity_installments as product_number_of_quantity_installments,
51 | product_2.quantity_installment_period as product_quantity_installment_period,
52 | product_2.quantity_schedule_type as product_quantity_schedule_type,
53 | product_2.quantity_unit_of_measure as product_quantity_unit_of_measure,
54 | product_2.number_of_revenue_installments as product_number_of_revenue_installments,
55 | product_2.revenue_installment_period as product_revenue_installment_period,
56 | product_2.revenue_schedule_type as product_revenue_schedule_type
57 | {% endif %}
58 |
59 | --The below script allows for pass through columns.
60 | {{ fivetran_utils.persist_pass_through_columns(pass_through_variable='salesforce__opportunity_line_item_pass_through_columns', identifier='oli') }}
61 |
62 | {% if var('salesforce__product_2_enabled', True) %}
63 | {{ fivetran_utils.persist_pass_through_columns(pass_through_variable='salesforce__product_2_pass_through_columns', identifier='product_2') }}
64 | {% endif %}
65 |
66 | from opportunity_line_item as oli
67 |
68 | {% if var('salesforce__product_2_enabled', True) %}
69 | left join product_2
70 | on oli.product_2_id = product_2.product_2_id
71 | {% endif %}
72 | )
73 |
74 | select *
75 | from final
--------------------------------------------------------------------------------
/models/salesforce/salesforce__owner_performance.sql:
--------------------------------------------------------------------------------
1 | with opportunity_aggregation_by_owner as (
2 |
3 | select *
4 | from {{ ref('int_salesforce__opportunity_aggregation_by_owner') }}
5 | ),
6 |
7 | salesforce_user as (
8 |
9 | select *
10 | from {{ var('user') }}
11 | )
12 |
13 | select
14 | opportunity_aggregation_by_owner.*,
15 | salesforce_user.user_name as owner_name,
16 | salesforce_user.city as owner_city,
17 | salesforce_user.state as owner_state,
18 | case
19 | when (bookings_amount_closed_this_month + lost_amount_this_month) > 0
20 | then bookings_amount_closed_this_month / (bookings_amount_closed_this_month + lost_amount_this_month) * 100
21 | else 0
22 | end as win_percent_this_month,
23 | case
24 | when (bookings_amount_closed_this_quarter + lost_amount_this_quarter) > 0
25 | then bookings_amount_closed_this_quarter / (bookings_amount_closed_this_quarter + lost_amount_this_quarter) * 100
26 | else 0
27 | end as win_percent_this_quarter,
28 | case
29 | when (total_bookings_amount + total_lost_amount) > 0
30 | then total_bookings_amount / (total_bookings_amount + total_lost_amount) * 100
31 | else 0
32 | end as total_win_percent
33 | from opportunity_aggregation_by_owner
34 | join salesforce_user
35 | on salesforce_user.user_id = opportunity_aggregation_by_owner.owner_id
--------------------------------------------------------------------------------
/models/salesforce/salesforce__sales_snapshot.sql:
--------------------------------------------------------------------------------
1 | with salesforce_opportunity_enhanced as (
2 |
3 | select *
4 | from {{ ref('salesforce__opportunity_enhanced') }}
5 | ),
6 |
7 | pipeline as (
8 |
9 | select
10 | round(sum(created_amount_this_month)) as pipeline_created_amount_this_month,
11 | round(sum(created_amount_this_quarter)) as pipeline_created_amount_this_quarter,
12 | round(sum(created_amount_this_month * probability)) as pipeline_created_forecast_amount_this_month,
13 | round(sum(created_amount_this_quarter * probability)) as pipeline_created_forecast_amount_this_quarter,
14 | sum(created_count_this_month) as pipeline_count_created_this_month,
15 | sum(created_count_this_quarter) as pipeline_count_created_this_quarter,
16 | count(*) as total_number_pipeline,
17 | round(sum(amount)) as total_pipeline_amount,
18 | round(sum(amount * probability)) as total_pipeline_forecast_amount,
19 | round(avg(amount)) as avg_pipeline_opp_amount,
20 | max(amount) as largest_deal_in_pipeline,
21 | avg(days_since_created) as avg_days_open
22 | from salesforce_opportunity_enhanced
23 | where status = 'Pipeline'
24 | ),
25 |
26 | bookings as (
27 |
28 | select
29 | round(sum(closed_amount_this_month)) as bookings_amount_closed_this_month,
30 | round(sum(closed_amount_this_quarter)) as bookings_amount_closed_this_quarter,
31 | count(*) as total_number_bookings,
32 | round(sum(amount)) as total_bookings_amount,
33 | sum(closed_count_this_month) as bookings_count_closed_this_month,
34 | sum(closed_count_this_quarter) as bookings_count_closed_this_quarter,
35 | round(avg(amount)) as avg_bookings_amount,
36 | max(amount) as largest_booking,
37 | avg(days_to_close) as avg_days_to_close
38 | from salesforce_opportunity_enhanced
39 | where status = 'Won'
40 | ),
41 |
42 | lost as (
43 |
44 | select
45 | round(sum(closed_amount_this_month)) as lost_amount_this_month,
46 | round(sum(closed_amount_this_quarter)) as lost_amount_this_quarter,
47 | count(*) as total_number_lost,
48 | round(sum(amount)) as total_lost_amount,
49 | sum(closed_count_this_month) as lost_count_this_month,
50 | sum(closed_count_this_quarter) as lost_count_this_quarter
51 | from salesforce_opportunity_enhanced
52 | where status = 'Lost'
53 | )
54 |
55 | select
56 | bookings.*,
57 | pipeline.*,
58 | lost.*,
59 | case
60 | when (bookings.bookings_amount_closed_this_month + lost.lost_amount_this_month) = 0 then null
61 | else round( (bookings.bookings_amount_closed_this_month / (bookings.bookings_amount_closed_this_month + lost.lost_amount_this_month) ) * 100, 2 )
62 | end as win_percent_this_month,
63 | case
64 | when (bookings.bookings_amount_closed_this_quarter + lost.lost_amount_this_quarter) = 0 then null
65 | else round( (bookings.bookings_amount_closed_this_quarter / (bookings.bookings_amount_closed_this_quarter + lost.lost_amount_this_quarter) ) * 100, 2 )
66 | end as win_percent_this_quarter,
67 | case
68 | when (bookings.total_bookings_amount + lost.total_lost_amount) = 0 then null
69 | else round( (bookings.total_bookings_amount / (bookings.total_bookings_amount + lost.total_lost_amount) ) * 100, 2)
70 | end as total_win_percent
71 | from bookings, pipeline, lost
--------------------------------------------------------------------------------
/models/salesforce_history/salesforce__account_daily_history.sql:
--------------------------------------------------------------------------------
1 | {{
2 | config(
3 | enabled = var('salesforce__account_history_enabled', False),
4 | materialized = 'incremental',
5 | partition_by = {
6 | 'field': 'date_day',
7 | 'data_type': 'date'
8 | } if target.type not in ['spark', 'databricks'] else ['date_day'],
9 | unique_key = 'account_day_id',
10 | incremental_strategy = 'insert_overwrite' if target.type in ('bigquery', 'spark', 'databricks') else 'delete+insert',
11 | file_format = 'parquet',
12 | on_schema_change = 'fail'
13 | )
14 | }}
15 |
16 | {% if execute %}
17 | {% set date_query %}
18 | select
19 | {{ dbt.date_trunc('day', dbt.current_timestamp_backcompat()) }} as max_date
20 | {% endset %}
21 |
22 | {% set last_date = run_query(date_query).columns[0][0]|string %}
23 |
24 | {# If only compiling, creates range going back 1 year #}
25 | {% else %}
26 | {% set last_date = dbt.dateadd("year", "-1", "current_date") %}
27 | {% endif %}
28 |
29 |
30 | with spine as (
31 | {# Prioritizes variables over calculated dates #}
32 | {% set first_date = var('account_history_start_date', var('global_history_start_date', '2020-01-01'))|string %}
33 | {% set last_date = last_date|string %}
34 |
35 | {{ dbt_utils.date_spine(
36 | datepart="day",
37 | start_date = "cast('" ~ first_date[0:10] ~ "'as date)",
38 | end_date = "cast('" ~ last_date[0:10] ~ "'as date)"
39 | )
40 | }}
41 | ),
42 |
43 | account_history as (
44 |
45 | select *
46 | from {{ var('account_history') }}
47 | {% if is_incremental() %}
48 | where _fivetran_start >= (select max(cast((_fivetran_start) as {{ dbt.type_timestamp() }})) from {{ this }} )
49 | {% endif %}
50 | ),
51 |
52 | order_daily_values as (
53 |
54 | select
55 | *,
56 | row_number() over (
57 | partition by _fivetran_date, account_id
58 | order by _fivetran_start desc) as row_num
59 | from account_history
60 | ),
61 |
62 | get_latest_daily_value as (
63 |
64 | select *
65 | from order_daily_values
66 | where row_num = 1
67 | ),
68 |
69 | daily_history as (
70 |
71 | select
72 | {{ dbt_utils.generate_surrogate_key(['spine.date_day','get_latest_daily_value.account_id']) }} as account_day_id,
73 | cast(spine.date_day as date) as date_day,
74 | get_latest_daily_value.*
75 | from get_latest_daily_value
76 | join spine on get_latest_daily_value._fivetran_start <= cast(spine.date_day as {{ dbt.type_timestamp() }})
77 | and get_latest_daily_value._fivetran_end >= cast(spine.date_day as {{ dbt.type_timestamp() }})
78 | )
79 |
80 | select *
81 | from daily_history
--------------------------------------------------------------------------------
/models/salesforce_history/salesforce__contact_daily_history.sql:
--------------------------------------------------------------------------------
1 | {{
2 | config(
3 | enabled = var('salesforce__contact_history_enabled', False),
4 | materialized = 'incremental',
5 | partition_by = {
6 | 'field': 'date_day',
7 | 'data_type': 'date'
8 | } if target.type not in ['spark', 'databricks'] else ['date_day'],
9 | unique_key = 'contact_day_id',
10 | incremental_strategy = 'insert_overwrite' if target.type in ('bigquery', 'spark', 'databricks') else 'delete+insert',
11 | file_format = 'parquet',
12 | on_schema_change = 'fail'
13 | )
14 | }}
15 |
16 | {% if execute %}
17 | {% set date_query %}
18 | select
19 | {{ dbt.date_trunc('day', dbt.current_timestamp_backcompat()) }} as max_date
20 | {% endset %}
21 |
22 | {% set last_date = run_query(date_query).columns[0][0]|string %}
23 |
24 | {# If only compiling, creates range going back 1 year #}
25 | {% else %}
26 | {% set last_date = dbt.dateadd("year", "-1", "current_date") %}
27 | {% endif %}
28 |
29 |
30 | with spine as (
31 | {# Prioritizes variables over calculated dates #}
32 | {% set first_date = var('contact_history_start_date', var('global_history_start_date', '2020-01-01'))|string %}
33 | {% set last_date = last_date|string %}
34 |
35 | {{ dbt_utils.date_spine(
36 | datepart="day",
37 | start_date = "cast('" ~ first_date[0:10] ~ "'as date)",
38 | end_date = "cast('" ~ last_date[0:10] ~ "'as date)"
39 | )
40 | }}
41 | ),
42 |
43 | contact_history as (
44 |
45 | select *
46 | from {{ var('contact_history') }}
47 | {% if is_incremental() %}
48 | where _fivetran_start >= (select max(cast((_fivetran_start) as {{ dbt.type_timestamp() }})) from {{ this }} )
49 | {% endif %}
50 | ),
51 |
52 | order_daily_values as (
53 |
54 | select
55 | *,
56 | row_number() over (
57 | partition by _fivetran_date, contact_id
58 | order by _fivetran_start desc) as row_num
59 | from contact_history
60 | ),
61 |
62 | get_latest_daily_value as (
63 |
64 | select *
65 | from order_daily_values
66 | where row_num = 1
67 | ),
68 |
69 | daily_history as (
70 |
71 | select
72 | {{ dbt_utils.generate_surrogate_key(['spine.date_day','get_latest_daily_value.contact_id']) }} as contact_day_id,
73 | cast(spine.date_day as date) as date_day,
74 | get_latest_daily_value.*
75 | from get_latest_daily_value
76 | join spine on get_latest_daily_value._fivetran_start <= cast(spine.date_day as {{ dbt.type_timestamp() }})
77 | and get_latest_daily_value._fivetran_end >= cast(spine.date_day as {{ dbt.type_timestamp() }})
78 | )
79 |
80 | select *
81 | from daily_history
--------------------------------------------------------------------------------
/models/salesforce_history/salesforce__opportunity_daily_history.sql:
--------------------------------------------------------------------------------
1 | {{
2 | config(
3 | enabled = var('salesforce__opportunity_history_enabled', False),
4 | materialized = 'incremental',
5 | partition_by = {
6 | 'field': 'date_day',
7 | 'data_type': 'date'
8 | } if target.type not in ['spark', 'databricks'] else ['date_day'],
9 | unique_key = 'opportunity_day_id',
10 | incremental_strategy = 'insert_overwrite' if target.type in ('bigquery', 'spark', 'databricks') else 'delete+insert',
11 | file_format = 'parquet',
12 | on_schema_change = 'fail'
13 | )
14 | }}
15 |
16 |
17 | {% if execute %}
18 | {% set date_query %}
19 | select
20 | {{ dbt.date_trunc('day', dbt.current_timestamp_backcompat()) }} as max_date
21 | {% endset %}
22 |
23 | {% set last_date = run_query(date_query).columns[0][0]|string %}
24 |
25 | {# If only compiling, creates range going back 1 year #}
26 | {% else %}
27 | {% set last_date = dbt.dateadd("year", "-1", "current_date") %}
28 | {% endif %}
29 |
30 |
31 | with spine as (
32 | {# Prioritizes variables over calculated dates #}
33 | {% set first_date = var('opportunity_history_start_date', var('global_history_start_date', '2020-01-01'))|string %}
34 | {% set last_date = last_date|string %}
35 |
36 | {{ dbt_utils.date_spine(
37 | datepart="day",
38 | start_date = "cast('" ~ first_date[0:10] ~ "'as date)",
39 | end_date = "cast('" ~ last_date[0:10] ~ "'as date)"
40 | )
41 | }}
42 | ),
43 |
44 | opportunity_history as (
45 |
46 | select *
47 | from {{ var('opportunity_history') }}
48 | {% if is_incremental() %}
49 | where _fivetran_start >= (select max(cast((_fivetran_start) as {{ dbt.type_timestamp() }})) from {{ this }} )
50 | {% endif %}
51 | ),
52 |
53 | order_daily_values as (
54 |
55 | select
56 | *,
57 | row_number() over (
58 | partition by _fivetran_date, opportunity_id
59 | order by _fivetran_start desc) as row_num
60 | from opportunity_history
61 | ),
62 |
63 | get_latest_daily_value as (
64 |
65 | select *
66 | from order_daily_values
67 | where row_num = 1
68 | ),
69 |
70 | daily_history as (
71 |
72 | select
73 | {{ dbt_utils.generate_surrogate_key(['spine.date_day','get_latest_daily_value.opportunity_id']) }} as opportunity_day_id,
74 | cast(spine.date_day as date) as date_day,
75 | get_latest_daily_value.*
76 | from get_latest_daily_value
77 | join spine on get_latest_daily_value._fivetran_start <= cast(spine.date_day as {{ dbt.type_timestamp() }})
78 | and get_latest_daily_value._fivetran_end >= cast(spine.date_day as {{ dbt.type_timestamp() }})
79 | )
80 |
81 | select *
82 | from daily_history
--------------------------------------------------------------------------------
/models/salesforce_history/salesforce_history.yml:
--------------------------------------------------------------------------------
1 | version: 2
2 |
3 | models:
4 | - name: salesforce__account_daily_history
5 | description: Each record is a daily record in an account, starting with its first active date and updating up toward either the current date (if still active) or its last active date.
6 | columns:
7 | - name: account_day_id
8 | description: Surrogate key hashed on `date_day` and `account_id`
9 | tests:
10 | - unique
11 | - not_null
12 | - name: date_day
13 | description: Date on which the account had these field values.
14 | - name: account_id
15 | description: The unique, system-generated ID assigned during creation.
16 | - name: _fivetran_active
17 | description: true if it is the currently active record. false if it is a historical version of the record. Only one version of the record can be true.
18 | - name: _fivetran_start
19 | description: The time when the record was first created or modified in the source, based on a timestamp value in the source table that monotonically increases over time with data change or update.
20 | - name: _fivetran_end
21 | description: The time until which the record was active minus epsilon, where epsilon is the smallest time difference that can be stored in the timestamp type value.
22 | - name: _fivetran_synced
23 | description: The time at which fivetran last synced this record.
24 | - name: history_unique_key
25 | description: Surrogate key hashed on `_fivetran_start` and `account_id`.
26 | - name: account_number
27 | description: Account number assigned to this account (not the unique, system-generated ID assigned during creation).
28 | - name: account_source
29 | description: The source of the account record. For example, Advertisement, Data.com, or Trade Show.
30 | - name: annual_revenue
31 | description: Estimated annual revenue of the account.
32 | - name: billing_city
33 | description: Details for the billing address of this account.
34 | - name: billing_country
35 | description: Details for the billing address of this account.
36 | - name: billing_postal_code
37 | description: Details for the billing address of this account.
38 | - name: billing_state
39 | description: Details for the billing address of this account.
40 | - name: billing_street
41 | description: Street address for the billing address of this account.
42 | - name: account_description
43 | description: Text description of the account.
44 | - name: industry
45 | description: An industry associated with this account.
46 | - name: is_deleted
47 | description: Indicates whether the object has been moved to the Recycle Bin (true) or not (false).
48 | - name: last_activity_date
49 | description: Value is one of the following, whichever is the most recent.
50 | - name: last_referenced_date
51 | description: The timestamp when the current user last accessed this record, a record related to this record, or a list view.
52 | - name: last_viewed_date
53 | description: The timestamp when the current user last viewed this record or list view. If this value is null, the user might have only accessed this record or list view (LastReferencedDate) but not viewed it.
54 | - name: master_record_id
55 | description: If this object was deleted as the result of a merge, this field contains the ID of the record that was kept. If this object was deleted for any other reason, or has not been deleted, the value is null.
56 | - name: account_name
57 | description: Required. Name of the account.
58 | - name: number_of_employees
59 | description: Number of employees working at the company represented by this account.
60 | - name: owner_id
61 | description: The ID of the user who currently owns this account.
62 | - name: ownership
63 | description: Ownership type for the account, for example Private, Public, or Subsidiary.
64 | - name: parent_id
65 | description: ID of the parent object, if any.
66 | - name: rating
67 | description: The account’s prospect rating, for example Hot, Warm, or Cold.
68 | - name: record_type_id
69 | description: ID of the record type assigned to this object.
70 | - name: shipping_city
71 | description: Details of the shipping address for this account.
72 | - name: shipping_country
73 | description: Details of the shipping address for this account. Country.
74 | - name: shipping_postal_code
75 | description: Details of the shipping address for this account. Postal code.
76 | - name: shipping_state
77 | description: Details of the shipping address for this account. State.
78 | - name: shipping_street
79 | description: The street address of the shipping address for this account.
80 | - name: type
81 | description: Type of account, for example, Customer, Competitor, or Partner.
82 | - name: website
83 | description: The website of this account.
84 |
85 | - name: salesforce__contact_daily_history
86 | description: Each record is a daily record in a contact, starting with its first active date and updating up toward either the current date (if still active) or its last active date.
87 | columns:
88 | - name: contact_day_id
89 | description: Surrogate key hashed on `date_day` and `contact_id`
90 | tests:
91 | - unique
92 | - not_null
93 | - name: date_day
94 | description: Date on which the opportunity had these field values.
95 | - name: contact_id
96 | description: The unique, system-generated ID assigned during creation.
97 | - name: _fivetran_active
98 | description: true if it is the currently active record. false if it is a historical version of the record. Only one version of the record can be true.
99 | - name: _fivetran_start
100 | description: The time when the record was first created or modified in the source, based on a timestamp value in the source table that monotonically increases over time with data change or update.
101 | - name: _fivetran_end
102 | description: The time until which the record was active minus epsilon, where epsilon is the smallest time difference that can be stored in the timestamp type value.
103 | - name: _fivetran_synced
104 | description: The time at which fivetran last synced this record.
105 | - name: history_unique_key
106 | description: Surrogate key hashed on `_fivetran_start` and `contact_id`.
107 | - name: account_id
108 | description: ID of the account that’s the parent of this contact.
109 | - name: contact_description
110 | description: A description of the contact. Label is Contact Description up to 32 KB.
111 | - name: email
112 | description: The contact’s email address.
113 | - name: first_name
114 | description: The contact’s first name up to 40 characters.
115 | - name: home_phone
116 | description: The contact’s home telephone number.
117 | - name: individual_id
118 | description: ID of the data privacy record associated with this contact. This field is available if Data Protection and Privacy is enabled. This is a relationship field.
119 | - name: is_deleted
120 | description: Indicates whether the object has been moved to the Recycle Bin (true) or not (false). Label is Deleted.
121 | - name: last_activity_date
122 | description: >
123 | Value is the most recent of either:
124 | Due date of the most recent event logged against the record.
125 | Due date of the most recently closed task associated with the record.
126 | - name: last_modified_by_id
127 | description: Last Modified By ID
128 | - name: last_modified_date
129 | description: Last Modified Date
130 | - name: last_name
131 | description: Required. Last name of the contact up to 80 characters.
132 | - name: last_referenced_date
133 | description: The timestamp when the current user last accessed this record, a record related to this record, or a list view.
134 | - name: last_viewed_date
135 | description: The timestamp when the current user last viewed this record or list view. If this value is null, the user might have only accessed this record or list view (LastReferencedDate) but not viewed it.
136 | - name: lead_source
137 | description: The lead’s source.
138 | - name: mailing_city
139 | description: City mailing address details.
140 | - name: mailing_country
141 | description: Country mailing address details.
142 | - name: mailing_postal_code
143 | description: Postal code mailing address details.
144 | - name: mailing_state
145 | description: State mailing address details.
146 | - name: mailing_street
147 | description: Street mailing address details.
148 | - name: master_record_id
149 | description: >
150 | If this record was deleted as the result of a merge, this field contains the ID of the record that remains. If this record was deleted for any other reason, or has not been deleted, the value is null.
151 | This is a relationship field.
152 | - name: mobile_phone
153 | description: Contact’s mobile phone number.
154 | - name: contact_name
155 | description: Concatenation of FirstName, MiddleName, LastName, and Suffix up to 203 characters, including whitespaces.
156 | - name: owner_id
157 | description: >
158 | The ID of the owner of the account associated with this contact.
159 | This is a relationship field.
160 | - name: phone
161 | description: Telephone number for the contact. Label is Business Phone.
162 | - name: reports_to_id
163 | description: >
164 | This field doesn’t appear if IsPersonAccount is true.
165 | This is a relationship field.
166 | - name: title
167 | description: Title
168 |
169 | - name: salesforce__opportunity_daily_history
170 | description: Each record is a daily record in an opportunity, starting with its first active date and updating up toward either the current date (if still active) or its last active date.
171 | columns:
172 | - name: opportunity_day_id
173 | description: Surrogate key hashed on `date_day` and `opportunity_id`
174 | tests:
175 | - unique
176 | - not_null
177 | - name: date_day
178 | description: Date on which the opportunity had these field values.
179 | - name: opportunity_id
180 | description: The unique, system-generated ID assigned during creation.
181 | - name: _fivetran_active
182 | description: true if it is the currently active record. false if it is a historical version of the record. Only one version of the record can be true.
183 | - name: _fivetran_start
184 | description: The time when the record was first created or modified in the source, based on a timestamp value in the source table that monotonically increases over time with data change or update.
185 | - name: _fivetran_end
186 | description: The time until which the record was active minus epsilon, where epsilon is the smallest time difference that can be stored in the timestamp type value.
187 | - name: _fivetran_synced
188 | description: The time at which fivetran last synced this record.
189 | - name: history_unique_key
190 | description: Surrogate key hashed on `_fivetran_start` and `opportunity_id`.
191 | - name: account_id
192 | description: ID of the account associated with this opportunity.
193 | - name: amount
194 | description: Estimated total sale amount. For opportunities with products, the amount is the sum of the related products.
195 | - name: campaign_id
196 | description: ID of a related Campaign. This field is defined only for those organizations that have the campaign feature Campaigns enabled.
197 | - name: close_date
198 | description: Required. Date when the opportunity is expected to close.
199 | - name: created_date
200 | description: Date when the opportunity is was created.
201 | - name: opportunity_description
202 | description: Text description of the opportunity.
203 | - name: expected_revenue
204 | description: Read-only field that is equal to the product of the opportunity Amount field and the Probability.
205 | - name: fiscal
206 | description: If fiscal years are not enabled, the name of the fiscal quarter or period in which the opportunity CloseDate falls.
207 | - name: fiscal_quarter
208 | description: Represents the fiscal quarter. Valid values are 1, 2, 3, or 4.
209 | - name: fiscal_year
210 | description: Represents the fiscal year, for example, 2006.
211 | - name: forecast_category
212 | description: Restricted picklist field.
213 | - name: forecast_category_name
214 | description: The name of the forecast category.
215 | - name: has_open_activity
216 | description: Indicates whether an opportunity has an open event or task (true) or not (false).
217 | - name: has_opportunity_line_item
218 | description: Read-only field that indicates whether the opportunity has associated line items. A value of true means that Opportunity line items have been created for the opportunity.
219 | - name: has_overdue_task
220 | description: Indicates whether an opportunity has an overdue task (true) or not (false).
221 | - name: is_closed
222 | description: True, if Stage Name Label is Closed.
223 | - name: is_deleted
224 | description: Indicates whether the object has been moved to the Recycle Bin (true) or not (false).
225 | - name: is_won
226 | description: True, if Stage Name Label is Won.
227 | - name: last_activity_date
228 | description: Value is one of the following, whichever is the most recent:Due date of the most recent event logged against the record or Due date of the most recently closed task associated with the record.
229 | - name: last_referenced_date
230 | description: The timestamp when the current user last accessed this record, a record related to this record, or a list view.
231 | - name: last_viewed_date
232 | description: The timestamp when the current user last viewed this record or list view. If this value is null, the user might have only accessed this record or list view (LastReferencedDate) but not viewed it.
233 | - name: lead_source
234 | description: Source of this opportunity, such as Advertisement or Trade Show.
235 | - name: opportunity_name
236 | description: Required. A name for this opportunity.
237 | - name: next_step
238 | description: Description of next task in closing opportunity.
239 | - name: owner_id
240 | description: ID of the User who has been assigned to work this opportunity.
241 | - name: probability
242 | description: Percentage of estimated confidence in closing the opportunity.
243 | - name: record_type_id
244 | description: ID of the record type assigned to this object.
245 | - name: stage_name
246 | description: Required. Current stage of this record. The StageName field controls several other fields on an opportunity.
247 | - name: synced_quote_id
248 | description: The ID of the Quote that syncs with the opportunity.
249 | - name: type
250 | description: Type of opportunity. For example, Existing Business or New Business.
--------------------------------------------------------------------------------
/packages.yml:
--------------------------------------------------------------------------------
1 | packages:
2 | - package: fivetran/salesforce_source
3 | version: [">=1.1.0", "<1.2.0"]
--------------------------------------------------------------------------------