Skip to content
Back to skills

Source 8cfab0fd18140bed2b6b2d52

ASecurity

Read from Salesforce into a Spark DataFrame in an AIDP notebook via the AIDP `aidataplatform` Spark format handler. Use when the user mentions Salesforce, SFDC, Sales Cloud, Service Cloud, Account, Opportunity, Lead, sObject, SOQL. Auth is host/port + user/password. Read-only.

  • 2 stars
  • 0 votes
  • 0 copies
  • 0 views
  • Added November 7, 2026
databasespythongobashsqlgitapidatabasesecurity

Works with

  • api

Security analysis

A100/100

Pro scans all 3 files and shows the line behind each finding

Scanned November 7, 2026

npx -y skills add gutsofpratik/OpenClaude-Skills --skill source-8cfab0fd18140bed2b6b2d52 --agent claude-code

Installs into .claude/skills of the current project.

Are you the author of Source 8cfab0fd18140bed2b6b2d52?

Add the live security badge to your README. It updates with every re-scan.

Security grade badge for Source 8cfab0fd18140bed2b6b2d52
[![Security: A — Skills Directory](https://www.skillsdirectory.com/api/skills/gutsofpratik-source-8cfab0fd18140bed2b6b2d52/badge)](https://www.skillsdirectory.com/skills/gutsofpratik-source-8cfab0fd18140bed2b6b2d52)

More formats (shields.io, HTML) on the badges page. Keep it an A: scan every change in CI with Pro.

Download with Pro
SKILL.md
---
name: aidp-salesforce
description: Read from Salesforce into a Spark DataFrame in an AIDP notebook via the AIDP `aidataplatform` Spark format handler. Use when the user mentions Salesforce, SFDC, Sales Cloud, Service Cloud, Account, Opportunity, Lead, sObject, SOQL. Auth is host/port + user/password. Read-only.
allowed-tools: Read, Write, Edit, Bash
---

# `aidp-salesforce` — Salesforce via AIDP `aidataplatform`

## When to use
- User wants to ingest Salesforce data (Account, Opportunity, Lead, Contact, custom sObjects) into a Spark DataFrame from an AIDP notebook.
- User mentions: "Salesforce", "SFDC", "Sales Cloud", "Service Cloud", "sObject", "SOQL", a Salesforce object name (Account, Opportunity, etc.).

## When NOT to use
- For arbitrary REST APIs with a custom manifest → [`aidp-rest-generic`](../aidp-rest-generic/SKILL.md).
- For Oracle CX/CRM → [`aidp-siebel`](../aidp-siebel/SKILL.md) (Siebel) or Fusion CX via [`aidp-fusion-rest`](../aidp-fusion-rest/SKILL.md).

## Prerequisites in the AIDP notebook
1. Helpers on `sys.path` (run `aidp-connectors-bootstrap` first).
2. Env vars / OCI Vault secrets:
   - `SFDC_HOST` (Salesforce login host, e.g. `login.salesforce.com` or `<my-domain>.my.salesforce.com`)
   - `SFDC_PORT` (typically `443`)
   - `SFDC_DATABASE_NAME` (org name / database identifier; for most tenants this is just the org name)
   - `SFDC_USER` (Salesforce username — typically `<email>`)
   - `SFDC_PASSWORD` (password concatenated with security token: `<password><security-token>`)
   - `SFDC_SCHEMA` (typically `SFORCE` for the connector)
   - `SFDC_TABLE` (sObject API name, e.g. `Account`, `Opportunity`, `Custom_Object__c`)

## Read

```python
import os
from oracle_ai_data_platform_connectors.aidataplatform import (
    AIDP_FORMAT, aidataplatform_options,
)

opts = aidataplatform_options(
    type="SFORCE",
    host=os.environ["SFDC_HOST"],
    port=int(os.environ.get("SFDC_PORT", "443")),
    database_name=os.environ["SFDC_DATABASE_NAME"],
    user=os.environ["SFDC_USER"],
    password=os.environ["SFDC_PASSWORD"],
    schema=os.environ.get("SFDC_SCHEMA", "SFORCE"),
    table=os.environ["SFDC_TABLE"],   # e.g. "Account", "Opportunity"
)
df = spark.read.format(AIDP_FORMAT).options(**opts).load()
df.show(10)
```

## Pushdown SQL

Use `pushdown.sql` to push a SOQL-like query at the source — useful for filtering on indexed fields, joins via relationship paths, or LIMIT semantics.

```python
opts = aidataplatform_options(
    type="SFORCE",
    host=os.environ["SFDC_HOST"],
    port=int(os.environ.get("SFDC_PORT", "443")),
    database_name=os.environ["SFDC_DATABASE_NAME"],
    user=os.environ["SFDC_USER"],
    password=os.environ["SFDC_PASSWORD"],
    extra={
        "pushdown.sql": (
            "SELECT Id, Name, AnnualRevenue, BillingCountry "
            "FROM Account "
            "WHERE AnnualRevenue > 1000000 AND BillingCountry = 'United States'"
        ),
    },
)
df = spark.read.format(AIDP_FORMAT).options(**opts).load()
df.show(10)
```

## Gotchas
- **`type` is `SFORCE`, not `SALESFORCE`.** Easy to get wrong if you're following the human-readable name. The connector type literally says `SFORCE`.
- **Password requires the security token appended.** Salesforce username/password auth needs `<password><security-token>` concatenated as a single string. The security token is reset each time the user changes their password — emailed to the user.
- **API limits.** Salesforce enforces per-org daily API call quotas. Bulk reads count against the quota. Use `pushdown.sql` with selective filters and field projection to minimize calls.
- **Connector is read-only.** Salesforce writes (create/update sObjects) need to go through the Salesforce REST/Bulk API or the Composite API directly.
- **Custom objects** end in `__c` (e.g. `Project__c`). Custom fields end in `__c` too — always include the trailing `__c` in `pushdown.sql`.
- **Field-level security.** The connector user inherits Salesforce profile + permission sets. Fields hidden by FLS won't appear in the result.

## References
- Helper: [scripts/oracle_ai_data_platform_connectors/aidataplatform.py](../../scripts/oracle_ai_data_platform_connectors/aidataplatform.py)
- Official sample: [oracle-samples/oracle-aidp-samples → `data-engineering/ingestion/Read_Only_Ingestion_Connectors/Salesforce.ipynb`](https://github.com/oracle-samples/oracle-aidp-samples/blob/main/data-engineering/ingestion/Read_Only_Ingestion_Connectors/Salesforce.ipynb)

Files in this skill

  • PROVENANCE.json301 B
  • SKILL.md4.4 KB
  • UPSTREAM-LICENSE.txt1.1 KB

Attribution

Is this your skill, or is something wrong with this listing? Request removal or report an issue. Author removals are honored within 72 hours.

Comments

Loading comments…

Newsletter

Get the weekly list of safe new skills, and the ones we pulled.