<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:dc="http://purl.org/dc/elements/1.1/">
  <channel>
    <title>DEV Community: Chamindu Perera</title>
    <description>The latest articles on DEV Community by Chamindu Perera (@chaminduperera).</description>
    <link>https://dev.to/chaminduperera</link>
    <image>
      <url>https://media2.dev.to/dynamic/image/width=90,height=90,fit=cover,gravity=auto,format=auto/https:%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Fuser%2Fprofile_image%2F1152113%2F452fb671-675b-4c71-8716-f0484c4a5ebc.png</url>
      <title>DEV Community: Chamindu Perera</title>
      <link>https://dev.to/chaminduperera</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/chaminduperera"/>
    <language>en</language>
    <item>
      <title>Snowflake SQL Interview Questions – Quick Notes</title>
      <dc:creator>Chamindu Perera</dc:creator>
      <pubDate>Tue, 07 Jul 2026 15:04:54 +0000</pubDate>
      <link>https://dev.to/chaminduperera/snowflake-sql-interview-questions-quick-notes-1754</link>
      <guid>https://dev.to/chaminduperera/snowflake-sql-interview-questions-quick-notes-1754</guid>
      <description>&lt;p&gt;SNOWFLAKE SQL INTERVIEW QUESTIONS – QUICK NOTES&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;What is Snowflake?
Snowflake is a cloud-based data warehouse that separates compute and storage, allowing both to scale independently.&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;Key Features:&lt;br&gt;
• Cloud-native architecture&lt;br&gt;
• Separation of Compute &amp;amp; Storage&lt;br&gt;
• Virtual Warehouses&lt;br&gt;
• Time Travel&lt;br&gt;
• Zero-Copy Cloning&lt;br&gt;
• Secure Data Sharing&lt;br&gt;
• Automatic Scaling&lt;/p&gt;




&lt;ol&gt;
&lt;li&gt;Explain Snowflake Architecture.&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;Snowflake has three layers:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;
&lt;p&gt;Database Storage Layer&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Stores compressed data.&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Compute Layer&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Virtual Warehouses execute SQL queries.&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Cloud Services Layer&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Handles authentication, metadata, query optimization, and security.&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;/ol&gt;




&lt;ol&gt;
&lt;li&gt;What is a Virtual Warehouse?&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;A Virtual Warehouse is a compute cluster that executes SQL queries. Multiple warehouses can access the same data simultaneously.&lt;/p&gt;




&lt;ol&gt;
&lt;li&gt;Difference between CTE and Subquery&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;CTE&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Easier to read&lt;/li&gt;
&lt;li&gt;Can be reused&lt;/li&gt;
&lt;li&gt;Supports recursive queries&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Subquery&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Less readable for complex queries&lt;/li&gt;
&lt;li&gt;Usually used once&lt;/li&gt;
&lt;li&gt;Cannot be reused easily&lt;/li&gt;
&lt;/ul&gt;




&lt;ol&gt;
&lt;li&gt;Types of Joins&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;• INNER JOIN&lt;br&gt;
• LEFT JOIN&lt;br&gt;
• RIGHT JOIN&lt;br&gt;
• FULL OUTER JOIN&lt;br&gt;
• CROSS JOIN&lt;br&gt;
• SELF JOIN&lt;/p&gt;




&lt;ol&gt;
&lt;li&gt;Window Functions&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;Common functions:&lt;br&gt;
• ROW_NUMBER()&lt;br&gt;
• RANK()&lt;br&gt;
• DENSE_RANK()&lt;br&gt;
• LAG()&lt;br&gt;
• LEAD()&lt;br&gt;
• SUM() OVER()&lt;br&gt;
• AVG() OVER()&lt;/p&gt;

&lt;p&gt;Example:&lt;/p&gt;

&lt;p&gt;SELECT employee_id,&lt;br&gt;
       salary,&lt;br&gt;
       ROW_NUMBER() OVER(ORDER BY salary DESC) AS rn&lt;br&gt;
