<?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: Vijay Ashley Rodrigues</title>
    <description>The latest articles on DEV Community by Vijay Ashley Rodrigues (@vijayrodrigues).</description>
    <link>https://dev.to/vijayrodrigues</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.amazonaws.com%2Fuploads%2Fuser%2Fprofile_image%2F3170056%2F1ab3a2d7-094e-4617-b090-677f0c9e10f3.jpg</url>
      <title>DEV Community: Vijay Ashley Rodrigues</title>
      <link>https://dev.to/vijayrodrigues</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/vijayrodrigues"/>
    <language>en</language>
    <item>
      <title>Building with Snowflake Cortex Analyst — What I Learned About Semantic Layers and Guardrails</title>
      <dc:creator>Vijay Ashley Rodrigues</dc:creator>
      <pubDate>Wed, 18 Mar 2026 01:42:52 +0000</pubDate>
      <link>https://dev.to/vijayrodrigues/building-with-snowflake-cortex-analyst-what-i-learned-about-semantic-layers-and-guardrails-23pm</link>
      <guid>https://dev.to/vijayrodrigues/building-with-snowflake-cortex-analyst-what-i-learned-about-semantic-layers-and-guardrails-23pm</guid>
      <description>&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%2Fdu54omost3vhhdlcyvf4.jpg" 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%2Fdu54omost3vhhdlcyvf4.jpg" alt="cortex_analyst_banner" width="800" height="227"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;When I started working with Snowflake Cortex Analyst, I assumed the hard part would be getting the system to answer questions correctly.&lt;/p&gt;

&lt;p&gt;It wasn't. The hard part was deciding which questions it shouldn't answer.&lt;/p&gt;

&lt;p&gt;In this post I want to share two things that took more thought than I expected — verified queries and guardrails.&lt;/p&gt;

&lt;h2&gt;
  
  
  A Quick Overview of Cortex Analyst
&lt;/h2&gt;

&lt;p&gt;Snowflake Cortex Analyst lets users ask questions in plain English and get answers from structured data. Under the hood, it uses a semantic model defined in YAML to understand the data and generate SQL responses.&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%2Fum4hs2rjeyyuu9m4iam8.jpg" 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%2Fum4hs2rjeyyuu9m4iam8.jpg" alt="cortex_analyst_architecture" width="800" height="399"&gt;&lt;/a&gt;&lt;/p&gt;




&lt;p&gt;There are two ways it can respond:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Verified queries — pre-validated question-answer pairs you define&lt;/li&gt;
&lt;li&gt;LLM-generated SQL — the model generates SQL on its own when no verified query matches&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;The goal of a well-structured semantic model is to maximize verified query hits. The more questions route through verified queries, the more controlled and reliable your output.&lt;/p&gt;




&lt;h2&gt;
  
  
  The Verified Queries Trade-off
&lt;/h2&gt;

&lt;p&gt;My first instinct was to add as many verified query variations as possible — cover every way a user might ask the same question.&lt;/p&gt;

&lt;p&gt;That backfired.&lt;/p&gt;

&lt;div class="table-wrapper-paragraph"&gt;&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;Approach&lt;/th&gt;
&lt;th&gt;Problem&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;Too few variations&lt;/td&gt;
&lt;td&gt;Model misses valid questions, falls back to LLM generation&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Too many variations&lt;/td&gt;
&lt;td&gt;Introduces noise, wrong query gets matched&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;&lt;/div&gt;




&lt;h2&gt;
  
  
  The Guardrail Problem — Define What It Shouldn't Do
&lt;/h2&gt;

&lt;p&gt;This is the part most people skip.&lt;/p&gt;

&lt;p&gt;In data engineering we always plan for edge cases. I applied the same thinking here — users will assume this works like any AI tool and ask anything. You can't control that. So instead of trying to restrict users, I put the responsibility on the YAML.&lt;/p&gt;

&lt;p&gt;Cortex Analyst has a &lt;code&gt;question_categorization&lt;/code&gt; block where you explicitly define categories of questions the system should refuse. Here's a simplified example:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight yaml"&gt;&lt;code&gt;&lt;span class="na"&gt;question_categorization&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt;
  &lt;span class="pi"&gt;-&lt;/span&gt; &lt;span class="na"&gt;category&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt; &lt;span class="s"&gt;unavailable_topics&lt;/span&gt;
    &lt;span class="na"&gt;examples&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt;
      &lt;span class="pi"&gt;-&lt;/span&gt; &lt;span class="s2"&gt;"&lt;/span&gt;&lt;span class="s"&gt;What&lt;/span&gt;&lt;span class="nv"&gt; &lt;/span&gt;&lt;span class="s"&gt;is&lt;/span&gt;&lt;span class="nv"&gt; &lt;/span&gt;&lt;span class="s"&gt;the&lt;/span&gt;&lt;span class="nv"&gt; &lt;/span&gt;&lt;span class="s"&gt;return&lt;/span&gt;&lt;span class="nv"&gt; &lt;/span&gt;&lt;span class="s"&gt;rate&lt;/span&gt;&lt;span class="nv"&gt; &lt;/span&gt;&lt;span class="s"&gt;by&lt;/span&gt;&lt;span class="nv"&gt; &lt;/span&gt;&lt;span class="s"&gt;supplier?"&lt;/span&gt;
      &lt;span class="pi"&gt;-&lt;/span&gt; &lt;span class="s2"&gt;"&lt;/span&gt;&lt;span class="s"&gt;Show&lt;/span&gt;&lt;span class="nv"&gt; &lt;/span&gt;&lt;span class="s"&gt;me&lt;/span&gt;&lt;span class="nv"&gt; &lt;/span&gt;&lt;span class="s"&gt;customer&lt;/span&gt;&lt;span class="nv"&gt; &lt;/span&gt;&lt;span class="s"&gt;lifetime&lt;/span&gt;&lt;span class="nv"&gt; &lt;/span&gt;&lt;span class="s"&gt;value"&lt;/span&gt;

  &lt;span class="pi"&gt;-&lt;/span&gt; &lt;span class="na"&gt;category&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt; &lt;span class="s"&gt;greetings&lt;/span&gt;
    &lt;span class="na"&gt;examples&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt;
      &lt;span class="pi"&gt;-&lt;/span&gt; &lt;span class="s2"&gt;"&lt;/span&gt;&lt;span class="s"&gt;Hey"&lt;/span&gt;
      &lt;span class="pi"&gt;-&lt;/span&gt; &lt;span class="s2"&gt;"&lt;/span&gt;&lt;span class="s"&gt;Can&lt;/span&gt;&lt;span class="nv"&gt; &lt;/span&gt;&lt;span class="s"&gt;you&lt;/span&gt;&lt;span class="nv"&gt; &lt;/span&gt;&lt;span class="s"&gt;help&lt;/span&gt;&lt;span class="nv"&gt; &lt;/span&gt;&lt;span class="s"&gt;me?"&lt;/span&gt;

  &lt;span class="pi"&gt;-&lt;/span&gt; &lt;span class="na"&gt;category&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt; &lt;span class="s"&gt;forecast_or_prediction&lt;/span&gt;
    &lt;span class="na"&gt;examples&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt;
      &lt;span class="pi"&gt;-&lt;/span&gt; &lt;span class="s2"&gt;"&lt;/span&gt;&lt;span class="s"&gt;What&lt;/span&gt;&lt;span class="nv"&gt; &lt;/span&gt;&lt;span class="s"&gt;will&lt;/span&gt;&lt;span class="nv"&gt; &lt;/span&gt;&lt;span class="s"&gt;sales&lt;/span&gt;&lt;span class="nv"&gt; &lt;/span&gt;&lt;span class="s"&gt;look&lt;/span&gt;&lt;span class="nv"&gt; &lt;/span&gt;&lt;span class="s"&gt;like&lt;/span&gt;&lt;span class="nv"&gt; &lt;/span&gt;&lt;span class="s"&gt;next&lt;/span&gt;&lt;span class="nv"&gt; &lt;/span&gt;&lt;span class="s"&gt;month?"&lt;/span&gt;
      &lt;span class="pi"&gt;-&lt;/span&gt; &lt;span class="s2"&gt;"&lt;/span&gt;&lt;span class="s"&gt;Predict&lt;/span&gt;&lt;span class="nv"&gt; &lt;/span&gt;&lt;span class="s"&gt;inventory&lt;/span&gt;&lt;span class="nv"&gt; &lt;/span&gt;&lt;span class="s"&gt;needs&lt;/span&gt;&lt;span class="nv"&gt; &lt;/span&gt;&lt;span class="s"&gt;for&lt;/span&gt;&lt;span class="nv"&gt; &lt;/span&gt;&lt;span class="s"&gt;Q4"&lt;/span&gt;

  &lt;span class="pi"&gt;-&lt;/span&gt; &lt;span class="na"&gt;category&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt; &lt;span class="s"&gt;ambiguous_queries&lt;/span&gt;
    &lt;span class="na"&gt;examples&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt;
      &lt;span class="pi"&gt;-&lt;/span&gt; &lt;span class="s2"&gt;"&lt;/span&gt;&lt;span class="s"&gt;Show&lt;/span&gt;&lt;span class="nv"&gt; &lt;/span&gt;&lt;span class="s"&gt;me&lt;/span&gt;&lt;span class="nv"&gt; &lt;/span&gt;&lt;span class="s"&gt;something&lt;/span&gt;&lt;span class="nv"&gt; &lt;/span&gt;&lt;span class="s"&gt;interesting"&lt;/span&gt;
      &lt;span class="pi"&gt;-&lt;/span&gt; &lt;span class="s2"&gt;"&lt;/span&gt;&lt;span class="s"&gt;What&lt;/span&gt;&lt;span class="nv"&gt; &lt;/span&gt;&lt;span class="s"&gt;should&lt;/span&gt;&lt;span class="nv"&gt; &lt;/span&gt;&lt;span class="s"&gt;I&lt;/span&gt;&lt;span class="nv"&gt; &lt;/span&gt;&lt;span class="s"&gt;look&lt;/span&gt;&lt;span class="nv"&gt; &lt;/span&gt;&lt;span class="s"&gt;at?"&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Without this block, the system will attempt to answer everything — including questions it has no business answering. That doesn't happen by itself. You have to build it in.&lt;/p&gt;




