Skip to content

Commit 8a8ac6e

Browse files
anilm386psainics
authored andcommitted
new upsert
1 parent 6edaa7a commit 8a8ac6e

File tree

4 files changed

+43
-9
lines changed

4 files changed

+43
-9
lines changed

src/e2e-test/features/salesforcesink/RunTime.feature

Lines changed: 38 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -132,3 +132,41 @@ Feature: Salesforce Sink - Run time Scenarios
132132
Then Verify the pipeline status is "Succeeded"
133133
Then Close the pipeline logs
134134
Then Validate the values of records transferred from Bigquery to Salesforce is equal
135+
136+
@SINK-TS-SF-RNTM-04 @BQ_SOURCE_TEST @DELETE_TEST_DATA
137+
Scenario: Verify user should be able to see ingest the records successfully using upsert operation
138+
When Open Datafusion Project to configure pipeline
139+
And Select plugin: "BigQuery" from the plugins list as: "Source"
140+
And Navigate to the properties page of plugin: "BigQuery"
141+
Then Replace input plugin property: "project" with value: "projectId"
142+
Then Enter input plugin property: "datasetProject" with value: "projectId"
143+
Then Enter input plugin property: "referenceName" with value: "BQReferenceName"
144+
Then Enter input plugin property: "dataset" with value: "dataset"
145+
Then Enter input plugin property: "table" with value: "bqSourceTable"
146+
Then Validate "BigQuery" plugin properties
147+
And Close the Plugin Properties page
148+
And Select Sink plugin: "Salesforce" from the plugins list
149+
And Connect plugins: "BigQuery" and "Salesforce" to establish connection
150+
And Navigate to the properties page of plugin: "Salesforce"
151+
And fill Authentication properties for Salesforce Admin user
152+
Then Enter input plugin property: "referenceName" with value: "ReferenceName"
153+
And Select radio button plugin property: "operation" with value: "upsert"
154+
Then Enter input plugin property: "externalIdField" with value: "UpsertColumnvalue"
155+
And Enter input plugin property: "sObject" with value: "sobject.account"
156+
And Select dropdown plugin property: "errorHandling" with option value: "Skip on error"
157+
Then Validate "Salesforce" plugin properties
158+
And Close the Plugin Properties page
159+
And Save the pipeline
160+
And Preview and run the pipeline
161+
Then Wait till pipeline preview is in running state
162+
Then Open and capture pipeline preview logs
163+
Then Verify the preview run status of pipeline in the logs is "succeeded"
164+
Then Close the pipeline logs
165+
Then Close the preview
166+
Then Deploy the pipeline
167+
Then Run the Pipeline in Runtime
168+
Then Wait till pipeline is in running state
169+
Then Open and capture logs
170+
Then Verify the pipeline status is "Succeeded"
171+
Then Close the pipeline logs
172+
Then Validate the values of records transferred from Bigquery to Salesforce is equal
Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1 @@
1-
create table `DATASET.TABLE_NAME` (Name STRING, Col_Timestamp__c TIMESTAMP, Col_Date__c DATE, Col_Currency__c FLOAT64,
2-
Col_Email__c STRING, Col_Number__c FLOAT64, Col_GeoLocation__Latitude__s FLOAT64,
3-
Col_GeoLocation__Longitude__s FLOAT64, Col__c STRING, Col_Url__c STRING, Col_Time__c TIME, Col_Text__c STRING)
1+
create table DATASET.TABLE_NAME (Id__c FLOAT64, Name STRING, Col_Timestamp__c TIMESTAMP, Col_Date__c DATE, Col_Currency__c FLOAT64, Col_Email__c STRING, Col_Number__c FLOAT64, Col__c STRING, Col_Url__c STRING, Col_Time__c TIME, Col_Text__c STRING)
Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,3 @@
1-
insert into `DATASET.TABLE_NAME` (Name, Col_Timestamp__c, Col_Date__c, Col_Currency__c, Col_Email__c, Col_Number__c,
2-
Col_GeoLocation__Latitude__s, Col_GeoLocation__Longitude__s, Col__c, Col_Url__c, Col_Time__c, Col_Text__c) values
3-
('adam','2019-03-10 04:50:01 UTC','2021-01-28',61.823765812,'skfdsfds@gmail.com',898365444,37.794116,-122.3432,
4-
'984746334','abc/123','20:26:34','find');
5-
1+
insert into DATASET.TABLE_NAME (Id__c, Name, Col_Timestamp__c, Col_Date__c, Col_Currency__c, Col_Email__c, Col_Number__c,Col__c, Col_Url__c, Col_Time__c, Col_Text__c) values
2+
(786777,'adam','2019-03-10 04:50:01 UTC','2021-01-28',61.823765812,'skfdsfds@gmail.com',-122.3432,
3+
'984746334','abc/123','20:26:34','find');

src/e2e-test/resources/pluginParameters.properties

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ invalid.admin.consumer.secret=lmnop891011
1818
#SOQL Query
1919
simple.query=SELECT Id, Name, Phone FROM Account
2020
test.query=SELECT Id,Name,Col_Timestamp__c,Col_Date__c,Col_Currency__c,Col_Email__c,Col_Number__c,\
21-
Col_GeoLocation__Latitude__s,Col_GeoLocation__Longitude__s,Col__c,Col_Url__c,Col_Time__c,Col_Text__c FROM Automation_custom__c
21+
Col__c,Col_Url__c,Col_Time__c,Col_Text__c FROM Automation_custom__c
2222
where.query=SELECT name FROM Opportunity WHERE StageName='Needs Analysis'
2323
groupby.query=SELECT CampaignId, AVG(Amount) FROM Opportunity GROUP BY CampaignId
2424
childtoparent.query=SELECT Id, Name, Account.Name FROM Contact WHERE Account.Industry = 'Chemicals'

0 commit comments

Comments
 (0)