You can import bulk data, both user attribute and events, from your data warehouse or legacy system using comma separated values (CSV) files. You can use this technique in all regions and with all outputs.
Use the following process to load user attribute or event data from CSV files:
Prepare the CSV files for import. Files must follow the guidelines in this section.
Files must be sent in one of the following formats:
.gpg appended, for example,
.csv.gz.gpg). Only encrypted OR unencrypted files can be accepted, but not both. You must use PGP encryption with mParticle’s public key. See Encrypted files for additional instructions.
File name requirements:
-eventless.csv for eventless uploads of user identities and attributes
Column names: specify fields according to our JSON Schema, using dot notation.
environment set to
production. If an
environment column is not included, data is ingested into the production environment.
User and Device IDs: as with any data sent to mParticle, you must include a column with at least one user ID or device ID.
If you include user attributes, for each, include a column named as
user_attributes.key, where key is a user attribute key. For example:
Attribute names with spaces are allowed and do not require quotes. All the keys listed in the JSON Reference are supported.
events.data.timestamp_unixtime_ms to set the event time.
events.data.custom_attributes.key, where key is an event attribute key, to set custom event attributes.
events.data.screen_name if you want to include the screen name.
events.data.custom_event_type to include custom events.
Commerce events: use columns with the following names for commerce events.
Only one product per event can be included for commerce events uploaded via CSV.
All data in the CSV is converted to a string. The only exceptions to this are values that require a particular data type, such as MPID or IDFA.
mParticle maintains an SFTP server where you will drop your CSV files. Use the following instructions to securely retrieve your credentials and find the hostname and path to use when you drop your files on the SFTP server.
To get your SFTP username and password:
Configure the Custom CSV Feed as input. This step provides the hostname and folder path on the SFTP server where your CSV files must be dropped.
To configure the Custom CSV Feed:
Visit SETUP > Inputs > Feeds in the mParticle UI and click the Add Feed Input button, then select Custom CSV Feed from the list.
If you’ve already added the Custom CSV Feed, it won’t show up in the list. Scroll through the list of feeds until you see Custom CSV Feed, and then click the large plus sign in the gray bar to create a new feed. You need one feed for each different event type.
Enter the following values:
drop folder. If you don’t see one, create a folder named
drop folder, and name it using the pathname provided in the mParticle UI as shown in the previous section. For example, based on the previous example, the folder path and name is
sftp.mparticle.com:4422:drop/us1-123456789123456789/. Hint: Verify that there are no trailing spaces in the name.
Files on the SFTP location are added to the processing queue nearly immediately. Depending on file count and file size, a backlog may develop. You can observe how much data has been processed using Data Master and your outbound connections. There is no notification of processing progress or completion.
Was this page helpful?