- TLC Home Home
- Discussions & Ideas Discussions & Ideas
- Product Guides Product Guides
- Knowledge Base Knowledge Base
- Developer Docs Developer Docs
- Education Education
- Blog TLC Blog
- Support Desk Support Desk
The use of omnichannel imports requires that your account be enabled for AudienceStream. The following topics will help you prepare your files for a successful import using the file import data source.
In this article:
The best data to import will help create a fuller and richer visitor profile of your customers. To get the most out of an omnichannel import the data should have a visitor identifier associated with each row of data. This will ensure that the corresponding visitor within the Customer Data Hub is enriched.
When multiple files are uploaded at the same time using SFTP or S3, the files are processed in the order of the upload timestamp.
The following data sets are recommended for use with omnichannel imports:
To ensure a successful import of the data, it is critical to understand the expected file format. Use the following guidelines when formatting your file:
"[""one"",""two"",""three""]"
"[1.99,20.99]"
Your CSV files must be named using the following format: {prefix}_{version}.csv
This format consists of the following two (2) parts:
Format | Description |
---|---|
prefix |
A unique identifier for groups of files that share the same CSV column names. |
version |
A unique identifier for a file within a prefix, usually a timestamp and (optionally) a version number |
File names are case-sensitive and may not contain special characters other than hyphen '-' and underscore '_'.
Prefix | Version | File Name |
---|---|---|
storepurchases |
20170319-a |
storepurchases_20170319-a.csv |
storepurchases |
20170319-b |
storepurchases_20170319-b.csv |
Prefix | Version | File Name |
---|---|---|
storereturns |
20170314 |
storereturns_20170314.csv |
storereturns |
20170315 |
storereturns_20170315.csv |
The prefix of one set of files should not match the prefix of another set of files. For example, attempts to maintain a prefix of store-transactions
and store-transactions-returns
will cause unexpected results because they share the same prefix: "store-transactions".
You can import up to 1,000,000 rows of data per day. The maximum number of rows per file is 100,000. Therefore, you can import the maximum amount of data by creating 10 files each with 100,000 rows for a total of 1,000,000 rows.
Smaller files, no bigger than 50MB, provide optimal import performance.
If a CSV file is larger than 100,000 rows it must be split into smaller files, each containing the header line from the original. In this example, a file named master_purchases.csv
has 325,000 rows of purchase data and is split into smaller files, each with 100,000 rows.
The split
command creates smaller files with a lexically ordered suffix using the characters a-z.
$ split -l 100000 -a 1 master_purchases.csv purchases- $ ls master_purchases.csv purchases-a purchases-b purchases-c purchases-d
The split command contains a header line in the first file, to which the bash script prepends an additional header in each split file. The results then contain duplicate header lines. If needed, you can manually remove the redundant header.
In this example, the resulting four (4) new files contain the following number of rows to total 325,000:
File Number | File Name | Number of Rows |
---|---|---|
1 | purchases-a | 100,000 |
2 | purchases-b | 100,000 |
3 | purchases-c | 100,000 |
4 | purchases-d | 25,000 |
Total Number of Rows | 325,000 |
The head
and cat
commands are then used to add the header line from the original file to the smaller files.
$ for file in purchases-* > do > head -n 1 master_purchases.csv > tmp > cat $file >> tmp > mv -f tmp $file > done
The data within your files should use the following guidelines to ensure a successful import:
Valid Values | Invalid Values |
---|---|
39.75 | $39.75 |
0 | zero |
1399.00 | €1.399,00 |
Once your files are ready, click one of the following links to proceed with configuring a file import or an omnichannel import.
Copyright All Rights Reserved © 2008-2021