The Tealium Customer Data Platform (CDP) allows you to create File Import as a Data Source that allows you to ingest data from a CSV file. Using a File Import, you can enrich your existing CPD data with demographic, prospect and lead data. This can be setup through an Amazon S3 bucket, Microsoft Azure File/Blob Storage or an FTP/SFTP connection. Setting up a File Import is rather simple through the Tealium admin. Follow Tealium’s step by step guide to setup your initial connection. While this guide walks you through how to setup your configuration, it lacks how to properly debug when encountering issues. The “What if the files fail to be processed” section of Tealium’s step by step guide offers high level debugging with the following suggestions. While helpful, it does not properly equip you with the ability to debug further.
- The CSV file is improperly formatted and is therefore not a valid CSV file.
- The CSV file must be in UTF-8 format with no BOM encoding.
- Column names used in the file definition do not exist in the file
- A column name is used more than once in the File Service configuration
In this article, we will be covering how to best configure your CSV so it can be successfully imported into Tealium and how to debug your Data Source when you do encounter issues.
Structuring Your CSV Data
Similar to how we structure website data to pass through the Data Layer, we must do the same for our CSV. There are some “gotchas” here that might cause your File Import to fail. Let’s overview some common data types you are likely to pass in your CSV.
Use strings for all Boolean and numeric non-product variables. Booleans should be passed as “1” or “0” vs “true” or “false”. Tealium cites that as being a more stable way of passing Boolean values while also making it apparent from the admin the variable is a Boolean due to its values.
|Boolean||is_member: “1”||is_member: true|
|Integer||estimate_total: “123.45”||estimate_total: 123.45|
Best practice is to set product level data, like price, quantity and IDs, into arrays vs a string separated by commas as this approach is prone to errors. See examples below.
Recommended Array Structure:
membership_types: [“Res HVAC Service”, “Res Plumbing Service”]
Acceptable String Structure:
membership_types: “Res HVAC Service, Res Plumbing Service”
One thing to note for arrays is that they will need to be wrapped in a string for the CSV. Like so:
“[“”Res HVAC Service”, “Res Plumbing Service””]”
You will need to normalize some of your data like dates and empty values. While the ability to reformat the date is available when configuring the Data Source, all rows within the CSV should be uniformly formatted.
In addition, if a column does not contain a value there is no need to pass in a placeholder value like “null”, an empty string or an empty array. You can simply leave these values as blank within the CSV.
Debugging the Data Source
You’ve successfully set up your Data Source and prepped your CSV data, but your CSV isn’t importing any rows of data. A red dot appears, an indication that none of your data has been imported. Unfortunately, Tealium’s interface doesn’t do much to help you in terms of figuring out exactly what is causing the issue.