Data Access
Polling the whip for data.
Last updated
Polling the whip for data.
Last updated
Before we start incurring a whole lot of cost, we pool for the data in a repeatable fashion, using Kubernetes scheduling and Python.
The diagram below shows the Rivian API as a source, but realistically can be any, the cheat code here is if get mine for data here and grab our complex objects in this fashion, we wont eat DBU's running on the Databricks cluster to get the bronze stage in the medallion architecture.
When incorporating Kubernetes scheduling and Python into data mining workflows, it allows for efficient and mostly inexpensive deployment of data mining tasks with data sources.
The Rivian API is a set of endpoints designed by Rivian, to enable communication and interaction between their vehicles and external software applications or systems. This API offers developers a range of functionalities, allowing access to vehicle data such as battery status, charging information, location tracking, and control over certain vehicle functions like locking/unlocking doors or pre-conditioning the cabin. Deez Watts utilizes the API to land the data passively to hopefully create innovative applications, integrations, or services that enhance the owner experience, facilitate fleet management, or provide insights into vehicle performance.
Rivian web APIs use GraphQL.
The Python library of choice for our data adventure is rivian-python-api
which is below, it has extensive information on security and transparency to limitations. Additionally, it was primarily built off the information in the RivDocs mentioned above and works perfectly for our needs.
Below is a simple example on how to hit the Rivian API for information about your Rivian with the above library. It creates a complex json object containing, charging, status information, and owner information.
Vehicle commands scoped for write require an HMAC signature to be sent with the request. The HMAC is generated using the command name and the current timestamp, using a shared key generated from the phone’s private key and the vehicle’s public key. The vehicle’s public key is available in the vehiclePublicKey
field of the getUserInfo
endpoint.