Skip to main content

Is it possible to export all metric data for a given metric type?

I have several million metrics of a type “Placed Order” which I have sent via API into Klavio.

This metric is of the form:

{'$value': 279.72, '$event_id': '1615469952', '$attribution': {}, '$extra': {'Items': m{'SKU': 'H05*TL005-END/C', '$value': '259.00', 'vendor': 'H05', 'name': 'GEN E Table', 'price': '259.00', 'qty': '1', 'ext_price': '259.00', 'sys_price': '249.00', 'vend_stk_no': 'TL005-END/C', 'desc': 'GEN ETable'}]}, 'store_no': '92', 'tax_perc': '8.000', 'inv_no': '543570', 'subtotal': '259.00', 'id': '838*543570'}

I wanted to use the “metric export api” to run a query based on the the Items of this metric. However because the Items attribute is a nested field (under $extra→ Items), this is not possible

Further more the metrics api only allows 100 metrics to be given at a time, meaning downloading the entire collection of metrics through the api could take days.

Is there some mechanism to download or dump all this data. Even a solution that sends it to a third party that has more aggressive analytics for nested fields is an option.

 

Alternatively is is possible to do a one time modification of a metric’s structure to un nest a field?

Hi @watchsteve,

Our Metrics API timeline endpoint can export event data but cannot be filtered. Our Metrics API export endpoint can be filtered but only returns counts.

To achieve your desired functionality, you will need to export everything using the timeline endpoint and filter the data outside of Klaviyo. If you want to do this on an ongoing basis, I would recommend running a backfill and setting up a cron job to pull all the data periodically so the data is kept up to date and you do not need to complete another backfill.

Re: “Is there some mechanism to download or dump all this data. Even a solution that sends it to a third party that has more aggressive analytics for nested fields is an option.” Unfortunately we do not have this functionality currently, but I am happy to pass along this feedback to our product team.

Re: “Alternatively is is possible to do a one time modification of a metric’s structure to un nest a field?” We unfortunately do not have this capability at this time but I will pass this feedback along to our product team.

Best,

Caroline


Reply