Hello GoodData :wave: Is there a way to, when flus...
# gooddata-cn
t
Hello GoodData 👋 Is there a way to, when flushing the cache, also trigger cache re-calculation instead of calculating on demand as users open dashboards?
j
Hi Tomáš, This should be possible using our Python SDK. Check out the following script.
Copy code
from gooddata_sdk import GoodDataSdk

sdk = GoodDataSdk.create(host, token)
workspace_id = "demo"
datasource_id = "demo-ds"

# cache invalidation
sdk.catalog_data_source.register_upload_notification(data_source_id=datasource_id)

# re-calculation
insights = sdk.insights.get_insights(workspace_id=workspace_id)
for insight in insights:
    sdk.tables.for_insight(workspace_id=workspace_id, insight=insight)
🙌 1
t
Thank you, Jan!