&lt;h2&gt;
  
  
  Summary
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;Structure your semantic model to maximize verified query hits, not just expose data.&lt;/li&gt;
&lt;li&gt;Verified queries need enough variation to be useful — but too many creates noise.&lt;/li&gt;
&lt;li&gt;Use &lt;code&gt;question_categorization&lt;/code&gt; to explicitly define what the system should refuse.&lt;/li&gt;
&lt;li&gt;Think defensively from day one — don't wait for something to break in production.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Still early in this build, but these are the decisions I'm glad I made at the start rather than retrofitting later.&lt;/p&gt;

</description>
      <category>dataengineering</category>
      <category>snowflake</category>
      <category>architecture</category>
      <category>mcp</category>
    </item>
    <item>
      <title>From Views to Tables: How I Optimized dbt Models with Delta on Databricks</title>
      <dc:creator>Vijay Ashley Rodrigues</dc:creator>
      <pubDate>Tue, 24 Jun 2025 18:20:03 +0000</pubDate>
      <link>https://dev.to/vijayrodrigues/from-views-to-tables-how-i-optimized-dbt-models-with-delta-on-databricks-f7n</link>
      <guid>https://dev.to/vijayrodrigues/from-views-to-tables-how-i-optimized-dbt-models-with-delta-on-databricks-f7n</guid>
      <description>&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%2Fh78k0dcb6dr3wujdbih5.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%2Fh78k0dcb6dr3wujdbih5.png" alt="databricks-dbt-delta" width="800" height="800"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;When I started using dbt with Databricks, I was mostly focused on writing models and building transformations. But as the data volume grew, I realized the performance and cost implications of materializations and storage formats.&lt;/p&gt;

&lt;p&gt;In this post, I want to share some real lessons learned while choosing between &lt;code&gt;view&lt;/code&gt;, &lt;code&gt;table&lt;/code&gt;, and &lt;code&gt;incremental&lt;/code&gt; materializations—and why switching from Parquet to Delta Lake made a huge difference.&lt;/p&gt;




&lt;h2&gt;
  
  
  Views vs Tables vs Incremental: What Actually Works?
&lt;/h2&gt;

&lt;p&gt;Here’s a quick breakdown of how I use each materialization in real projects:&lt;/p&gt;

&lt;div class="table-wrapper-paragraph"&gt;&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;Materialization&lt;/th&gt;
&lt;th&gt;Use Case&lt;/th&gt;
&lt;th&gt;Notes&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;&lt;code&gt;view&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;Lightweight models (renaming, filtering)&lt;/td&gt;
&lt;td&gt;Great for development, but recomputes every time&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;code&gt;table&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;Medium-size dimensions&lt;/td&gt;
&lt;td&gt;Useful for reference tables that rarely change&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;code&gt;incremental&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;Large facts, high-frequency data&lt;/td&gt;
&lt;td&gt;Only processes new or changed rows (ideal for big datasets)&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;&lt;/div&gt;




&lt;h2&gt;
  
  
  DAG and &lt;code&gt;ref()&lt;/code&gt; – How dbt Manages Dependencies
&lt;/h2&gt;

&lt;p&gt;Instead of hardcoding table names, I use &lt;code&gt;ref()&lt;/code&gt; to link models. For example:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight sql"&gt;&lt;code&gt;&lt;span class="k"&gt;SELECT&lt;/span&gt; &lt;span class="o"&gt;*&lt;/span&gt;
&lt;span class="k"&gt;FROM&lt;/span&gt; &lt;span class="p"&gt;{{&lt;/span&gt; &lt;span class="k"&gt;ref&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="s1"&gt;'stg_orders'&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="p"&gt;}}&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;This function does more than just alias a table. Behind the scenes, &lt;code&gt;ref()&lt;/code&gt; helps dbt:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Build a Directed Acyclic Graph (DAG) of your models&lt;/li&gt;
&lt;li&gt;Determine the correct run order during &lt;code&gt;dbt run&lt;/code&gt;
&lt;/li&gt;
&lt;li&gt;Resolve fully qualified table names dynamically across dev/prod environments&lt;/li&gt;
&lt;li&gt;Track lineage for documentation and testing&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;This becomes incredibly useful in Databricks where the environment, catalog, and schema may differ between workspaces.&lt;/p&gt;

&lt;p&gt;For example, &lt;code&gt;{{ ref('stg_orders') }}&lt;/code&gt; might compile into:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight sql"&gt;&lt;code&gt;&lt;span class="nv"&gt;`dev_catalog`&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nv"&gt;`analytics_schema`&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nv"&gt;`stg_orders`&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;This makes your project &lt;strong&gt;environment-agnostic&lt;/strong&gt; and easier to manage with Git-based workflows.&lt;/p&gt;




&lt;h2&gt;
  
  
  Real Problem I Faced with Views on Databricks
&lt;/h2&gt;

&lt;p&gt;In one pipeline, I had several dbt models materialized as &lt;code&gt;view&lt;/code&gt;, assuming it would keep things fast and light. But as models started chaining together—one &lt;code&gt;ref()&lt;/code&gt; leading to another—the final model failed due to &lt;strong&gt;out-of-memory errors&lt;/strong&gt;.&lt;/p&gt;

&lt;p&gt;That’s because views in dbt are logical; Databricks has to recompute all the upstream SQL each time. As complexity grew, so did query length and memory usage.&lt;/p&gt;




&lt;h2&gt;
  
  
  Solution: Switching from &lt;code&gt;view&lt;/code&gt; to &lt;code&gt;table&lt;/code&gt;
&lt;/h2&gt;

&lt;p&gt;I changed key intermediate models to use &lt;code&gt;table&lt;/code&gt; materialization:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight sql"&gt;&lt;code&gt;&lt;span class="p"&gt;{{&lt;/span&gt; &lt;span class="n"&gt;config&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;materialized&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="s1"&gt;'table'&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="p"&gt;}}&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;This persisted the results, reduced recomputation, and stabilized the pipeline.&lt;/p&gt;




&lt;h2&gt;
  
  
  Why I Use Delta Format on Databricks
&lt;/h2&gt;

&lt;p&gt;If you're using Databricks and still materializing models as regular Parquet files, you're missing out.&lt;/p&gt;

&lt;p&gt;Delta Lake adds:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;ACID compliance&lt;/strong&gt; (safe concurrent writes)&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Time travel&lt;/strong&gt; (query past versions)&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Efficient upserts and merges&lt;/strong&gt;&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Z-Ordering&lt;/strong&gt; (for faster filtering)&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;In my dbt config, I now explicitly define:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight sql"&gt;&lt;code&gt;&lt;span class="p"&gt;{{&lt;/span&gt; &lt;span class="n"&gt;config&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;materialized&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="s1"&gt;'table'&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;file_format&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="s1"&gt;'delta'&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="p"&gt;}}&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;And for large tables, I follow up with:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight sql"&gt;&lt;code&gt;&lt;span class="n"&gt;OPTIMIZE&lt;/span&gt; &lt;span class="n"&gt;analytics&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;fct_orders&lt;/span&gt; &lt;span class="n"&gt;ZORDER&lt;/span&gt; &lt;span class="k"&gt;BY&lt;/span&gt; &lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;order_date&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;This alone made queries run significantly faster for date-filtered dashboards.&lt;/p&gt;




&lt;h2&gt;
  
  
  Summary
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;Use &lt;code&gt;view&lt;/code&gt; when developing, but be cautious of deep chains.&lt;/li&gt;
&lt;li&gt;Switch to &lt;code&gt;table&lt;/code&gt; when performance matters or complexity grows.&lt;/li&gt;
&lt;li&gt;Always use &lt;code&gt;ref()&lt;/code&gt; to link models—hardcoding paths will break your project at scale.&lt;/li&gt;
&lt;li&gt;On Databricks, prefer &lt;strong&gt;Delta over Parquet&lt;/strong&gt; for better reliability, query speed, and flexibility.&lt;/li&gt;
&lt;/ul&gt;




&lt;p&gt;&lt;strong&gt;Tags:&lt;/strong&gt;  &lt;/p&gt;

&lt;h1&gt;
  
  
  dbt #databricks #dataengineering #delta #sql #analyticsengineering
&lt;/h1&gt;

</description>
      <category>dataengineering</category>
      <category>dbt</category>
      <category>analyticsengineering</category>
      <category>deltalake</category>
    </item>
    <item>
      <title>🧠 The Hidden Soft Skills That Make You a Better Data Engineer</title>
      <dc:creator>Vijay Ashley Rodrigues</dc:creator>
      <pubDate>Wed, 04 Jun 2025 19:37:37 +0000</pubDate>
      <link>https://dev.to/vijayrodrigues/the-hidden-soft-skills-that-make-you-a-better-data-engineer-44i1</link>
      <guid>https://dev.to/vijayrodrigues/the-hidden-soft-skills-that-make-you-a-better-data-engineer-44i1</guid>
      <description>&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%2F9he9dyv8zum7x5hyersr.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%2F9he9dyv8zum7x5hyersr.png" alt="data-engineer-soft-skills" width="800" height="533"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;But here’s the thing: the most impactful data engineers I’ve worked with (and learned from) weren’t just great with tech. They were great at soft skills — the behind-the-scenes stuff that no one talks about in job descriptions, but makes a huge difference in real work.&lt;/p&gt;

&lt;p&gt;Here are some &lt;strong&gt;soft skills&lt;/strong&gt; I’ve picked up over the years that have made my job easier, helped me work better with teams, and honestly, kept a few projects from going sideways.&lt;/p&gt;




&lt;h2&gt;
  
  
  🗣️ Communication — Ask First, Query Later
&lt;/h2&gt;

&lt;p&gt;Before you write any code, talk to people.&lt;/p&gt;

&lt;p&gt;A lot of misunderstandings in data projects come down to vague requirements. One word — like “active users” or “conversion” — can mean different things to different teams.&lt;/p&gt;

&lt;p&gt;💬 &lt;strong&gt;Real Example:&lt;/strong&gt;&lt;br&gt;
Whenever a project was discussed — especially tasks like converting code from one language to another — I made it a habit to ask as many questions as I could upfront:&lt;br&gt;
“What is the code doing?”&lt;br&gt;
“Why are we converting this?”&lt;br&gt;
“What are the business outcomes?”&lt;br&gt;
This helped me avoid rework and ensured I delivered exactly what was needed.&lt;/p&gt;




&lt;h2&gt;
  
  
  🐞 Debugging — More Detective Work Than Code
&lt;/h2&gt;

&lt;p&gt;When something breaks (and it always does), your mindset matters more than your keyboard.&lt;/p&gt;

&lt;p&gt;Instead of guessing, slow down and look for recent changes. Be systematic.&lt;/p&gt;

&lt;p&gt;💬 &lt;strong&gt;Real Example:&lt;/strong&gt;&lt;br&gt;
I once dealt with a pipeline that kept failing randomly. After a bit of digging, I realized the source table had been updated — new columns were added and a few data types had changed. These subtle schema changes broke downstream processes.&lt;br&gt;
Rather than patching it blindly, I tracked down the exact change and made the necessary schema adjustments to get things running again.&lt;/p&gt;