FROM employees;&lt;/p&gt;




&lt;ol&gt;
&lt;li&gt;QUALIFY Clause (Snowflake Specific)&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;Filters rows after applying window functions.&lt;/p&gt;

&lt;p&gt;Example:&lt;/p&gt;

&lt;p&gt;SELECT *&lt;br&gt;
FROM employees&lt;br&gt;
QUALIFY ROW_NUMBER() OVER&lt;br&gt;
(PARTITION BY department ORDER BY salary DESC)=1;&lt;/p&gt;




&lt;ol&gt;
&lt;li&gt;Difference between ROW_NUMBER(), RANK(), and DENSE_RANK()&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;ROW_NUMBER()&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Assigns unique numbers.&lt;/li&gt;
&lt;li&gt;No duplicates.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;RANK()&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Same rank for ties.&lt;/li&gt;
&lt;li&gt;Skips rank numbers.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;DENSE_RANK()&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Same rank for ties.&lt;/li&gt;
&lt;li&gt;Does not skip numbers.&lt;/li&gt;
&lt;/ul&gt;




&lt;ol&gt;
&lt;li&gt;Find Second Highest Salary&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;SELECT salary&lt;br&gt;
FROM employees&lt;br&gt;
QUALIFY DENSE_RANK() OVER(ORDER BY salary DESC)=2;&lt;/p&gt;




&lt;ol&gt;
&lt;li&gt;What is Time Travel?&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;Allows recovery of deleted or modified data within the configured retention period.&lt;/p&gt;




&lt;ol&gt;
&lt;li&gt;What is Zero Copy Cloning?&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;Creates an instant copy of tables, schemas, or databases without duplicating physical storage.&lt;/p&gt;




&lt;ol&gt;
&lt;li&gt;Temporary vs Transient vs Permanent Tables&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;Temporary Table&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Exists only for the current session.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Transient Table&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;No Fail-safe.&lt;/li&gt;
&lt;li&gt;Lower storage cost.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Permanent Table&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Supports Time Travel and Fail-safe.&lt;/li&gt;
&lt;/ul&gt;




&lt;ol&gt;
&lt;li&gt;&lt;p&gt;Common SQL Interview Questions&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Find duplicate records.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Remove duplicate records.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Find the second highest salary.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Find the top 3 salaries in each department.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Calculate running totals.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Calculate rolling averages.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Find employees earning above department average.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Get the latest record for each customer.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Count customers by month.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Find missing dates.&lt;/p&gt;&lt;/li&gt;
&lt;/ol&gt;




&lt;ol&gt;
&lt;li&gt;Performance Tips&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;• Avoid SELECT *.&lt;br&gt;
• Filter data as early as possible.&lt;br&gt;
• Use appropriate warehouse size.&lt;br&gt;
• Use clustering keys when necessary.&lt;br&gt;
• Use QUALIFY instead of nested subqueries where applicable.&lt;/p&gt;




&lt;ol&gt;
&lt;li&gt;Frequently Asked Snowflake Questions&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;• What are Micro-partitions?&lt;br&gt;
• Explain Snowpipe.&lt;br&gt;
• What are Streams and Tasks?&lt;br&gt;
• What is Fail-safe?&lt;br&gt;
• Difference between COPY INTO and Snowpipe.&lt;br&gt;
• What is VARIANT data type?&lt;br&gt;
• Explain FLATTEN().&lt;br&gt;
• Explain RBAC in Snowflake.&lt;br&gt;
• How do you optimize slow queries?&lt;br&gt;
• What is Query Profile?&lt;/p&gt;




&lt;p&gt;Interview Tips&lt;/p&gt;

&lt;p&gt;✔ Master Joins, CTEs, Window Functions, and QUALIFY.&lt;/p&gt;

&lt;p&gt;✔ Practice writing SQL without an editor.&lt;/p&gt;

