The Data Warehouse can be accessed through the Query option within the left menu. This will take you to Big Query where you can access the data tables. This option will only be available if you have the Data Warehouse enabled.
The following tables are available:
- Chargebacks
- Comments
- Customers
- Devices
- IP Addresses
- Items
- Locations
- Order score
- Orders
- Payment methods
- Reviews
- Scores
- Transactions
The underlying data is available in near real time.
Querying dates
When running queries in your data warehouse you should use the PARTITIONTIME
column to filter the date range of your data.
Choosing a smaller date range by using PARTITIONTIME
will mean your queries are faster and incur less cost.
For example:
SELECT customerId, name, email
FROM customers
WHERE PARTITIONTIME = '2023-01-05'
The very latest data isn’t always available when comparing the PARTITIONTIME
column to a date. If you want the very latest data you should also query the “null partition”.
For example:
SELECT
customerId, name, email
FROM
customers
WHERE
(PARTITIONTIME = '2023-01-05' OR PARTITIONTIME IS NULL)
If you want to filter on a specific time range you will also need to add a condition using one of the columns containing a timestamp.
For example:
SELECT
customerId, name, email
FROM
customers
WHERE
(PARTITIONTIME = '2023-01-05' OR PARTITIONTIME IS NULL)
AND updatedAt >= '2023-01-05T10:30:00.000Z'
AND updatedAt >= '2023-01-05T11:00:00.000Z'
ORDER BY updatedAt