Using the TableName parameter with the Salesforce driver
- Last Updated: October 7, 2020
- 2 minute read
- DataDirect Connectors
- ODBC
- Aha! 8.0
- Amazon Redshift 8.0
- Apache Cassandra 8.0
- Apache Hive 8.0
- Apache Spark SQL 8.0
- Autonomous Rest Connector 8.0
- Cloudera Impala 7.1
- dBase 7.1
- + 24
The value required in the TableName parameter varies, depending on the bulk operation specified in the SetBulkOperation function. The following paragraphs describe the TableName value based on whether the Bulk Operation type is set to INSERT, DELETE, or UPSERT.
BULK_OPERATION_INSERT
table_name [(column_list)]
where:
- column_list
- is
(columnSpec[, columnSpec]…)
- columnSpec
- can be
columnNameorforeignKeyColumnName EXT_ID externalIdColumnNameThe column names define the mapping between columns in the table and columns in the bulk data file. The column names can also indicate which columns are External ID columns.
The SQL equivalent of this function is:
INSERT INTO table_name [( column_list )] VALUES (? … ?)
BULK_OPERATION_DELETE
table_name (column_list)
where:
- column_list
- is the ID column, which identifies the row to delete.
For DELETE, the ID column is the only valid column in the column list.
The SQL equivalent of this function is:
DELETE FROM table_name WHERE <column> = ? AND <column> = ? …
BULK_OPERATION_UPDATE
table_name (column_list)
where:
- column_list
- is ID_column
, <update column>[,<update column>]… - ID_column
- must be one of the columns in the column list. The ID column identifies which row to update; the other columns are the list of columns to be updated.
The SQL equivalent of this function is:
UPDATE table_name SET <update column> = ? … WHERE <ID column> = ? …
BULK_OPERATION_UPSERT
table_name (column_list)
where:
- column_list
- is the same as for INSERT except that at least one of the columns must
be identified as an external ID.
For UPSERT,
column_listcan be(columnSpec[,columnSpec]…) - columnSpec
- can be one of the following:
- columnName
-
foreignKeyColumnName EXT_ID externalIdColumnName -
extIdColumn
EXT_IDwhere extIdColumn is the column that is checked to determine whether the row already exists in the database.
The SQL equivalent of this function is one of the following:
- If no row matching the table’s key columns is found:
INSERT INTOtable_name[(column_list)] VALUES (? … ?) - If a row matching the table’s key columns is found:
UPDATEtable_nameSET <table column> = ? … WHERE <key column> = ? …