The NGPVAN: Import Targets script template allows users to import the VAN IDs from a target in NGP or VAN to a Platform table. Additionally, you can import target metadata for a single target_id or all targets. You can use it for both NGP and VAN targets by inputting the respective credential (NGP or VAN) in the NGPVAN Credential parameter.
You can create your script using this link, or in Platform you can navigate to Code → Scripts → More Script Templates and search for "NGPVAN: Import Targets" or “67401”. If you are not shared on this template, please contact Civis support.
Parameters
- Import Mode (required): One of ‘Targets Metadata Import’ or ‘Targets VAN ID Import’. Targets VAN ID import returns a table of van_ids saved in the specified target. Target metadata returns target metadata such as name, description, status, and type.
- Database (required): Name of the destination database for imported data.
- Database Credential (required): A valid database credential for the cluster.
- Output Table (required): Name of table to store NGPVAN response.
- Output Table Setting (required): Drop or append existing rows in output table
- NGPVAN Targets ID: Unique ID of NGPVAN target. Required for Targets VAN ID import, optional for Targets Metadata Import - if blank the script will import metadata for all targets.
- Status: The status of targets to return. One of 'Setup', 'Ready', or 'Active'. For use in Targets metadata import mode only.
- Type: The type of targets to return. One of 'Static' or 'Dynamic'. For use in Targets metadata import mode only.
- NGP VAN Credential (required): A custom Civis credential with a username and password for NGP or VAN.
- Database Mode (required): NGPVAN database, MyVoterfile or MyCampaign
Output Table Fields
Target VAN ID import mode
Column Name |
Type |
vanid |
int |
target_id |
int |
imported_at |
timestamp |
Target metadata import mode
Column Name |
Type |
aresubgroupssticky |
boolean |
description |
string |
markedsubgroup |
string |
name |
string |
points |
int |
status |
string |
subgroups |
JSON string |
targetid |
int |
type |
string |
imported_at |
timestamp |
Comments
0 comments
Please sign in to leave a comment.