# Keep daily snapshot from source tables

**URL:** <https://community.dremio.com/t/keep-daily-snapshot-from-source-tables/10273>\
**Category:** Dremio University\
**Created:** [February 8, 2023, 10:14am UTC](https://community.dremio.com/t/keep-daily-snapshot-from-source-tables/10273 "2023-02-08T10:14:51Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![crazyisjen](https://sea2.discourse-cdn.com/flex020/user_avatar/community.dremio.com/crazyisjen/32/4552_2.png) [@crazyisjen](https://community.dremio.com/u/crazyisjen)\
**Post date:** [February 8, 2023, 10:14am UTC](https://community.dremio.com/t/keep-daily-snapshot-from-source-tables/10273/1 "2023-02-08T10:14:51Z")

</div>

Hi,

I’m facing a challenges , as the source database table just keep the current image, and we plan to automate a daily job in dremio to keep track of daily image , plan to use CTAS to export daily snapshot into PDS, and then use MERGE INTO to keep track of the CDC data change by comparing current and previous image , however seems PDS not allow run the DML (insert, update, delete) . pls suggest any alternative way to solve the issue, can i convert source data into iceberg table and do the SCD? Many Thanks in advance

---

<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:** [February 13, 2023, 4:54am UTC](https://community.dremio.com/t/keep-daily-snapshot-from-source-tables/10273/2 "2023-02-13T04:54:18Z")

</div>

@crazyisjen

Few questions,

- What version of Dremio is this?
- Is the CTAS format Iceberg?
- If the CTAS format is Iceberg are you still not able to insert into?

---

<div class="post-metadata">

**Author:** ![crazyisjen](https://sea2.discourse-cdn.com/flex020/user_avatar/community.dremio.com/crazyisjen/32/4552_2.png) [@crazyisjen](https://community.dremio.com/u/crazyisjen)\
**Post date:** [February 14, 2023, 7:42am UTC](https://community.dremio.com/t/keep-daily-snapshot-from-source-tables/10273/3 "2023-02-14T07:42:14Z")

</div>

thx for reply,

my dremio is community version.19  
may I know how to convert to CTAS by sql instead of UI function  
Could you advise how to automate the increment load by script? thanks

---

<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:** [February 15, 2023, 5:01am UTC](https://community.dremio.com/t/keep-daily-snapshot-from-source-tables/10273/4 "2023-02-15T05:01:58Z")

</div>

@crazyisjen Insert into is only an option in v23.x and copy into in v24.x

In 19.x you can do CTAS to PARQUET by doing the below

```auto
CREATE TABLE <Full_Path_To_Folder>.<Table_name> AS
SELECT ...

```
