Details
-
Improvement
-
Status: Resolved
-
Major
-
Resolution: Fixed
-
1.25.0
-
None
Description
Currently, the QuerySalesforceObject processor in NiFi is capable of querying active records from Salesforce. However, it lacks the functionality to retrieve deleted records, which is critical for scenarios where we need to track changes or removals of records, especially for audit and compliance purposes. This improvement will add support for querying deleted records (soft deletes in Salesforce), leveraging the isDeleted field in Salesforce's SOQL queries.
Requirements:
- New Processor Property:
-
- Add a Boolean property: Include Deleted Records.
- When set to true, the processor should include records where the isDeleted field is true.
- SOQL Query Modification:
-
- Modify the query structure to include the isDeleted field in the WHERE clause when querying the object. For example:
- SELECT Id, Name, IsDeleted FROM ContentVersion WHERE IsDeleted = true.
- Modify the query structure to include the isDeleted field in the WHERE clause when querying the object. For example:
- Backward Compatibility:
-
- Ensure backward compatibility by keeping the default behavior of excluding deleted records unless the new property is enabled.
Acceptance Criteria:
- Users should be able to enable or disable the querying of deleted records via a new processor property.
- The processor should return both deleted and non-deleted records when appropriate.