&lt;h2&gt;
  
  
  📝 Documentation — Future You Will Be Grateful
&lt;/h2&gt;

&lt;p&gt;I used to skip documentation thinking, “I’ll remember this.”&lt;br&gt;
Spoiler: I didn’t.&lt;/p&gt;

&lt;p&gt;Now, I write short notes for my future self and teammates — especially for projects I know I’ll revisit.&lt;/p&gt;

&lt;p&gt;💬 &lt;strong&gt;Real Example:&lt;/strong&gt;&lt;br&gt;
Documentation has saved me so many times — whether it’s writing clean comments in code or understanding a new project.&lt;br&gt;
When joining an ongoing project, even a single-page process flow or doc can help you understand how everything fits together.&lt;br&gt;
Even something as simple as a clear README or inline comment can go a long way.&lt;/p&gt;




&lt;h2&gt;
  
  
  🔄 Scope Changes — Flexibility Beats Frustration
&lt;/h2&gt;

&lt;p&gt;Plans change. Projects evolve. That’s just part of the job.&lt;/p&gt;

&lt;p&gt;Instead of getting frustrated, I’ve learned to pause, re-evaluate, and communicate the new reality.&lt;/p&gt;

&lt;p&gt;💬 &lt;strong&gt;Real Example:&lt;/strong&gt;&lt;br&gt;
I was converting some legacy scripts to SQL. Looked simple at first — until I saw how messy and layered the old logic was.&lt;br&gt;
Instead of rushing through it, I flagged the complexity, broke it down, and explained the extra effort needed to the team. We extended the timeline, prioritized correctly, and ended up with a stable, well-structured result.&lt;/p&gt;




&lt;h2&gt;
  
  
  🤝 Working With Non-Data Folks — Speak Their Language
&lt;/h2&gt;

&lt;p&gt;As a data engineer, you’re often the bridge between raw data and real decisions. That means working with non-technical folks — analysts, PMs, stakeholders — and translating their goals into data logic.&lt;/p&gt;

&lt;p&gt;💬 &lt;strong&gt;Real Example:&lt;/strong&gt;&lt;br&gt;
I’ve worked with stakeholders who were brilliant in their domain, but not technical. Instead of dumping jargon on them, I focused on asking what they were trying to achieve.&lt;br&gt;
Once I understood their goals, I could break down the technical details in plain terms and deliver what they actually needed — not what I assumed they wanted.&lt;/p&gt;




&lt;h2&gt;
  
  
  🙌 Final Thoughts
&lt;/h2&gt;

&lt;p&gt;You can be great at building pipelines, optimizing queries, or scheduling DAGs — but soft skills are what make you reliable, easy to work with, and trusted by your team.&lt;/p&gt;

&lt;p&gt;These aren’t flashy skills, but they matter more than you think.&lt;/p&gt;

&lt;p&gt;If you're starting out in data engineering, don't ignore them. And if you're already deep into it, it’s never too late to improve.&lt;/p&gt;

&lt;p&gt;💬 Got a soft skill that’s helped you in your data journey? Drop it in the comments — would love to hear your take!&lt;/p&gt;

</description>
      <category>dataengineering</category>
      <category>softwareengineering</category>
      <category>career</category>
      <category>learning</category>
    </item>
    <item>
      <title>What Is DBT? A No-Fluff Guide for Data Engineers and Analysts</title>
      <dc:creator>Vijay Ashley Rodrigues</dc:creator>
      <pubDate>Sun, 01 Jun 2025 06:30:40 +0000</pubDate>
      <link>https://dev.to/vijayrodrigues/what-is-dbt-a-no-fluff-guide-for-data-engineers-and-analysts-32k5</link>
      <guid>https://dev.to/vijayrodrigues/what-is-dbt-a-no-fluff-guide-for-data-engineers-and-analysts-32k5</guid>
      <description>&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%2F9mkwv2gx7j3k3quaeaw8.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%2F9mkwv2gx7j3k3quaeaw8.png" alt="dbt-cover-image" width="800" height="533"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;If you’ve been around modern data tools, you’ve probably heard the term &lt;strong&gt;DBT&lt;/strong&gt; pop up more than once. It's one of those tools that gets mentioned in conversations about clean data pipelines, SQL transformations, and analytics engineering — but what is it, really?&lt;/p&gt;

&lt;p&gt;In this post, I’ll break down what DBT (short for &lt;strong&gt;Data Build Tool&lt;/strong&gt;) actually is, how it works, and why it’s become such a big deal in the modern data stack — without the buzzword overload.&lt;/p&gt;




&lt;h2&gt;
  
  
  What Exactly Is DBT?
&lt;/h2&gt;

&lt;p&gt;At its core, DBT is a transformation tool — not an extraction or loading tool. It doesn’t move data in or out of your warehouse (that’s what tools like Fivetran, Airbyte, or custom ETL scripts do). Instead, DBT focuses on the “T” in &lt;strong&gt;ELT&lt;/strong&gt;: turning raw data inside your warehouse into &lt;strong&gt;clean, analytics-ready tables&lt;/strong&gt;.&lt;/p&gt;

&lt;p&gt;You write your transformations as SQL models (literally .sql files), organize them in a folder structure, and DBT runs them in a &lt;strong&gt;defined sequence&lt;/strong&gt; using its built-in dependency graph.&lt;/p&gt;

&lt;p&gt;It handles:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Execution order (via &lt;code&gt;ref()&lt;/code&gt; references)&lt;/li&gt;
&lt;li&gt;Data testing&lt;/li&gt;
&lt;li&gt;Documentation&lt;/li&gt;
&lt;li&gt;Environment configuration&lt;/li&gt;
&lt;li&gt;And even integrates with Git for version control&lt;/li&gt;
&lt;/ul&gt;




&lt;p&gt;&lt;strong&gt;Why Teams Love DBT&lt;/strong&gt;&lt;br&gt;
Traditional SQL development often turns into spaghetti — duplicate code, inconsistent logic, and barely any testing. DBT introduces &lt;strong&gt;structure&lt;/strong&gt; to that chaos.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Here's what makes it awesome:&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Modular, reusable SQL files&lt;/li&gt;
&lt;li&gt;Git integration for version control&lt;/li&gt;
&lt;li&gt;Automated data quality tests (nulls, uniqueness, relationships)&lt;/li&gt;
&lt;li&gt;Interactive documentation with lineage graphs&lt;/li&gt;
&lt;li&gt;Dynamic SQL using &lt;strong&gt;Jinja templates&lt;/strong&gt;
&lt;/li&gt;
&lt;/ul&gt;


&lt;h2&gt;
  
  
  How DBT Works (In Plain English)
&lt;/h2&gt;

&lt;p&gt;A DBT project is basically a collection of models and configurations:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Models&lt;/strong&gt; are &lt;code&gt;.sql&lt;/code&gt; files containing &lt;code&gt;SELECT&lt;/code&gt; statements&lt;/li&gt;
&lt;li&gt;You reference other models using &lt;code&gt;ref('model_name')&lt;/code&gt;
&lt;/li&gt;
&lt;li&gt;DBT builds a DAG (dependency graph) to figure out what runs when&lt;/li&gt;
&lt;li&gt;You can test models, define sources, and set materializations (view/table/etc.)&lt;/li&gt;
&lt;/ul&gt;

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

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight sql"&gt;&lt;code&gt;&lt;span class="c1"&gt;-- models/stg_customers.sql&lt;/span&gt;

