lib/remi/data_subject/salesforce.rb in remi-0.2.28 vs lib/remi/data_subject/salesforce.rb in remi-0.2.29
- old
+ new
@@ -106,9 +106,10 @@
#
# Returns true if the load operation was successful
def load!
@logger.info "Performing Salesforce #{@operation} on object #{@sfo}"
+ df_as_array_of_hashes = df.to_a[0] # This probably wouldn't work with a non-Daru df
if @operation == :update
Remi::SfBulkHelper::SfBulkUpdate.update(restforce_client, @sfo, df_as_array_of_hashes, logger: @logger)
elsif @operation == :create
Remi::SfBulkHelper::SfBulkCreate.create(restforce_client, @sfo, df_as_array_of_hashes, logger: @logger)
elsif @operation == :upsert