Skip to main content

AWS S3

Radar can stream both events and locations to AWS S3.

Use the AWS S3 integration to make Radar data available in a simple object storage format within your own systems, making your locations and events data more easily accessible by your engineers and data scientists.

By having all of your event and location data in S3, you can integrate your location data with other analysis tools like AWS Athena or Snowflake. Files are delivered via an AWS Kinesis Data Firehose as snappy-compressed parquet files. Each /dt=YYYY-MM-DD/ folder will have multiple files in it. This format should be consumable out-of-the-box with Apache Spark, AWS Athena, or other data engineering tools. This can enable you to build custom dashboard visualizations of data like foot traffic, trip duration, or dwell time in a location.

Configuration#

Contact your customer success manager to enable this feature.

The AWS S3 integration uses an AWS Kinesis Data Firehose to stream new Radar locations and events. The AWS Kinesis Data Firehose flushes data to your S3 bucket after 10 minutes or 128 MB of data, whichever happens first. Additionally, AWS KMS can be used to encrypt Kinesis data streams server-side.

AWS S3 configuration diagram

Create a bucket#

Create an S3 bucket for Radar to deliver data to, for example, s3://com.example.bucket/. Data will be delivered to s3://com.example.bucket/radar/events/project=$PROJECT/dt=YYYY-MM-DD/X.parquet.snappy. Provide the name of the bucket to your customer success manager.

Create an AWS Cross-Account IAM policy#

Create an IAM Policy that allows Radar to deliver data to this bucket. To do this, implement step 2 in the Cross-Account Delivery to an Amazon S3 Destination IAM Policy documentation. Radar will implement steps 1 and 3. Contact your Customer Support Manager to obtain the values for the accountA-id and iam-role-name values to use in the IAM Policy.

Location Schema#

NameTypeDescription
locationidstringUnique ID of the location
useridstringRadar ID of user
userexternalidstringExternal ID of user
usermetadatastringMetadata of the user
organizationstringRadar ID of the org
locationaccuracydoubleThe accuracy reported by the device in meters
updatedatstringLocation update time
devicetypestringThe type of device
livebooleanLive/test mode
foregroundbooleanDid the user send up the location in foreground or background
stoppedbooleanDid the user stop
sdkversionstringThe Radar SDK version
floorleveldoubleThe floor level as reported by the device
altitudedoubleThe altitude level as reported by the device
verticalaccuracydoubleThe altitude accuracy as reported by the device
latitudedoubleThe latitude of the location
longitudedoubleThe longitude of the location
timezoneoffsetintThe timezone offset of the user
sourcestringThe sdk source they generated the location
eventsarray<string>A list of events associated with this location
sessionidstringThe session id created by the SDK
appstandbybucketintThe App Standby Bucket as reported by the OS
locationauthorizationstringWhat type of location authorization was granted? (e.g. foreground or background)
locationaccuracyauthorizationstringHow precise is the location granted? (e.g. precise location vs coarse location)
devicemakestringThe make of the device
devicemodelstringThe device model
deviceosstringThe OS of the device
metadatastringMetadata such as tracking options used by the device
projectstringPartition key. The Radar Project ID publishing locations
dtstringPartition key. The day of location delivery, formatted as YYYY-MM-DD

Event Schema#

NameTypeDescription
_idstringRadar ID of the event
createdattimestampEvent creation time of the event from the Radar SDK
actualcreatedattimestampEvent creation time on the server
organizationstringThe Radar organization ID
livebooleanLive/test mode
locationaccuracydoubleThe accuracy reported by the device in meters
confidenceintEvent confidence
placestringThe Radar ID of a place
placecategoriesstringThe categories of the place
placechainnamestringThe chain name of the place
placechainslugstringThe chain slug of the place
placegroupstringThe group of the place
placenamestringThe name of the place
alternateplacesarray<string>Alternate candidate places where the user entered
placecandidatesarray<string>Alternate candidate places where the user entered with extra metadata
durationdoubleThe length of the geofence entry
longitudedoubleThe longitude of the event
latitudedoubleThe latitude of the event
userstringThe Radar ID of the user
geofencestringThe Radar ID of the geofence
geofencedescriptionstringThe description of the geofence
geofencetagstringThe tag of the geofence
geofenceexternalidstringThe customer-provided ID of the geofence
regionstringThe Radar ID of the region
countryregionnamestringThe name of the country
countryregioncodestringThe ISO code of the country
countryregionstringThe Radar ID of the country
dmaregionstringThe Radar ID of the DMA
dmaregionnamestringThe name of the DMA
dmaregioncodestringThe ISO code of the DMA
stateregionstringThe Radar ID of the state
stateregionnamestringThe name of the state
stateregioncodestringThe ISO code of the state
postalcoderegionstringThe Radar ID of the postal code
postalcoderegioncodestringThe postal cod
replayedbooleanDid the SDK send this up in an event of a retry from a failed request
typestringThe event type
timezoneoffsetintThe timezone offset of the user
tripstringThe Radar ID of the trip
beaconstringThe Radar ID of the beacon
foregroundbooleanDid the user send up the event in foreground or background
locationaccuracyauthorizationstringHow precise is the location granted? (e.g. precise location vs coarse location)
locationauthorizationstringWhat type of location authorization was granted? (e.g. foreground or background)
devicetypestringThe type of device
devicemakestringThe make of the device
devicemodelstringThe device model
deviceosstringThe OS of the device
sdkversionstringThe Radar SDK version
stoppedbooleanDid the user stop
beacontagstringThe tag of the beacon
beaconexternalidstringThe customer-specified ID of the beacon
beacontypestringThe type of beacon
beaconmajorstringThe major version of the beacon
`beaconminorstringThe minor version of the beacon
beaconuuidstringThe UUID of the beacon
tripexternalidstringThe user-specified ID of the trip
tripdestinationgeofencetagstringThe geofence tag of the trip destination
tripdestinationgeofenceexternalidstringThe customer-specified geofence ID of the trip destination
userexternalidstringThe user externalId specified by the customer
usermetadatastringUser metadata as stringified JSON
travelingstringWhether a user is traveling or not
projectstringPartition key. The Radar Project ID publishing events
dtstringPartition key. The day of event delivery, formatted as YYYY-MM-DD