&lt;p&gt;✔ Learn Snowflake-specific features:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Time Travel&lt;/li&gt;
&lt;li&gt;Zero-Copy Cloning&lt;/li&gt;
&lt;li&gt;Streams&lt;/li&gt;
&lt;li&gt;Tasks&lt;/li&gt;
&lt;li&gt;Snowpipe&lt;/li&gt;
&lt;li&gt;VARIANT&lt;/li&gt;
&lt;li&gt;FLATTEN&lt;/li&gt;
&lt;li&gt;Virtual Warehouses&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;✔ Explain your SQL logic clearly during the interview.&lt;/p&gt;

</description>
      <category>ai</category>
      <category>programming</category>
      <category>database</category>
      <category>sql</category>
    </item>
    <item>
      <title>KNIME Analytics Platform for Data Science-1</title>
      <dc:creator>Chamindu Perera</dc:creator>
      <pubDate>Sat, 02 Sep 2023 19:44:08 +0000</pubDate>
      <link>https://dev.to/chaminduperera/knime-analytics-platform-for-data-science-1-2ie7</link>
      <guid>https://dev.to/chaminduperera/knime-analytics-platform-for-data-science-1-2ie7</guid>
      <description>&lt;h2&gt;
  
  
  KNIME
&lt;/h2&gt;

&lt;p&gt;KNIME Analytics is a Java-based data science tool. It is simpler to construct data mining applications with this software since it supports visual programming in the form of a workflow with numerous nodes, which &lt;strong&gt;eliminates the need for highly developed coding abilities, but also allows if you need it&lt;/strong&gt;. It has a huge and varied plugin center and is commonly used in academic settings. It is an extensible data science platform that supports user-created scripts and codes in addition to visual programming. KNIME is a cross-platform software package that may be set up on several operating systems. Early versions of KNIME works with JAVA 8 but Updated KNIME requires &lt;strong&gt;JAVA 11&lt;/strong&gt; and higher versions. So, you can install one of the &lt;code&gt;openjdk-11&lt;/code&gt; or &lt;code&gt;openjdk-latest&lt;/code&gt; packages before install the KNIME platform. After that You can start surfing with start downloading KNIME by this &lt;a href="https://www.knime.com/downloads" rel="noopener noreferrer"&gt;Link:)&lt;/a&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;KNIME Workbench&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;The main tab in the KNIME interface is the Workbench. This Workbench is the place where you will be building your workflows. It is also where you'll find all the resources you need to help you build your workflows. &lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F7xihyw8bizedpc8atlin.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F7xihyw8bizedpc8atlin.png" alt=" " width="800" height="455"&gt;&lt;/a&gt;&lt;br&gt;
Other Tabs are,&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;p&gt;KNIME Explorer&lt;br&gt;
Explorer is what you use to manage your workflows, workflow groups, and server connections and also you can access example workflows that have been built to demonstrate different functionalities in KNIME.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Workflow Coach&lt;br&gt;
This tab will recommend you the node that you can use as the next step after where you are now. These node recommendations are based on KNIME community usage statistics. You can add nodes from the workflow coach to the editor by dragging and dropping them, or by double clicking.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Node repository&lt;br&gt;
Currently installed nodes are available from the node repository. You build your workflow by dragging or double clicking nodes from the node repository to the workflow editor as in the workflow coach. There are two types of searches in the repository as crisp search and fuzzy search. The &lt;strong&gt;crisp search&lt;/strong&gt; is the default mode and returns all nodes that either have the search term in the name or that are in a subcategory whose name includes the search term. The &lt;strong&gt;fuzzy search&lt;/strong&gt; returns all nodes that are related to the search term.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Description&lt;br&gt;
This gives you information about the currently active workflow, or about an individual node selected either in the node repository or the workflow editor and tells you the purpose of the workflow, what it does, what you might need to run it plus links  to blog articles, for example, or other web pages related to the workflow.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Console&lt;br&gt;
The console is where any warnings and error messages are shown that relate to your workflow, indicating what is going on under the hood.&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fw918son6x0e95z89lwxq.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fw918son6x0e95z89lwxq.png" alt=" " width="742" height="452"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h4&gt;
  
  
  Nodes, Data &amp;amp; Workflows