&lt;span class="k"&gt;SELECT&lt;/span&gt;
  &lt;span class="n"&gt;id&lt;/span&gt; &lt;span class="k"&gt;AS&lt;/span&gt; &lt;span class="n"&gt;customer_id&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
  &lt;span class="k"&gt;LOWER&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;email&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="k"&gt;AS&lt;/span&gt; &lt;span class="n"&gt;normalized_email&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
  &lt;span class="n"&gt;created_at&lt;/span&gt;&lt;span class="p"&gt;::&lt;/span&gt;&lt;span class="nb"&gt;DATE&lt;/span&gt; &lt;span class="k"&gt;AS&lt;/span&gt; &lt;span class="n"&gt;signup_date&lt;/span&gt;
&lt;span class="k"&gt;FROM&lt;/span&gt; &lt;span class="p"&gt;{{&lt;/span&gt; &lt;span class="k"&gt;source&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="s1"&gt;'raw'&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="s1"&gt;'customers'&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="p"&gt;}}&lt;/span&gt;
&lt;span class="k"&gt;WHERE&lt;/span&gt; &lt;span class="n"&gt;email&lt;/span&gt; &lt;span class="k"&gt;IS&lt;/span&gt; &lt;span class="k"&gt;NOT&lt;/span&gt; &lt;span class="k"&gt;NULL&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;This model takes raw customer data and cleans it up. You can later reference it in other models like this:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight sql"&gt;&lt;code&gt;&lt;span class="k"&gt;SELECT&lt;/span&gt; &lt;span class="o"&gt;*&lt;/span&gt; &lt;span class="k"&gt;FROM&lt;/span&gt; &lt;span class="p"&gt;{{&lt;/span&gt; &lt;span class="k"&gt;ref&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="s1"&gt;'stg_customers'&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="p"&gt;}}&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;You can even add tests with a simple YAML config like:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight yaml"&gt;&lt;code&gt;&lt;span class="na"&gt;columns&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt;
  &lt;span class="pi"&gt;-&lt;/span&gt; &lt;span class="na"&gt;name&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt; &lt;span class="s"&gt;customer_id&lt;/span&gt;
    &lt;span class="na"&gt;tests&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt;
      &lt;span class="pi"&gt;-&lt;/span&gt; &lt;span class="s"&gt;not_null&lt;/span&gt;
      &lt;span class="pi"&gt;-&lt;/span&gt; &lt;span class="s"&gt;unique&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;






&lt;h2&gt;
  
  
  Key Concepts in DBT
&lt;/h2&gt;

&lt;div class="table-wrapper-paragraph"&gt;&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;Component&lt;/th&gt;
&lt;th&gt;What It Does&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;&lt;strong&gt;Models&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;SQL-based transformations&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;strong&gt;Sources&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;Raw input tables defined in YAML&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;strong&gt;Tests&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;Validate data quality rules&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;strong&gt;Macros&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;Reusable Jinja + SQL logic&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;strong&gt;Docs&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;Auto-generated documentation and lineage&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;&lt;/div&gt;




&lt;h2&gt;
  
  
  Who Should Use DBT?
&lt;/h2&gt;

&lt;p&gt;If you:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Know SQL&lt;/li&gt;
&lt;li&gt;Work with data in warehouses like &lt;strong&gt;Snowflake&lt;/strong&gt;, &lt;strong&gt;Databricks&lt;/strong&gt;, &lt;strong&gt;BigQuery&lt;/strong&gt;, or &lt;strong&gt;Redshift&lt;/strong&gt;
&lt;/li&gt;
&lt;li&gt;Want to write cleaner, testable transformation code&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Then DBT is made for you — whether you’re a solo analyst or part of a larger data team.&lt;/p&gt;

&lt;p&gt;You don’t need to learn a new language. DBT lets you keep working in SQL, but brings in the best parts of software engineering: version control, CI/CD, modularity, and documentation.&lt;/p&gt;




&lt;h2&gt;
  
  
  Getting Started
&lt;/h2&gt;

&lt;p&gt;You’ve got two ways to use DBT:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;
&lt;strong&gt;DBT CLI&lt;/strong&gt; — Open-source and terminal-based&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;DBT Cloud&lt;/strong&gt; — Hosted version with UI, scheduler, logging, etc.&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;Start with the &lt;strong&gt;Jaffle Shop demo project&lt;/strong&gt; (yes, that’s what it’s called) to see DBT in action.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Your getting-started flow:&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Install DBT CLI or sign up for DBT Cloud&lt;/li&gt;
&lt;li&gt;Connect it to your warehouse&lt;/li&gt;
&lt;li&gt;Initialize a project&lt;/li&gt;
&lt;li&gt;Create some models, tests, and sources&lt;/li&gt;
&lt;li&gt;Run &lt;code&gt;dbt run&lt;/code&gt;, then &lt;code&gt;dbt docs generate&lt;/code&gt; to see lineage graphs&lt;/li&gt;
&lt;/ul&gt;




&lt;h2&gt;
  
  
  🙌 Final Thoughts
&lt;/h2&gt;

&lt;p&gt;DBT is changing how data teams think about transformations. It brings the discipline of software engineering to SQL workflows — making your data pipelines more &lt;strong&gt;reliable&lt;/strong&gt;, &lt;strong&gt;documented&lt;/strong&gt;, and &lt;strong&gt;collaborative&lt;/strong&gt;.&lt;/p&gt;

&lt;p&gt;You don’t need to be an expert to get started. If you know SQL and want a smarter way to build and manage data models, &lt;strong&gt;DBT is absolutely worth exploring.&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;💬 Tried DBT already? Thinking of learning it? Drop your experience or questions in the comments — I’d love to connect!&lt;/p&gt;

</description>
      <category>sql</category>
      <category>dbt</category>
      <category>dataengineering</category>
      <category>discuss</category>
    </item>
    <item>
      <title>No Docker, No Problem: Run Apache Kafka on Windows</title>
      <dc:creator>Vijay Ashley Rodrigues</dc:creator>
      <pubDate>Sun, 25 May 2025 06:46:05 +0000</pubDate>
      <link>https://dev.to/vijayrodrigues/no-docker-no-problem-run-apache-kafka-on-windows-4kc9</link>
      <guid>https://dev.to/vijayrodrigues/no-docker-no-problem-run-apache-kafka-on-windows-4kc9</guid>
      <description>&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%2Ft5ku565cguq0f7s3vzfi.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%2Ft5ku565cguq0f7s3vzfi.png" alt="apache-kafka-without-docker" width="800" height="653"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Getting Kafka up and running without Docker on a Windows machine might seem like navigating a maze—most tutorials assume you're working on Linux or using containers. But what if you're working &lt;strong&gt;directly on Windows&lt;/strong&gt;, or inside &lt;strong&gt;WSL&lt;/strong&gt;, and want full visibility into every config and step?&lt;/p&gt;

