Skip to main content
GuideServerConfigure and deploy Tabsdata servers on your machine.TutorialsConfigure data integration workflows within a running Tabsdata server.Advanced TutorialsBuild end-to-end workflows between two specific systems.API ReferenceCLI ReferenceRelease Notes
Version: 2.0.0

SalesforceReportSrc

class
class SalesforceReportSrc(
reports: ReportsSpec,
column_name_strategy: Literal['columnName', 'label'] = 'columnName',
find_report_by: Literal['id', 'name'] | None = None,
filter: FilterSpec | None = None,
filter_logic: str | None = None,
last_modified_column: str | None = None,
initial_last_modified: datetime | None = None,
src_cfg: SrcCfgSpec | None = None,
)

Bases: Src

Categories: source

Salesforce report source for @publisher -- Tabular reports only.

Every table this source publishes automatically carries two metadata columns: @td.salesforce.report_id, the resolved report id that produced the row (even when reports named the report by name), and @td.salesforce.last_modified, the source's initial_last_modified cutoff (empty when unset). Setting the src_cfg key tabsdata.src_metadata.drop to True leaves them off.

Examples

Publish a Tabular report by id, filtered server-side before download:

@publisher(
source=SalesforceReportSrc(
reports=["00O000000000001"],
filter=[("Type", "equals", "Customer")],
),
output_tables=["customers"],
)
def ingest(customers: TableFrameSpec) -> TableFrameSpec:
return customers

Parameters

parameter
reportsReportsSpec (list[str])

Report ids or names, one output slot per entry (non-empty list).

parameter
column_name_strategyLiteral['columnName', 'label']

"columnName" (default, API names) or "label" (display names).

parameter
find_report_byLiteral['id', 'name'] | None

Lookup strategy for a reports entry that could be either a report id (15- or 18-char alphanumeric) or a report name -- "id" forces id lookup, "name" forces name lookup. Leave unset to auto-detect; set it to break the tie when both forms resolve.

parameter
filterFilterSpec | None (list[tuple[str, Literal['equals', 'notEqual', 'lessThan', 'greaterThan', 'lessOrEqual', 'greaterOrEqual', 'contains', 'notContain', 'startsWith', 'includes', 'excludes', 'within', 'between'], str]] | None)

Optional list of (column, operator, value) triples applied on the server before download. operator is one of equals, notEqual, lessThan, greaterThan, lessOrEqual, greaterOrEqual, contains, notContain, startsWith, includes, excludes, within or between.

parameter
filter_logicstr | None

Optional boolean expression over the filter entries, e.g. "(1 AND 2) OR 3".

parameter
last_modified_columnstr | None

Optional column for incremental last-modified filtering; requires initial_last_modified (and vice versa).

parameter
initial_last_modifieddatetime | None

Cutoff datetime; requires last_modified_column.

parameter
src_cfgSrcCfgSpec | None (Mapping[Literal['salesforce.logging_level', 'tabsdata.src_metadata.drop'], Any] | None)

Optional connector config over the keys salesforce.logging_level and tabsdata.src_metadata.drop.

Methods

method
validate
def validate()

Validate the last-modified column and cutoff are set together.

Called by the framework; raises SalesforceValidateException.