Guides
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:
.csv
).zip
).csv.gz
)..gpg
appended, for example, .csv.gpg
or .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:
-custom_event.csv
-commerce_event.csv
-screen_view.csv
-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 development
or 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.
Device IDs
device_info.android_advertising_id
device_info.android_uuid
device_info.ios_advertising_id
device_info.att_authorization_status
device_info.ios_idfv
device_info.roku_advertising_id
device_info.roku_publisher_id
device_info.fire_advertising_id
device_info.microsoft_advertising_id
User IDs
mpid
user_identities.customerid
user_identities.email
user_identities.facebook
user_identities.microsoft
user_identities.twitter
user_identities.yahoo
user_identities.other
user_identities.other2
user_identities.other3
user_identities.other4
User attributes:
If you include user attributes, for each, include a column named as user_attributes.key
, where key is a user attribute key. For example:
user_attributes.$FirstName
user_attributes.communication_preference
user_attributes.Member Tier
Attribute names with spaces are allowed and do not require quotes. All the keys listed in the JSON Reference are supported.
Events:
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.event_name
and events.data.custom_event_type
to include custom events.Commerce events: use columns with the following names for commerce events.
events.data.product_action.action
events.data.product_action.products.id
events.data.product_action.products.name
events.data.product_action.products.category
events.data.product_action.products.brand
events.data.product_action.products.variant
events.data.product_action.products.position
events.data.product_action.products.price
events.data.product_action.products.quantity
events.data.product_action.products.coupon_code
events.data.product_action.products.added_to_cart_time_ms
events.data.product_action.products.total_product_amount
events.data.product_action.products.custom_attributes
Only one product per event can be included for commerce events uploaded via CSV.
Data types:
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
.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?