Skip to content

Commit d1e2ab4

Browse files
committed
source-salesforce-native: add a capture snapshot test
The capture snapshot test only includes two bindings, but that's ok. Some of the value of the capture snapshot test is ensuring the connector starts up & captures documents without error. That would have caught the SourcedSchema bug with Pydantic v2 in the previous commit.
1 parent 3f20209 commit d1e2ab4

File tree

6 files changed

+438
-5
lines changed

6 files changed

+438
-5
lines changed
Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,34 @@
1+
$defs:
2+
Meta:
3+
properties:
4+
op:
5+
default: u
6+
description: 'Operation type (c: Create, u: Update, d: Delete)'
7+
enum:
8+
- c
9+
- u
10+
- d
11+
title: Op
12+
type: string
13+
row_id:
14+
default: -1
15+
description: Row ID of the Document, counting up from zero, or -1 if not known
16+
title: Row Id
17+
type: integer
18+
title: Meta
19+
type: object
20+
additionalProperties: true
21+
properties:
22+
_meta:
23+
$ref: '#/$defs/Meta'
24+
description: Document metadata
25+
Id:
26+
title: Id
27+
type: string
28+
required:
29+
- Id
30+
title: SalesforceResource
31+
type: object
32+
x-infer-schema: true
33+
reduce:
34+
strategy: merge
Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,34 @@
1+
$defs:
2+
Meta:
3+
properties:
4+
op:
5+
default: u
6+
description: 'Operation type (c: Create, u: Update, d: Delete)'
7+
enum:
8+
- c
9+
- u
10+
- d
11+
title: Op
12+
type: string
13+
row_id:
14+
default: -1
15+
description: Row ID of the Document, counting up from zero, or -1 if not known
16+
title: Row Id
17+
type: integer
18+
title: Meta
19+
type: object
20+
additionalProperties: true
21+
properties:
22+
_meta:
23+
$ref: '#/$defs/Meta'
24+
description: Document metadata
25+
Id:
26+
title: Id
27+
type: string
28+
required:
29+
- Id
30+
title: SalesforceResource
31+
type: object
32+
x-infer-schema: true
33+
reduce:
34+
strategy: merge
Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
collections:
2+
acmeCo/Account:
3+
schema: Account.schema.yaml
4+
key:
5+
- /Id
6+
acmeCo/User:
7+
schema: User.schema.yaml
8+
key:
9+
- /Id
Lines changed: 16 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,22 @@
1-
---
1+
import:
2+
- acmeCo/flow.yaml
23
captures:
34
acmeCo/source-salesforce-native:
45
endpoint:
56
local:
67
command:
7-
- python
8-
- "-m"
9-
- source_salesforce_native
8+
- python
9+
- -m
10+
- source_salesforce_native
1011
config: config.yaml
11-
bindings: []
12+
bindings:
13+
- resource:
14+
name: Account
15+
interval: PT5M
16+
schedule: 55 23 * * *
17+
target: acmeCo/Account
18+
- resource:
19+
name: User
20+
interval: PT5M
21+
schedule: 55 23 * * *
22+
target: acmeCo/User
Lines changed: 291 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,291 @@
1+
[
2+
[
3+
"acmeCo/Account",
4+
{
5+
"AccountNumber": null,
6+
"AccountSource": null,
7+
"Active__c": null,
8+
"AnnualRevenue": null,
9+
"BillingAddress": null,
10+
"BillingCity": null,
11+
"BillingCountry": null,
12+
"BillingGeocodeAccuracy": null,
13+
"BillingLatitude": null,
14+
"BillingLongitude": null,
15+
"BillingPostalCode": null,
16+
"BillingState": null,
17+
"BillingStreet": null,
18+
"CleanStatus": "Pending",
19+
"CreatedById": "005bm000005TvBKAA0",
20+
"CreatedDate": "redacted",
21+
"CustomerPriority__c": null,
22+
"DandbCompanyId": null,
23+
"Description": null,
24+
"DunsNumber": null,
25+
"ENT_customer_calculated_ARR__c": null,
26+
"Fax": null,
27+
"Id": "001bm00000NMK67AAH",
28+
"Industry": null,
29+
"IsDeleted": false,
30+
"Jigsaw": null,
31+
"JigsawCompanyId": null,
32+
"LastActivityDate": null,
33+
"LastModifiedById": "005bm000005TvBKAA0",
34+
"LastModifiedDate": "redacted",
35+
"LastReferencedDate": null,
36+
"LastViewedDate": "redacted",
37+
"MasterRecordId": null,
38+
"NaicsCode": null,
39+
"NaicsDesc": null,
40+
"Name": "Sample Account for Entitlements",
41+
"NumberOfEmployees": null,
42+
"NumberofLocations__c": null,
43+
"OperatingHoursId": null,
44+
"OwnerId": "005bm000005TvBKAA0",
45+
"Ownership": null,
46+
"ParentId": null,
47+
"Phone": null,
48+
"PhotoUrl": "/services/images/photo/001bm00000NMK67AAH",
49+
"Rating": null,
50+
"SLAExpirationDate__c": null,
51+
"SLASerialNumber__c": null,
52+
"SLA__c": null,
53+
"ShippingAddress": null,
54+
"ShippingCity": null,
55+
"ShippingCountry": null,
56+
"ShippingGeocodeAccuracy": null,
57+
"ShippingLatitude": null,
58+
"ShippingLongitude": null,
59+
"ShippingPostalCode": null,
60+
"ShippingState": null,
61+
"ShippingStreet": null,
62+
"Sic": null,
63+
"SicDesc": null,
64+
"Site": null,
65+
"SystemModstamp": "redacted",
66+
"TickerSymbol": null,
67+
"Tradestyle": null,
68+
"Type": null,
69+
"UpsellOpportunity__c": null,
70+
"Website": null,
71+
"YearStarted": null,
72+
"_meta": {
73+
"uuid": "DocUUIDPlaceholder-329Bb50aa48EAa9ef"
74+
},
75+
"my_time_field__c": "redacted"
76+
}
77+
],
78+
[
79+
"acmeCo/User",
80+
{
81+
"AboutMe": null,
82+
"AccountId": null,
83+
"Address": {
84+
"city": null,
85+
"country": "US",
86+
"geocodeAccuracy": null,
87+
"latitude": null,
88+
"longitude": null,
89+
"postalCode": null,
90+
"state": null,
91+
"street": null
92+
},
93+
"Alias": "ABair",
94+
"BadgeText": "",
95+
"BannerPhotoUrl": "/profilephoto/005/B",
96+
"CallCenterId": null,
97+
"City": null,
98+
"CommunityNickname": "alexb",
99+
"CompanyName": "Estuary",
100+
"ContactId": null,
101+
"Country": "US",
102+
"CreatedById": "005bm000005Te1hAAC",
103+
"CreatedDate": "redacted",
104+
"DefaultGroupNotificationFrequency": "N",
105+
"DelegatedApproverId": null,
106+
"Department": null,
107+
"DigestFrequency": "D",
108+
"Division": null,
109+
"Email": "alexb@estuary.dev",
110+
"EmailEncodingKey": "UTF-8",
111+
"EmailPreferencesAutoBcc": true,
112+
"EmailPreferencesAutoBccStayInTouch": false,
113+
"EmailPreferencesStayInTouchReminder": true,
114+
"EmployeeNumber": null,
115+
"EndDay": "23",
116+
"Extension": null,
117+
"Fax": null,
118+
"FederationIdentifier": null,
119+
"FirstName": "Alex",
120+
"ForecastEnabled": true,
121+
"FullPhotoUrl": "https://estuary2-dev-ed.develop.file.force.com/profilephoto/005/F",
122+
"GeocodeAccuracy": null,
123+
"Id": "005bm000005Te1hAAC",
124+
"IndividualId": null,
125+
"IsActive": true,
126+
"IsExtIndicatorVisible": false,
127+
"IsProfilePhotoActive": false,
128+
"JigsawImportLimitOverride": 300,
129+
"LanguageLocaleKey": "en_US",
130+
"LastLoginDate": "redacted",
131+
"LastModifiedById": "005bm000005Te1hAAC",
132+
"LastModifiedDate": "redacted",
133+
"LastName": "Bair",
134+
"LastPasswordChangeDate": "redacted",
135+
"LastReferencedDate": "2025-10-20T13:15:34.000Z",
136+
"LastViewedDate": "redacted",
137+
"Latitude": null,
138+
"LocaleSidKey": "en_US",
139+
"Longitude": null,
140+
"ManagerId": null,
141+
"MediumBannerPhotoUrl": "/profilephoto/005/E",
142+
"MediumPhotoUrl": "https://estuary2-dev-ed.develop.file.force.com/profilephoto/005/M",
143+
"MobilePhone": null,
144+
"Name": "Alex Bair",
145+
"NumberOfFailedLogins": 0,
146+
"OfflinePdaTrialExpirationDate": null,
147+
"OfflineTrialExpirationDate": null,
148+
"OutOfOfficeMessage": "",
149+
"PasswordExpirationDate": "redacted",
150+
"Phone": null,
151+
"PostalCode": null,
152+
"ProfileId": "00ebm000004y9vnAAA",
153+
"ReceivesAdminInfoEmails": true,
154+
"ReceivesInfoEmails": false,
155+
"SenderEmail": null,
156+
"SenderName": null,
157+
"Signature": null,
158+
"SmallBannerPhotoUrl": "/profilephoto/005/D",
159+
"SmallPhotoUrl": "https://estuary2-dev-ed.develop.file.force.com/profilephoto/005/T",
160+
"StartDay": "6",
161+
"State": null,
162+
"StayInTouchNote": null,
163+
"StayInTouchSignature": null,
164+
"StayInTouchSubject": null,
165+
"Street": null,
166+
"SuAccessExpirationDate": null,
167+
"SystemModstamp": "redacted",
168+
"TimeZoneSidKey": "America/Los_Angeles",
169+
"Title": null,
170+
"UserPermissionsCallCenterAutoLogin": false,
171+
"UserPermissionsInteractionUser": false,
172+
"UserPermissionsJigsawProspectingUser": false,
173+
"UserPermissionsKnowledgeUser": false,
174+
"UserPermissionsMarketingUser": true,
175+
"UserPermissionsOfflineUser": true,
176+
"UserPermissionsSFContentUser": true,
177+
"UserPermissionsSiteforceContributorUser": false,
178+
"UserPermissionsSiteforcePublisherUser": false,
179+
"UserPermissionsSupportUser": true,
180+
"UserPermissionsWorkDotComUserFeature": false,
181+
"UserPreferencesActionLauncherEinsteinGptConsent": false,
182+
"UserPreferencesActivityRemindersPopup": true,
183+
"UserPreferencesApexPagesDeveloperMode": false,
184+
"UserPreferencesAssistiveActionsEnabledInActionLauncher": false,
185+
"UserPreferencesCacheDiagnostics": false,
186+
"UserPreferencesContentEmailAsAndWhen": false,
187+
"UserPreferencesContentNoEmail": false,
188+
"UserPreferencesCreateLEXAppsWTShown": false,
189+
"UserPreferencesDisCommentAfterLikeEmail": false,
190+
"UserPreferencesDisMentionsCommentEmail": false,
191+
"UserPreferencesDisProfPostCommentEmail": false,
192+
"UserPreferencesDisableAllFeedsEmail": false,
193+
"UserPreferencesDisableBookmarkEmail": false,
194+
"UserPreferencesDisableChangeCommentEmail": false,
195+
"UserPreferencesDisableEndorsementEmail": false,
196+
"UserPreferencesDisableFileShareNotificationsForApi": false,
197+
"UserPreferencesDisableFollowersEmail": false,
198+
"UserPreferencesDisableLaterCommentEmail": false,
199+
"UserPreferencesDisableLikeEmail": false,
200+
"UserPreferencesDisableMentionsPostEmail": false,
201+
"UserPreferencesDisableMessageEmail": false,
202+
"UserPreferencesDisableProfilePostEmail": false,
203+
"UserPreferencesDisableSharePostEmail": false,
204+
"UserPreferencesEnableAutoSubForFeeds": false,
205+
"UserPreferencesEventRemindersCheckboxDefault": true,
206+
"UserPreferencesExcludeMailAppAttachments": false,
207+
"UserPreferencesFavoritesShowTopFavorites": false,
208+
"UserPreferencesFavoritesWTShown": false,
209+
"UserPreferencesGlobalNavBarWTShown": false,
210+
"UserPreferencesGlobalNavGridMenuWTShown": false,
211+
"UserPreferencesHasCelebrationBadge": false,
212+
"UserPreferencesHasSentWarningEmail": false,
213+
"UserPreferencesHasSentWarningEmail238": false,
214+
"UserPreferencesHasSentWarningEmail240": false,
215+
"UserPreferencesHideBiggerPhotoCallout": false,
216+
"UserPreferencesHideCSNDesktopTask": false,
217+
"UserPreferencesHideCSNGetChatterMobileTask": false,
218+
"UserPreferencesHideChatterOnboardingSplash": false,
219+
"UserPreferencesHideEndUserOnboardingAssistantModal": false,
220+
"UserPreferencesHideLightningMigrationModal": false,
221+
"UserPreferencesHideS1BrowserUI": false,
222+
"UserPreferencesHideSecondChatterOnboardingSplash": false,
223+
"UserPreferencesHideSfxWelcomeMat": false,
224+
"UserPreferencesJigsawListUser": false,
225+
"UserPreferencesLightningExperiencePreferred": true,
226+
"UserPreferencesLiveAgentMiawSetupDeflection": false,
227+
"UserPreferencesNativeEmailClient": false,
228+
"UserPreferencesNewLightningReportRunPageEnabled": false,
229+
"UserPreferencesPathAssistantCollapsed": false,
230+
"UserPreferencesPreviewCustomTheme": false,
231+
"UserPreferencesPreviewLightning": false,
232+
"UserPreferencesReceiveNoNotificationsAsApprover": false,
233+
"UserPreferencesReceiveNotificationsAsDelegatedApprover": false,
234+
"UserPreferencesRecordHomeReservedWTShown": false,
235+
"UserPreferencesRecordHomeSectionCollapseWTShown": false,
236+
"UserPreferencesReminderSoundOff": false,
237+
"UserPreferencesReverseOpenActivitiesView": false,
238+
"UserPreferencesSRHOverrideActivities": false,
239+
"UserPreferencesShowCityToExternalUsers": false,
240+
"UserPreferencesShowCityToGuestUsers": false,
241+
"UserPreferencesShowCountryToExternalUsers": false,
242+
"UserPreferencesShowCountryToGuestUsers": false,
243+
"UserPreferencesShowEmailToExternalUsers": false,
244+
"UserPreferencesShowEmailToGuestUsers": false,
245+
"UserPreferencesShowFaxToExternalUsers": false,
246+
"UserPreferencesShowFaxToGuestUsers": false,
247+
"UserPreferencesShowForecastingChangeSignals": false,
248+
"UserPreferencesShowForecastingRoundedAmounts": false,
249+
"UserPreferencesShowManagerToExternalUsers": false,
250+
"UserPreferencesShowManagerToGuestUsers": false,
251+
"UserPreferencesShowMobilePhoneToExternalUsers": false,
252+
"UserPreferencesShowMobilePhoneToGuestUsers": false,
253+
"UserPreferencesShowPostalCodeToExternalUsers": false,
254+
"UserPreferencesShowPostalCodeToGuestUsers": false,
255+
"UserPreferencesShowProfilePicToGuestUsers": false,
256+
"UserPreferencesShowStateToExternalUsers": false,
257+
"UserPreferencesShowStateToGuestUsers": false,
258+
"UserPreferencesShowStreetAddressToExternalUsers": false,
259+
"UserPreferencesShowStreetAddressToGuestUsers": false,
260+
"UserPreferencesShowTerritoryTimeZoneShifts": false,
261+
"UserPreferencesShowTitleToExternalUsers": true,
262+
"UserPreferencesShowTitleToGuestUsers": false,
263+
"UserPreferencesShowWorkPhoneToExternalUsers": false,
264+
"UserPreferencesShowWorkPhoneToGuestUsers": false,
265+
"UserPreferencesSortFeedByComment": false,
266+
"UserPreferencesSuppressEventSFXReminders": false,
267+
"UserPreferencesSuppressTaskSFXReminders": false,
268+
"UserPreferencesTaskRemindersCheckboxDefault": true,
269+
"UserPreferencesUserDebugModePref": false,
270+
"UserRoleId": null,
271+
"UserType": "Standard",
272+
"Username": "alexb@estuary.dev",
273+
"_meta": {
274+
"uuid": "DocUUIDPlaceholder-329Bb50aa48EAa9ef"
275+
},
276+
"my_decimal_geolocation__Latitude__s": "12.0",
277+
"my_decimal_geolocation__Longitude__s": "50.3",
278+
"my_decimal_geolocation__c": {
279+
"latitude": 12.0,
280+
"longitude": 50.3
281+
},
282+
"my_geolocation__Latitude__s": "43.2",
283+
"my_geolocation__Longitude__s": "100.0",
284+
"my_geolocation__c": {
285+
"latitude": 43.2,
286+
"longitude": 100.0
287+
},
288+
"my_time_field__c": "redacted"
289+
}
290+
]
291+
]

0 commit comments

Comments
 (0)