Can't refresh the reflection on a view through API

POST /api/v3/catalog/{id}/refresh

I used the above API to perform reflection refresh on a view, but it didn’t work. But it worked for refreshing reflection on table.

I tracked the program and found that it may be related to the following method:

com.dremio.service.reflection.DependencyManager.shouldRefresh

final RefreshRequest request =
dependencyResolutionContext.getRefreshRequest(dependency.getId());

The requestedAt property of the request object obtained here is not the time when the API was called, so the result of following codes is always ‘false’.

return lastSubmitted < refreshStart;

I don’t know if my understanding is correct. Has anyone encountered the same problem? Can we discuss it together.

Hi @zenoda

Refreshing all reflections related to a view is a paid feature. If you are using OSS edition, then you can only trigger refreshes starting with a table which will eventually make its way to your target view. You need to make sure to refresh all tables associated to your view.

Ideally, if you only know that data has changed in a specific table, then you just trigger the refresh from that table and not trigger refreshes on tables that haven’t changed.

Also, if you are using Iceberg tables as your sources into the view, then Dremio will keep track of the Iceberg snapshot ids and not do unnecessary refreshes. This is also a paid feature.

1 Like

Oh, I got It. Thanks for your prompt reply.