&lt;p&gt;I ran into the same challenge—and after hours of tweaking, testing, and debugging, I finally got it all working. This article documents the entire process, step-by-step, so &lt;strong&gt;you can skip the trial and error&lt;/strong&gt; and get straight to building.&lt;/p&gt;

&lt;p&gt;Let’s dive into the full local setup: from environment setup to producing and consuming messages with Python.&lt;/p&gt;




&lt;h2&gt;
  
  
  Step 1: Activate Your Python Virtual Environment
&lt;/h2&gt;

&lt;p&gt;Make sure your virtual environment is activated:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;F:\python_virtual_environments\orchestration_env\Scripts\activate
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;You should see your prompt change to:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;(orchestration_env) F:\python_virtual_environments&amp;gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;






&lt;h2&gt;
  
  
  Step 2: Install the Kafka Python Library
&lt;/h2&gt;

&lt;p&gt;With your virtual environment active, install:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight python"&gt;&lt;code&gt;&lt;span class="n"&gt;pip&lt;/span&gt; &lt;span class="n"&gt;install&lt;/span&gt; &lt;span class="n"&gt;kafka&lt;/span&gt;&lt;span class="o"&gt;-&lt;/span&gt;&lt;span class="n"&gt;python&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Verify:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight python"&gt;&lt;code&gt;&lt;span class="n"&gt;python&lt;/span&gt; &lt;span class="o"&gt;-&lt;/span&gt;&lt;span class="n"&gt;c&lt;/span&gt; &lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;import kafka; print(kafka.__version__)&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;






&lt;h2&gt;
  
  
  Step 3: Configure Kafka and Java Environment Variables
&lt;/h2&gt;

&lt;p&gt;&lt;strong&gt;Kafka Variables:&lt;/strong&gt;&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;Open System Properties → Environment Variables.&lt;/li&gt;
&lt;li&gt;Add:&lt;/li&gt;
&lt;/ol&gt;

&lt;ul&gt;
&lt;li&gt;&lt;code&gt;KAFKA_HOME = F:\kafka_2_13__3_4_0&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;Add to &lt;code&gt;Path&lt;/code&gt;: &lt;code&gt;F:\kafka_2_13__3_4_0\bin\windows&lt;/code&gt;
&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;strong&gt;Java Variables:&lt;/strong&gt;&lt;br&gt;
If not already set:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;code&gt;JAVA_HOME = C:\Program Files\Java\jdk-&amp;lt;version&amp;gt;&lt;/code&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Restart your terminal to apply.&lt;/p&gt;


&lt;h2&gt;
  
  
  Step 4: Update Kafka Config Files
&lt;/h2&gt;

&lt;p&gt;Navigate to:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight python"&gt;&lt;code&gt;&lt;span class="n"&gt;F&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;\&lt;span class="n"&gt;kafka_2_13__3_4_0&lt;/span&gt;\&lt;span class="n"&gt;config&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;strong&gt;Edit&lt;/strong&gt; &lt;code&gt;zookeeper.properties:&lt;/code&gt;&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight python"&gt;&lt;code&gt;&lt;span class="n"&gt;clientPort&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="mi"&gt;2182&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;strong&gt;Edit&lt;/strong&gt; &lt;code&gt;server.properties:&lt;/code&gt;&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight python"&gt;&lt;code&gt;&lt;span class="n"&gt;broker&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nb"&gt;id&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="mi"&gt;0&lt;/span&gt;
&lt;span class="n"&gt;zookeeper&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;connect&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="n"&gt;localhost&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="mi"&gt;2182&lt;/span&gt;
&lt;span class="n"&gt;log&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;dirs&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="n"&gt;F&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="o"&gt;/&lt;/span&gt;&lt;span class="n"&gt;kafka_2_13__3_4_0&lt;/span&gt;&lt;span class="o"&gt;/&lt;/span&gt;&lt;span class="n"&gt;logs&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;






&lt;h2&gt;
  
  
  Step 5: Delete meta.properties (Fix for InconsistentClusterId)
&lt;/h2&gt;

&lt;p&gt;Stop Kafka:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight python"&gt;&lt;code&gt;&lt;span class="n"&gt;F&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;\&lt;span class="n"&gt;kafka_2_13__3_4_0&lt;/span&gt;\&lt;span class="nb"&gt;bin&lt;/span&gt;\&lt;span class="n"&gt;windows&lt;/span&gt;\&lt;span class="n"&gt;kafka&lt;/span&gt;&lt;span class="o"&gt;-&lt;/span&gt;&lt;span class="n"&gt;server&lt;/span&gt;&lt;span class="o"&gt;-&lt;/span&gt;&lt;span class="n"&gt;stop&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;bat&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Stop Zookeeper:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight python"&gt;&lt;code&gt;&lt;span class="n"&gt;F&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;\&lt;span class="n"&gt;kafka_2_13__3_4_0&lt;/span&gt;\&lt;span class="nb"&gt;bin&lt;/span&gt;\&lt;span class="n"&gt;windows&lt;/span&gt;\&lt;span class="n"&gt;zookeeper&lt;/span&gt;&lt;span class="o"&gt;-&lt;/span&gt;&lt;span class="n"&gt;server&lt;/span&gt;&lt;span class="o"&gt;-&lt;/span&gt;&lt;span class="n"&gt;stop&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;bat&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Delete meta.properties:&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Navigate to:&lt;/strong&gt; &lt;code&gt;F:\kafka_2_13__3_4_0\logs&lt;/code&gt;&lt;br&gt;
&lt;strong&gt;Delete the file:&lt;/strong&gt; &lt;code&gt;meta.properties&lt;/code&gt;&lt;/p&gt;


&lt;h2&gt;
  
  
  Step 6: Start Zookeeper
&lt;/h2&gt;


&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight python"&gt;&lt;code&gt;&lt;span class="n"&gt;F&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;\&lt;span class="n"&gt;kafka_2_13__3_4_0&lt;/span&gt;\&lt;span class="nb"&gt;bin&lt;/span&gt;\&lt;span class="n"&gt;windows&lt;/span&gt;\&lt;span class="n"&gt;zookeeper&lt;/span&gt;&lt;span class="o"&gt;-&lt;/span&gt;&lt;span class="n"&gt;server&lt;/span&gt;&lt;span class="o"&gt;-&lt;/span&gt;&lt;span class="n"&gt;start&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;bat&lt;/span&gt; &lt;span class="n"&gt;F&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;\&lt;span class="n"&gt;kafka_2_13__3_4_0&lt;/span&gt;\&lt;span class="n"&gt;config&lt;/span&gt;\&lt;span class="n"&gt;zookeeper&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;properties&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;


&lt;p&gt;Wait for Zookeeper to fully initialize.&lt;/p&gt;


&lt;h2&gt;
  
  
  Step 7: Start Kafka Broker
&lt;/h2&gt;


