Skip to content

feat: Implement Salesforce custom object support #221

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

karakanb
Copy link
Contributor

@karakanb karakanb commented Jun 3, 2025

This commit introduces support for ingesting data from Salesforce custom objects.

The get_records helper function in the Salesforce source has been updated to recognize a new table naming convention: custom:<object-name>. When this convention is used, the source will correctly translate the object name to the Salesforce API format (<object-name>__c) for all interactions, including describing the object, querying data, and constructing SOQL queries.

Key changes:

  • Modified ingestr/src/salesforce/helpers.py:
    • The get_records function now parses the sobject parameter.
    • If sobject starts with custom:, it extracts the object name and appends __c.
    • Otherwise, the standard object name is used.
  • Added ingestr/tests/unit/test_salesforce.py:
    • New unit tests to verify the correct handling of custom object names.
    • Tests ensure that standard object ingestion remains unaffected.
    • Tests cover data iteration, field exclusion (compound fields), and datetime formatting.

All new and existing tests pass, confirming the functionality.

This commit introduces support for ingesting data from Salesforce custom objects.

The `get_records` helper function in the Salesforce source has been updated to recognize a new table naming convention: `custom:<object-name>`. When this convention is used, the source will correctly translate the object name to the Salesforce API format (`<object-name>__c`) for all interactions, including describing the object, querying data, and constructing SOQL queries.

Key changes:
- Modified `ingestr/src/salesforce/helpers.py`:
    - The `get_records` function now parses the `sobject` parameter.
    - If `sobject` starts with `custom:`, it extracts the object name and appends `__c`.
    - Otherwise, the standard object name is used.
- Added `ingestr/tests/unit/test_salesforce.py`:
    - New unit tests to verify the correct handling of custom object names.
    - Tests ensure that standard object ingestion remains unaffected.
    - Tests cover data iteration, field exclusion (compound fields), and datetime formatting.

All new and existing tests pass, confirming the functionality.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant