---
warning: DO NOT CHANGE THIS MANUALLY, THIS IS GENERATED BY https://github.com/duckdb/community-extensions repository, check README there
title: salesforce
excerpt: |
DuckDB Community Extensions
Read-only access to Salesforce orgs as DuckDB SQL tables over the official REST and Bulk APIs — OAuth refresh-token or JWT-bearer auth (credentials from inline options, environment variables, or an SFDX auth URL), native ATTACH, projection + predicate pushdown, COUNT pushdown, explicit server-side aggregates with GROUP BY, lazy/auto/Bulk transports with PK chunking (Bulk blob/base64 compatibility guard), a per-job API quota governor, parent + grandparent relationship STRUCT columns with diagnostics, queryAll (archived + deleted), Tooling-API fast schema, and metadata helpers (manual cache refresh, picklist values, record types). Requires DuckDB v1.5.4 or newer.
# Submission file for https://github.com/duckdb/community-extensions
#
# This update bumps salesforce from v0.19.1 to v0.19.2 (own-repo release
# 2026-10-14: tag v0.19.2, commit 2c96c1916c6067d979f578c1b73d7872457425d3,
# Release published with signed assets). Deltas: version + repo.ref bumped;
# extended_description gains the v0.19.2 sentence (latest_date_covered
# column, read_only ATTACH option, plan-time Id validation,
# sf_timeout_read_s). Function count unchanged (28, all self-documented).
extension:
name: salesforce
description: Read-only access to Salesforce orgs as DuckDB SQL tables over the official REST and Bulk APIs — OAuth refresh-token or JWT-bearer auth (credentials from inline options, environment variables, or an SFDX auth URL), native ATTACH, projection + predicate pushdown, COUNT pushdown, explicit server-side aggregates with GROUP BY, lazy/auto/Bulk transports with PK chunking (Bulk blob/base64 compatibility guard), a per-job API quota governor, parent + grandparent relationship STRUCT columns with diagnostics, queryAll (archived + deleted), Tooling-API fast schema, and metadata helpers (manual cache refresh, picklist values, record types). Requires DuckDB v1.5.4 or newer.
version: 0.19.2
language: C++
build: cmake
license: MIT
# Maintainer: Fernando Lozer — https://github.com/flozer
maintainers:
- flozer
# CI-validated platforms: linux_amd64 + windows_amd64 (baseline) + osx_arm64
# (extra). The rest stay excluded until built/tested (osx_amd64 = cross-compile;
# wasm has no sockets; mingw/arm/musl not validated). OpenSSL is the only
# third-party dependency, resolved from vcpkg.json by the community CI.
excluded_platforms: "osx_amd64;wasm_mvp;wasm_eh;wasm_threads;windows_amd64_mingw;linux_amd64_musl;linux_arm64;linux_arm64_musl;windows_arm64"
repo:
github: flozer/duckdb-salesforce
# community-extensions CI checks out exactly this ref to build + sign.
# PLACEHOLDER - pin to the v0.19.2 tag commit before submitting.
ref: 2c96c1916c6067d979f578c1b73d7872457425d3
docs:
hello_world: |
-- Published build is signed: INSTALL salesforce FROM community; LOAD salesforce;
-- Connect with an OAuth refresh-token Connected App.
-- Set SF_CLIENT_ID, SF_CLIENT_SECRET, SF_REFRESH_TOKEN, and optionally SF_LOGIN_URL.
ATTACH 'salesforce://myorg' AS sf (TYPE salesforce, auth_source 'env');
SELECT Id, Name FROM sf.Account WHERE Name = 'Acme' LIMIT 10;
extended_description: |
duckdb-salesforce attaches a Salesforce org as a read-only DuckDB catalog.
Tables map to sObjects; SELECT runs over REST /query (or /queryAll for
archived + soft-deleted rows), Bulk API 2.0 (lazy-streamed, optional
parallel PK chunking), or an auto-selected transport, with SOQL projection +
predicate pushdown and COUNT pushdown. salesforce_aggregate() runs explicit
server-side SOQL aggregates (MIN/MAX/SUM/AVG/COUNT, optional filter and
GROUP BY) without dragging rows down, and salesforce_relationships() reports
parent/grandparent expansion. Read-only metadata helpers are available too:
salesforce_refresh_metadata() (manual per-ATTACH cache refresh),
salesforce_picklist_values(), and salesforce_record_types(). A Bulk
blob/base64 compatibility guard keeps incompatible scans off Bulk, and
blob bodies / epoch datetimes have clear documented limitations. Opt-in
parent- and grandparent-relationship STRUCT columns, a per-job API quota
governor, and Tooling-API fast schema discovery round it out. Authentication
is OAuth 2.0 refresh-token or JWT
bearer, with credentials from inline options, environment variables, or an
SFDX auth URL; credentials stay in memory and are never logged; TLS
server-certificate verification is always on. Read-only: all mutating
catalog operations throw. Since v0.15.1 every function self-documents
through duckdb_functions() (description, runnable example, real parameter
names), so SQL clients and AI agents can discover the surface from the
connection. Since v0.16.0-v0.17.0, no-group COUNT, COUNT(DISTINCT), MIN
and MAX queries push down transparently (kill-switch
sf_aggregate_pushdown; MIN/MAX need a sortable numeric/temporal/boolean
field; SUM/AVG deliberately stay local — the server sums in floating
point), salesforce_relationship_graph recurses child relationships up to
max_depth with cycle protection, and the Report Bridge resolves a report's
base object from the official reportTypeMetadata when the first category
is unambiguous. Built and tested against DuckDB v1.5.4, v1.5.5 and
v1.5.6 (v1.5.2/v1.5.3 support was dropped in v0.15.0 — see CHANGELOG.md).
Full change history in this repo's CHANGELOG.md.
Since v0.19.2, salesforce_deleted_ids returns latest_date_covered (the
getDeleted coverage frontier, for wide-window sweep checkpoints), the
read_only ATTACH option is accepted as a documented no-op (the catalog is
read-only by design), Id literals in =/!=/IN filters are validated at
plan time (15/18 alphanumeric chars; clear error instead of Salesforce's
generic INVALID_QUERY_FILTER_OPERATOR), and the per-attempt HTTP read
timeout is tunable via sf_timeout_read_s (default 60s, cap 3600s).
Since v0.19.1,
salesforce_deleted_ids paginates its queryAll sweep (v0.19.0 truncated at
exactly 2,000 ids) and uses the Replication API getDeleted() as the
default source for ANY window width (the 15-minute cap was an incorrect
assumption; latestDateCovered resume + boundary dedup), covering objects
with no IsDeleted field (e.g. User).
Since v0.19.0, salesforce_deleted_ids(catalog, object, since, until)
surfaces the ids deleted in the org within a window (Replication API
getDeleted for exact deletion timestamps; a queryAll IsDeleted scan as
fallback for wider windows), salesforce_bulk_resume(catalog, job_id)
re-streams the results of an existing Bulk query job (recovery without
re-running it), salesforce_scan(catalog, object, filter, ...) scans an
sObject directly with per-call overrides, transient HTTP failures retry
with tunable sf_retry_max/sf_retry_backoff_ms, and well-known Salesforce
errorCodes surface with embedded remedy hints.
extension_star_count: 3
extension_star_count_pretty: 3
extension_download_count: 6446
extension_download_count_pretty: 6.4k
image: '/images/community_extensions/social_preview/preview_community_extension_salesforce.png'
layout: community_extension_doc
---
### Compatibility Matrix
This table covers all DuckDB releases that have not reached [end-of-life](https://duckdb.org/release_calendar), including LTS releases, and shows the 2 most recent patch releases of each. Older patch releases are not listed, but the extension may be available for them as well.