&lt;/h4&gt;

&lt;p&gt;The following image illustrates a node and explains the different parts of a node.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fvofgr9qocuqz6f18h10y.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fvofgr9qocuqz6f18h10y.png" alt=" " width="391" height="208"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h4&gt;
  
  
  Data access
&lt;/h4&gt;

&lt;p&gt;The start of any project is to access the required data. So, refer below different nodes which we can access data in KNIME. You can access and blend data from different local end remote file systems: CSV files and other formatted text files, Excel workbooks, proprietary file formats of other tools, and more.&lt;/p&gt;

&lt;h4&gt;
  
  
  Reader Nodes
&lt;/h4&gt;

&lt;p&gt;The common file types for which there are dedicated nodes are CSV, Tabular, and Excel files. For a more exhaustive list and description of all KNIME nodes for data access, download the free e-book &lt;a href="https://www.knime.com/knimepress/will-they-blend#:~:text=This%20is%20the%20fourth%20edition,social%20media%2C%20from%20R%20and" rel="noopener noreferrer"&gt;"Will they blend?"&lt;/a&gt;, a collection of blog posts centered around data access &amp;amp; blending.&lt;/p&gt;

&lt;h6&gt;
  
  
  Related Nodes:
&lt;/h6&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fn5h51yra4cwwnqlnax3b.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fn5h51yra4cwwnqlnax3b.png" alt=" " width="304" height="103"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;1.CSV Reader&lt;br&gt;
2.Table Reader&lt;br&gt;
3.Excel Reader&lt;/p&gt;

&lt;h4&gt;
  
  
  Accessing Databases
&lt;/h4&gt;

&lt;p&gt;In KNIME, you can connect to any JDBC compliant database and manipulate data directly on the database. At any point, you can read the data into a local KNIME data table, and vice versa.&lt;/p&gt;

&lt;h6&gt;
  
  
  Related Nodes:
&lt;/h6&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Ftikarpe9yieo4vd2tktd.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Ftikarpe9yieo4vd2tktd.png" alt=" " width="294" height="96"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;1.DB Connector&lt;br&gt;
2.DB Table Selector&lt;br&gt;
3.DB Reader&lt;/p&gt;

&lt;h4&gt;
  
  
  Data Cleaning
&lt;/h4&gt;

&lt;p&gt;After accessed the data from one or more sources, you need to clean and transform it. One purpose of these steps is to reduce the irrelevant and retain the essential information. The possible operations include row and column filtering and transformations on numbers, strings, and rules.&lt;/p&gt;

&lt;p&gt;Another purpose of cleaning data is to reduce bias and enhance clarity in the next steps, such as model training, statistics calculation, and creating dashboards. Missing value handling and outlier detection are helpful operations there.&lt;/p&gt;

&lt;h4&gt;
  
  
  Row &amp;amp; Column Filtering
&lt;/h4&gt;

&lt;p&gt;A good start to transforming data is to exclude unnecessary information. Rows can be removed, for example, if they are duplicates, have missing values, or if they just don't belong to the subset of interest.&lt;/p&gt;

&lt;h6&gt;
  
  
  Related Nodes:
&lt;/h6&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fjw16m89ldumuh1lh5q7t.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fjw16m89ldumuh1lh5q7t.png" alt=" " width="240" height="102"&gt;&lt;/a&gt;&lt;br&gt;
1.Row Filter&lt;br&gt;
2.Column Filter&lt;/p&gt;

&lt;p&gt;That's it for the Basic introduction and all data accessing, cleaning parts in KNIME for beginners and keep in touch for upcoming Data Standardization part with numbers, Strings and Rules.&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;&lt;strong&gt;Thank you!&lt;/strong&gt;&lt;/p&gt;
&lt;/blockquote&gt;

</description>
      <category>datascience</category>
      <category>dataengineering</category>
      <category>ai</category>
      <category>machinelearning</category>
    </item>
  </channel>
</rss>
