# SQL command to Refresh Reflection

**URL:** <https://community.dremio.com/t/sql-command-to-refresh-reflection/8537>\
**Category:** Uncategorized\
**Created:** [December 20, 2021, 1:48pm UTC](https://community.dremio.com/t/sql-command-to-refresh-reflection/8537 "2021-12-20T13:48:18Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![Arnie](https://avatars.discourse-cdn.com/v4/letter/a/ba9def/32.png) [@Arnie](https://community.dremio.com/u/Arnie)\
**Post date:** [December 20, 2021, 1:48pm UTC](https://community.dremio.com/t/sql-command-to-refresh-reflection/8537/1 "2021-12-20T13:48:18Z")

</div>

Hello  
We see Dremio uses following sequence to refresh REFLECTION (REFRESH REFLECTION AS , LOAD MATERIALIZATION METADATA , DROP TABLE IF EXISTS “\_\_\_\_accelerator”.…).  
When trying to run those commands through UI we get an error message, how to refresh REFLECTION without using the GUI ? (only through SQL or API) ?

---

<div class="post-metadata">

**Author:** ![balaji.ramaswamy](https://sea2.discourse-cdn.com/flex020/user_avatar/community.dremio.com/balaji.ramaswamy/32/843_2.png) [@balaji.ramaswamy](https://community.dremio.com/u/balaji.ramaswamy)\
**Post date:** [December 22, 2021, 9:36pm UTC](https://community.dremio.com/t/sql-command-to-refresh-reflection/8537/2 "2021-12-22T21:36:49Z")

</div>

@Arnie These are internal jobs that Dremio creates and will not work via the SQL editor. To refresh the reflection via the UI hit “refresh now” on the physical dataset. If your VDS is a join of more than one PDS, then pick any one in the chain and hit “refresh now”, Dremio will make sure to refresh the dependent PDS, click on settings on the PDS and “Refresh Now” should be under the reflections tab

---

<div class="post-metadata">

**Author:** ![Gerbasi](https://sea2.discourse-cdn.com/flex020/user_avatar/community.dremio.com/gerbasi/32/4625_2.png) [@Gerbasi](https://community.dremio.com/u/Gerbasi)\
**Post date:** [February 9, 2023, 12:22pm UTC](https://community.dremio.com/t/sql-command-to-refresh-reflection/8537/3 "2023-02-09T12:22:52Z")

</div>

@balaji.ramaswamy, good morning, for me this step by step that you passed worked, thank you.  
But via api or some command by the sql editor can have the same result? greetings

---

<div class="post-metadata">

**Author:** ![lenoyjacob](https://sea2.discourse-cdn.com/flex020/user_avatar/community.dremio.com/lenoyjacob/32/3474_2.png) [@lenoyjacob](https://community.dremio.com/u/lenoyjacob)\
**Post date:** [February 9, 2023, 5:29pm UTC](https://community.dremio.com/t/sql-command-to-refresh-reflection/8537/4 "2023-02-09T17:29:50Z")

</div>

@Gerbasi You can use the Catalog Refresh API to refresh dependent reflections of a physical dataset. You need the id of the PDS as the input. See: [Dremio](https://docs.dremio.com/software/rest-api/catalog/post-catalog-id-refresh/)
