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…
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) –
@dataedgehungary
when I tried your method to disable then reenable, it works. It keeps the same id but changes the tag and from the looks of it does a complete refresh, and it deletes the previous reflection. When the reflection is disabled the UI shows a gray disk icon and size of 0 bytes reflecting a deletion has occurred. I’m not sure if the deletion occurs immediate when disabling, if so it should be called “truncate” instead of “delete” I would suggest they change the name. From what I can tell Dremio uses the tag as a version indicator, omitting it will return Invalid reflection: reflection version required.
I tried to use PUT update a specific raw reflection as described on Dremio API Docs. I am able to get 200 OK but it does not actually refresh it, according to the jobs view, the log, and the UI nothing is triggered.
I have been able to get reflections to fail then refresh them and get the same size footprint, which suggests they did not fail except from the standpoint where they were queued for the maximum wait time then marked as failed, after which the previous successful reflection is lost when I have to reenable them to remove the failure indicator. I think I am also having trouble with the failure count settings propagating from my admin console at the reflections tab (in AWS marketplace version, not visible in Docker version). If I set it low = 1 then it fails once, the reflection stays in failed mode forever, cannot be refreshed via the UI.
My recommendation is Dremio needs to:
change wording for disable reflection to truncate
get the PUT reflection API call to perform the same as the refresh now in the API
explain why the version tag should change when disabling / enabling a reflection whose design has not changed.
add to the UI a few things:
refresh all reflections
retry all failed reflections
force refresh of multiple reflections (checkboxes, run)
there seem to be an issue with latest ver 4.8 of dremio.
refresh reflection on VD used to work with a single put api by simply changing the name or two put api’s by setting enabled to False&True.
with ver 4.8 put request gives 200 OK, but nothing happens. it simply updates an entry in sys.reflections table without actually refreshing.
@balaji.ramaswamy
I also tried both options and none working.
Later I found out that it mostly works, but it takes a long time to enable tha save button. I make any kind of changes to the reflection, and only after about 2 minutes the save button is enabled.
Hey folks, just seeing if there has been any update on this? We’re in the middle of an enterprise deployment and are looking to use this functionality…it does seem the disable/enable works for me, just seems clunky…thanks in advance
Is there any way to update the same reflection via api, without disabling and enabling?
We provide data from the Dremio table for company APIs, and we cannot run out of accelerating queries while another reflection is created.
We are trying to use the call PUT /api/v3/reflection/{id}, but the reflection is not updated.
To change the reflection definition you need to do PUT /reflection · Dremio but if the reflection is running as you said the refresh job would get cancelled