The Import from DonorDrive Query API template uses the “DonorDrive Query API” to import data onto Civis Platform. This API is distinct from and should not be confused with other DonorDrive APIs, especially the “REST API” and “Public REST API” (for which Civis Platform has another import – please see here).
Parameters
- Instance Name (required): If your DonorDrive client instance is https://nonprofitname.donordrive.com, then the instance name that you need to provide is “nonprofitname”. Alternatively, if you have an API URL, the instance name can also be extracted from it: “https://api.donordrive.com/v1/[instance name]/view…”.
- DonorDrive Login (required): This is a custom credential on Civis Platform, where the username is the email address associated with your DonorDrive admin user account, and the password is the one corresponding to this email address.
- View ID (required): This is the ID of the “View Definition” of the DonorDrive data that you would like to import onto Civis Platform, e.g., “data.json”. You can find the view ID in an API URL: “https://api.donordrive.com/v1/[instance name]/view/[viewid]”.
- Columns (required): A comma-separated list of column names for the data to import. At least one column name must be provided.
- Where (optional): An optional SQL-style “where” clause for filtering the data. Examples: “some_column_name > 100”, “some_column_name = 500 AND donationentereddate > 2023-11-01”.
- Order by (optional): Optionally sort the data by some columns. Examples: “some_column_name DESC”, “some_column_name ASC”.
- Destination Database (required): The database in which to write records to.
- Destination Database Credential (required): A valid database credential for the cluster.
- Schema and Table (required): The schema and table name you would like to import the data into, e.g., “schema.table”.
-
If Table Exists (optional): The action to take if a table with the requested name already exists. Options are:
- Fail: The sync job fails if the table exists
- Append: Records will be appended to the existing table
- Truncate: Records on the table will be wiped out while maintaining the current columns.
- Drop: Removes the entire table including column information.
- Upsert: Update or insert records into the specified table. The upsert mode modifies the table by leveraging the Primary key as well as Last modified keys values provided to modify existing records or add new ones. Visit Upsert Mode for more information on how it works.
- Max Errors (optional): The maximum number of rows with errors to remove from the Civis Platform table import before failing. Defaults to 0 (i.e., no errors allowed).
- Dist Style (optional): The distribution style for the resulting table. One of 'even', 'all' or 'key'. Defaults to 'key'.
- Dist Key (optional): The column to use as the distkey for the table. Defaults to 'id'. If you import data that doesn’t have a column named ‘id’, please provide the column name for the primary key.
- Sort Key 1 (optional): The column to use as the sortkey for the table.
- Sort Key 2 (optional): The second column in a compound sortkey for the table.
- Primary Keys (optional): A comma separated list of the primary key column(s) of the destination table that uniquely identifies a record.
- Last Modified Keys (optional): A comma separated list of the columns indicating a record has been updated.
Log Level (optional): Which level of logging to use. The options are “INFO” (default), “DEBUG” (more verbose), and “WARNING” (less verbose).
Comments
0 comments
Article is closed for comments.