How to download data 

In CSV tabular format

This page details how you can download cost and usage data in tabular format (CSV) from within the Teevity Dynamic Cost Explorer. These downloads can be performed with interactive requests (for cost exploration), or using Teevity Reports.

Downloading using the Dynamic Cost Explorer

The "Download button" in the Teevity Dynamic Cost Explorer gives you access to the "Report Data Download" sidebar (it's located next to the "Submit button")

This sidebar has 3 different areas:

The Download configuration area lets you choose

Each time you change one of these 3 parameters, a new preview and Teevity CLI command will be generated

Click on "Download button" to actually start the file download

Downloading using the Teevity CLI

With the Teevity CLI, you can download data by specifying it:

Remember that you can always get help on all the CLI parameters using the --help option. In this case: 

teevity reports download-data --help

If you don't have the Teevity CLI installed yet, you can get information on how to install it here.

Using download-data with "Teevity Reports"

The syntax and parameters are as follow:

teevity reports download-data --fileLayout YOURSELECTEDFILELAYOUT --fileFormat YOURSELECTEDFILEFORMAT --reportUuid YOURREPORTUUID [--fileName Cost-ECS-Last2Months]


teevity reports download-data --fileLayout TeevityDataExportTimeAsColumns --fileFormat csv --reportUuid 754a5e67-574a-4683-b9ef-f5c52919a99c --fileName Cost-ECS-Last2Months

The --fileName parameter is optional and a filename is generated for you based on the report name.

Using download-data with "Teevity Interactive Queries"

The syntax and parameters are as follow:

teevity reports download-data --fileLayout YOURSELECTEDFILELAYOUT --fileFormat YOURSELECTEDFILEFORMAT --queryParams YOURQUERYPARAMS [--fileName Cost-ECS-Last2Months]

TIP - The query syntax being a bit verbose, you would usually build these requests using the CLI equivalent command generator located in the "Report Data Download" sidebar in the Teevity Dynamic Cost Explorer


teevity reports download-data --fileLayout TeevityDataExportTimeAsLines --fileFormat csv --queryParams '{"isCost":true,"aggregate":"stats","consolidate":"daily","isCumulative":false,"start":"2022-05-22 12PM","end":"2022-07-22 12PM","breakdown":false,"showsps":false,"factorsps":false,"showPercentage":false,"groupBy":"Product","filter_account_selectionFilterBinding":true,"filter_region_selectionFilterBinding":true,"filter_product_selectionFilterBinding":true,"filter_operation_selectionFilterBinding":true,"filter_usageType_selectionFilterBinding":true}' --fileName Cost-interactiveQuery001-last3Months

You can also specify an output file name with the optional --fileName parameter.  When none is provided, a file name is generated for you.

IMPORTANT - For interactive request data downloading to work, you need the Dynamic Cost Explorer of your Teevity account started (not paused).