Refresh Reflection using API call

Hi!

I was wondering if there is a way to trigger the refresh on certain Reflections via the Dremio API. Same concept as the “Refresh Now” button, just programatically?

When I finish loading data to the underlying Hive table, I would like to refresh immediately without waiting for the automatic hourly…

My bad… Sorry I was looking at the Jobs and Reflection endpoints and not in Catalog.

Hi dataedgehungary,

I have requested this enhancement and hope they add it soon. In the meantime, the only way I know to refresh a reflection via the API is to disable the reflection and then re-enable it. Like this (python) –

    reflection = apiGet(f'reflection/{reflection_id}')
    reflection['enabled'] = False
    response = apiPut(f'reflection/{reflection_id}', reflection)

    reflection = apiGet(f'reflection/{reflection_id}')
    reflection['enabled'] = True
    response = apiPut(f'reflection/{reflection_id}', reflection)
1 Like