<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Re: QCDI Daily snaphot of DB table/view? in Data Movement &amp; Streaming</title>
    <link>https://community.qlik.com/t5/Data-Movement-Streaming/QCDI-Daily-snaphot-of-DB-table-view/m-p/2461520#M2402</link>
    <description>&lt;BLOCKQUOTE&gt;&lt;HR /&gt;&lt;a href="https://community.qlik.com/t5/user/viewprofilepage/user-id/300322"&gt;@janda&lt;/a&gt;&lt;SPAN data-sheets-root="1" data-sheets-value="{&amp;quot;1&amp;quot;:2,&amp;quot;2&amp;quot;:&amp;quot;HealthCare gov\r&amp;quot;}" data-sheets-userformat="{&amp;quot;2&amp;quot;:4995,&amp;quot;3&amp;quot;:{&amp;quot;1&amp;quot;:0},&amp;quot;4&amp;quot;:{&amp;quot;1&amp;quot;:2,&amp;quot;2&amp;quot;:14281427},&amp;quot;10&amp;quot;:2,&amp;quot;11&amp;quot;:3,&amp;quot;12&amp;quot;:0,&amp;quot;15&amp;quot;:&amp;quot;Arial&amp;quot;}"&gt;&lt;A href="https://www.health-insurancemarket.com" target="_self"&gt;HealthCare gov&lt;/A&gt;&amp;nbsp;&lt;/SPAN&gt;wrote:&lt;BR /&gt;
&lt;P&gt;Hello everybody,&lt;/P&gt;
&lt;P&gt;is there a possibility to make daily snapshots of a view in database (PostgreSQL, in this case) using QCDI and store it in an AWS S3 bucket?&lt;/P&gt;
&lt;P&gt;Right now I can schedule a reload, but that just overwrites existing file LOAD00000001.snappy.parquet. I would assume that there is a functionality that allows me to create&amp;nbsp;LOAD00000002.snappy.parquet, LOAD00000003.snappy.parquet,... but I cannot find it.&lt;/P&gt;
&lt;P&gt;Thanks in advance for any suggestions&lt;/P&gt;
&lt;P&gt;Petr&lt;/P&gt;
&lt;HR /&gt;&lt;/BLOCKQUOTE&gt;
&lt;P&gt;Hello,&lt;/P&gt;
&lt;P&gt;You're right, reloading the data using QCDI will overwrite the existing file. Here are a couple of approaches to achieve daily snapshots of your PostgreSQL view in S3 using QCDI:&lt;/P&gt;
&lt;P&gt;Approach 1: Utilize S3 Versioning&lt;/P&gt;
&lt;P&gt;Enable S3 Versioning: Enable versioning on the S3 bucket where you want to store the snapshots. This allows S3 to keep previous versions of the file even when you overwrite it.&lt;/P&gt;
&lt;P&gt;QCDS Configuration: In your QCDI configuration file (.qcdprc), set the output_overwrite_mode parameter to append. This will instruct QCDI to append data to the existing file in S3. However, since the file is overwritten with new data each day, S3 versioning will automatically create a new version each time.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;LI-CODE lang="markup"&gt;[qcd]
output_overwrite_mode = append&lt;/LI-CODE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Approach 2: Daily Load with Unique Filenames&lt;/P&gt;
&lt;P&gt;QCDS Script: Write a script using QCDI that incorporates the date in the output filename. This makes each snapshot unique and avoids overwriting previous ones.&lt;/P&gt;
&lt;P&gt;Date in Filename: Use Python's datetime module or a similar library to generate the date and integrate it into the filename within your QCDI script.&lt;/P&gt;
&lt;P&gt;Here's a basic Python code example (assuming your script is written in Python):&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;LI-CODE lang="markup"&gt;from datetime import datetime

# Generate unique filename with date
today = datetime.today().strftime("%Y-%m-%d")
filename = f"LOAD_{today}.snappy.parquet"

# Use filename in your qcdi.output.path configuration
qcdi.output.path = f"s3://your-bucket/{filename}"

# Perform your QCDI load here
&lt;/LI-CODE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;By implementing one of these approaches, you can achieve daily snapshots of your PostgreSQL view in S3 using QCDI.&lt;/P&gt;
&lt;P&gt;I hope the solution may help you.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Thu, 13 Jun 2024 04:10:28 GMT</pubDate>
    <dc:creator>Dennisleon</dc:creator>
    <dc:date>2024-06-13T04:10:28Z</dc:date>
    <item>
      <title>QCDI Daily snaphot of DB table/view?</title>
      <link>https://community.qlik.com/t5/Data-Movement-Streaming/QCDI-Daily-snaphot-of-DB-table-view/m-p/2461509#M2401</link>
      <description>&lt;P&gt;Hello everybody,&lt;/P&gt;
&lt;P&gt;is there a possibility to make daily snapshots of a view in database (PostgreSQL, in this case) using QCDI and store it in an AWS S3 bucket?&lt;/P&gt;
&lt;P&gt;Right now I can schedule a reload, but that just overwrites existing file LOAD00000001.snappy.parquet. I would assume that there is a functionality that allows me to create&amp;nbsp;LOAD00000002.snappy.parquet, LOAD00000003.snappy.parquet,... but I cannot find it.&lt;/P&gt;
&lt;P&gt;Thanks in advance for any suggestions&lt;/P&gt;
&lt;P&gt;Petr&lt;/P&gt;</description>
      <pubDate>Wed, 19 Mar 2025 21:58:43 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Data-Movement-Streaming/QCDI-Daily-snaphot-of-DB-table-view/m-p/2461509#M2401</guid>
      <dc:creator>janda</dc:creator>
      <dc:date>2025-03-19T21:58:43Z</dc:date>
    </item>
    <item>
      <title>Re: QCDI Daily snaphot of DB table/view?</title>
      <link>https://community.qlik.com/t5/Data-Movement-Streaming/QCDI-Daily-snaphot-of-DB-table-view/m-p/2461520#M2402</link>
      <description>&lt;BLOCKQUOTE&gt;&lt;HR /&gt;&lt;a href="https://community.qlik.com/t5/user/viewprofilepage/user-id/300322"&gt;@janda&lt;/a&gt;&lt;SPAN data-sheets-root="1" data-sheets-value="{&amp;quot;1&amp;quot;:2,&amp;quot;2&amp;quot;:&amp;quot;HealthCare gov\r&amp;quot;}" data-sheets-userformat="{&amp;quot;2&amp;quot;:4995,&amp;quot;3&amp;quot;:{&amp;quot;1&amp;quot;:0},&amp;quot;4&amp;quot;:{&amp;quot;1&amp;quot;:2,&amp;quot;2&amp;quot;:14281427},&amp;quot;10&amp;quot;:2,&amp;quot;11&amp;quot;:3,&amp;quot;12&amp;quot;:0,&amp;quot;15&amp;quot;:&amp;quot;Arial&amp;quot;}"&gt;&lt;A href="https://www.health-insurancemarket.com" target="_self"&gt;HealthCare gov&lt;/A&gt;&amp;nbsp;&lt;/SPAN&gt;wrote:&lt;BR /&gt;
&lt;P&gt;Hello everybody,&lt;/P&gt;
&lt;P&gt;is there a possibility to make daily snapshots of a view in database (PostgreSQL, in this case) using QCDI and store it in an AWS S3 bucket?&lt;/P&gt;
&lt;P&gt;Right now I can schedule a reload, but that just overwrites existing file LOAD00000001.snappy.parquet. I would assume that there is a functionality that allows me to create&amp;nbsp;LOAD00000002.snappy.parquet, LOAD00000003.snappy.parquet,... but I cannot find it.&lt;/P&gt;
&lt;P&gt;Thanks in advance for any suggestions&lt;/P&gt;
&lt;P&gt;Petr&lt;/P&gt;
&lt;HR /&gt;&lt;/BLOCKQUOTE&gt;
&lt;P&gt;Hello,&lt;/P&gt;
&lt;P&gt;You're right, reloading the data using QCDI will overwrite the existing file. Here are a couple of approaches to achieve daily snapshots of your PostgreSQL view in S3 using QCDI:&lt;/P&gt;
&lt;P&gt;Approach 1: Utilize S3 Versioning&lt;/P&gt;
&lt;P&gt;Enable S3 Versioning: Enable versioning on the S3 bucket where you want to store the snapshots. This allows S3 to keep previous versions of the file even when you overwrite it.&lt;/P&gt;
&lt;P&gt;QCDS Configuration: In your QCDI configuration file (.qcdprc), set the output_overwrite_mode parameter to append. This will instruct QCDI to append data to the existing file in S3. However, since the file is overwritten with new data each day, S3 versioning will automatically create a new version each time.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;LI-CODE lang="markup"&gt;[qcd]
output_overwrite_mode = append&lt;/LI-CODE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Approach 2: Daily Load with Unique Filenames&lt;/P&gt;
&lt;P&gt;QCDS Script: Write a script using QCDI that incorporates the date in the output filename. This makes each snapshot unique and avoids overwriting previous ones.&lt;/P&gt;
&lt;P&gt;Date in Filename: Use Python's datetime module or a similar library to generate the date and integrate it into the filename within your QCDI script.&lt;/P&gt;
&lt;P&gt;Here's a basic Python code example (assuming your script is written in Python):&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;LI-CODE lang="markup"&gt;from datetime import datetime

# Generate unique filename with date
today = datetime.today().strftime("%Y-%m-%d")
filename = f"LOAD_{today}.snappy.parquet"

# Use filename in your qcdi.output.path configuration
qcdi.output.path = f"s3://your-bucket/{filename}"

# Perform your QCDI load here
&lt;/LI-CODE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;By implementing one of these approaches, you can achieve daily snapshots of your PostgreSQL view in S3 using QCDI.&lt;/P&gt;
&lt;P&gt;I hope the solution may help you.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 13 Jun 2024 04:10:28 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Data-Movement-Streaming/QCDI-Daily-snaphot-of-DB-table-view/m-p/2461520#M2402</guid>
      <dc:creator>Dennisleon</dc:creator>
      <dc:date>2024-06-13T04:10:28Z</dc:date>
    </item>
    <item>
      <title>Re: QCDI Daily snaphot of DB table/view?</title>
      <link>https://community.qlik.com/t5/Data-Movement-Streaming/QCDI-Daily-snaphot-of-DB-table-view/m-p/2461537#M2404</link>
      <description>&lt;P&gt;Hello,&lt;/P&gt;
&lt;P&gt;thanks for the suggestion. The 2nd approach is exactly what i would like to do, unfortunately we are using SAAS Qlik with Data integration&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="janda_0-1718174028585.png" style="width: 400px;"&gt;&lt;img src="https://community.qlik.com/t5/image/serverpage/image-id/167782i1A0CF80D34AB1484/image-size/medium?v=v2&amp;amp;px=400" role="button" title="janda_0-1718174028585.png" alt="janda_0-1718174028585.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;a inside of it, i cannot find a way to modify code of the pipeline.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Petr&lt;/P&gt;</description>
      <pubDate>Wed, 12 Jun 2024 06:34:00 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Data-Movement-Streaming/QCDI-Daily-snaphot-of-DB-table-view/m-p/2461537#M2404</guid>
      <dc:creator>janda</dc:creator>
      <dc:date>2024-06-12T06:34:00Z</dc:date>
    </item>
  </channel>
</rss>