&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight python"&gt;&lt;code&gt;&lt;span class="n"&gt;F&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;\&lt;span class="n"&gt;kafka_2_13__3_4_0&lt;/span&gt;\&lt;span class="nb"&gt;bin&lt;/span&gt;\&lt;span class="n"&gt;windows&lt;/span&gt;\&lt;span class="n"&gt;kafka&lt;/span&gt;&lt;span class="o"&gt;-&lt;/span&gt;&lt;span class="n"&gt;server&lt;/span&gt;&lt;span class="o"&gt;-&lt;/span&gt;&lt;span class="n"&gt;start&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;bat&lt;/span&gt; &lt;span class="n"&gt;F&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;\&lt;span class="n"&gt;kafka_2_13__3_4_0&lt;/span&gt;\&lt;span class="n"&gt;config&lt;/span&gt;\&lt;span class="n"&gt;server&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;properties&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h2&gt;
  
  
  Step 8: Create a Kafka Topic
&lt;/h2&gt;


&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight python"&gt;&lt;code&gt;&lt;span class="n"&gt;F&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;\&lt;span class="n"&gt;kafka_2_13__3_4_0&lt;/span&gt;\&lt;span class="nb"&gt;bin&lt;/span&gt;\&lt;span class="n"&gt;windows&lt;/span&gt;\&lt;span class="n"&gt;kafka&lt;/span&gt;&lt;span class="o"&gt;-&lt;/span&gt;&lt;span class="n"&gt;topics&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;bat&lt;/span&gt; &lt;span class="o"&gt;-&lt;/span&gt;&lt;span class="n"&gt;create&lt;/span&gt; &lt;span class="o"&gt;-&lt;/span&gt;&lt;span class="n"&gt;topic&lt;/span&gt; &lt;span class="n"&gt;test&lt;/span&gt;&lt;span class="o"&gt;-&lt;/span&gt;&lt;span class="n"&gt;topic&lt;/span&gt; &lt;span class="o"&gt;-&lt;/span&gt;&lt;span class="n"&gt;bootstrap&lt;/span&gt;&lt;span class="o"&gt;-&lt;/span&gt;&lt;span class="n"&gt;server&lt;/span&gt; &lt;span class="n"&gt;localhost&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="mi"&gt;9092&lt;/span&gt; &lt;span class="o"&gt;-&lt;/span&gt;&lt;span class="n"&gt;partitions&lt;/span&gt; &lt;span class="mi"&gt;1&lt;/span&gt; &lt;span class="o"&gt;-&lt;/span&gt;&lt;span class="n"&gt;replication&lt;/span&gt;&lt;span class="o"&gt;-&lt;/span&gt;&lt;span class="n"&gt;factor&lt;/span&gt; &lt;span class="mi"&gt;1&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;


&lt;p&gt;Verify:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight python"&gt;&lt;code&gt;&lt;span class="n"&gt;F&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;\&lt;span class="n"&gt;kafka_2_13__3_4_0&lt;/span&gt;\&lt;span class="nb"&gt;bin&lt;/span&gt;\&lt;span class="n"&gt;windows&lt;/span&gt;\&lt;span class="n"&gt;kafka&lt;/span&gt;&lt;span class="o"&gt;-&lt;/span&gt;&lt;span class="n"&gt;topics&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;bat&lt;/span&gt; &lt;span class="o"&gt;-&lt;/span&gt;&lt;span class="nb"&gt;list&lt;/span&gt; &lt;span class="o"&gt;-&lt;/span&gt;&lt;span class="n"&gt;bootstrap&lt;/span&gt;&lt;span class="o"&gt;-&lt;/span&gt;&lt;span class="n"&gt;server&lt;/span&gt; &lt;span class="n"&gt;localhost&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="mi"&gt;9092&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;






&lt;h2&gt;
  
  
  Step 9: Use CMD for Producer and Consumer
&lt;/h2&gt;

&lt;p&gt;&lt;strong&gt;Start Producer:&lt;/strong&gt;&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight python"&gt;&lt;code&gt;&lt;span class="n"&gt;F&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;\&lt;span class="n"&gt;kafka_2_13__3_4_0&lt;/span&gt;\&lt;span class="nb"&gt;bin&lt;/span&gt;\&lt;span class="n"&gt;windows&lt;/span&gt;\&lt;span class="n"&gt;kafka&lt;/span&gt;&lt;span class="o"&gt;-&lt;/span&gt;&lt;span class="n"&gt;console&lt;/span&gt;&lt;span class="o"&gt;-&lt;/span&gt;&lt;span class="n"&gt;producer&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;bat&lt;/span&gt; &lt;span class="o"&gt;-&lt;/span&gt;&lt;span class="n"&gt;topic&lt;/span&gt; &lt;span class="n"&gt;test&lt;/span&gt;&lt;span class="o"&gt;-&lt;/span&gt;&lt;span class="n"&gt;topic&lt;/span&gt; &lt;span class="o"&gt;-&lt;/span&gt;&lt;span class="n"&gt;bootstrap&lt;/span&gt;&lt;span class="o"&gt;-&lt;/span&gt;&lt;span class="n"&gt;server&lt;/span&gt; &lt;span class="n"&gt;localhost&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="mi"&gt;9092&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Type your messages in this window.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Start Consumer:&lt;/strong&gt;&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight python"&gt;&lt;code&gt;&lt;span class="n"&gt;F&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;\&lt;span class="n"&gt;kafka_2_13__3_4_0&lt;/span&gt;\&lt;span class="nb"&gt;bin&lt;/span&gt;\&lt;span class="n"&gt;windows&lt;/span&gt;\&lt;span class="n"&gt;kafka&lt;/span&gt;&lt;span class="o"&gt;-&lt;/span&gt;&lt;span class="n"&gt;console&lt;/span&gt;&lt;span class="o"&gt;-&lt;/span&gt;&lt;span class="n"&gt;consumer&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;bat&lt;/span&gt; &lt;span class="o"&gt;-&lt;/span&gt;&lt;span class="n"&gt;topic&lt;/span&gt; &lt;span class="n"&gt;test&lt;/span&gt;&lt;span class="o"&gt;-&lt;/span&gt;&lt;span class="n"&gt;topic&lt;/span&gt; &lt;span class="o"&gt;-&lt;/span&gt;&lt;span class="n"&gt;bootstrap&lt;/span&gt;&lt;span class="o"&gt;-&lt;/span&gt;&lt;span class="n"&gt;server&lt;/span&gt; &lt;span class="n"&gt;localhost&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="mi"&gt;9092&lt;/span&gt; &lt;span class="o"&gt;-&lt;/span&gt;&lt;span class="k"&gt;from&lt;/span&gt;&lt;span class="o"&gt;-&lt;/span&gt;&lt;span class="n"&gt;beginning&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;This window will show the messages received.&lt;/p&gt;




&lt;h2&gt;
  
  
  Step 10: Send &amp;amp; Receive Messages Using Python
&lt;/h2&gt;

&lt;p&gt;&lt;strong&gt;Create Scripts:&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;kafka_producer.py&lt;/strong&gt;&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight python"&gt;&lt;code&gt;&lt;span class="kn"&gt;from&lt;/span&gt; &lt;span class="n"&gt;kafka&lt;/span&gt; &lt;span class="kn"&gt;import&lt;/span&gt; &lt;span class="n"&gt;KafkaProducer&lt;/span&gt;

