Analyzing data from Query History export
You can use Query History export to bring Query History data to an external monitoring solution for further analysis. In this recipe, we will show you how to export Query History data to Amazon S3, and then analyze it using Cube by reading the data from S3 using DuckDB.Configuration
Vector configuration for exporting Query History to Amazon S3 and also outputting it to the console of the Vector agent in your Cube Cloud deployment. In the example below, we are using theaws_s3 sink to export the cube-query-history-export-demo
bucket in Amazon S3, but you can use any other storage solution that Vector supports.
Data modeling
Example data model for analyzing data from Query History export that is brought to a bucket in Amazon S3. The data is accessed directly from S3 using DuckDB. With this data model, you can run queries that aggregate data by dimensions such asstatus, environment_name, api_type, etc. and also calculate metrics like
count, total_duration, or avg_duration: