<?xml version="1.0" encoding="UTF-8"?><rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" version="2.0" xmlns:cc="http://cyber.law.harvard.edu/rss/creativeCommonsRssModule.html">
    <channel>
        <title><![CDATA[Stories by Sushant on Medium]]></title>
        <description><![CDATA[Stories by Sushant on Medium]]></description>
        <link>https://medium.com/@sushant.paricharak?source=rss-c34a34f97cea------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/fit/c/150/150/1*dmbNkD5D-u45r44go_cf0g.png</url>
            <title>Stories by Sushant on Medium</title>
            <link>https://medium.com/@sushant.paricharak?source=rss-c34a34f97cea------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Sun, 06 Dec 2026 12:47:48 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@sushant.paricharak/feed" rel="self" type="application/rss+xml"/>
        <webMaster><![CDATA[yourfriends@medium.com]]></webMaster>
        <atom:link href="http://medium.superfeedr.com/" rel="hub"/>
        <item>
            <title><![CDATA[SnowConvert — DDL conversion tool]]></title>
            <link>https://medium.com/@sushant.paricharak/snowconvert-ddl-conversion-tool-8899a7071e95?source=rss-c34a34f97cea------2</link>
            <guid isPermaLink="false">https://medium.com/p/8899a7071e95</guid>
            <dc:creator><![CDATA[Sushant]]></dc:creator>
            <pubDate>Fri, 08 Aug 2025 19:51:32 GMT</pubDate>
            <atom:updated>2025-08-08T19:51:52.955Z</atom:updated>
            <content:encoded><![CDATA[<h3>SnowConvert — DDL conversion tool</h3><p>I recently had the opportunity to attend the Snowflake Summit 2025, where Snowflake team demoed the SnowConvert feature. It is snowflake’s premiere code conversion tool to move legacy code to snowflake.</p><p>Why do we need these type of tool?</p><p>Database migration project often invovle moving from one database platform to another. Sometime the current state is on-premise and future state is over cloud. The process typically requires converting from existing DDL (Data Definition Language) Statements from the source DW to the syntax supported by the target platform. Here is why dedicated tools are essential for this conversion:</p><ol><li>Data compatibility &amp; Shcema conversion challenges</li></ol><p>2. Streamlined Migration Process</p><p>3. Standardization and Reusability</p><p>4. Reduced Manual Labor efforts</p><p>5. Faster time to Cloud adoption</p><p>About SnowConvert: (Directly from documentation <a href="https://docs.snowconvert.com/sc">https://docs.snowconvert.com/sc</a>)</p><p>Conventional data platforms and big data solutions struggle to deliver on their fundamental purpose: to enable any user to work with any data, without limits on scale, performance, or flexibility. Whether you’re a data analyst, data scientist, data engineer, or any other business or technology professional, you’ll get more from your data with the reinvented data warehousing that Snowflake can provide. Included in the many benefits of transitioning to world’s leading cloud-based data platform are:</p><ul><li><em>Multi-cluster and shared data</em>: allows you to process enormous quantities of data with maximum speed and efficiency.</li><li><em>Micro-Partitioning</em>: allows you to securely and efficiently store customer data.</li><li><em>Delivered as a service</em>: allows you to eliminate the administration and management demands of traditional data platforms.</li><li><em>Data Platform built for any cloud</em>: the separation of services from storage and compute allows multiple, compute clusters to simultaneously operate on the same data</li><li><em>Better Performance and throughput</em>: outperforms traditional methods for executing data workloads.</li><li><em>Support for all data</em>: allows you to query both structured and machine-generated, semi-structured data (i.e., JSON, Avro, XML, Parquet).</li></ul><p><em>Snowflake SnowConvert</em> is an easy-to-use software that lets you jump-start the modernization of your conventional data platform to the reinvented Snowflake Data Warehousing Architecture. To achieve this modernization, <em>SnowConvert</em> understands your source SQL (such as Oracle, SQL Server, and Teradata SQL) and translates SQL to <a href="https://docs.snowflake.net/manuals/sql-reference-commands.html"><strong>Snowflake SQL</strong></a>. Once your original code is converted, you’ll be able to start enjoying all the benefits of Snowflake.</p><p>Currently, SnowConvert is available for the following source platforms:</p><ul><li><a href="https://docs.snowconvert.com/sc/translation-references/teradata"><strong><em>Teradata</em></strong></a></li><li><a href="https://docs.snowconvert.com/sc/translation-references/oracle"><strong><em>Oracle</em></strong></a></li><li><a href="https://docs.snowconvert.com/sc/translation-references/transact"><strong><em>SQL Server</em></strong></a></li><li><a href="https://docs.snowconvert.com/sc/translation-references/redshift"><strong>Redshift</strong></a></li><li><a href="https://docs.snowconvert.com/sc/translation-references/transact"><strong><em>Azure Synapse</em></strong></a></li><li><a href="https://docs.snowconvert.com/sc/translation-references/sybaseiq"><strong>Sybase IQ</strong></a></li><li><a href="https://docs.snowconvert.com/sc/translation-references/spark-dbx"><strong>Spark SQL</strong></a></li><li><a href="https://docs.snowconvert.com/sc/translation-references/spark-dbx"><strong>Databricks SQL</strong></a></li><li><a href="https://docs.snowconvert.com/sc/bigquery">BigQuery</a></li><li><a href="https://docs.snowconvert.com/sc/translation-references/postgresql">PostgreSQL &amp; Based Languages</a></li><li><a href="https://docs.snowconvert.com/sc/vertica">Vertica</a></li></ul><p>This article will help you to convert a simple DDL from Tearadata to Snowflake and things required before to start with this tool.During this exercise learnt about. Especially for this article Teradata DDLs are used as source.</p><p>Initial Preparation:</p><p>A. Install the SnowConvert</p><p>Snowflake has given very detail documentation for installing Snowcovert on your laptop</p><p><a href="https://docs.snowconvert.com/sc/general/getting-started/download-and-access">Download and Access | SnowConvert</a></p><p>The above documentation give some steps however this article will cover more details which are needed when converting the DDL from Teradata to Snowflake</p><p>B. Set up Project :</p><ol><li>Access Code : Get the access code from snowflake support team. When you first open SnowConvert we have to first create project.</li></ol><p>— — Project Name : &lt;Name your Proejct &gt;</p><p>— — Select Source — &lt;For eg Teradata&gt;</p><p>— — Enter new access Code of select one -This will be in file you can store in directory. You can add the code directly as well.</p><p>SP NOTE : Access code is must you can reach out to your Snowflake contact and support team to get open the case for provisioing one for you. It would be good to have this code requested for 30–60 days period. If not specifically mentioned Snowflake team will give a code which will have get expired in 1 day.</p><p>C. Create directory structure for better management:</p><pre>root (c:/users/yourusername)<br>    |--access_code (.lic file will be sent by snowflake team<br>    |--source_db<br>           |-Teradata<br>                |-scripts<br>    |--Output<br>         |-Snowflake<br>             |-DDL</pre><p>D. If you do not define the OUTPUT location Snowconvert is craeting one for you so one try that option as well.</p><ol><li>Source DDL file naming convention</li></ol><p>— — Store your file with simple name without any hypens or numbers. When performing the execution having name such as tdddl.ddl or tdddl.sql would work, ensure you do not have number, underscore or any dates etc., somehow it is throwing error.</p><p>2. Source file format</p><p>— — when you save the file in Windows OS laptop please ensure that you select “Encoding : UTF-8 with BOM” For this POC i have selected this Encoding.</p><p>Once you enter below two inputs in Snowconvert</p><p>“Where is your Source code?” C:/my_working_dir/TD_DDL/</p><p>Where should the migrated code be saved” c:/my_working_dir/TD_DDL_OUTPUT/</p><p>And hit on CONTINUE TO CONVERSION snowconvert opens the next screen which execute the conversion process.</p><p>This will generate the file in OUTPUT directory with two other directories logs\ which contains the steps followed during the conversion since from beginning and Reports\ — contains the XLS file with details about the error.</p><p>Image…</p><p>Below is the snippet of the converted DDL from TERADATA to Snowflake</p><p>tdtosnowflake.ddl file generated in OUTPUT location.</p><p>In generated file you will see below lines: The best part is the details provided in the output query. The COMMENT part is impressive feature.</p><pre>- ** SSC-FDM-TD0024 - SET TABLE FUNCTIONALITY NOT SUPPORTED. TABLE MIGHT hAVE DUPLIATES ROWS<br>CREATE OR REPLACE TABLE TEST_SCHM.TEST_TD_Tbl (<br>Col1 varchar(255) not null,<br>Col2 varchar(255) not null)<br>COMMENT = &#39;{&quot;origin&quot;:&quot;sf_sc&quot;,&quot;name&quot;:&quot;snowconvert&quot;,&quot;version&quot;:{&quot;major&quot;:1, &quot;minor&quot;:8, &quot;patch&quot;:&quot;1.0&quot;, &quot;attributes&quot;:{&quot;component&quot;:&quot;teradata&quot;, &quot;convertedon&quot;:&quot;date&quot;,&quot;domain&quot;:&quot;&quot;}}<br>}&#39;</pre><p><strong>Conclusion</strong>: DDL conversion tools like Snowconvert in DW migration projects are essential because they automate complex and error-prone tasks, significantly reducing time ,efforts &amp; cost involved in manually converting the schema and associated code. The SnowConvert tool help to expedite the conversion of Teradata BTEQ SQL code, DDL and Procedure to Snowflake. In my following articles will publish the SQL and Procedure conversion.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=8899a7071e95" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[SnowConvert — DDL conversion tool]]></title>
            <link>https://medium.com/@sushant.paricharak/snowconvert-ddl-conversion-tool-9040d600dc44?source=rss-c34a34f97cea------2</link>
            <guid isPermaLink="false">https://medium.com/p/9040d600dc44</guid>
            <dc:creator><![CDATA[Sushant]]></dc:creator>
            <pubDate>Wed, 25 Jun 2025 18:23:02 GMT</pubDate>
            <atom:updated>2025-06-25T18:23:02.216Z</atom:updated>
            <content:encoded><![CDATA[<h3>SnowConvert — DDL conversion tool</h3><p>I recently had the opportunity to attend the Snowflake Summit 2025, where Snowflake team demoed the SnowConvert feature. It is snowflake’s premiere code conversion tool to move legacy code to snowflake.</p><p>Why do we need these type of tool?</p><p>Database migration project often invovl moving from one database platform to another. Sometime the current state is on-premise and future state is over cloud. The process typically requires converting from existing DDL (Data Definition Language) Statements from the source DW to the syntax supported by the target platform. Here is why dedicated tools are essential for this conversion:</p><ol><li>Data compatibility &amp; Shcema conversion challenges</li></ol><p>2. Streamlined Migration Process</p><p>3. Standardization and Reusability</p><p>4. Reduced Manual Labor efforts</p><p>5. Faster time to Cloud adoption</p><p>About SnowConvert: (Directly from documentation <a href="https://docs.snowconvert.com/sc">https://docs.snowconvert.com/sc</a>)</p><p>Conventional data platforms and big data solutions struggle to deliver on their fundamental purpose: to enable any user to work with any data, without limits on scale, performance, or flexibility. Whether you’re a data analyst, data scientist, data engineer, or any other business or technology professional, you’ll get more from your data with the reinvented data warehousing that Snowflake can provide. Included in the many benefits of transitioning to world’s leading cloud-based data platform are:</p><ul><li><em>Multi-cluster and shared data</em>: allows you to process enormous quantities of data with maximum speed and efficiency.</li><li><em>Micro-Partitioning</em>: allows you to securely and efficiently store customer data.</li><li><em>Delivered as a service</em>: allows you to eliminate the administration and management demands of traditional data platforms.</li><li><em>Data Platform built for any cloud</em>: the separation of services from storage and compute allows multiple, compute clusters to simultaneously operate on the same data</li><li><em>Better Performance and throughput</em>: outperforms traditional methods for executing data workloads.</li><li><em>Support for all data</em>: allows you to query both structured and machine-generated, semi-structured data (i.e., JSON, Avro, XML, Parquet).</li></ul><p><em>Snowflake SnowConvert</em> is an easy-to-use software that lets you jump-start the modernization of your conventional data platform to the reinvented Snowflake Data Warehousing Architecture. To achieve this modernization, <em>SnowConvert</em> understands your source SQL (such as Oracle, SQL Server, and Teradata SQL) and translates SQL to <a href="https://docs.snowflake.net/manuals/sql-reference-commands.html"><strong>Snowflake SQL</strong></a>. Once your original code is converted, you’ll be able to start enjoying all the benefits of Snowflake.</p><p>Currently, SnowConvert is available for the following source platforms:</p><ul><li><a href="https://docs.snowconvert.com/sc/translation-references/teradata"><strong><em>Teradata</em></strong></a></li><li><a href="https://docs.snowconvert.com/sc/translation-references/oracle"><strong><em>Oracle</em></strong></a></li><li><a href="https://docs.snowconvert.com/sc/translation-references/transact"><strong><em>SQL Server</em></strong></a></li><li><a href="https://docs.snowconvert.com/sc/translation-references/redshift"><strong>Redshift</strong></a></li><li><a href="https://docs.snowconvert.com/sc/translation-references/transact"><strong><em>Azure Synapse</em></strong></a></li><li><a href="https://docs.snowconvert.com/sc/translation-references/sybaseiq"><strong>Sybase IQ</strong></a></li><li><a href="https://docs.snowconvert.com/sc/translation-references/spark-dbx"><strong>Spark SQL</strong></a></li><li><a href="https://docs.snowconvert.com/sc/translation-references/spark-dbx"><strong>Databricks SQL</strong></a></li><li><a href="https://docs.snowconvert.com/sc/bigquery">BigQuery</a></li><li><a href="https://docs.snowconvert.com/sc/translation-references/postgresql">PostgreSQL &amp; Based Languages</a></li><li><a href="https://docs.snowconvert.com/sc/vertica">Vertica</a></li></ul><p>This article will help you to convert a simple DDL from Tearadata to Snowflake and things required before to start with this tool.During this exercise learnt about. Especially for this article Teradata DDLs are used as source.</p><p>Initial Preparation:</p><p>A. Install the SnowConvert</p><p>Snowflake has given very detail documentation for installing Snowcovert on your laptop</p><p><a href="https://docs.snowconvert.com/sc/general/getting-started/download-and-access">Download and Access | SnowConvert</a></p><p>The above documentation give some steps however this article will cover more details which are needed when converting the DDL from Teradata to Snowflake</p><p>B. Set up Project :</p><ol><li>Access Code : Get the access code from snowflake support team. When you first open SnowConvert we have to first create project.</li></ol><p>— — Project Name : &lt;Name your Proejct &gt;</p><p>— — Select Source — &lt;For eg Teradata&gt;</p><p>— — Enter new access Code of select one -This will be in file you can store in directory. You can add the code directly as well.</p><p>SP NOTE : Access code is must you can reach out to your Snowflake contact and support team to get open the case for provisioing one for you. It would be good to have this code requested for 30–60 days period. If not specifically mentioned Snowflake team will give a code which will have get expired in 1 day.</p><p>C. Create directory structure for better management:</p><pre>root (c:/users/yourusername)<br>    |--access_code (.lic file will be sent by snowflake team<br>    |--source_db<br>           |-Teradata<br>                |-scripts<br>    |--Output<br>         |-Snowflake<br>             |-DDL</pre><p>D. If you do not define the OUTPUT location Snowconvert is craeting one for you so one try that option as well.</p><ol><li>Source DDL file naming convention</li></ol><p>— — Store your file with simple name without any hypens or numbers. When performing the execution having name such as tdddl.ddl or tdddl.sql would work, ensure you do not have number, underscore or any dates etc., somehow it is throwing error.</p><p>2. Source file format</p><p>— — when you save the file in Windows OS laptop please ensure that you select “Encoding : UTF-8 with BOM” For this POC i have selected this Encoding.</p><p>Once you enter below two inputs in Snowconvert</p><p>“Where is your Source code?” C:/my_working_dir/TD_DDL/</p><p>Where should the migrated code be saved” c:/my_working_dir/TD_DDL_OUTPUT/</p><p>And hit on CONTINUE TO CONVERSION snowconvert opens the next screen which execute the conversion process.</p><p>This will generate the file in OUTPUT directory with two other directories logs\ which contains the steps followed during the conversion since from beginning and Reports\ — contains the XLS file with details about the error.</p><p>Image…</p><p>Below is the snippet of the converted DDL from TERADATA to Snowflake</p><p>tdtosnowflake.ddl file generated in OUTPUT location.</p><p>In generated file you will see below lines: The best part is the details provided in the output query. The COMMENT part is impressive feature.</p><pre>- ** SSC-FDM-TD0024 - SET TABLE FUNCTIONALITY NOT SUPPORTED. TABLE MIGHT hAVE DUPLIATES ROWS<br>CREATE OR REPLACE TABLE TEST_SCHM.TEST_TD_Tbl (<br>Col1 varchar(255) not null,<br>Col2 varchar(255) not null)<br>COMMENT = &#39;{&quot;origin&quot;:&quot;sf_sc&quot;,&quot;name&quot;:&quot;snowconvert&quot;,&quot;version&quot;:{&quot;major&quot;:1, &quot;minor&quot;:8, &quot;patch&quot;:&quot;1.0&quot;, &quot;attributes&quot;:{&quot;component&quot;:&quot;teradata&quot;, &quot;convertedon&quot;:&quot;date&quot;,&quot;domain&quot;:&quot;&quot;}}<br>}&#39;</pre><p><strong>Conclusion</strong>: DDL conversion tools like Snowconvert in DW migration projects are essential because they automate complex and error-prone tasks, significantly reducing time ,efforts &amp; cost involved in manually converting the schema and associated code. The SnowConvert tool help to expedite the conversion of Teradata BTEQ SQL code, DDL and Procedure to Snowflake. In my following articles will publish the SQL and Procedure conversion.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=9040d600dc44" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Snowflake Apache Iceberg using External Catalog (using Glue) — Part 1]]></title>
            <link>https://medium.com/modern-data-cloud-engineering-journal/snowflake-apache-iceberg-using-external-catalog-using-glue-part-1-71eaffd64d27?source=rss-c34a34f97cea------2</link>
            <guid isPermaLink="false">https://medium.com/p/71eaffd64d27</guid>
            <category><![CDATA[snowflake-iceberg]]></category>
            <category><![CDATA[snowflake-data-cloud]]></category>
            <dc:creator><![CDATA[Sushant]]></dc:creator>
            <pubDate>Fri, 28 Mar 2025 21:58:45 GMT</pubDate>
            <atom:updated>2025-03-31T17:38:31.655Z</atom:updated>
            <content:encoded><![CDATA[<h3>Snowflake Apache Iceberg using External Catalog (using Glue) — Part 1</h3><p><strong>Introduction</strong><br>In the evolving world of modern data platforms, achieving a balance between cost optimization, performance, and open table format adoption has become crucial. Recently, I had the opportunity to work on an interesting POC (Proof of Concept) to integrate Snowflake with Apache Iceberg using AWS Glue Catalog as an external catalog source.<br> This article is not a “How-To” guide but a genuine sharing of my learning, experience, challenges, and key observations during this POC.</p><p>This is just first part of my 3 part story and i would be breaking down my whole proof of concept in</p><ol><li>Using Glue Catalog → Part1</li><li>Unity Data Catalog</li><li>Other Engines available for ETL</li></ol><p>Before I begin, I would like to sincerely <strong>thank all the technical authors, Snowflake community experts, AWS data engineering leaders, and open-source contributors</strong> who have published informative articles and valuable documentation on the same. Their work has helped many of us in the data community, including myself, in gaining deep insights on this evolving technology.</p><h3>Background &amp; Motivation</h3><p>We have been working extensively on <strong>Snowflake External Tables</strong> for large-scale analytics workloads. Over time, it was observed that:</p><ul><li><strong>High external query costs on cloud data lake layers.</strong></li><li><strong>Performance challenges</strong> observed with existing external table architecture.</li><li><strong>Desire to leverage open table formats for long-term scalability.</strong></li></ul><p>That’s where I decided to explore Snowflake’s integration with Apache Iceberg using Exteranal glue catalog. With that two possible choices we explored 1) Using AWS glue data catalog and 2)Using Databricks Unity data catalog.</p><p>This prompted me to explore newer ways to optimize query performance and minimize unnecessary costs &amp; thanks to Snowflake community and other snowflake DataSuperheroes who consistently share their knowledges to take references at certain stages.</p><h3>What is Apache Iceberg &amp; Why It Helped Us?</h3><p>For those who are new like me, <strong>Apache Iceberg</strong> is an <strong>open table format</strong> that addresses limitations in legacy data lakes by supporting:</p><ul><li>ACID transactions</li><li>Schema evolution</li><li>Partition &amp; metadata pruning</li><li>Time travel capabilities</li></ul><p>The real benefit for our use case: 👉 Iceberg’s well-structured metadata management drastically improved query runtimes over huge datasets compared to traditional External Tables</p><h3>Architecture Overview</h3><h3>Solution Components</h3><p><strong>S3 Bucket</strong> → Stores Iceberg table data</p><p><strong>IAM Roles and Policies</strong> -&gt; For access permission<br> <strong>Apache Iceberg Table Format</strong> → Manages partitioning, schema evolution<br> <strong>AWS Glue Data Catalog</strong> → Holds table metadata<br> <strong>AWS Glue Crawler</strong> → Used for metadata discovery (but has limitations)<br> <strong>Snowflake External Schema &amp; Table</strong> → Connects to Glue Catalog and queries Iceberg data</p><p>Here’s a simplified <strong>Architecture Diagram</strong> for your setup:</p><p>To quickly set up my AWS glue catalog I first created database and tables with appropriate schema added in AWS Glue. This will be bit challenging if we have 4000+ column file in S3 bucket. Now there different for many different scenarios for ex</p><ol><li>CSV file with no header</li><li>AVRO file formats</li><li>Parquet file.</li></ol><p>If you are using AWS Glue data catalog you can create the catalog using Athena Query editor to create database and tables, Athena has direct link to do so.</p><pre>Architecture Overview<br>Here’s a simplified Architecture Diagram for your setup:<br>                   +-----------------------------+<br>                   |         AWS S3 Bucket       |<br>                   |-----------------------------|<br>                   |  - Raw CSV files            |<br>                   |  - Iceberg Metadata &amp; Data  |<br>                   +-------------+---------------+<br>                                 |<br>                                 ▼<br>               +-----------------------------------+<br>               |        AWS Glue Crawler          |<br>               +-----------------------------------+<br>               |  - Crawls Iceberg Table Metadata |<br>               |  - Registers in Glue Catalog     |<br>               +-----------------------------------+<br>                                 |<br>                                 ▼<br>                   +----------------------------+<br>                   |         AWS Glue Catalog   |<br>                   +----------------------------+<br>                   | Iceberg Table Definitions  |<br>                   +----------------------------+<br>                                 |<br>                   +----------------------------+<br>                   |    AWS Athena/AWS glue ETL |<br>                   +----------------------------+<br>                    +----------------------------+<br>                   |    Snowflake Apache Iceberg|<br>                   +----------------------------+</pre><h3>Configure AWS IAM Role for Snowflake</h3><p>Create a dedicated <strong>AWS IAM Role</strong> with policies:</p><ul><li><strong>S3 read-only access</strong> to the data bucket.</li><li><strong>Glue GetDatabase, GetTable, GetPartition permissions.</strong></li><li>Enable <strong>External Volume access</strong> in Snowflake.</li></ul><p><strong>IAM Role Permissions Required</strong></p><p>This is the one place sometime we need precise direction on what should be IAM permissions or policies i should use</p><p>&gt; Create one role for S3 access, This role should have below permission when I say permission that is nothing but policies required to associate with role</p><pre>{<br>  &quot;Effect&quot;: &quot;Allow&quot;,<br>  &quot;Action&quot;: [<br>    &quot;s3:ListBucket&quot;,<br>    &quot;s3:GetObject&quot;,<br>    &quot;s3:PutObject&quot;<br>  ],<br>  &quot;Resource&quot;: [<br>    &quot;arn:aws:s3:::your-bucket&quot;,<br>    &quot;arn:aws:s3:::your-bucket/*&quot;<br>  ]<br>},<br>{<br>  &quot;Effect&quot;: &quot;Allow&quot;,<br>  &quot;Action&quot;: [<br>    &quot;glue:GetDatabase&quot;,<br>    &quot;glue:GetTable&quot;,<br>    &quot;glue:UpdateTable&quot;,<br>    &quot;glue:CreateTable&quot;<br>  ],<br>  &quot;Resource&quot;: &quot;*&quot; /* here you can add glue etl script if you want to update transform your CSV source into the Apache Iceberg format this will rem<br>                    your need of Athena engine to be used*/<br>}<br>{ /*Add statement for AWS KMS encrypt and decrypt */<br>}</pre><p>&gt; Trust Policy permissions</p><pre>{<br>  &quot;Version&quot; : &quot;2012-10-17&quot;,<br>   &quot;Statement&quot;: [<br>{  &quot;Effect&quot;:&quot;Allow&quot;,<br>    &quot;Principal&quot;:{<br>      &quot;AWS&quot;: &quot;arn:aws:iam:yourawsaccountforsnowflake:user/xxx-1234&quot;<br>}<br>,<br>&quot;Action&quot;: &quot;sts:AssumeRole&quot;,<br>&quot;Condition&quot;:{<br>&quot;Stringequal&quot;:{<br>&quot;sts:ExternalId&quot;: [<br>      &quot;You will have to add external ids for your snowfalke&quot;]}<br>}<br>}]}<br></pre><p>This above AWS IAM Trust Policy snippet is used to establish a trust relationship between an AWS IAM Role and an external entity, specifically Snowflake in this case.<br> It allows Snowflake to assume a role in your AWS account (commonly used to read/write data from your S3 bucket or AWS Glue Catalog).</p><p>&gt; Another role is for Glue role to allow snowflake to Allow get actions to apply on the AWS glue catalog and aws glue database</p><pre>{<br>   &quot;Version&quot;: &quot;2012-10-17&quot;,<br>   &quot;Statement&quot;: [<br>      {<br>         &quot;Sid&quot;: &quot;AllowGlueCatalogTableAccess&quot;,<br>         &quot;Effect&quot;: &quot;Allow&quot;,<br>         &quot;Action&quot;: [<br>            &quot;glue:GetTable&quot;,<br>            &quot;glue:GetTables&quot;<br>         ],<br>         &quot;Resource&quot;: [<br>            &quot;arn:aws:glue:*:&lt;accountid&gt;:table/*/*&quot;,<br>            &quot;arn:aws:glue:*:&lt;accountid&gt;:catalog&quot;,<br>            &quot;arn:aws:glue:*:&lt;accountid&gt;:database/&lt;database-name&gt;&quot;<br>         ]<br>      }<br>   ]<br>}</pre><p>For this i have updated the Trust policy same as above. The above step is the first step towards configuring the access permission for glue catalog.</p><pre>{<br>   &quot;Version&quot;: &quot;2012-10-17&quot;,<br>   &quot;Statement&quot;: [<br>      {<br>      &quot;Sid&quot;: &quot;&quot;,<br>      &quot;Effect&quot;: &quot;Allow&quot;,<br>      &quot;Principal&quot;: {<br>         &quot;AWS&quot;: &quot;&lt;glue_iam_user_arn&gt;&quot;<br>      },<br>      &quot;Action&quot;: &quot;sts:AssumeRole&quot;,<br>      &quot;Condition&quot;: {<br>         &quot;StringEquals&quot;: {<br>            &quot;sts:ExternalId&quot;: &quot;&lt;glue_aws_external_id&gt;&quot;<br>         }<br>      }<br>      }<br>   ]<br>}</pre><p>NOTE: One can just keep one role and add single policy and trust policy to avoid too many roles and policies created.</p><p>While i also used the Athena to quickly convert the CSV and avro files into ICEBERG format below is the command used:</p><h3>Convert CSV to Apache Iceberg Format (Athena)</h3><p>Use <strong>Athena</strong> DDL to convert external CSV table into <strong>Managed Iceberg Table</strong>:</p><pre>CREATE TABLE glue_db.iceberg_orders<br>WITH (<br>  format = &#39;ICEBERG&#39;,<br>  external_location = &#39;s3://your-bucket/iceberg/orders/&#39;<br>) AS<br>SELECT * FROM glue_db.csv_orders;</pre><p>This will create <strong>data &amp; metadata folders</strong> in your S3 location.</p><h3>Create a catalog integration in Snowflake</h3><p>Create a catalog integration for the AWS Glue Data Catalog using the <a href="https://docs.snowflake.com/en/sql-reference/sql/create-catalog-integration-glue">CREATE CATALOG INTEGRATION (AWS Glue)</a> command.</p><p>The following example creates a catalog integration that uses an AWS Glue Data Catalog source. The example specifies a value for the optional GLUE_REGION parameter.</p><pre>CREATE CATALOG INTEGRATION glueCatalogInt<br>  CATALOG_SOURCE = GLUE<br>  CATALOG_NAMESPACE = &#39;my.catalogdb&#39;<br>  TABLE_FORMAT = ICEBERG<br>  GLUE_AWS_ROLE_ARN = &#39;arn:aws:iam::123456789012:role/myGlueRole&#39;<br>  GLUE_CATALOG_ID = &#39;123456789012&#39;<br>  GLUE_REGION = &#39;us-east-2&#39;<br>  ENABLED = TRUE;</pre><p>To retrieve information about the AWS IAM user and the external ID that were created for your Snowflake account when you created the catalog integration, execute the <a href="https://docs.snowflake.com/en/sql-reference/sql/desc-catalog-integration">DESCRIBE CATALOG INTEGRATION</a> command. You provide this information to AWS in the next section to establish a trust relationship.</p><pre>Record the following values:<br><br>Value<br><br>Description<br><br>GLUE_AWS_IAM_USER_ARN<br><br>The AWS IAM user created for your Snowflake account, for example, arn:aws:iam::123456789001:user/abc1-b-self1234. Snowflake provisions a single IAM user for your entire Snowflake account. All Glue catalog integrations in your account use that IAM user.<br><br>GLUE_AWS_EXTERNAL_ID<br><br>The external ID that is needed to establish a trust relationship.</pre><h3>How to Achieve Auto Schema Evolution &amp; Metadata Update</h3><p>Below are my explorations</p><p>OPTION 1:</p><p>I have used AWS GLUE visual ETL to perform the schema and metadata update. If you are comfortable you can make used of AWS Glue’s user friendly User interface which help in creating the ETL in about 5 min. I will give more details on this in upcmoing series. I found it more interesting while working with it. I have used Terraform modules as well to provision the required AWS services.</p><h3>Option 2: Apache Spark + Iceberg Schema Merge (Preferred for Automation)</h3><p>Apache Iceberg supports <strong>automatic schema merging</strong> if enabled.</p><p><strong>Steps:</strong></p><ol><li>Enable Spark option:</li></ol><ul><li>spark.conf.set(&quot;spark.sql.catalog.glue_catalog&quot;, &quot;org.apache.iceberg.aws.glue.GlueCatalog&quot;) spark.conf.set(&quot;spark.sql.catalog.glue_catalog.warehouse&quot;, &quot;s3://your-bucket/&quot;) spark.conf.set(&quot;spark.sql.iceberg.schema.auto-update&quot;, &quot;true&quot;)</li></ul><p>When you run a MERGE or INSERT with <strong>new columns</strong>, Iceberg will automatically evolve the schema:</p><p>python</p><ul><li>df = spark.read.format(&quot;avro&quot;).load(&quot;s3://your-bucket/source-folder/&quot;) df.writeTo(&quot;glue_catalog.db.iceberg_table&quot;).append()</li></ul><h3>Recommended</h3><p>For large column counts like <strong>4500 columns</strong>, you should avoid relying only on Glue Crawlers and instead prefer <strong>Spark Iceberg Write Mode with </strong><strong>schema.auto-update=true</strong> to dynamically manage schema evolution and data ingestion at scale.</p><h3>🌼 Closing Note</h3><p>This article is only the beginning. In <strong>Part 2 &amp; Part 3</strong>, I will cover:</p><ul><li>Automating metadata refresh when CSV files are updated.</li><li>Handling partition evolution &amp; schema changes.</li><li>Performance benchmarking between External Tables vs Iceberg Tables.</li><li>Production Rollout Recommendations &amp; Cost Optimization.</li></ul><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=71eaffd64d27" width="1" height="1" alt=""><hr><p><a href="https://medium.com/modern-data-cloud-engineering-journal/snowflake-apache-iceberg-using-external-catalog-using-glue-part-1-71eaffd64d27">Snowflake Apache Iceberg using External Catalog (using Glue) — Part 1</a> was originally published in <a href="https://medium.com/modern-data-cloud-engineering-journal">Modern Data &amp; Cloud Engineering Journal</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
    </channel>
</rss>