&lt;span class="n"&gt;producer&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nc"&gt;KafkaProducer&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;bootstrap_servers&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="sh"&gt;'&lt;/span&gt;&lt;span class="s"&gt;localhost:9092&lt;/span&gt;&lt;span class="sh"&gt;'&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
&lt;span class="n"&gt;producer&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;send&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="sh"&gt;'&lt;/span&gt;&lt;span class="s"&gt;test-topic&lt;/span&gt;&lt;span class="sh"&gt;'&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="sa"&gt;b&lt;/span&gt;&lt;span class="sh"&gt;'&lt;/span&gt;&lt;span class="s"&gt;Hello from Python!&lt;/span&gt;&lt;span class="sh"&gt;'&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
&lt;span class="n"&gt;producer&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;flush&lt;/span&gt;&lt;span class="p"&gt;()&lt;/span&gt;

&lt;span class="nf"&gt;print&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;Message sent.&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;strong&gt;kafka_consumer.py&lt;/strong&gt;&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight python"&gt;&lt;code&gt;&lt;span class="kn"&gt;from&lt;/span&gt; &lt;span class="n"&gt;kafka&lt;/span&gt; &lt;span class="kn"&gt;import&lt;/span&gt; &lt;span class="n"&gt;KafkaConsumer&lt;/span&gt;

&lt;span class="n"&gt;consumer&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nc"&gt;KafkaConsumer&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;
    &lt;span class="sh"&gt;'&lt;/span&gt;&lt;span class="s"&gt;test-topic&lt;/span&gt;&lt;span class="sh"&gt;'&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
    &lt;span class="n"&gt;bootstrap_servers&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="sh"&gt;'&lt;/span&gt;&lt;span class="s"&gt;localhost:9092&lt;/span&gt;&lt;span class="sh"&gt;'&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
    &lt;span class="n"&gt;auto_offset_reset&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="sh"&gt;'&lt;/span&gt;&lt;span class="s"&gt;earliest&lt;/span&gt;&lt;span class="sh"&gt;'&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
    &lt;span class="n"&gt;group_id&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="sh"&gt;'&lt;/span&gt;&lt;span class="s"&gt;test-group&lt;/span&gt;&lt;span class="sh"&gt;'&lt;/span&gt;
&lt;span class="p"&gt;)&lt;/span&gt;

&lt;span class="k"&gt;for&lt;/span&gt; &lt;span class="n"&gt;message&lt;/span&gt; &lt;span class="ow"&gt;in&lt;/span&gt; &lt;span class="n"&gt;consumer&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;
    &lt;span class="nf"&gt;print&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="sa"&gt;f&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;Received: &lt;/span&gt;&lt;span class="si"&gt;{&lt;/span&gt;&lt;span class="n"&gt;message&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;value&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;decode&lt;/span&gt;&lt;span class="p"&gt;()&lt;/span&gt;&lt;span class="si"&gt;}&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h2&gt;
  
  
  Run the Scripts:
&lt;/h2&gt;

&lt;p&gt;Before running any Kafka-related Python scripts, first activate your &lt;br&gt;
virtual environment:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight python"&gt;&lt;code&gt;&lt;span class="n"&gt;F&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;\&lt;span class="n"&gt;python_virtual_environments&lt;/span&gt;\&lt;span class="n"&gt;orchestration_env&lt;/span&gt;\&lt;span class="n"&gt;Scripts&lt;/span&gt;\&lt;span class="n"&gt;activate&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Once activated, your prompt will look like:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight python"&gt;&lt;code&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;orchestration_env&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="n"&gt;F&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;\&lt;span class="n"&gt;python_virtual_environments&lt;/span&gt;&lt;span class="o"&gt;&amp;gt;&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Now, navigate to the Kafka scripts directory:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight python"&gt;&lt;code&gt;&lt;span class="n"&gt;cd&lt;/span&gt; &lt;span class="n"&gt;F&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;\&lt;span class="n"&gt;kafka&lt;/span&gt;&lt;span class="o"&gt;-&lt;/span&gt;&lt;span class="n"&gt;scripts&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Run the &lt;strong&gt;Producer&lt;/strong&gt; script:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight python"&gt;&lt;code&gt;&lt;span class="n"&gt;python&lt;/span&gt; &lt;span class="n"&gt;kafka_producer&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;py&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Then, open &lt;strong&gt;another CMD window&lt;/strong&gt;, activate the virtual environment again, and run the &lt;strong&gt;Consumer&lt;/strong&gt; script:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight python"&gt;&lt;code&gt;&lt;span class="n"&gt;F&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;\&lt;span class="n"&gt;python_virtual_environments&lt;/span&gt;\&lt;span class="n"&gt;orchestration_env&lt;/span&gt;\&lt;span class="n"&gt;Scripts&lt;/span&gt;\&lt;span class="n"&gt;activate&lt;/span&gt;
&lt;span class="n"&gt;cd&lt;/span&gt; &lt;span class="n"&gt;F&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;\&lt;span class="n"&gt;kafka&lt;/span&gt;&lt;span class="o"&gt;-&lt;/span&gt;&lt;span class="n"&gt;scripts&lt;/span&gt;
&lt;span class="n"&gt;python&lt;/span&gt; &lt;span class="n"&gt;kafka_consumer&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;py&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;






&lt;h2&gt;
  
  
  Step 11: Stop Kafka and Zookeeper Safely
&lt;/h2&gt;

&lt;p&gt;Once you're finished, stop both services gracefully:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight python"&gt;&lt;code&gt;&lt;span class="n"&gt;F&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;\&lt;span class="n"&gt;kafka_2_13__3_4_0&lt;/span&gt;\&lt;span class="nb"&gt;bin&lt;/span&gt;\&lt;span class="n"&gt;windows&lt;/span&gt;\&lt;span class="n"&gt;kafka&lt;/span&gt;&lt;span class="o"&gt;-&lt;/span&gt;&lt;span class="n"&gt;server&lt;/span&gt;&lt;span class="o"&gt;-&lt;/span&gt;&lt;span class="n"&gt;stop&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;bat&lt;/span&gt;
&lt;span class="n"&gt;F&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;\&lt;span class="n"&gt;kafka_2_13__3_4_0&lt;/span&gt;\&lt;span class="nb"&gt;bin&lt;/span&gt;\&lt;span class="n"&gt;windows&lt;/span&gt;\&lt;span class="n"&gt;zookeeper&lt;/span&gt;&lt;span class="o"&gt;-&lt;/span&gt;&lt;span class="n"&gt;server&lt;/span&gt;&lt;span class="o"&gt;-&lt;/span&gt;&lt;span class="n"&gt;stop&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;bat&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;






&lt;h2&gt;
  
  
  🙌 Final Thoughts
&lt;/h2&gt;

&lt;p&gt;Setting up Apache Kafka on Windows without Docker can feel tricky at first, but once you walk through the steps, it’s actually a clean and flexible solution — perfect for local development or experimentation.&lt;/p&gt;

&lt;p&gt;If this guide helped you or saved you time, consider leaving a ❤️, bookmarking it for later, or sharing your experience in the comments.&lt;br&gt;
I’d love to hear how it went for you — or answer any questions you might have!&lt;/p&gt;

</description>
      <category>kafka</category>
      <category>docker</category>
      <category>developers</category>
      <category>microsoft</category>
    </item>
  </channel>
</rss>
