cacheResult API | Python SDK | Teradata AppCenter - cache_result API - Teradata AppCenter

Teradata® AppCenter Python SDK User Guide

Product
Teradata AppCenter
Release Number
2.0
Published
September 2020
Language
English (United States)
Last Update
2020-09-28
dita:mapPath
hqg1594325323212.ditamap
dita:ditavalPath
ft:empty
dita:id
B035-1119
Product Category
Analytical Ecosystem

Purpose

The cacheResult API caches your query result or visualization result so you can view the results or share the results with other users. The cacheResult API takes results as either a string or stream (file-like object or generator). For large results, Teradata recommends that you use a stream to reduce memory consumption.

Job results are available for 30 days from the time they are generated, after which they expire. The root user can change the default to a value between 1 and 365 days from Settings in the AppCenter UI.

Python Code Examples

Example Type Example
Caching string result
client.cache_result(query_result, 'application/json')
client.cache_result(visualized_result, 'text/html')
Caching stream result
client.cache_result(query_result_stream, 'application/json', stream=True)
client.cache_result(visualized_result_stream, 'text/html', stream=True)