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:
Download configuration to personalize the data format and data layout; you can also, configure the filename (Left part)
Data Preview to see how your file will look like (Right part)
Teevity CLI command generator which displays the Teevity CLI command needed to download the data (equivalent to your UI preferences)
The Download configuration area lets you choose
Data Layout : There are 3 Data Layouts you can chose from ("Time As Columns", "Time As Lines" or "Budget" when a budget overlay is present in your data/report)
File Format : The file format for the downloaded file. Only "CSV" is available for the moment.
File Name : You can chose the file name you will download
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:
with existing "Teevity Reports" that you have created (or that have been shared with you)
with "interactive requests", usually built using the "Download Menu" in the Teevity Dynamic Cost Explorer (to ease the syntax aspect)
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]
Example:
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
Example:
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).