-
Notifications
You must be signed in to change notification settings - Fork 17
/
src_fivetran_formula.yml
375 lines (367 loc) · 23 KB
/
src_fivetran_formula.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
version: 2
sources:
- name: salesforce #This should always be salesforce
schema: "{{ var('salesforce_schema', 'salesforce') }}" #Modify this to be where your Salesforce data resides
database: #Add the database where your Salesforce data resides. Eg. 'my_salesforce_database'. By default the target.database is used.
#This source yml contains the following Salesforce tables: fivetran_formula, opportunity, account, user, user_role.
#If you would like to include additional source tables you can copy add them in a similar fashion, then paste within your
#root dbt project. Similarly, if you do not have these tables you can remove them.
tables:
- name: fivetran_formula_model
description: A table containing a Salesforce object and the full model statement to generate the formula model.
columns:
- name: object
description: The Salesforce object (warehouse table).
- name: model
description: The full model (select statement) which contains all formulas related to the Salesforce object.
- name: fivetran_formula
description: A table containing a mapping of sfdc formulas with a reference to corresponding table objects for the formulas to be applied.
columns:
- name: field
description: Name of the formula
- name: object
description: Reference to the table the formula is to be applied
- name: formula
description: Salesforce defined formula
- name: sql
description: Standard sql interpretation of the Salesforce defined formula, generated by Fivetran
- name: _fivetran_synced
description: Timestamp of when the record was synced by Fivetran
- name: opportunity
description: Represents an opportunity, which is a sale or pending deal.
columns:
- name: id
description: The unique, system-generated ID assigned during creation.
- name: _fivetran_synced
description: The time at which fivetran last synced this record
- name: account_id
description: ID of the account associated with this opportunity.
- name: amount
description: Estimated total sale amount. For opportunities with products, the amount is the sum of the related products.
- name: campaign_id
description: ID of a related Campaign. This field is defined only for those organizations that have the campaign feature Campaigns enabled.
- name: close_date
description: Required. Date when the opportunity is expected to close.
- name: created_date
description: Date when the opportunity is was created.
- name: description
description: Text description of the opportunity.
- name: expected_revenue
description: Read-only field that is equal to the product of the opportunity Amount field and the Probability.
- name: fiscal
description: If fiscal years are not enabled, the name of the fiscal quarter or period in which the opportunity CloseDate falls.
- name: fiscal_quarter
description: Represents the fiscal quarter. Valid values are 1, 2, 3, or 4.
- name: fiscal_year
description: Represents the fiscal year, for example, 2006.
- name: forecast_category
description: Restricted picklist field.
- name: forecast_category_name
description: The name of the forecast category.
- name: has_open_activity
description: Indicates whether an opportunity has an open event or task (true) or not (false).
- name: has_opportunity_line_item
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.
- name: has_overdue_task
description: Indicates whether an opportunity has an overdue task (true) or not (false).
- name: is_closed
description: True, if Stage Name Label is Closed.
- name: is_deleted
description: Indicates whether the object has been moved to the Recycle Bin (true) or not (false).
- name: is_excluded_from_territory_2_filter
description: Used for Filter-Based Opportunity Territory Assignment. Indicates whether the opportunity is excluded (True) or included (False) each time the APEX filter is executed.
- name: is_won
description: True, if Stage Name Label is Won.
- name: last_activity_date
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.
- name: last_referenced_date
description: The timestamp when the current user last accessed this record, a record related to this record, or a list view.
- name: last_viewed_date
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.
- name: lead_source
description: Source of this opportunity, such as Advertisement or Trade Show.
- name: name
description: Required. A name for this opportunity.
- name: next_step
description: Description of next task in closing opportunity.
- name: owner_id
description: ID of the User who has been assigned to work this opportunity.
- name: Pricebook2Id
description: ID of a related Pricebook2 object. The Pricebook2Id field indicates which Pricebook2 applies to this opportunity. The Pricebook2Id field is defined only for those organizations that have products enabled as a feature. You can specify values for only one field (Pricebook2Id or PricebookId)—not both fields. For this reason, both fields are declared nillable.
- name: pricebook_2_id
description: Unavailable as of version 3.0. As of version 8.0, the Pricebook object is no longer available. Use the Pricebook2Id field instead, specifying the ID of the Pricebook2 record.
- name: probability
description: Percentage of estimated confidence in closing the opportunity.
- name: record_type_id
description: ID of the record type assigned to this object.
- name: stage_name
description: Required. Current stage of this record. The StageName field controls several other fields on an opportunity.
- name: synced_quote_id
description: The ID of the Quote that syncs with the opportunity.
- name: territory_2_id
description: The ID of the territory that is assigned to the opportunity.
- name: type
description: Type of opportunity. For example, Existing Business or New Business.
- name: account
description: Represents an individual account, which is an organization or person involved with your business (such as customers, competitors, and partners).
columns:
- name: id
description: The unique, system-generated ID assigned during creation
- name: _fivetran_synced
description: The time at which fivetran last synced this record
- name: account_number
description: Account number assigned to this account (not the unique, system-generated ID assigned during creation).
- name: account_source
description: The source of the account record. For example, Advertisement, Data.com, or Trade Show.
- name: annual_revenue
description: Estimated annual revenue of the account.
- name: billing_city
description: Details for the billing address of this account.
- name: billing_country
description: Details for the billing address of this account.
- name: billing_country_code
description: The ISO country code for the account’s billing address.
- name: billing_geocode_accuracy
description: Accuracy level of the geocode for the billing address. See Compound Field Considerations and Limitations for details on geolocation compound fields.
- name: billing_latitude
description: Used with BillingLongitude to specify the precise geolocation of a billing address.
- name: billing_longitude
description: Used with BillingLatitude to specify the precise geolocation of a billing address.
- name: billing_postal_code
description: Details for the billing address of this account.
- name: billing_state
description: Details for the billing address of this account.
- name: billing_state_code
description: The ISO state code for the account’s billing address.
- name: billing_street
description: Street address for the billing address of this account.
- name: description
description: Text description of the account.
- name: fax
description: Fax number for the account.
- name: industry
description: An industry associated with this account.
- name: is_deleted
description: Indicates whether the object has been moved to the Recycle Bin (true) or not (false).
- name: jigsaw_company_id
description: References the ID of a company in Data.com. If an account has a value in this field, it means that the account was imported from Data.com.
- name: last_activity_date
description: Value is one of the following, whichever is the most recent
- name: last_referenced_date
description: The timestamp when the current user last accessed this record, a record related to this record, or a list view.
- name: last_viewed_date
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.
- name: master_record_id
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.
- name: name
description: Required. Name of the account.
- name: number_of_employees
description: Number of employees working at the company represented by this account.
- name: owner_id
description: The ID of the user who currently owns this account.
- name: ownership
description: Ownership type for the account, for example Private, Public, or Subsidiary.
- name: parent_id
description: ID of the parent object, if any.
- name: phone
description: Phone number for this account.
- name: photo_url
description: Path to be combined with the URL of a Salesforce instance (for example, https://yourInstance.salesforce.com/) to generate a URL to request the social network profile image associated with the account.
- name: rating
description: The account’s prospect rating, for example Hot, Warm, or Cold.
- name: record_type_id
description: ID of the record type assigned to this object.
- name: shipping_city
description: Details of the shipping address for this account
- name: shipping_country
description: Details of the shipping address for this account. Country
- name: shipping_country_code
description: The ISO country code for the account’s shipping address.
- name: shipping_geocode_accuracy
description: Accuracy level of the geocode for the shipping address.
- name: shipping_latitude
description: Used with ShippingLongitude to specify the precise geolocation of a shipping address.
- name: shipping_longitude
description: Used with ShippingLatitude to specify the precise geolocation of an address.
- name: shipping_postal_code
description: Details of the shipping address for this account. Postal code
- name: shipping_state
description: Details of the shipping address for this account. State
- name: shipping_state_code
description: The ISO state code for the account’s shipping address.
- name: shipping_street
description: The street address of the shipping address for this account.
- name: sic
description: Standard Industrial Classification code of the company’s main business categorization, for example, 57340 for Electronics.
- name: sic_desc
description: A brief description of an organization’s line of business, based on its SIC code.
- name: site
description: Name of the account’s location, for example Headquarters or London.
- name: ticker_symbol
description: The stock market symbol for this account. This field is available on business accounts, not person accounts.
- name: type
description: Type of account, for example, Customer, Competitor, or Partner.
- name: website
description: The website of this account.
- name: user
description: Represents a user in your organization.
columns:
- name: id
description: The unique, system-generated ID assigned during creation.
- name: _fivetran_synced
description: The time at which fivetran last synced this record
- name: _fivetran_deleted
description: True, if this field has been deleted
- name: about_me
description: Information about the user, such as areas of interest or skills.
- name: account_id
description: ID of the Account associated with a Customer Portal user. This field is null for Salesforce users.
- name: alias
description: Required. The user’s alias. For example, jsmith.
- name: badge_text
description: The community role, displayed on the user profile page just below the user name.
- name: banner_photo_url
description: The URL for the user's banner photo.
- name: call_center_id
description: If Salesforce CRM Call Center is enabled, represents the call center to which this user is assigned.
- name: city
description: The city associated with the user. Up to 40 characters allowed.
- name: community_nickname
description: Name used to identify this user in the Community application, which includes the ideas and answers features.
- name: company_name
description: The name of the user’s company.
- name: contact_id
description: ID of the Contact associated with this account. The contact must have a value in the AccountId field or an error occurs.
- name: country
description: The country associated with the user.
- name: country_code
description: The ISO country code associated with the user.
- name: default_group_notification_frequency
description: The default frequency for sending the user's Chatter group email notifications when the user joins groups.
- name: delegated_approver_id
description: Id of the user who is a delegated approver for this user.
- name: department
description: The company department associated with the user.
- name: digest_frequency
description: The frequency at which the system sends the user’s Chatter personal email digest.
- name: division
description: The division associated with this user, similar to Department and unrelated to DefaultDivision.
- name: email
description: Required. The user’s email address.
- name: email_encoding_key
description: Required. The email encoding for the user, such as ISO-8859-1 or UTF-8.
- name: email_preferences_auto_bcc
description: Determines whether the user receives copies of sent emails. This option applies only if compliance BCC emails are not enabled.
- name: employee_number
description: The user’s employee number.
- name: extension
description: The user’s phone extension number.
- name: fax
description: The user’s fax number.
- name: federation_identifier
description: Indicates the value that must be listed in the Subject element of a Security Assertion Markup Language (SAML) IDP certificate to authenticate the user for a client application using single sign-on.
- name: first_name
description: The user’s first name.
- name: forecast_enabled
description: Indicates whether the user is enabled as a forecast manager (true) or not (false).
- name: full_photo_url
description: The URL for the user's profile photo.
- name: geocode_accuracy
description: The level of accuracy of a location’s geographical coordinates compared with its physical address.
- name: individual_id
description: ID of the data privacy record associated with this user. This field is available if Data Protection and Privacy is enabled.
- name: is_active
description: Indicates whether the user has access to log in (true) or not (false).
- name: is_profile_photo_active
description: Indicates whether a user has a profile photo (true) or not (false).
- name: language_locale_key
description: Required. The user’s language, such as “French” or “Chinese (Traditional).”
- name: last_login_date
description: The date and time when the user last successfully logged in. This value is updated if 60 seconds have elapsed since the user’s last login.
- name: last_name
description: Required. The user’s last name.
- name: last_referenced_date
description: The timestamp for when the current user last viewed a record related to this record.
- name: last_viewed_date
description: The timestamp for when the current user last viewed this record. If this value is null, this record might only have been referenced (LastReferencedDate) and not viewed.
- name: latitude
description: Used with Longitude to specify the precise geolocation of an address.
- name: locale_sid_key
description: Required. This field is a restricted picklist field. The value of the field affects formatting and parsing of values, especially numeric values, in the user interface.
- name: longitude
description: Used with Latitude to specify the precise geolocation of an address.
- name: manager_id
description: The Id of the user who manages this user.
- name: medium_banner_photo_url
description: The URL for the medium-sized user profile banner photo.
- name: mobile_phone
description: The user’s mobile or cellular phone number.
- name: name
description: Concatenation of FirstName and LastName.
- name: offline_trial_expiration_date
description: The date and time when the user’s Connect Offline trial expires.
- name: phone
description: The user’s phone number.
- name: postal_code
description: The user’s postal or ZIP code.
- name: profile_id
description: Required. ID of the user’s Profile. Use this value to cache metadata based on profile. In earlier releases, this was RoleId.
- name: receives_admin_info_emails
description: Indicates whether the user receives email for administrators from Salesforce (true) or not (false).
- name: receives_info_emails
description: Indicates whether the user receives informational email from Salesforce (true) or not (false).
- name: sender_email
description: The email address used as the From address when the user sends emails. This address is the same value shown in Setup on the My Email Settings page.
- name: sender_name
description: The name used as the email sender when the user sends emails. This name is the same value shown in Setup on the My Email Settings page.
- name: signature
description: The signature text added to emails.
- name: small_banner_photo_url
description: The URL for the small user profile banner photo.
- name: small_photo_url
description: The URL for a thumbnail of the user's profile photo.
- name: state
description: The state associated with the User.
- name: state_code
description: The ISO state code associated with the user.
- name: street
description: The street address associated with the User.
- name: time_zone_sid_key
description: Required. This field is a restricted picklist field. A User time zone affects the offset used when displaying or entering times in the user interface.
- name: title
description: The user’s business title, such as “Vice President.”
- name: username
description: Contains the name that a user enters to log in. The value for this field must be in the form of an email address, using all lowercase characters. It must also be unique across all organizations.
- name: user_role_id
description: ID of the user’s UserRole.
- name: user_type
description: The category of user license.
- name: user_role
description: Represents a user role in your organization.
columns:
- name: id
description: The unique, system-generated ID assigned during creation
- name: _fivetran_synced
description: The time at which fivetran last synced this record
- name: _fivetran_deleted
description: True, if this field has been deleted
- name: case_access_for_account_owner
description: The case access level for the account owner.
- name: contact_access_for_account_owner
description: The contact access level for the account owner.
- name: developer_name
description: The unique name of the object in the API.
- name: forecast_user_id
description: The ID of the forecast manager associated with this role.
- name: may_forecast_manager_share
description: Indicates whether the forecast manager can manually share their own forecast.
- name: name
description: Required. Name of the role. Corresponds to Label on the user interface.
- name: opportunity_access_for_account_owner
description: Required. The opportunity access level for the account owner.
- name: parent_role_id
description: The ID of the parent role.
- name: portal_type
description: This value indicates the type of portal for the role
- name: rollup_description
description: Description of the forecast rollup.