Load fileactivity allows you to import data in one structured form to use this data in Adobe Campaign. The data is temporarily imported and another activity is necessary to definitively integrate it in the Adobe Campaign database.
Context of use
The way in which the data will be extracted is defined when the activity is configured. The file to load may be a list of contacts, for example.
Only the "flat" structure files are taken into account, such as the .txt, .csv, etc., files for example.
- Use the file structure to apply it to another file's data (recovered using theTransfer fileactivity) or,
- Use the structure and data from the file to import it into Adobe Campaign.
The activity configuration involves two steps. First, you need to define the expected file structure by uploading a sample file. Once this is done, you can specify the origin of the file whose data will be imported.
The data of the sample file is used for configuring the activity but is not imported. We recommend using a sample file containing little data.
- Drag and drop aLoad fileactivity into your workflow.
- Select the activity, then open it using the button from the quick actions that appear.
- Upload the sample file that will let you define the expected structure when importing the final file.Once the data file is uploaded, two new tabs appear in the activity:File structureandColumn definition.
- Go to theFile structuretab to view the structure that is automatically detected from the sample file.If the file structure was incorrectly detected, you have several options to correct any possible errors:
- You can choose to use the structure of another file by selecting theDetect structure from a new fileoption.
- You can modify the default detection parameters to adapt them to your file. TheFile typefield lets you specify if the file you want to import is made up of columns with fixed length. In that case, you must also specify the maximum number of characters for each column in theColumn definitiontab.All of the detection options necessary to correctly recover the data from the file are regrouped inFile format. You can modify them then re-detect the structure of the last file loaded in the activity by taking into account these new settings. To do this, use theApply configurationbutton. For example, you can specify a different column separator.This operation takes into account the last file that was loaded in the activity. If the file detected is large, the data preview will only show the first 30 lines.In theFile formatsection, theCheck columns from file against column definitionsoption lets you verify that the columns of the file you are uploading correspond to the column definition.If the number and/or name of columns don't match the column definition, an error message will display when executing the workflow. If the option is not activated, warnings will display in the log file.
- Go to theColumn definitiontab to check the data format for each column and adjust the parameters if necessary.TheColumn definitiontab allows you to precisely specify the data structure of each column in order to import data that does not contain any errors (for example, using null management) and make it match the types that are already present in the Adobe Campaign database for future operations.For example, you can change the label of a column, select its type (string, integer, date, etc.) or even specify error processing.For more information, refer to the Column format section.
- In theExecutiontab, specify whether the file is to be processed for loading data:
- Comes from an inbound transition in the workflow.
- Is the one that you uploaded during the previous step.
- Is a new file to upload from the local machine. TheUpload a new file from local machineoption appears if uploading a first file was already defined in the workflow. This allows you to upload another file to be processed if the current file does not suit your needs.
- If the file that you want to load the data from is compressed into a GZIP file (.gz), select theDecompressionoption in theAdd a pre-processing stepfield. This allows you to unzip the file before loading the data. This option is only available if the file comes from the activity's inbound transition.
- TheKeep the rejects in a fileoption enables you to download a file containing errors that occurred during the import, and to apply to it a post-processing stage.TheAdd date and time to the file nameoption lets you add a timestamp the name of the file containing the rejects.
- Confirm the configuration of your activity and save your workflow.
When you load a sample file, the column format is automatically detected with the default parameters for each data type. You can modify these default parameters in order to specify the particular processes to apply to your data, particularly when there is an error or an empty value.
To do this, select
Edit propertiesfrom the quick actions of the column whose format you would like to define. The column format detail window will open.
You may then modify the formatting for each column.
The column formatting allows you to define the value processing of each column:
- Ignore column: does not process this column during data loading.
- Data type: specifies the type of data expected for each column.
- Format and separators,Properties: specify the properties of a text, the time, date, and numerical value format, as well as the separator specified by the column context.
- Maximum number of characters: specifies the maximum number of characters for string type columns.This field must be filled in when loading files made up of columns with fixed length.
- Letter case management: defines whether a character case process needs to be applied forTextdata.
- White space management: specifies whether certain spaces need to be ignored in a string forTextdata.
- Time format,Date format: specify the format forDate,TimeandDate and timedata.
- Format: allows you to define the format of numerical values forIntegerandFloating numberdata.
- Separator: defines the separator specified by the column context (thousands separator or decimal separator for numerical values, separator for dates and time) forDate,Time,Date and time,Integer, andFloating numberdata.
- Remapping of values: this field is only available in the column detail configuration. It lets you transform certain values when they are imported. For example, you can transform "three" into "3".
- Error processing: defines the behavior if an error is encountered.
Error processingconcerns errors regarding values in the imported file. For example, a faulty data type encountered ("four" all in letters for an "Integer" column), a string containing more characters than the maximum number authorized, a date with faulty separators, etc. However, this option does not concern errors generated by empty value management.
- Ignore the value: the value is ignored. A warning is generated in the workflow execution log.
- Reject the line: the entire line is not processed.
- Use a default value: replaces the value causing the error with a default value, defined in theDefault valuefield.
- Use a default value in case the value is not remapped: replaces the value causing the error with a default value, defined in theDefault valuefield, unless a mapping was defined for the erroneous value (see theRemapping of valuesoption above).
- Reject the line when there is no remapping value: the entire line is not processed unless a mapping was defined for the erroneous value (see theRemapping of valuesoption above).
- Default value: specifies the default value according to the error processing chosen.
- Empty value management: specifies how to manage empty values during data loading.
- Generate an error for numerical fields: generates an error for the numerical fields only, otherwise inserts a NULL value.
- Insert NULL in the corresponding field: authorizes empty values. The value NULL is therefore inserted.
- Generate an error: generates an error if a value is empty.
Example 1: Updating the database
The load file activity mainly structures the data from a transfer file activity in order to integrate it into the existing data.
The following example shows the result of an automatically downloaded load file activity via a transfer file activity, followed by an update data activity. This workflow aims to enrich the Adobe Campaign database with new profiles or to update existing profiles using the data recovered from the imported file.
- Drag and drop aTransfer fileactivity into your workflow and configure it in a way so that it recovers the file you would like.
- Drag and drop aLoad fileactivity into your workflow and place it after theTransfer fileactivity.
- Select the activity, then open it using the button from the quick actions that appear.
- In theFile to loadsection of theExecutiontab, check theUse the file specified in the inbound transitionoption.
- Configure your activity as specified earlier.
Once the workflow has started, the data from the uploaded file is extracted and then used to enrich the Adobe Campaign database.
Example 2: Sending an email with enriched fields
The load file activity also enables to send an email enriched with additional data from an external file in the same workflow.
The example below shows how to send an email using additional data retrieved from an external file through the load file activity. In this example, the external file contains a list of profiles with their associated account number. You want to import this data to send an email to each profile with their account number.
- Drag and drop aQueryactivity into your workflow and open it to define the main target.
- Drag and drop aLoad fileactivity to assign some data to a profile. In this example, load a file containing account numbers corresponding to some profiles of the database.
- Drag and drop anEnrichmentactivity into your workflow and link the load file and query activities to it.
- In theAdvanced relationstab of the enrichment activity, select the0 or 1 cardinality simple linkand define the fields to be used for reconciliation. Here we use the last name to reconcile the data with the database profiles.
- In theAdditional datatab, select the elements that you want to use in your email. Here select Account number (column from the file that you retrieved through the load file activity).For more on this, see the Enrichment section.
- Drag and drop aSegmentationactivity into your workflow and open it to refine the main target.For more on this, see the Segmentation section.
- Drag and drop anEmail deliveryactivity into your workflow and open it.
- Add a personalization field and select the additional data defined in the enrichment activity (here Account number) from theAdditional data (targetData)node. This enables to dynamically retrieve the account number of each profile in the email content.
- Save the email and start the workflow.
The email is sent to the target. Each profile receives the email with their corresponding account number.