JSON Files as an External Data Source
Last updated
Last updated
ou can import .json
files into Sandstorm to import data into your account. We’ll accept both one-time uploads and a recurring import of .json
files from your Amazon S3 Bucket.
We recommend you read and before getting started here.
We accept files with the .json extension
with this caveat: each line of the file must be a valid JSON object. For example:
JSON
JSON
Names will have the bold titles. These are the two required fields:
“_p” (required): _p
corresponds to a KM Identity. We will accept both new identities and identities already in our database.
Then include at least one of these three names, depending on what type of data you’re importing:
“_n” (optional): _n
corresponds to the name of a KM Event. You can add an event name, such as Signed Up. It does not matter if you currently have data for this event, or if this is a completely new event.
“_p2” (optional): _p2
corresponds to an Alias. In the rare case you are uploading aliases, you can add additional aliases to the KM identity.
“any value” (optional): Any other Name:Value
pairs will be treated as properties.
record
command)JSON
record
command with properties)JSON
set
command)JSON
alias
command)It’s uncommon to upload aliases, but this is the format if you absolutely need to:
JSON
.json
file“_t” (required): A timestamp of when the event/property occurred. The time format is in seconds as a UTC Unix epoch. If you are using dates in Excel, you may need to convert those dates to Unix timestamps. See this answer on . Be aware that Unix timestamps are calculated based on GMT, which may affect the way you convert times to Unix timestamps.
Here's a sample for reference.