<?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: Jin</title>
    <description>The latest articles on DEV Community by Jin (@luca1iu).</description>
    <link>https://dev.to/luca1iu</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%2F1230121%2F2521cc84-ad7d-458c-99e5-b4d82f625a88.jpg</url>
      <title>DEV Community: Jin</title>
      <link>https://dev.to/luca1iu</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/luca1iu"/>
    <language>en</language>
    <item>
      <title>DP-750: Azure Databricks Cluster Explained and with Real Exam Questions</title>
      <dc:creator>Jin</dc:creator>
      <pubDate>Fri, 24 Jul 2026 05:00:03 +0000</pubDate>
      <link>https://dev.to/luca1iu/dp-750-azure-databricks-cluster-explained-and-with-real-exam-questions-4l80</link>
      <guid>https://dev.to/luca1iu/dp-750-azure-databricks-cluster-explained-and-with-real-exam-questions-4l80</guid>
      <description>&lt;p&gt;When preparing for &lt;strong&gt;DP-750: Microsoft Certified: Azure Databricks Data Engineer Associate&lt;/strong&gt;, one of the first topics you should understand is &lt;strong&gt;Azure Databricks compute&lt;/strong&gt;, often informally called a &lt;strong&gt;cluster&lt;/strong&gt;.&lt;/p&gt;

&lt;p&gt;Many exam questions are not really testing whether you remember a button name. They are testing whether you can choose the right compute type for a workload:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;interactive development&lt;/li&gt;
&lt;li&gt;production ingestion&lt;/li&gt;
&lt;li&gt;Lakeflow Spark Declarative Pipelines&lt;/li&gt;
&lt;li&gt;batch ETL jobs&lt;/li&gt;
&lt;li&gt;cost optimization&lt;/li&gt;
&lt;li&gt;machine learning workloads&lt;/li&gt;
&lt;li&gt;troubleshooting out-of-memory failures&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;In the uploaded DP-750 question bank, several questions focus directly on clusters, autoscaling, job compute, serverless compute, Photon, auto termination, and Spark UI troubleshooting.&lt;/p&gt;




&lt;h2&gt;
  
  
  1. What is a cluster in Azure Databricks?
&lt;/h2&gt;

&lt;p&gt;In Azure Databricks, a &lt;strong&gt;cluster&lt;/strong&gt; is a compute resource used to run notebooks, jobs, Spark workloads, machine learning code, and data engineering pipelines.&lt;/p&gt;

&lt;p&gt;More generally, Azure Databricks documentation now often uses the word &lt;strong&gt;compute&lt;/strong&gt; instead of only “cluster”. Microsoft’s documentation describes configuration settings for both &lt;strong&gt;all-purpose compute&lt;/strong&gt; and &lt;strong&gt;job compute&lt;/strong&gt;, and explains that many users create compute through policies that control which settings are available.&lt;/p&gt;

&lt;p&gt;A Databricks compute resource usually includes:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;a &lt;strong&gt;driver node&lt;/strong&gt;, which coordinates the Spark application&lt;/li&gt;
&lt;li&gt;one or more &lt;strong&gt;worker nodes&lt;/strong&gt;, which execute distributed tasks&lt;/li&gt;
&lt;li&gt;a &lt;strong&gt;Databricks Runtime&lt;/strong&gt;, which provides Spark, libraries, connectors, and Databricks optimizations&lt;/li&gt;
&lt;li&gt;optional features such as &lt;strong&gt;autoscaling&lt;/strong&gt;, &lt;strong&gt;auto termination&lt;/strong&gt;, &lt;strong&gt;Photon&lt;/strong&gt;, and &lt;strong&gt;compute policies&lt;/strong&gt;
&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;For DP-750, the most important point is not the internal architecture. The most important point is choosing the right compute for the right workload.&lt;/p&gt;




&lt;h2&gt;
  
  
  2. Main compute types you must know for DP-750
&lt;/h2&gt;

&lt;h3&gt;
  
  
  All-purpose cluster
&lt;/h3&gt;

&lt;p&gt;An &lt;strong&gt;all-purpose cluster&lt;/strong&gt; is designed for interactive work.&lt;/p&gt;

&lt;p&gt;Typical use cases:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;notebook development&lt;/li&gt;
&lt;li&gt;data exploration&lt;/li&gt;
&lt;li&gt;debugging&lt;/li&gt;
&lt;li&gt;ad hoc analysis&lt;/li&gt;
&lt;li&gt;collaborative development&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;In exam questions, if you see words such as &lt;strong&gt;interactive development&lt;/strong&gt;, &lt;strong&gt;users working in notebooks&lt;/strong&gt;, or &lt;strong&gt;development cluster&lt;/strong&gt;, the answer often points to an all-purpose cluster.&lt;/p&gt;

&lt;p&gt;However, all-purpose clusters are usually not the best choice for production pipelines because they can be shared by many users, stay idle, and allow development activity to affect production workloads.&lt;/p&gt;




&lt;h3&gt;
  
  
  Job cluster
&lt;/h3&gt;

&lt;p&gt;A &lt;strong&gt;job cluster&lt;/strong&gt; is created for running a job and is usually terminated after the job finishes.&lt;/p&gt;

&lt;p&gt;Typical use cases:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;production ETL&lt;/li&gt;
&lt;li&gt;scheduled ingestion&lt;/li&gt;
&lt;li&gt;automated workflows&lt;/li&gt;
&lt;li&gt;isolated pipeline execution&lt;/li&gt;
&lt;li&gt;repeatable job runs&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;In DP-750 questions, when the requirement says:&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;production workloads must run as scheduled, non-interactive pipelines&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;or:&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;prevent development activity from affecting production pipelines&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;you should think about &lt;strong&gt;job compute&lt;/strong&gt;, &lt;strong&gt;serverless compute&lt;/strong&gt;, or &lt;strong&gt;Lakeflow pipeline compute&lt;/strong&gt;, not a shared all-purpose development cluster.&lt;/p&gt;




&lt;h3&gt;
  
  
  Serverless compute
&lt;/h3&gt;

&lt;p&gt;&lt;strong&gt;Serverless compute&lt;/strong&gt; means Databricks manages the infrastructure for you. You do not manually provision the underlying compute resources. Microsoft describes serverless compute as an Azure Databricks-managed service for notebooks, workflows, and Lakeflow Spark Declarative Pipelines; Databricks automatically allocates and manages the required compute resources, which reduces idle time and management effort.&lt;/p&gt;

&lt;p&gt;For &lt;strong&gt;Lakeflow Jobs&lt;/strong&gt;, serverless compute lets you run jobs without configuring and deploying infrastructure. Databricks manages, optimizes, and scales the compute resources, and autoscaling and Photon are automatically enabled for the compute resources that run the job.&lt;/p&gt;

&lt;p&gt;For &lt;strong&gt;Lakeflow Spark Declarative Pipelines&lt;/strong&gt;, Databricks recommends serverless compute for new pipelines. Serverless pipelines use enhanced autoscaling and can scale both horizontally and vertically based on workload demand.&lt;/p&gt;

&lt;p&gt;This is very important for DP-750:&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;If the question asks for the lowest operational effort for a new Lakeflow Spark Declarative Pipeline and &lt;strong&gt;serverless compute is available as an option&lt;/strong&gt;, serverless compute is usually the best answer.&lt;/p&gt;
&lt;/blockquote&gt;




&lt;h2&gt;
  
  
  3. Autoscaling vs auto termination
&lt;/h2&gt;

&lt;p&gt;These two features are often tested together, but they solve different problems.&lt;/p&gt;

&lt;h3&gt;
  
  
  Autoscaling
&lt;/h3&gt;

&lt;p&gt;&lt;strong&gt;Autoscaling&lt;/strong&gt; automatically adds or removes worker nodes based on workload demand.&lt;/p&gt;

&lt;p&gt;Use autoscaling when:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;workload size changes&lt;/li&gt;
&lt;li&gt;ingestion volume spikes&lt;/li&gt;
&lt;li&gt;users run variable workloads&lt;/li&gt;
&lt;li&gt;you need to scale up and scale down automatically&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;In DP-750 language:&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;“Automatically add and remove worker nodes” = &lt;strong&gt;Autoscaling&lt;/strong&gt;&lt;/p&gt;
&lt;/blockquote&gt;




&lt;h3&gt;
  
  
  Auto termination
&lt;/h3&gt;

&lt;p&gt;&lt;strong&gt;Auto termination&lt;/strong&gt; shuts down compute after it has been idle for a configured period.&lt;/p&gt;

&lt;p&gt;Use auto termination when:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;users forget to stop clusters&lt;/li&gt;
&lt;li&gt;all-purpose clusters remain idle&lt;/li&gt;
&lt;li&gt;you want to reduce unnecessary compute cost&lt;/li&gt;
&lt;li&gt;active workloads must not be affected&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;In DP-750 language:&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;“Automatically shut down when idle” = &lt;strong&gt;Auto termination&lt;/strong&gt;&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;Microsoft’s compute best-practice documentation also recommends enabling auto termination to ensure compute is terminated after inactivity, and considering autoscaling based on the analyst’s workload.&lt;/p&gt;




&lt;h2&gt;
  
  
  4. Photon acceleration
&lt;/h2&gt;

&lt;p&gt;&lt;strong&gt;Photon&lt;/strong&gt; is Databricks’ native vectorized query engine. It accelerates SQL workloads, DataFrame API calls, ETL pipelines, and stateless streaming workloads. It is compatible with Apache Spark APIs, so existing Spark code can often run without code changes.&lt;/p&gt;

&lt;p&gt;In DP-750, Photon is usually associated with:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;performance improvement&lt;/li&gt;
&lt;li&gt;ETL acceleration&lt;/li&gt;
&lt;li&gt;SQL workloads&lt;/li&gt;
&lt;li&gt;DataFrame workloads&lt;/li&gt;
&lt;li&gt;cost reduction per workload when faster execution reduces total compute usage&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;However, Photon is not a magic answer for every cost problem.&lt;/p&gt;

&lt;p&gt;If a cluster is overprovisioned and CPU utilization is very low, enabling Photon is not necessarily the best answer. In that case, the better solution may be to reduce the number of workers or right-size the cluster.&lt;/p&gt;




&lt;h2&gt;
  
  
  5. Cost optimization logic for cluster questions
&lt;/h2&gt;

&lt;p&gt;DP-750 cluster questions often test cost optimization. Here are the most useful decision rules.&lt;/p&gt;

&lt;h3&gt;
  
  
  Case 1: The workload is variable or bursty
&lt;/h3&gt;

&lt;p&gt;Use &lt;strong&gt;autoscaling&lt;/strong&gt; or &lt;strong&gt;serverless compute&lt;/strong&gt;.&lt;/p&gt;

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

&lt;ul&gt;
&lt;li&gt;telemetry spikes&lt;/li&gt;
&lt;li&gt;unpredictable volume&lt;/li&gt;
&lt;li&gt;workload demand changes&lt;/li&gt;
&lt;li&gt;new records arrive frequently&lt;/li&gt;
&lt;li&gt;pipeline must scale automatically&lt;/li&gt;
&lt;/ul&gt;




&lt;h3&gt;
  
  
  Case 2: The cluster is idle for long periods
&lt;/h3&gt;

&lt;p&gt;Use &lt;strong&gt;auto termination&lt;/strong&gt;.&lt;/p&gt;

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

&lt;ul&gt;
&lt;li&gt;users finish work but clusters keep running&lt;/li&gt;
&lt;li&gt;all-purpose clusters remain idle&lt;/li&gt;
&lt;li&gt;reduce cost without affecting active workloads&lt;/li&gt;
&lt;/ul&gt;




&lt;h3&gt;
  
  
  Case 3: The workload is predictable and overprovisioned
&lt;/h3&gt;

&lt;p&gt;Reduce the number of workers.&lt;/p&gt;

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

&lt;ul&gt;
&lt;li&gt;CPU utilization remains below 20%&lt;/li&gt;
&lt;li&gt;workload does not spike&lt;/li&gt;
&lt;li&gt;current node type already meets requirements&lt;/li&gt;
&lt;li&gt;need to reduce cost without increasing duration&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;In this situation, disabling autoscaling and reducing workers can be better than simply enabling Photon or changing the auto-termination timeout.&lt;/p&gt;




&lt;h3&gt;
  
  
  Case 4: Production and development are sharing compute
&lt;/h3&gt;

&lt;p&gt;Separate them.&lt;/p&gt;

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

&lt;ul&gt;
&lt;li&gt;production and development workloads run on the same all-purpose clusters&lt;/li&gt;
&lt;li&gt;development activity affects production pipelines&lt;/li&gt;
&lt;li&gt;production ingestion should be scheduled and non-interactive&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;The answer will usually involve &lt;strong&gt;job compute&lt;/strong&gt;, &lt;strong&gt;serverless compute&lt;/strong&gt;, or a production-specific pipeline configuration.&lt;/p&gt;




&lt;h2&gt;
  
  
  6. Cluster libraries and Unity Catalog
&lt;/h2&gt;

&lt;p&gt;Sometimes the exam asks how to install libraries on a cluster while using Unity Catalog for access control.&lt;/p&gt;

&lt;p&gt;A cluster-scoped library can be used by notebooks and jobs running on that cluster, and Microsoft’s documentation explains that libraries can be installed on a specific cluster through the Azure Databricks workspace UI, REST API, CLI, Terraform, or policies.&lt;/p&gt;

&lt;p&gt;For DP-750, the key point is:&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;If the solution must use Unity Catalog for access control, avoid unmanaged or ad hoc installation patterns. Prefer workspace-managed or governed library installation approaches.&lt;/p&gt;
&lt;/blockquote&gt;




&lt;h2&gt;
  
  
  7. Machine learning cluster traps
&lt;/h2&gt;

&lt;p&gt;A common exam trap is confusing &lt;strong&gt;Databricks Runtime for Machine Learning&lt;/strong&gt; with GPU capability.&lt;/p&gt;

&lt;p&gt;Databricks Runtime ML includes common machine learning and deep learning libraries, but GPU acceleration still requires GPU-enabled compute. Microsoft’s GPU documentation says that to create GPU compute, the worker type must be a GPU instance type.&lt;/p&gt;

&lt;p&gt;So if a cluster is:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;single-node&lt;/li&gt;
&lt;li&gt;general-purpose VM&lt;/li&gt;
&lt;li&gt;Databricks Runtime ML&lt;/li&gt;
&lt;li&gt;Python supported&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;then it can run Python ML code using preinstalled libraries, but it cannot automatically train GPU-based deep learning models unless the node type is GPU-enabled. A single-node cluster also cannot distribute workloads across multiple worker nodes.&lt;/p&gt;




&lt;h2&gt;
  
  
  8. Troubleshooting cluster failures with Spark UI
&lt;/h2&gt;

&lt;p&gt;When a job fails because of out-of-memory errors, you should not only look at the notebook output. You need to understand what happened during execution.&lt;/p&gt;

&lt;p&gt;The &lt;strong&gt;Spark UI&lt;/strong&gt; is the key tool for analyzing runtime behavior. Microsoft’s Spark memory troubleshooting documentation explains that memory errors can be generic and may come from several causes, such as shuffle partitions, large broadcasts, UDFs, skew, and streaming state.&lt;/p&gt;

&lt;p&gt;For DP-750:&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;OOM root-cause analysis = &lt;strong&gt;Spark UI&lt;/strong&gt;&lt;br&gt;&lt;br&gt;
Memory/runtime behavior = &lt;strong&gt;executors&lt;/strong&gt;, tasks, stages, shuffle, spill, skew&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;If the question asks specifically for execution behavior and root cause, Spark UI is usually stronger than cluster event logs or notebook output.&lt;/p&gt;




&lt;h1&gt;
  
  
  Real Exam Questions
&lt;/h1&gt;

&lt;h2&gt;
  
  
  Question 1
&lt;/h2&gt;

&lt;h3&gt;
  
  
  Useful case information
&lt;/h3&gt;

&lt;p&gt;Contoso has a single Azure Databricks workspace named Workspace1 in the West US Azure region. Workspace1 is enabled for Unity Catalog.&lt;/p&gt;

&lt;p&gt;Workspace1 contains all-purpose clusters for both development and production workloads.&lt;/p&gt;

&lt;p&gt;The company’s existing analytics environment has several compute issues:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Production and development workloads run on the same all-purpose clusters.&lt;/li&gt;
&lt;li&gt;Production and development workloads do NOT support autoscaling or workload isolation.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Contoso identifies the following environment and compute requirements:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Ensure that production ingestion workloads run on compute clusters that can scale automatically during telemetry spikes.&lt;/li&gt;
&lt;li&gt;Prevent development activity from affecting production pipelines.&lt;/li&gt;
&lt;li&gt;Production ingestion workloads must run as scheduled, non-interactive pipelines rather than on shared interactive development clusters.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;You need to configure compute for the ingestion of telemetry data. The solution must meet the data ingestion and processing requirements.&lt;/p&gt;

&lt;p&gt;What should you do?&lt;/p&gt;

&lt;p&gt;A. Move the ingestion pipelines to shared compute.&lt;/p&gt;

&lt;p&gt;B. Enable Photon acceleration for a job compute cluster. ✅ Correct Answer&lt;/p&gt;

&lt;p&gt;C. Increase an all-purpose cluster to a larger fixed node type.&lt;/p&gt;

&lt;p&gt;D. Disable autoscaling for a job compute cluster.&lt;/p&gt;




&lt;h2&gt;
  
  
  Question 2
&lt;/h2&gt;

&lt;p&gt;You have an Azure Databricks workspace.&lt;/p&gt;

&lt;p&gt;You are creating a Lakeflow Spark Declarative Pipelines (SDP) pipeline that scales automatically.&lt;/p&gt;

&lt;p&gt;You need to configure compute for the pipeline. The solution must minimize operational costs and effort.&lt;/p&gt;

&lt;p&gt;What should you use?&lt;/p&gt;

&lt;p&gt;A. the existing SQL warehouse&lt;/p&gt;

&lt;p&gt;B. an all-purpose cluster that uses autoscaling&lt;/p&gt;

&lt;p&gt;C. a job cluster that uses autoscaling ✅ Correct Answer&lt;/p&gt;

&lt;p&gt;D. a single-node, all-purpose cluster&lt;/p&gt;




&lt;h2&gt;
  
  
  Question 3
&lt;/h2&gt;

&lt;p&gt;You have an Azure Databricks workspace that contains an all-purpose compute cluster named Cluster1. Cluster1 is used for interactive development.&lt;/p&gt;

&lt;p&gt;You need to configure Cluster1 to meet the following requirements:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;p&gt;Automatically add and remove worker nodes based on workload demand.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Automatically shut down when the cluster has been idle for a specific period.&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;What should you configure for each requirement?&lt;/p&gt;

&lt;div class="table-wrapper-paragraph"&gt;&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;Requirement&lt;/th&gt;
&lt;th&gt;Answer&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;Automatically add and remove worker nodes&lt;/td&gt;
&lt;td&gt;Autoscaling ✅ Correct Answer&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Automatically shut down&lt;/td&gt;
&lt;td&gt;Auto termination ✅ Correct Answer&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;&lt;/div&gt;




&lt;h2&gt;
  
  
  Question 5
&lt;/h2&gt;

&lt;p&gt;You have an Azure Databricks workspace named Workspace1.&lt;/p&gt;

&lt;p&gt;You create a compute cluster named Cluster1 that will be used to ingest data.&lt;/p&gt;

&lt;p&gt;You need to install the required libraries on Cluster1. The solution must use Unity Catalog for access control.&lt;/p&gt;

&lt;p&gt;What should you do?&lt;/p&gt;

&lt;p&gt;A. Install the libraries by using pip3.&lt;/p&gt;

&lt;p&gt;B. Create a custom dependency management script and run the script from a Databricks notebook.&lt;/p&gt;

&lt;p&gt;C. Upload the libraries to Workspace1 and install the libraries on Cluster1. ✅ Correct Answer&lt;/p&gt;

&lt;p&gt;D. Install the libraries on Cluster1 and manually restart the cluster.&lt;/p&gt;




&lt;h2&gt;
  
  
  Question 7
&lt;/h2&gt;

&lt;p&gt;You have an Azure Databricks workspace that contains an all-purpose cluster named Cluster1.&lt;/p&gt;

&lt;p&gt;You need to configure Cluster1 to meet the following requirements:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;p&gt;Scale up automatically when workloads increase.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Scale down automatically when workloads decrease.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Minimize costs.&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Which two actions should you perform? Each correct answer presents part of the solution.&lt;/p&gt;

&lt;p&gt;A. Disable Photon acceleration.&lt;/p&gt;

&lt;p&gt;B. Enable autoscaling for Cluster1. ✅ Correct Answer&lt;/p&gt;

&lt;p&gt;C. Apply a compute policy that enables users to manage the cluster settings.&lt;/p&gt;

&lt;p&gt;D. Specify a fixed number of workers.&lt;/p&gt;

&lt;p&gt;E. Configure Cluster1 to terminate after 30 minutes of inactivity. ✅ Correct Answer&lt;/p&gt;




&lt;h2&gt;
  
  
  Question 10
&lt;/h2&gt;

&lt;p&gt;You have an Azure Databricks workspace that contains a cluster named Cluster1.&lt;/p&gt;

&lt;p&gt;Performance monitoring shows that Cluster1 is consistently overprovisioned for its batch workload:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;p&gt;CPU utilization remains below 20 percent, including peak processing periods.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;The workload is highly predictable and does not spike.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;The current node type already meets the workload requirements.&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;You need to reduce compute costs without increasing job duration.&lt;/p&gt;

&lt;p&gt;What should you do?&lt;/p&gt;

&lt;p&gt;A. Enable Photon acceleration.&lt;/p&gt;

&lt;p&gt;B. Configure Cluster1 to use a larger node type.&lt;/p&gt;

&lt;p&gt;C. Decrease the autotermination timeout of Cluster1.&lt;/p&gt;

&lt;p&gt;D. Disable autoscaling and reduce the number of worker nodes. ✅ Correct Answer&lt;/p&gt;




&lt;h2&gt;
  
  
  Question 11
&lt;/h2&gt;

&lt;p&gt;You have an Azure Databricks workspace.&lt;/p&gt;

&lt;p&gt;You are creating a Lakeflow Spark Declarative Pipelines (SDP) pipeline that scales automatically.&lt;/p&gt;

&lt;p&gt;You need to configure compute for the pipeline. The solution must minimize operational costs and administrative effort.&lt;/p&gt;

&lt;p&gt;What should you use?&lt;/p&gt;

&lt;p&gt;A. serverless compute ✅ Correct Answer&lt;/p&gt;

&lt;p&gt;B. a single-node, all-purpose cluster&lt;/p&gt;

&lt;p&gt;C. an all-purpose cluster that uses autoscaling&lt;/p&gt;

&lt;p&gt;D. an existing SQL warehouse&lt;/p&gt;

&lt;p&gt;E. a job cluster that uses autoscaling&lt;/p&gt;




&lt;h2&gt;
  
  
  Question 13
&lt;/h2&gt;

&lt;p&gt;You have an Azure Databricks workspace that contains a cluster named Cluster1.&lt;/p&gt;

&lt;p&gt;Cluster1 has the following characteristics:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;p&gt;Configured as a single node cluster&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Uses a general purpose virtual machine node type&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;The cluster runtime environment has the following configurations:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;p&gt;Uses Databricks Runtime for Machine Learning&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Includes common machine learning libraries&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Supports Python workloads&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;For each of the following statements, select Yes if the statement is true. Otherwise, select No.&lt;/p&gt;

&lt;div class="table-wrapper-paragraph"&gt;&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;Statement&lt;/th&gt;
&lt;th&gt;Answer&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;Cluster1 can be used to train deep learning models that require GPU acceleration.&lt;/td&gt;
&lt;td&gt;No ✅ Correct Answer&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Cluster1 can distribute machine learning workloads across multiple nodes.&lt;/td&gt;
&lt;td&gt;No ✅ Correct Answer&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Cluster1 can run Python workloads that rely on preinstalled machine learning libraries.&lt;/td&gt;
&lt;td&gt;Yes ✅ Correct Answer&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;&lt;/div&gt;




&lt;h2&gt;
  
  
  Question 61
&lt;/h2&gt;

&lt;p&gt;You have an Azure Databricks workspace that contains an all-purpose cluster named Cluster1.&lt;/p&gt;

&lt;p&gt;You discover that out-of-memory, OOM, errors intermittently cause jobs running on Cluster1 to fail.&lt;/p&gt;

&lt;p&gt;You need to identify the root cause of the failures by analyzing the runtime execution behavior.&lt;/p&gt;

&lt;p&gt;What should you do?&lt;/p&gt;

&lt;div class="table-wrapper-paragraph"&gt;&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;Area&lt;/th&gt;
&lt;th&gt;Answer&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;Diagnostic tool to use&lt;/td&gt;
&lt;td&gt;The Apache Spark UI ✅ Correct Answer&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Execution level to analyze&lt;/td&gt;
&lt;td&gt;Executors ✅ Correct Answer&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;&lt;/div&gt;




&lt;h2&gt;
  
  
  Question 70
&lt;/h2&gt;

&lt;p&gt;You have an Azure Databricks workspace that contains multiple all-purpose clusters.&lt;/p&gt;

&lt;p&gt;You discover that some clusters remain idle for long periods after users finish their work.&lt;/p&gt;

&lt;p&gt;You need to reduce compute costs without affecting active workloads.&lt;/p&gt;

&lt;p&gt;What should you do?&lt;/p&gt;

&lt;p&gt;A. Enable autoscaling.&lt;/p&gt;

&lt;p&gt;B. Convert the clusters into job clusters.&lt;/p&gt;

&lt;p&gt;C. Use spot instances.&lt;/p&gt;

&lt;p&gt;D. Configure automatic termination. ✅ Correct Answer&lt;/p&gt;




&lt;h2&gt;
  
  
  Explore more
&lt;/h2&gt;


&lt;div class="ltag__user ltag__user__id__1230121"&gt;
    &lt;a href="/luca1iu" class="ltag__user__link profile-image-link"&gt;
      &lt;div class="ltag__user__pic"&gt;
        &lt;img src="https://media2.dev.to/dynamic/image/width=150,height=150,fit=cover,gravity=auto,format=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Fuser%2Fprofile_image%2F1230121%2F2521cc84-ad7d-458c-99e5-b4d82f625a88.jpg" alt="luca1iu image"&gt;
      &lt;/div&gt;
    &lt;/a&gt;
  &lt;div class="ltag__user__content"&gt;
    &lt;h2&gt;
&lt;a class="ltag__user__link" href="/luca1iu"&gt;Jin&lt;/a&gt;Follow
&lt;/h2&gt;
    &lt;div class="ltag__user__summary"&gt;
      &lt;a class="ltag__user__link" href="/luca1iu"&gt;Hello there! 👋 I'm Jin, a Business Intelligence Developer with a passion for all things data. Proficient in Python, SQL, Power BI, Tableau&lt;/a&gt;
    &lt;/div&gt;
  &lt;/div&gt;
&lt;/div&gt;


&lt;p&gt;Thank you for taking the time to explore data-related insights with me. I appreciate your engagement.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://www.linkedin.com/in/lucaliu-data" class="crayons-btn crayons-btn--primary" rel="noopener noreferrer"&gt;Connect with me on LinkedIn&lt;/a&gt;
&lt;/p&gt;

&lt;p&gt;&lt;a href="https://twitter.com/Luca_DataTeam" class="crayons-btn crayons-btn--primary" rel="noopener noreferrer"&gt;Connect with me on X&lt;/a&gt;
&lt;/p&gt;

</description>
      <category>azure</category>
      <category>databricks</category>
      <category>certification</category>
      <category>tutorial</category>
    </item>
    <item>
      <title>Was My Claude Account Banned Because I Speak Chinese?</title>
      <dc:creator>Jin</dc:creator>
      <pubDate>Thu, 23 Jul 2026 18:59:58 +0000</pubDate>
      <link>https://dev.to/luca1iu/was-my-claude-account-banned-because-i-speak-chinese-330o</link>
      <guid>https://dev.to/luca1iu/was-my-claude-account-banned-because-i-speak-chinese-330o</guid>
      <description>&lt;p&gt;Recently, Anthropic has heavily tightened its restrictions on users linked to unsupported regions, particularly China. While I live and work in Germany, I found myself caught in this wave of account bans.&lt;/p&gt;

&lt;p&gt;I want to share what happened, look at how these bans work technically, and explore why legitimate Chinese speakers outside China might be experiencing algorithmic "friendly fire."&lt;/p&gt;

&lt;h3&gt;
  
  
  My Experience: Three Months, Three Bans
&lt;/h3&gt;

&lt;p&gt;My setup is completely legitimate: I live in Germany, registered with a German phone number, and paid with a German credit card. Germany is fully supported by Anthropic.&lt;/p&gt;

&lt;p&gt;Despite this, I have opened three separate Claude accounts, upgraded to Claude Pro three times, and &lt;strong&gt;every single time, my account was banned near the end of the billing month.&lt;/strong&gt; (Fortunately, Anthropic automatically issued full refunds each time).&lt;/p&gt;

&lt;p&gt;Because my network and billing footprints are strictly German, I was left with one obvious question: &lt;em&gt;Was I banned because I chat with Claude in Chinese?&lt;/em&gt;&lt;/p&gt;

&lt;h3&gt;
  
  
  The Technical Reality: Multi-Signal Risk Scoring
&lt;/h3&gt;

&lt;p&gt;Anthropic doesn't publish its enforcement logic, but public statements, news reports, and community reverse-engineering reveal that the system doesn't just look at your IP address. It uses a combination of signals to calculate a risk score:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Location &amp;amp; Network:&lt;/strong&gt; IP geolocation, VPN/proxy detection, and cloud-hosted IP ranges.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Payment Data:&lt;/strong&gt; The card issuing country (via Bank Identification Numbers) and billing address.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Device Metadata:&lt;/strong&gt; Local system timezone, browser language, and OS locale settings.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Corporate Ownership:&lt;/strong&gt; In late 2025, Anthropic expanded its rules to block access by overseas subsidiaries of companies with more than 50% ownership from unsupported jurisdictions.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Client Environment:&lt;/strong&gt; In early 2026, controversies surrounding &lt;em&gt;Claude Code&lt;/em&gt; revealed that Anthropic experimented with checking local environments for proxy configurations and timezone mismatches (like &lt;code&gt;Asia/Shanghai&lt;/code&gt;).&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;h3&gt;
  
  
  Is Language a Trigger?
&lt;/h3&gt;

&lt;p&gt;In a standard risk-scoring model, no single factor causes a ban. Speaking Chinese alone is a poor indicator of location—millions of people in supported countries (like Singapore, Malaysia, Germany, and the US) speak Chinese daily.&lt;/p&gt;

&lt;p&gt;However, if an automated system combines multiple "weak" signals—such as system language settings, browser locale, heavy Chinese prompting, and perhaps minor network flags like using a corporate VPN or iCloud Private Relay—the risk score might cross the threshold for an automatic ban.&lt;/p&gt;

&lt;p&gt;When this happens, the platform simply disables the account and issues a refund with zero transparent explanation.&lt;/p&gt;

&lt;h3&gt;
  
  
  The Takeaway
&lt;/h3&gt;

&lt;p&gt;My current guess is that Chinese-language usage isn't the sole reason for the ban, but it likely acts as a contributing feature in a rigid, automated trust and safety model. This creates a unique frustration for Chinese speakers living abroad: our language and browsing habits can accidentally mimic the exact patterns the algorithms are trying to block.&lt;/p&gt;




&lt;h2&gt;
  
  
  Explore more
&lt;/h2&gt;


&lt;div class="ltag__user ltag__user__id__1230121"&gt;
    &lt;a href="/luca1iu" class="ltag__user__link profile-image-link"&gt;
      &lt;div class="ltag__user__pic"&gt;
        &lt;img src="https://media2.dev.to/dynamic/image/width=150,height=150,fit=cover,gravity=auto,format=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Fuser%2Fprofile_image%2F1230121%2F2521cc84-ad7d-458c-99e5-b4d82f625a88.jpg" alt="luca1iu image"&gt;
      &lt;/div&gt;
    &lt;/a&gt;
  &lt;div class="ltag__user__content"&gt;
    &lt;h2&gt;
&lt;a class="ltag__user__link" href="/luca1iu"&gt;Jin&lt;/a&gt;Follow
&lt;/h2&gt;
    &lt;div class="ltag__user__summary"&gt;
      &lt;a class="ltag__user__link" href="/luca1iu"&gt;Hello there! 👋 I'm Jin, a Business Intelligence Developer with a passion for all things data. Proficient in Python, SQL, Power BI, Tableau&lt;/a&gt;
    &lt;/div&gt;
  &lt;/div&gt;
&lt;/div&gt;


&lt;p&gt;Thank you for taking the time to explore data-related insights with me. I appreciate your engagement.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://www.linkedin.com/in/lucaliu-data" class="crayons-btn crayons-btn--primary" rel="noopener noreferrer"&gt;Connect with me on LinkedIn&lt;/a&gt;
&lt;/p&gt;

&lt;p&gt;&lt;a href="https://twitter.com/Luca_DataTeam" class="crayons-btn crayons-btn--primary" rel="noopener noreferrer"&gt;Connect with me on X&lt;/a&gt;
&lt;/p&gt;

</description>
      <category>ai</category>
      <category>anthropic</category>
      <category>claude</category>
      <category>llm</category>
    </item>
    <item>
      <title>Selling Power BI Templates for Passive Income</title>
      <dc:creator>Jin</dc:creator>
      <pubDate>Wed, 22 Jul 2026 04:59:58 +0000</pubDate>
      <link>https://dev.to/luca1iu/selling-power-bi-templates-for-passive-income-n3a</link>
      <guid>https://dev.to/luca1iu/selling-power-bi-templates-for-passive-income-n3a</guid>
      <description>&lt;p&gt;Like many people, I used to think passive income meant getting enough blog traffic to earn decent ad revenue. But relying on ads is difficult, slow, and requires massive audience volume.&lt;/p&gt;

&lt;p&gt;Recently, I realized there is a much more practical approach: shifting the focus from generating clicks to selling actual digital products or services. As data professionals, we already have highly monetizable skills. One of the best ways to leverage this is by selling ready-to-use Power BI templates.&lt;/p&gt;

&lt;h1&gt;
  
  
  Why Power BI Templates?
&lt;/h1&gt;

&lt;p&gt;Many small businesses and independent professionals need data visualization, but they do not have the budget to hire a full-time Data Analyst. They just want a dashboard that works.&lt;/p&gt;

&lt;p&gt;If you can build a clean, plug-and-play Power BI template for common use cases—like sales tracking, inventory management, or personal finance—you are solving a direct problem. The best part of a digital product is the scale: you build the template once, and you can sell it infinitely.&lt;/p&gt;

&lt;h1&gt;
  
  
  Where to Sell Your Templates
&lt;/h1&gt;

&lt;p&gt;You do not need to build a complex e-commerce website from scratch. There are several platforms designed specifically for hosting and selling digital files. Before researching this side hustle, I had never heard of most of these places, but they are exactly what creators use.&lt;/p&gt;

&lt;h2&gt;
  
  
  &lt;strong&gt;Etsy&lt;/strong&gt;
&lt;/h2&gt;

&lt;p&gt;Most people think Etsy is only for handmade crafts. In reality, it has a massive market for digital downloads. Business owners actively search Etsy for Excel trackers, resume formats, and Power BI dashboards. It gives you access to a huge built-in audience.&lt;/p&gt;

&lt;h2&gt;
  
  
  &lt;strong&gt;Gumroad&lt;/strong&gt;
&lt;/h2&gt;

&lt;p&gt;Gumroad is a platform built specifically for digital creators. It is incredibly easy to use. You simply upload your Power BI file, set a price, and Gumroad gives you a clean checkout link you can share on your blog or social media.&lt;/p&gt;

&lt;h2&gt;
  
  
  &lt;strong&gt;Ko-fi&lt;/strong&gt;
&lt;/h2&gt;

&lt;p&gt;Ko-fi is well-known as a platform where followers can "buy you a coffee" to support your work. However, it also includes a great digital storefront feature. You can list your templates for sale directly on your profile, often with lower fees than other platforms.&lt;/p&gt;

&lt;h2&gt;
  
  
  &lt;strong&gt;Payhip&lt;/strong&gt;
&lt;/h2&gt;

&lt;p&gt;Payhip is another straightforward platform focused entirely on selling digital downloads and memberships. It handles the checkout process and the secure file delivery to the customer automatically.&lt;/p&gt;

&lt;h1&gt;
  
  
  The Takeaway
&lt;/h1&gt;

&lt;p&gt;If you want to build a passive income stream, stop chasing pennies from website ads. Take the technical skills you already use at work, package them into a valuable template, and list it on a digital storefront. It is a much faster and more controllable path to monetizing your expertise.&lt;/p&gt;




&lt;h2&gt;
  
  
  Explore more
&lt;/h2&gt;


&lt;div class="ltag__user ltag__user__id__1230121"&gt;
    &lt;a href="/luca1iu" class="ltag__user__link profile-image-link"&gt;
      &lt;div class="ltag__user__pic"&gt;
        &lt;img src="https://media2.dev.to/dynamic/image/width=150,height=150,fit=cover,gravity=auto,format=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Fuser%2Fprofile_image%2F1230121%2F2521cc84-ad7d-458c-99e5-b4d82f625a88.jpg" alt="luca1iu image"&gt;
      &lt;/div&gt;
    &lt;/a&gt;
  &lt;div class="ltag__user__content"&gt;
    &lt;h2&gt;
&lt;a class="ltag__user__link" href="/luca1iu"&gt;Jin&lt;/a&gt;Follow
&lt;/h2&gt;
    &lt;div class="ltag__user__summary"&gt;
      &lt;a class="ltag__user__link" href="/luca1iu"&gt;Hello there! 👋 I'm Jin, a Business Intelligence Developer with a passion for all things data. Proficient in Python, SQL, Power BI, Tableau&lt;/a&gt;
    &lt;/div&gt;
  &lt;/div&gt;
&lt;/div&gt;


&lt;p&gt;Thank you for taking the time to explore data-related insights with me. I appreciate your engagement.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://www.linkedin.com/in/lucaliu-data" class="crayons-btn crayons-btn--primary" rel="noopener noreferrer"&gt;Connect with me on LinkedIn&lt;/a&gt;
&lt;/p&gt;

&lt;p&gt;&lt;a href="https://twitter.com/Luca_DataTeam" class="crayons-btn crayons-btn--primary" rel="noopener noreferrer"&gt;Connect with me on X&lt;/a&gt;
&lt;/p&gt;

</description>
      <category>powerbi</category>
      <category>sideprojects</category>
      <category>dataanalyst</category>
    </item>
    <item>
      <title>Why I Left China as a Data Analyst</title>
      <dc:creator>Jin</dc:creator>
      <pubDate>Sun, 05 Jul 2026 05:00:01 +0000</pubDate>
      <link>https://dev.to/luca1iu/why-i-left-china-as-a-data-analyst-2f1g</link>
      <guid>https://dev.to/luca1iu/why-i-left-china-as-a-data-analyst-2f1g</guid>
      <description>&lt;p&gt;In 2021, I graduated with my Master’s degree in &lt;em&gt;Industrial Engineering&lt;/em&gt; in Germany and decided to move back to China. During the final year of my degree, I taught myself Python and SQL on DataCamp. I used those skills to pass a data case study and landed my first job at a small SaaS startup in Shanghai. A year later, I moved to an American company, RRD, also in Shanghai.&lt;/p&gt;

&lt;p&gt;I worked there from 2022 to 2024. During those two years, I noticed a few undeniable trends in the data and tech industry. Eventually, these trends made me realize I needed to leave. Here is why.&lt;/p&gt;

&lt;h2&gt;
  
  
  1. Two Separate Software Ecosystems
&lt;/h2&gt;

&lt;p&gt;At my job, I used Microsoft Teams and Power BI. However, many of my friends in domestic companies used local Chinese office suites and BI tools.&lt;/p&gt;

&lt;p&gt;China has built its own independent software ecosystem. It works perfectly fine for those used to it, but it is completely separate from the global market. Because my skills and habits were rooted in global tools like Power BI, my employment options in China were almost entirely limited to foreign companies. That instantly shrank my job market.&lt;/p&gt;

&lt;h2&gt;
  
  
  2. The Great Tech Decoupling
&lt;/h2&gt;

&lt;p&gt;Between 2022 and 2024, the decoupling of global and domestic tech became obvious. Salesforce shut down its direct China operations, and Tableau made similar moves. Many companies were forced to adopt domestic ERP software.&lt;/p&gt;

&lt;p&gt;For a Data Analyst, the ERP system is your foundation. Domestic ERPs and SAP run on completely different logics. The same divide is happening with cloud infrastructure—global players like AWS, Azure, and GCP versus domestic Chinese clouds.&lt;/p&gt;

&lt;p&gt;I realized I was standing at a crossroads. I had to choose a path: adapt entirely to the Chinese software ecosystem, or stick with the international one. Trying to jump back and forth between the two just means a massive loss of time and high learning costs.&lt;/p&gt;

&lt;h2&gt;
  
  
  3. Budget Constraints Over Value Creation
&lt;/h2&gt;

&lt;p&gt;Profit margins for many companies in China are tight. Even in multinational companies, the high-profit departments usually stay abroad, leaving the Chinese branches with strict cost constraints.&lt;/p&gt;

&lt;p&gt;For example, we did not have the budget to give everyone a Power BI Pro license. Because of this, a significant part of my job turned into finding cheap workarounds. I had to figure out how to set up local servers for Power BI or build wrappers for Tableau just to save money. Instead of spending my time analyzing data and creating real business value, I was wasting energy trying to bypass budget rules using cheap alternatives.&lt;/p&gt;

&lt;h2&gt;
  
  
  4. The AI Barrier
&lt;/h2&gt;

&lt;p&gt;When the AI boom started, the tools were immediately inaccessible in China. Using them requires extra effort: setting up VPNs, buying virtual foreign phone numbers, and navigating blocks.&lt;/p&gt;

&lt;p&gt;On top of that, a $20 monthly subscription for AI tools is expensive relative to local salaries. AI is developing at lightning speed. I didn't want my first step with every new technology to be researching how to secretly bypass regulations just to use it.&lt;/p&gt;

&lt;h2&gt;
  
  
  The Decision to Leave
&lt;/h2&gt;

&lt;p&gt;Ultimately, I decided to leave China. The choice was half for my career and half for my family.&lt;/p&gt;

&lt;p&gt;Today, I am back in Germany, working as a Data Analyst. Looking back, I am happy with my decision. I can focus my time on creating real value, and most importantly, I am staying seamlessly connected to the global tech frontier.&lt;/p&gt;




&lt;h2&gt;
  
  
  Explore more
&lt;/h2&gt;


&lt;div class="ltag__user ltag__user__id__1230121"&gt;
    &lt;a href="/luca1iu" class="ltag__user__link profile-image-link"&gt;
      &lt;div class="ltag__user__pic"&gt;
        &lt;img src="https://media2.dev.to/dynamic/image/width=150,height=150,fit=cover,gravity=auto,format=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Fuser%2Fprofile_image%2F1230121%2F2521cc84-ad7d-458c-99e5-b4d82f625a88.jpg" alt="luca1iu image"&gt;
      &lt;/div&gt;
    &lt;/a&gt;
  &lt;div class="ltag__user__content"&gt;
    &lt;h2&gt;
&lt;a class="ltag__user__link" href="/luca1iu"&gt;Jin&lt;/a&gt;Follow
&lt;/h2&gt;
    &lt;div class="ltag__user__summary"&gt;
      &lt;a class="ltag__user__link" href="/luca1iu"&gt;Hello there! 👋 I'm Jin, a Business Intelligence Developer with a passion for all things data. Proficient in Python, SQL, Power BI, Tableau&lt;/a&gt;
    &lt;/div&gt;
  &lt;/div&gt;
&lt;/div&gt;


&lt;p&gt;Thank you for taking the time to explore data-related insights with me. I appreciate your engagement.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://www.linkedin.com/in/lucaliu-data" class="crayons-btn crayons-btn--primary" rel="noopener noreferrer"&gt;Connect with me on LinkedIn&lt;/a&gt;
&lt;/p&gt;

&lt;p&gt;&lt;a href="https://twitter.com/Luca_DataTeam" class="crayons-btn crayons-btn--primary" rel="noopener noreferrer"&gt;Connect with me on X&lt;/a&gt;
&lt;/p&gt;

</description>
      <category>job</category>
      <category>career</category>
      <category>dataanalyst</category>
      <category>ai</category>
    </item>
    <item>
      <title>Where to Write Python in Azure - Building the Python ETL Pipeline</title>
      <dc:creator>Jin</dc:creator>
      <pubDate>Sun, 05 Jul 2026 05:00:00 +0000</pubDate>
      <link>https://dev.to/luca1iu/where-to-write-python-in-azure-building-the-python-etl-pipeline-2d73</link>
      <guid>https://dev.to/luca1iu/where-to-write-python-in-azure-building-the-python-etl-pipeline-2d73</guid>
      <description>&lt;p&gt;Many data analysts know how to read and process Excel files using Python and Pandas locally. But what happens when you move to the Azure cloud?&lt;/p&gt;

&lt;p&gt;When building a recent ETL pipeline, the target database was Azure SQL Database. Suddenly, running Python on my local machine was no longer an option because local scripts couldn't easily or securely connect to the cloud database via ODBC. I needed a place to write and execute Python directly in Azure, read Excel files, and schedule daily tasks.&lt;/p&gt;

&lt;p&gt;Here is the architecture I built, the services I tested, and the exact costs of my final solution.&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.us-east-2.amazonaws.com%2Fuploads%2Farticles%2F25v0qb3k03xt6trexz86.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.us-east-2.amazonaws.com%2Fuploads%2Farticles%2F25v0qb3k03xt6trexz86.png" width="800" height="437"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h3&gt;
  
  
  Step 1: Getting Business Data into the Cloud
&lt;/h3&gt;

&lt;p&gt;The data sources for this pipeline were monthly Excel files and mapping tables that business users manually updated.&lt;/p&gt;

&lt;p&gt;To bridge the gap between business operations and the cloud, I used &lt;strong&gt;Power Automate&lt;/strong&gt;. I set up a flow that automatically syncs the users' OneDrive folders to an Azure Storage Account every day. This allows business users to update mapping tables in a familiar environment (OneDrive), while seamlessly feeding the latest data into the data engineering pipeline.&lt;/p&gt;

&lt;h3&gt;
  
  
  Step 2: The Quest for the Right Compute
&lt;/h3&gt;

&lt;p&gt;Once the data was in the Azure Storage Account, I needed a compute service to process it and write the results to Azure SQL Database. I tried four different Azure services before finding the right fit.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;1. Azure Synapse Analytics&lt;/strong&gt; Synapse is powerful, but it is expensive. According to Microsoft’s documentation, Synapse uses a Massively Parallel Processing (MPP) architecture. For medium-sized Excel data, this is massive overkill. Paying for distributed computation when you don't need it simply isn't cost-effective.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;2. Azure Machine Learning (Virtual Machine)&lt;/strong&gt; Next, I tried creating a VM in Azure ML. The developer experience was fantastic. By connecting via VS Code, I could easily read data from the Storage Account and write it to the SQL Database. However, it had one fatal flaw: scheduling. Setting up a simple daily automated run for a notebook in Azure ML is unnecessarily complicated.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;3. Azure Functions&lt;/strong&gt; Azure Functions are incredibly cheap. But as the data processing logic grew, I hit its limitations. Functions are great for lightweight, event-driven tasks, but they are not designed for managing complex ETL dependencies and heavy data transformations.&lt;/p&gt;

&lt;h3&gt;
  
  
  The Final Solution: Azure Databricks Serverless
&lt;/h3&gt;

&lt;p&gt;Ultimately, I moved to Azure Databricks. Initially, I used a standard hybrid workspace, but the idle costs of keeping VMs running (or waiting for them to spin up) were too high.&lt;/p&gt;

&lt;p&gt;Then, I switched to &lt;strong&gt;Databricks Serverless&lt;/strong&gt; (hosted in the Germany West Central region). This solved everything. I had an excellent environment to write Python, seamless connections to Azure Storage and SQL Database, and built-in, reliable scheduling.&lt;/p&gt;

&lt;h3&gt;
  
  
  Transparency: What Does It Actually Cost?
&lt;/h3&gt;

&lt;p&gt;One of the biggest concerns with Databricks is the cost. For this production pipeline, my Databricks service costs exactly &lt;strong&gt;€52 per month&lt;/strong&gt;.&lt;/p&gt;

&lt;p&gt;Here is the breakdown of my real Azure bill:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Premium Interactive Serverless Compute DBU:&lt;/strong&gt; €42.24&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Premium Automated Serverless Compute DBU:&lt;/strong&gt; €8.27&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Premium Databricks Storage Unit DSU:&lt;/strong&gt; €0.11&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;The largest chunk (€42.24) comes from &lt;em&gt;Interactive Compute&lt;/em&gt;—this is the cost generated when I am actively writing, testing, and debugging code.&lt;/p&gt;

&lt;p&gt;The actual production run—the &lt;em&gt;Automated Compute&lt;/em&gt;—only costs €8.27 per month. The pipeline is scheduled using a standard CRON expression (&lt;code&gt;0 0 5 ? * MON-FRI&lt;/code&gt;) to run every weekday at 5:00 AM. Because it is Serverless, I only pay for the exact seconds the compute is running to process the data, with zero idle costs on weekends.&lt;/p&gt;

&lt;h3&gt;
  
  
  The Takeaway
&lt;/h3&gt;

&lt;p&gt;When building a data pipeline in Azure, finding the right place to write Python isn't just about code execution. It is a balancing act between developer experience (like VS Code integration), operational ease (simple scheduling), and cost control. For medium data workloads, Databricks Serverless currently hits that sweet spot perfectly.&lt;/p&gt;




&lt;h2&gt;
  
  
  Explore more
&lt;/h2&gt;


&lt;div class="ltag__user ltag__user__id__1230121"&gt;
    &lt;a href="/luca1iu" class="ltag__user__link profile-image-link"&gt;
      &lt;div class="ltag__user__pic"&gt;
        &lt;img src="https://media2.dev.to/dynamic/image/width=150,height=150,fit=cover,gravity=auto,format=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Fuser%2Fprofile_image%2F1230121%2F2521cc84-ad7d-458c-99e5-b4d82f625a88.jpg" alt="luca1iu image"&gt;
      &lt;/div&gt;
    &lt;/a&gt;
  &lt;div class="ltag__user__content"&gt;
    &lt;h2&gt;
&lt;a class="ltag__user__link" href="/luca1iu"&gt;Jin&lt;/a&gt;Follow
&lt;/h2&gt;
    &lt;div class="ltag__user__summary"&gt;
      &lt;a class="ltag__user__link" href="/luca1iu"&gt;Hello there! 👋 I'm Jin, a Business Intelligence Developer with a passion for all things data. Proficient in Python, SQL, Power BI, Tableau&lt;/a&gt;
    &lt;/div&gt;
  &lt;/div&gt;
&lt;/div&gt;


&lt;p&gt;Thank you for taking the time to explore data-related insights with me. I appreciate your engagement.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://www.linkedin.com/in/lucaliu-data" class="crayons-btn crayons-btn--primary" rel="noopener noreferrer"&gt;Connect with me on LinkedIn&lt;/a&gt;
&lt;/p&gt;

&lt;p&gt;&lt;a href="https://twitter.com/Luca_DataTeam" class="crayons-btn crayons-btn--primary" rel="noopener noreferrer"&gt;Connect with me on X&lt;/a&gt;
&lt;/p&gt;

</description>
      <category>azure</category>
      <category>data</category>
      <category>python</category>
      <category>pipeline</category>
    </item>
    <item>
      <title>Stop Using Spark for Your Small Data - Why Azure Functions is the Right Tool for the Job</title>
      <dc:creator>Jin</dc:creator>
      <pubDate>Wed, 06 May 2026 09:22:57 +0000</pubDate>
      <link>https://dev.to/luca1iu/stop-using-spark-for-your-small-data-why-azure-functions-is-the-right-tool-for-the-job-4j66</link>
      <guid>https://dev.to/luca1iu/stop-using-spark-for-your-small-data-why-azure-functions-is-the-right-tool-for-the-job-4j66</guid>
      <description>&lt;p&gt;As a data analyst, my job is to get data from A to B, cleaned and ready for use. A common workflow for my team involves users uploading Excel files to a &lt;a href="https://www.microsoft.com/de-de/microsoft-365/onedrive/online-cloud-storage?market=de" rel="noopener noreferrer"&gt;OneDrive&lt;/a&gt; folder. A &lt;a href="//microsoft.com/de-de/power-platform/products/power-automate"&gt;Power Automate&lt;/a&gt; flow then syncs these files daily to a container in our &lt;a href="https://learn.microsoft.com/en-us/azure/storage/common/storage-account-overview" rel="noopener noreferrer"&gt;Azure Storage Account&lt;/a&gt;.&lt;/p&gt;

&lt;p&gt;From there, my responsibility begins:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;Read the new Excel file from Blob Storage using Python.&lt;/li&gt;
&lt;li&gt;Process the data (clean, transform, apply business logic).&lt;/li&gt;
&lt;li&gt;Write the final data to an Azure SQL Database.&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;I needed this to run on two triggers: a &lt;strong&gt;time schedule&lt;/strong&gt; (e.g., every morning at 7 AM) and an &lt;strong&gt;event-driven&lt;/strong&gt; trigger (i.e., as soon as a new file lands in the container).&lt;/p&gt;

&lt;p&gt;My first thought was to use the "big data" tools I'd heard of: &lt;a href="https://azure.microsoft.com/de-de/products/databricks" rel="noopener noreferrer"&gt;&lt;strong&gt;Azure Databricks&lt;/strong&gt;&lt;/a&gt; or &lt;a href="https://azure.microsoft.com/de-de/products/synapse-analytics" rel="noopener noreferrer"&gt;&lt;strong&gt;Azure Synapse Analytics&lt;/strong&gt;&lt;/a&gt;.&lt;/p&gt;

&lt;h1&gt;
  
  
  The "Big Tool" Trap
&lt;/h1&gt;

&lt;p&gt;On the surface, Databricks and Synapse are perfect.&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;They let me write Python in a &lt;strong&gt;Notebook&lt;/strong&gt;, which I'm very comfortable with.&lt;/li&gt;
&lt;li&gt;They have easy-to-use &lt;strong&gt;trigger&lt;/strong&gt; and &lt;strong&gt;monitoring&lt;/strong&gt; tools.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;I set up a proof-of-concept, and it worked. But I quickly realized a problem. My Excel files are 10MB, not 10TB.&lt;/p&gt;

&lt;p&gt;Using a full Spark cluster (which is what both Databricks and Synapse Notebooks run on) was like &lt;strong&gt;using a sledgehammer to crack a nut&lt;/strong&gt;. I was paying for a powerful, multi-node cluster (which took 5-10 minutes to "cold start") just to run a Python script that finished in 30 seconds. The cost was going to be far too high for such a simple task.&lt;/p&gt;

&lt;h1&gt;
  
  
  The "Right Tool": Azure Functions
&lt;/h1&gt;

&lt;p&gt;After some research, I found the perfect tool for small-to-medium data tasks: &lt;strong&gt;Azure Functions&lt;/strong&gt;.&lt;br&gt;
Azure Functions, when used on a "Consumption Plan," is a true "serverless" service. This means:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;It's cheap:&lt;/strong&gt; You get a generous free grant every month, and after that, you pay &lt;em&gt;only&lt;/em&gt; for the seconds your code is actually running. For my task, the cost is practically $0.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;It's fast:&lt;/strong&gt; It starts in seconds (or less), not minutes.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;It's perfect for triggers:&lt;/strong&gt; It has built-in triggers for exactly my needs (Timer and Blob Storage).&lt;/li&gt;
&lt;/ul&gt;
&lt;h1&gt;
  
  
  The (Small) Learning Curve
&lt;/h1&gt;

&lt;p&gt;The one trade-off is that it's &lt;em&gt;slightly&lt;/em&gt; more complex than a notebook. You can't just write and run your code in a web browser. The modern, recommended workflow is to use &lt;strong&gt;Visual Studio Code (VS Code)&lt;/strong&gt; to develop your code locally and then "deploy" (push) it to the cloud.&lt;/p&gt;

&lt;p&gt;This "local development" workflow is a best practice. It means you have a copy of your code, can use source control (like Git), and can test everything on your machine before it goes live.&lt;/p&gt;
&lt;h1&gt;
  
  
  More Than Just Timers
&lt;/h1&gt;

&lt;p&gt;My needs were simple, but Azure Functions has triggers for almost anything. The most popular ones include:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Timer Trigger:&lt;/strong&gt; Runs on a schedule (e.g., &lt;code&gt;0 7 * * 1&lt;/code&gt; for 7 AM every Monday).&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Blob Trigger:&lt;/strong&gt; Runs when a new file is uploaded to a storage container.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;HTTP Trigger:&lt;/strong&gt; Runs when it receives a web request (creating a simple API).&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Queue Trigger:&lt;/strong&gt; Runs when a new message is added to a storage queue.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;You can see the full list on the official &lt;a href="https://learn.microsoft.com/en-us/azure/azure-functions/functions-triggers-bindings" rel="noopener noreferrer"&gt;Microsoft Azure Functions Triggers and Bindings documentation&lt;/a&gt;.&lt;/p&gt;
&lt;h1&gt;
  
  
  Conclusion
&lt;/h1&gt;

&lt;p&gt;Databricks and Synapse are amazing, powerful tools, but they are not the answer for everything. For our team's daily Excel processing, using them was costing us time and money.&lt;/p&gt;

&lt;p&gt;By investing a little time to learn the VS Code + Azure Functions workflow, we built a solution that is faster, more efficient, and costs a fraction of the price. &lt;strong&gt;Don't pay for a Spark cluster when all you need is a 30-second Python script.&lt;/strong&gt;&lt;/p&gt;


&lt;h2&gt;
  
  
  Explore more
&lt;/h2&gt;


&lt;div class="ltag__user ltag__user__id__1230121"&gt;
    &lt;a href="/luca1iu" class="ltag__user__link profile-image-link"&gt;
      &lt;div class="ltag__user__pic"&gt;
        &lt;img src="https://media2.dev.to/dynamic/image/width=150,height=150,fit=cover,gravity=auto,format=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Fuser%2Fprofile_image%2F1230121%2F2521cc84-ad7d-458c-99e5-b4d82f625a88.jpg" alt="luca1iu image"&gt;
      &lt;/div&gt;
    &lt;/a&gt;
  &lt;div class="ltag__user__content"&gt;
    &lt;h2&gt;
&lt;a class="ltag__user__link" href="/luca1iu"&gt;Jin&lt;/a&gt;Follow
&lt;/h2&gt;
    &lt;div class="ltag__user__summary"&gt;
      &lt;a class="ltag__user__link" href="/luca1iu"&gt;Hello there! 👋 I'm Jin, a Business Intelligence Developer with a passion for all things data. Proficient in Python, SQL, Power BI, Tableau&lt;/a&gt;
    &lt;/div&gt;
  &lt;/div&gt;
&lt;/div&gt;


&lt;p&gt;Thank you for taking the time to explore data-related insights with me. I appreciate your engagement.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://www.linkedin.com/in/lucaliu-data" class="crayons-btn crayons-btn--primary" rel="noopener noreferrer"&gt;Connect with me on LinkedIn&lt;/a&gt;
&lt;/p&gt;

&lt;p&gt;&lt;a href="https://twitter.com/Luca_DataTeam" class="crayons-btn crayons-btn--primary" rel="noopener noreferrer"&gt;Connect with me on X&lt;/a&gt;
&lt;/p&gt;

</description>
      <category>azure</category>
      <category>dataanalyst</category>
      <category>functions</category>
      <category>dataengineering</category>
    </item>
    <item>
      <title>Data Analyst: Does Your Work Actually Matter?</title>
      <dc:creator>Jin</dc:creator>
      <pubDate>Wed, 06 May 2026 09:22:37 +0000</pubDate>
      <link>https://dev.to/luca1iu/data-analyst-does-your-work-actually-matter-3in2</link>
      <guid>https://dev.to/luca1iu/data-analyst-does-your-work-actually-matter-3in2</guid>
      <description>&lt;h1&gt;
  
  
  Introduction
&lt;/h1&gt;

&lt;p&gt;I recently saw a question on Reddit that stopped me in my tracks: "Do you feel your work in data analysis is valuable to the organization you work for?"&lt;/p&gt;

&lt;p&gt;It is the question that haunts every data analyst.&lt;/p&gt;

&lt;p&gt;We spend hours cleaning data and building complex dashboards. We send them out into the void. And then... silence. We wonder: Is anyone actually reading this? Does this dashboard change anything?&lt;/p&gt;

&lt;p&gt;If you are just answering ad-hoc requests, the answer is often "no."&lt;/p&gt;

&lt;h1&gt;
  
  
  The Trap of "Saving Time"
&lt;/h1&gt;

&lt;p&gt;Many analysts get stuck in the "automation trap." A colleague from another department asks you to automate their manual workflow. You do it. They are happy because they save two hours a week.&lt;/p&gt;

&lt;p&gt;You feel useful. But does the company see the value?&lt;/p&gt;

&lt;p&gt;Often, they don't. From a management perspective, that colleague’s salary is already paid. Unless that saved time is directly used to generate new revenue, your automation didn't change the company's bottom line. You just made someone's life easier.&lt;/p&gt;

&lt;p&gt;That is nice, but it isn't necessarily &lt;em&gt;valuable&lt;/em&gt; in a way leaders notice.&lt;/p&gt;

&lt;h1&gt;
  
  
  The Shift: Stop Doing Projects, Start Building Products
&lt;/h1&gt;

&lt;p&gt;If you want your work to matter, you need to stop acting like an IT support desk and start acting like a Product Owner.&lt;/p&gt;

&lt;p&gt;What is the difference?&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;A Data Project&lt;/strong&gt; has a start and an end date. It is usually a one-time request. The goal is "delivery." Once you hand over the dashboard or report, you are done. It quickly becomes outdated.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;A Data Product&lt;/strong&gt; is a living tool. It doesn't just report the past; it helps shape future decisions. It evolves. Its goal is not "delivery," but measurable "business impact" (like saving money or reducing risk).&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;h1&gt;
  
  
  Real-World Example: The SpendCube
&lt;/h1&gt;

&lt;p&gt;Let’s look at a real example from my work with a purchasing department.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;The "Project" Approach:&lt;/strong&gt; &lt;br&gt;
The department asks for a report on last month's spending. I pull the data, send an Excel file, and close the ticket. &lt;br&gt;
&lt;em&gt;Result:&lt;/em&gt; They look at what happened. Nothing changes. The value is low.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;The "Product" Approach (The SpendCube Dashboard):&lt;/strong&gt; &lt;br&gt;
I build a live dashboard that doesn't just show &lt;em&gt;what&lt;/em&gt; was spent, but actively highlights &lt;em&gt;where&lt;/em&gt; we are overspending against budget in real-time. It identifies specific suppliers where we could negotiate better contracts tomorrow. &lt;br&gt;
&lt;em&gt;Result:&lt;/em&gt; The dashboard isn't just a report; it is a tool they use to actively save the company money. It contributes directly to the P&amp;amp;L (Profit and Loss).&lt;/p&gt;
&lt;h1&gt;
  
  
  How to Make Your Work Valuable
&lt;/h1&gt;

&lt;p&gt;If you are tired of wondering if your work matters, change your approach.&lt;/p&gt;

&lt;p&gt;Don't just accept tasks. When someone asks for a dashboard, ask them: "What decision will you make with this data?" If they can't answer, the dashboard probably isn't necessary.&lt;/p&gt;

&lt;p&gt;Move away from automating tasks and start building data products that solve real business problems. When your work directly helps the company save money or make money, you never have to ask if you are valuable. You already know the answer.&lt;/p&gt;


&lt;h2&gt;
  
  
  Explore more
&lt;/h2&gt;


&lt;div class="ltag__user ltag__user__id__1230121"&gt;
    &lt;a href="/luca1iu" class="ltag__user__link profile-image-link"&gt;
      &lt;div class="ltag__user__pic"&gt;
        &lt;img src="https://media2.dev.to/dynamic/image/width=150,height=150,fit=cover,gravity=auto,format=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Fuser%2Fprofile_image%2F1230121%2F2521cc84-ad7d-458c-99e5-b4d82f625a88.jpg" alt="luca1iu image"&gt;
      &lt;/div&gt;
    &lt;/a&gt;
  &lt;div class="ltag__user__content"&gt;
    &lt;h2&gt;
&lt;a class="ltag__user__link" href="/luca1iu"&gt;Jin&lt;/a&gt;Follow
&lt;/h2&gt;
    &lt;div class="ltag__user__summary"&gt;
      &lt;a class="ltag__user__link" href="/luca1iu"&gt;Hello there! 👋 I'm Jin, a Business Intelligence Developer with a passion for all things data. Proficient in Python, SQL, Power BI, Tableau&lt;/a&gt;
    &lt;/div&gt;
  &lt;/div&gt;
&lt;/div&gt;


&lt;p&gt;Thank you for taking the time to explore data-related insights with me. I appreciate your engagement.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://www.linkedin.com/in/lucaliu-data" class="crayons-btn crayons-btn--primary" rel="noopener noreferrer"&gt;Connect with me on LinkedIn&lt;/a&gt;
&lt;/p&gt;

&lt;p&gt;&lt;a href="https://twitter.com/Luca_DataTeam" class="crayons-btn crayons-btn--primary" rel="noopener noreferrer"&gt;Connect with me on X&lt;/a&gt;
&lt;/p&gt;

</description>
      <category>analytics</category>
      <category>career</category>
      <category>data</category>
      <category>dataanalyst</category>
    </item>
    <item>
      <title>How to Fix "command 'claude-vscode.editor.openLast' not found" in VS Code</title>
      <dc:creator>Jin</dc:creator>
      <pubDate>Wed, 06 May 2026 08:06:22 +0000</pubDate>
      <link>https://dev.to/luca1iu/how-to-fix-command-claude-vscodeeditoropenlast-not-found-in-vs-code-13e9</link>
      <guid>https://dev.to/luca1iu/how-to-fix-command-claude-vscodeeditoropenlast-not-found-in-vs-code-13e9</guid>
      <description>&lt;h2&gt;
  
  
  The Problem
&lt;/h2&gt;

&lt;p&gt;When trying to use the Claude Code extension in VS Code, you might run into this error preventing it from opening (2.1.129):&lt;/p&gt;

&lt;p&gt;&lt;code&gt;command 'claude-vscode.editor.openLast' not found&lt;/code&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  The Solution
&lt;/h2&gt;

&lt;p&gt;The fix is simple: you need to downgrade the extension to a specific stable version (2.1.128).&lt;/p&gt;

&lt;p&gt;Here are the exact steps:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;&lt;p&gt;Uninstall your current Claude VS Code extension.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Click the Gear (Settings) icon on the Claude extension page in VS Code.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Select "Install Another Version..." from the dropdown menu.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Choose version 2.1.128 from the list.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Reload VS Code.&lt;/p&gt;&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;That's it! The error should be gone and Claude will work properly again.&lt;/p&gt;

</description>
      <category>ai</category>
      <category>vscode</category>
      <category>claude</category>
    </item>
    <item>
      <title>How to Store JSON and XML in SQL Databases</title>
      <dc:creator>Jin</dc:creator>
      <pubDate>Fri, 13 Mar 2026 15:37:17 +0000</pubDate>
      <link>https://dev.to/luca1iu/how-to-store-json-and-xml-in-sql-databases-491m</link>
      <guid>https://dev.to/luca1iu/how-to-store-json-and-xml-in-sql-databases-491m</guid>
      <description>&lt;h2&gt;
  
  
  Introduction
&lt;/h2&gt;

&lt;p&gt;In the era of big data and diverse data formats, the ability to store and query semi-structured data like JSON (JavaScript Object Notation) and XML (eXtensible Markup Language) in SQL databases has become increasingly important. This article explores how to effectively store and manage JSON and XML data in SQL databases, along with the pros and cons of each approach.&lt;/p&gt;

&lt;h2&gt;
  
  
  Understanding JSON and XML
&lt;/h2&gt;

&lt;h4&gt;
  
  
  JSON
&lt;/h4&gt;

&lt;p&gt;JSON is a lightweight data interchange format that is easy for humans to read and write, and easy for machines to parse and generate. It is often used in web applications for data exchange between clients and servers.&lt;/p&gt;

&lt;h4&gt;
  
  
  XML
&lt;/h4&gt;

&lt;p&gt;XML is a markup language that defines rules for encoding documents in a format that is both human-readable and machine-readable. It is widely used for data representation and exchange, especially in web services.&lt;/p&gt;

&lt;h2&gt;
  
  
  Storing JSON in SQL Databases
&lt;/h2&gt;

&lt;p&gt;Many modern SQL databases, such as PostgreSQL, MySQL, and SQL Server, provide native support for JSON data types.&lt;/p&gt;

&lt;h3&gt;
  
  
  How to Store JSON
&lt;/h3&gt;

&lt;ol&gt;
&lt;li&gt;Using JSON Data Type: Some databases allow you to define a column with a JSON data type.
&lt;/li&gt;
&lt;/ol&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight sql"&gt;&lt;code&gt;   &lt;span class="k"&gt;CREATE&lt;/span&gt; &lt;span class="k"&gt;TABLE&lt;/span&gt; &lt;span class="n"&gt;Products&lt;/span&gt; &lt;span class="p"&gt;(&lt;/span&gt;
       &lt;span class="n"&gt;ProductID&lt;/span&gt; &lt;span class="nb"&gt;int&lt;/span&gt; &lt;span class="k"&gt;PRIMARY&lt;/span&gt; &lt;span class="k"&gt;KEY&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
       &lt;span class="n"&gt;ProductData&lt;/span&gt; &lt;span class="n"&gt;json&lt;/span&gt;
   &lt;span class="p"&gt;);&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;


&lt;ol&gt;
&lt;li&gt;Inserting JSON Data:
&lt;/li&gt;
&lt;/ol&gt;
&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight sql"&gt;&lt;code&gt;   &lt;span class="k"&gt;INSERT&lt;/span&gt; &lt;span class="k"&gt;INTO&lt;/span&gt; &lt;span class="n"&gt;Products&lt;/span&gt; &lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;ProductID&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;ProductData&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="k"&gt;VALUES&lt;/span&gt; &lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="mi"&gt;1&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="s1"&gt;'{"name": "Laptop", "price": 999.99}'&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;

&lt;h3&gt;
  
  
  Querying JSON Data
&lt;/h3&gt;

&lt;p&gt;You can use built-in functions to query JSON data.&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="n"&gt;ProductData&lt;/span&gt;&lt;span class="o"&gt;-&amp;gt;&amp;gt;&lt;/span&gt;&lt;span class="s1"&gt;'name'&lt;/span&gt; &lt;span class="k"&gt;AS&lt;/span&gt; &lt;span class="n"&gt;ProductName&lt;/span&gt; &lt;span class="k"&gt;FROM&lt;/span&gt; &lt;span class="n"&gt;Products&lt;/span&gt; &lt;span class="k"&gt;WHERE&lt;/span&gt; &lt;span class="n"&gt;ProductID&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="mi"&gt;1&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;

&lt;h2&gt;
  
  
  Storing XML in SQL Databases
&lt;/h2&gt;

&lt;p&gt;SQL databases also support XML data types, allowing you to store and query XML documents.&lt;/p&gt;
&lt;h4&gt;
  
  
  How to Store XML
&lt;/h4&gt;

&lt;ol&gt;
&lt;li&gt;Using XML Data Type: Define a column with an XML data type.
&lt;/li&gt;
&lt;/ol&gt;
&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight sql"&gt;&lt;code&gt;   &lt;span class="k"&gt;CREATE&lt;/span&gt; &lt;span class="k"&gt;TABLE&lt;/span&gt; &lt;span class="n"&gt;Orders&lt;/span&gt; &lt;span class="p"&gt;(&lt;/span&gt;
       &lt;span class="n"&gt;OrderID&lt;/span&gt; &lt;span class="nb"&gt;int&lt;/span&gt; &lt;span class="k"&gt;PRIMARY&lt;/span&gt; &lt;span class="k"&gt;KEY&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
       &lt;span class="n"&gt;OrderDetails&lt;/span&gt; &lt;span class="n"&gt;xml&lt;/span&gt;
   &lt;span class="p"&gt;);&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;


&lt;ol&gt;
&lt;li&gt;Inserting XML Data:
&lt;/li&gt;
&lt;/ol&gt;
&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight sql"&gt;&lt;code&gt;   &lt;span class="k"&gt;INSERT&lt;/span&gt; &lt;span class="k"&gt;INTO&lt;/span&gt; &lt;span class="n"&gt;Orders&lt;/span&gt; &lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;OrderID&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;OrderDetails&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="k"&gt;VALUES&lt;/span&gt; &lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="mi"&gt;1&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="s1"&gt;'&amp;lt;order&amp;gt;&amp;lt;item&amp;gt;Book&amp;lt;/item&amp;gt;&amp;lt;quantity&amp;gt;2&amp;lt;/quantity&amp;gt;&amp;lt;/order&amp;gt;'&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;

&lt;h4&gt;
  
  
  Querying XML Data
&lt;/h4&gt;

&lt;p&gt;You can use XPath and XQuery to extract data from XML columns.&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="n"&gt;OrderDetails&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="s1"&gt;'(/order/item)[1]'&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="s1"&gt;'varchar(100)'&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;ItemName&lt;/span&gt; &lt;span class="k"&gt;FROM&lt;/span&gt; &lt;span class="n"&gt;Orders&lt;/span&gt; &lt;span class="k"&gt;WHERE&lt;/span&gt; &lt;span class="n"&gt;OrderID&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="mi"&gt;1&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;

&lt;h2&gt;
  
  
  Pros and Cons of Storing JSON and XML
&lt;/h2&gt;
&lt;h4&gt;
  
  
  Pros
&lt;/h4&gt;

&lt;ul&gt;
&lt;li&gt;Flexibility: Both JSON and XML allow for flexible data structures, making it easy to store complex data.&lt;/li&gt;
&lt;li&gt;Interoperability: They are widely used formats, making it easier to integrate with other systems and APIs.&lt;/li&gt;
&lt;li&gt;Schema-less: You can store data without a predefined schema, which is useful for evolving data models.&lt;/li&gt;
&lt;/ul&gt;
&lt;h4&gt;
  
  
  Cons
&lt;/h4&gt;

&lt;ul&gt;
&lt;li&gt;Performance: Querying semi-structured data can be slower than querying structured data, especially for large datasets.&lt;/li&gt;
&lt;li&gt;Complexity: Managing and querying JSON and XML data can add complexity to your database operations.&lt;/li&gt;
&lt;li&gt;Storage Overhead: JSON and XML formats can consume more storage space compared to traditional relational data.&lt;/li&gt;
&lt;/ul&gt;
&lt;h2&gt;
  
  
  Conclusion
&lt;/h2&gt;

&lt;p&gt;Storing JSON and XML in SQL databases provides a powerful way to handle semi-structured data. By leveraging the native support for these formats in modern SQL databases, you can efficiently store, query, and manage complex data structures. Understanding the advantages and limitations of each format will help you make informed decisions about how to best utilize them in your applications.&lt;/p&gt;


&lt;h2&gt;
  
  
  Explore more
&lt;/h2&gt;


&lt;div class="ltag__user ltag__user__id__1230121"&gt;
    &lt;a href="/luca1iu" class="ltag__user__link profile-image-link"&gt;
      &lt;div class="ltag__user__pic"&gt;
        &lt;img src="https://media2.dev.to/dynamic/image/width=150,height=150,fit=cover,gravity=auto,format=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Fuser%2Fprofile_image%2F1230121%2F2521cc84-ad7d-458c-99e5-b4d82f625a88.jpg" alt="luca1iu image"&gt;
      &lt;/div&gt;
    &lt;/a&gt;
  &lt;div class="ltag__user__content"&gt;
    &lt;h2&gt;
&lt;a class="ltag__user__link" href="/luca1iu"&gt;Jin&lt;/a&gt;Follow
&lt;/h2&gt;
    &lt;div class="ltag__user__summary"&gt;
      &lt;a class="ltag__user__link" href="/luca1iu"&gt;Hello there! 👋 I'm Jin, a Business Intelligence Developer with a passion for all things data. Proficient in Python, SQL, Power BI, Tableau&lt;/a&gt;
    &lt;/div&gt;
  &lt;/div&gt;
&lt;/div&gt;



&lt;p&gt;Thank you for taking the time to explore data-related insights with me. I appreciate your engagement.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://www.linkedin.com/in/lucaliu-data" class="crayons-btn crayons-btn--primary" rel="noopener noreferrer"&gt;Connect with me on LinkedIn&lt;/a&gt;
&lt;/p&gt;

&lt;p&gt;&lt;a href="https://twitter.com/Luca_DataTeam" class="crayons-btn crayons-btn--primary" rel="noopener noreferrer"&gt;Connect with me on X&lt;/a&gt;
&lt;/p&gt;

</description>
      <category>sql</category>
      <category>database</category>
      <category>tutorial</category>
      <category>data</category>
    </item>
    <item>
      <title>Fixing Azure SQL Connection Errors in Azure Scheduled Python Job</title>
      <dc:creator>Jin</dc:creator>
      <pubDate>Fri, 27 Feb 2026 13:37:00 +0000</pubDate>
      <link>https://dev.to/luca1iu/fixing-azure-sql-connection-errors-in-azure-scheduled-python-job-3ldk</link>
      <guid>https://dev.to/luca1iu/fixing-azure-sql-connection-errors-in-azure-scheduled-python-job-3ldk</guid>
      <description>&lt;p&gt;As a Data Analyst, I recently faced a frustrating issue while automating a daily data processing task in Azure.&lt;/p&gt;

&lt;p&gt;The goal was simple: run a scheduled job every morning to process data and sync it to an Azure SQL Database. When I ran the code manually, it worked perfectly. But when the scheduled job (via Azure Functions or Synapse) triggered at 6:00 AM, it crashed immediately.&lt;/p&gt;

&lt;p&gt;Here is the solution to fixing the "Database not available" error without increasing your Azure bill.&lt;/p&gt;

&lt;h1&gt;
  
  
  The Problem
&lt;/h1&gt;

&lt;p&gt;The job failed consistently with &lt;strong&gt;Error 40613&lt;/strong&gt;:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;(pyodbc.Error) ('HY000', "[HY000] [Microsoft][ODBC Driver 18 for SQL Server][SQL Server]Database 'xxxxxxx' on server 'xxxxxxxxxxxxxxxxxx' is not currently available. Please retry the connection later. If the problem persists, contact customer support, and provide them the session tracing ID of '{...}'. (40613) (SQLDriverConnect)") (Background on this error at: https://sqlalche.me/e/20/dbapi)
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;

&lt;h2&gt;
  
  
  Why this happens
&lt;/h2&gt;

&lt;p&gt;I am using the &lt;strong&gt;Azure SQL Database Serverless&lt;/strong&gt; tier. To save costs, this tier features &lt;strong&gt;Auto-pause&lt;/strong&gt;. If no one uses the database for a set period (e.g., 1 hour), Azure puts it to sleep.&lt;/p&gt;

&lt;p&gt;When my scheduled job runs in the morning, the database is cold. It takes approximately &lt;strong&gt;60 to 90 seconds&lt;/strong&gt; for Azure to spin the compute back up. The default Python connection string gives up before the database is ready.&lt;/p&gt;
&lt;h1&gt;
  
  
  The Expensive Fix (Don't do this)
&lt;/h1&gt;

&lt;p&gt;My first instinct was to disable Auto-pause.&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;Go to &lt;strong&gt;Azure Portal&lt;/strong&gt; &amp;gt; &lt;strong&gt;SQL Database&lt;/strong&gt;.&lt;/li&gt;
&lt;li&gt;Click &lt;strong&gt;Compute + storage&lt;/strong&gt;.
&lt;/li&gt;
&lt;li&gt;Uncheck &lt;strong&gt;Enable auto-pause&lt;/strong&gt;
&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;&lt;strong&gt;The result:&lt;/strong&gt; The error stopped, but my costs tripled. I was paying for compute 24/7 for a job that only runs for 10 minutes a day. This is not efficient.&lt;/p&gt;
&lt;h1&gt;
  
  
  The Smart Fix: Intelligent Retry Logic
&lt;/h1&gt;

&lt;p&gt;Instead of keeping the server running all night, we should write code that is patient enough to wait for the server to wake up.&lt;/p&gt;

&lt;p&gt;I wrote a custom wrapper for the SQLAlchemy engine that handles the specific behavior of Azure Serverless cold starts.&lt;/p&gt;
&lt;h3&gt;
  
  
  The Code
&lt;/h3&gt;

&lt;p&gt;Here is the robust connection function. It attempts to connect, and if it detects the database is sleeping, it waits and retries until the server is back online.&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;import&lt;/span&gt; &lt;span class="n"&gt;time&lt;/span&gt;
&lt;span class="kn"&gt;from&lt;/span&gt; &lt;span class="n"&gt;sqlalchemy&lt;/span&gt; &lt;span class="kn"&gt;import&lt;/span&gt; &lt;span class="n"&gt;create_engine&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;text&lt;/span&gt;
&lt;span class="kn"&gt;from&lt;/span&gt; &lt;span class="n"&gt;sqlalchemy.exc&lt;/span&gt; &lt;span class="kn"&gt;import&lt;/span&gt; &lt;span class="n"&gt;OperationalError&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;InterfaceError&lt;/span&gt;

&lt;span class="k"&gt;def&lt;/span&gt; &lt;span class="nf"&gt;connect_sql_engine&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;max_retries&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="mi"&gt;10&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;delay_seconds&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="mi"&gt;30&lt;/span&gt;&lt;span class="p"&gt;):&lt;/span&gt;
    &lt;span class="sh"&gt;"""&lt;/span&gt;&lt;span class="s"&gt;
    Attempts to connect to the database. 
    If the database is in serverless pause state, it retries until it wakes up.

    max_retries: Default 10. Covers ~5 minutes of startup time.
    delay_seconds: Default 30s. Wait time between attempts.
    &lt;/span&gt;&lt;span class="sh"&gt;"""&lt;/span&gt;

    &lt;span class="c1"&gt;# Replace with your credentials or use Environment Variables (Recommended)
&lt;/span&gt;    &lt;span class="n"&gt;server&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="sh"&gt;'&lt;/span&gt;&lt;span class="s"&gt;your-server.database.windows.net&lt;/span&gt;&lt;span class="sh"&gt;'&lt;/span&gt;
    &lt;span class="n"&gt;database&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="sh"&gt;'&lt;/span&gt;&lt;span class="s"&gt;your-database&lt;/span&gt;&lt;span class="sh"&gt;'&lt;/span&gt;
    &lt;span class="n"&gt;username&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="sh"&gt;'&lt;/span&gt;&lt;span class="s"&gt;your-username&lt;/span&gt;&lt;span class="sh"&gt;'&lt;/span&gt;
    &lt;span class="n"&gt;password&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="sh"&gt;'&lt;/span&gt;&lt;span class="s"&gt;your-password&lt;/span&gt;&lt;span class="sh"&gt;'&lt;/span&gt; 

    &lt;span class="c1"&gt;# LoginTimeout=30 gives the driver time to negotiate the handshake
&lt;/span&gt;    &lt;span class="n"&gt;connection_string&lt;/span&gt; &lt;span class="o"&gt;=&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;mssql+pyodbc://&lt;/span&gt;&lt;span class="si"&gt;{&lt;/span&gt;&lt;span class="n"&gt;username&lt;/span&gt;&lt;span class="si"&gt;}&lt;/span&gt;&lt;span class="s"&gt;:&lt;/span&gt;&lt;span class="si"&gt;{&lt;/span&gt;&lt;span class="n"&gt;password&lt;/span&gt;&lt;span class="si"&gt;}&lt;/span&gt;&lt;span class="s"&gt;@&lt;/span&gt;&lt;span class="si"&gt;{&lt;/span&gt;&lt;span class="n"&gt;server&lt;/span&gt;&lt;span class="si"&gt;}&lt;/span&gt;&lt;span class="s"&gt;/&lt;/span&gt;&lt;span class="si"&gt;{&lt;/span&gt;&lt;span class="n"&gt;database&lt;/span&gt;&lt;span class="si"&gt;}&lt;/span&gt;&lt;span class="sh"&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;?driver=ODBC+Driver+18+for+SQL+Server&amp;amp;LoginTimeout=30&lt;/span&gt;&lt;span class="sh"&gt;'&lt;/span&gt;
    &lt;span class="p"&gt;)&lt;/span&gt;

    &lt;span class="c1"&gt;# Create the engine with connection pooling enabled
&lt;/span&gt;    &lt;span class="n"&gt;engine&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nf"&gt;create_engine&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;
        &lt;span class="n"&gt;connection_string&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
        &lt;span class="n"&gt;fast_executemany&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="bp"&gt;True&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="c1"&gt;# Optimized for bulk inserts
&lt;/span&gt;        &lt;span class="n"&gt;pool_pre_ping&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="bp"&gt;True&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;    &lt;span class="c1"&gt;# Checks connection health before usage
&lt;/span&gt;        &lt;span class="n"&gt;pool_recycle&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="mi"&gt;1800&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;Attempting to connect to &lt;/span&gt;&lt;span class="si"&gt;{&lt;/span&gt;&lt;span class="n"&gt;database&lt;/span&gt;&lt;span class="si"&gt;}&lt;/span&gt;&lt;span class="s"&gt;...&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;attempt&lt;/span&gt; &lt;span class="ow"&gt;in&lt;/span&gt; &lt;span class="nf"&gt;range&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="mi"&gt;1&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;max_retries&lt;/span&gt; &lt;span class="o"&gt;+&lt;/span&gt; &lt;span class="mi"&gt;1&lt;/span&gt;&lt;span class="p"&gt;):&lt;/span&gt;
        &lt;span class="k"&gt;try&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;
            &lt;span class="c1"&gt;# Try to execute a simple query to wake the DB
&lt;/span&gt;            &lt;span class="k"&gt;with&lt;/span&gt; &lt;span class="n"&gt;engine&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;connect&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;conn&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;
                &lt;span class="n"&gt;conn&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;execute&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nf"&gt;text&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;SELECT 1&lt;/span&gt;&lt;span class="sh"&gt;"&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;&amp;gt;&amp;gt;&amp;gt; Success: Database is connected and awake!&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
            &lt;span class="k"&gt;return&lt;/span&gt; &lt;span class="n"&gt;engine&lt;/span&gt;

        &lt;span class="nf"&gt;except &lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;OperationalError&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;InterfaceError&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;e&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;Attempt &lt;/span&gt;&lt;span class="si"&gt;{&lt;/span&gt;&lt;span class="n"&gt;attempt&lt;/span&gt;&lt;span class="si"&gt;}&lt;/span&gt;&lt;span class="s"&gt;/&lt;/span&gt;&lt;span class="si"&gt;{&lt;/span&gt;&lt;span class="n"&gt;max_retries&lt;/span&gt;&lt;span class="si"&gt;}&lt;/span&gt;&lt;span class="s"&gt; failed. Database might be auto-paused.&lt;/span&gt;&lt;span class="sh"&gt;"&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;Error details: &lt;/span&gt;&lt;span class="si"&gt;{&lt;/span&gt;&lt;span class="n"&gt;e&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;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;Waiting &lt;/span&gt;&lt;span class="si"&gt;{&lt;/span&gt;&lt;span class="n"&gt;delay_seconds&lt;/span&gt;&lt;span class="si"&gt;}&lt;/span&gt;&lt;span class="s"&gt; seconds for wake-up...&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
            &lt;span class="n"&gt;time&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;sleep&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;delay_seconds&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;

    &lt;span class="c1"&gt;# If we reach here, the database is genuinely down or credentials are wrong
&lt;/span&gt;    &lt;span class="k"&gt;raise&lt;/span&gt; &lt;span class="nc"&gt;Exception&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;&amp;gt;&amp;gt;&amp;gt; Failed to wake up the database after multiple attempts.&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;
  
  
  How it works
&lt;/h2&gt;

&lt;ol&gt;
&lt;li&gt;
&lt;strong&gt;The Loop:&lt;/strong&gt; It tries to run &lt;code&gt;SELECT 1&lt;/code&gt;. This is a lightweight query that forces Azure to trigger the resume process.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;The Trap:&lt;/strong&gt; If it catches an &lt;code&gt;OperationalError&lt;/code&gt; (which covers the 40613 code), it pauses the script for 30 seconds using &lt;code&gt;time.sleep()&lt;/code&gt;.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;The Success:&lt;/strong&gt; Once Azure allocates the compute (usually after attempt 2 or 3), the connection succeeds, and the function returns the active &lt;code&gt;engine&lt;/code&gt; object for your pipeline to use.&lt;/li&gt;
&lt;/ol&gt;
&lt;h1&gt;
  
  
  Summary
&lt;/h1&gt;

&lt;p&gt;Don't change your infrastructure to fit your code; change your code to fit the infrastructure. By handling the "cold start" in Python, you keep the cost benefits of Serverless architecture while maintaining the reliability of a Production environment.&lt;/p&gt;

&lt;p&gt;Happy coding!&lt;/p&gt;


&lt;h2&gt;
  
  
  Explore more
&lt;/h2&gt;


&lt;div class="ltag__user ltag__user__id__1230121"&gt;
    &lt;a href="/luca1iu" class="ltag__user__link profile-image-link"&gt;
      &lt;div class="ltag__user__pic"&gt;
        &lt;img src="https://media2.dev.to/dynamic/image/width=150,height=150,fit=cover,gravity=auto,format=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Fuser%2Fprofile_image%2F1230121%2F2521cc84-ad7d-458c-99e5-b4d82f625a88.jpg" alt="luca1iu image"&gt;
      &lt;/div&gt;
    &lt;/a&gt;
  &lt;div class="ltag__user__content"&gt;
    &lt;h2&gt;
&lt;a class="ltag__user__link" href="/luca1iu"&gt;Jin&lt;/a&gt;Follow
&lt;/h2&gt;
    &lt;div class="ltag__user__summary"&gt;
      &lt;a class="ltag__user__link" href="/luca1iu"&gt;Hello there! 👋 I'm Jin, a Business Intelligence Developer with a passion for all things data. Proficient in Python, SQL, Power BI, Tableau&lt;/a&gt;
    &lt;/div&gt;
  &lt;/div&gt;
&lt;/div&gt;



&lt;p&gt;Thank you for taking the time to explore data-related insights with me. I appreciate your engagement.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://www.linkedin.com/in/lucaliu-data" class="crayons-btn crayons-btn--primary" rel="noopener noreferrer"&gt;🚀 Connect with me on LinkedIn&lt;/a&gt;
&lt;/p&gt;

&lt;p&gt;&lt;a href="https://twitter.com/Luca_DataTeam" class="crayons-btn crayons-btn--primary" rel="noopener noreferrer"&gt;🎃 Connect with me on X&lt;/a&gt;
&lt;/p&gt;

</description>
      <category>azure</category>
      <category>database</category>
      <category>automation</category>
      <category>python</category>
    </item>
    <item>
      <title>How to Install Python Package in Azure Synapse for Apache Spark pools</title>
      <dc:creator>Jin</dc:creator>
      <pubDate>Tue, 06 Jan 2026 21:58:00 +0000</pubDate>
      <link>https://dev.to/luca1iu/how-to-install-python-package-in-azure-synapse-for-apache-spark-pools-4pjj</link>
      <guid>https://dev.to/luca1iu/how-to-install-python-package-in-azure-synapse-for-apache-spark-pools-4pjj</guid>
      <description>&lt;h2&gt;
  
  
  Efficiently Installing Python Packages in Azure Synapse Analytics
&lt;/h2&gt;

&lt;p&gt;When working in Azure Synapse notebooks, you can use the %pip command (e.g., %pip install pandas) in a code cell to install packages. However, this method is temporary. The package is only installed for the current notebook session and must be re-installed every time the session starts.&lt;/p&gt;

&lt;p&gt;This repetition can lead to significant delays in notebook execution and is inefficient for frequently run jobs.&lt;/p&gt;

&lt;p&gt;A more permanent and efficient solution is to install packages directly onto the Apache Spark pool. This approach ensures the libraries are pre-installed and automatically available in every session attached to that pool.&lt;/p&gt;

&lt;h2&gt;
  
  
  How to Install Packages at the Spark Pool Level
&lt;/h2&gt;

&lt;p&gt;This method involves uploading a requirements.txt file that specifies the packages and versions you need.&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;Go to your Azure Synapse workspace in the Azure portal.&lt;/li&gt;
&lt;li&gt;Navigate to the "Manage" section on the left-hand side.&lt;/li&gt;
&lt;li&gt;Select "Apache Spark pools" under the "Analytics pools" section.&lt;/li&gt;
&lt;li&gt;Choose the Spark pool where you want to install the package.&lt;/li&gt;
&lt;li&gt;move your mouth to the three dots on the right side of the Spark pool and click on "Packages".&lt;/li&gt;
&lt;li&gt;upload &lt;code&gt;requirements.txt&lt;/code&gt; file which contains the list of packages you want to install. &lt;/li&gt;
&lt;li&gt;Click Apply to save the changes.&lt;/li&gt;
&lt;/ol&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%2Futjmsqs39tv57h4az884.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%2Futjmsqs39tv57h4az884.png" width="800" height="499"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;The Spark pool will update and automatically install the specified packages. This may take a few minutes. Once complete, all notebooks attached to this pool will have access to these libraries by default.&lt;/p&gt;

&lt;h2&gt;
  
  
  How to generate &lt;code&gt;requirements.txt&lt;/code&gt; file
&lt;/h2&gt;

&lt;p&gt;The requirements.txt file is a simple text file that lists the packages to be installed. You can easily generate this file from your local Python environment.&lt;/p&gt;

&lt;p&gt;Open your terminal or command prompt and run the following command:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;pip freeze &lt;span class="o"&gt;&amp;gt;&lt;/span&gt; requirements.txt
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;


&lt;p&gt;This command captures all packages and their exact versions from your current environment and saves them into a file named requirements.txt. Uploading this file ensures that the exact same package versions are installed in your Synapse environment, providing consistency and preventing dependency conflicts.&lt;/p&gt;


&lt;h2&gt;
  
  
  Explore more
&lt;/h2&gt;


&lt;div class="ltag__user ltag__user__id__1230121"&gt;
    &lt;a href="/luca1iu" class="ltag__user__link profile-image-link"&gt;
      &lt;div class="ltag__user__pic"&gt;
        &lt;img src="https://media2.dev.to/dynamic/image/width=150,height=150,fit=cover,gravity=auto,format=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Fuser%2Fprofile_image%2F1230121%2F2521cc84-ad7d-458c-99e5-b4d82f625a88.jpg" alt="luca1iu image"&gt;
      &lt;/div&gt;
    &lt;/a&gt;
  &lt;div class="ltag__user__content"&gt;
    &lt;h2&gt;
&lt;a class="ltag__user__link" href="/luca1iu"&gt;Jin&lt;/a&gt;Follow
&lt;/h2&gt;
    &lt;div class="ltag__user__summary"&gt;
      &lt;a class="ltag__user__link" href="/luca1iu"&gt;Hello there! 👋 I'm Jin, a Business Intelligence Developer with a passion for all things data. Proficient in Python, SQL, Power BI, Tableau&lt;/a&gt;
    &lt;/div&gt;
  &lt;/div&gt;
&lt;/div&gt;



&lt;p&gt;Thank you for taking the time to explore data-related insights with me. I appreciate your engagement.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://www.linkedin.com/in/lucaliu-data" class="crayons-btn crayons-btn--primary" rel="noopener noreferrer"&gt;🚀 Connect with me on LinkedIn&lt;/a&gt;
&lt;/p&gt;

&lt;p&gt;&lt;a href="https://twitter.com/Luca_DataTeam" class="crayons-btn crayons-btn--primary" rel="noopener noreferrer"&gt;🎃 Connect with me on X&lt;/a&gt;
&lt;/p&gt;

</description>
      <category>azure</category>
      <category>tutorial</category>
      <category>python</category>
      <category>data</category>
    </item>
    <item>
      <title>How to Calculate a Dynamic Truncated Mean in Power BI Using DAX</title>
      <dc:creator>Jin</dc:creator>
      <pubDate>Tue, 06 Jan 2026 21:57:00 +0000</pubDate>
      <link>https://dev.to/luca1iu/how-to-calculate-a-dynamic-truncated-mean-in-power-bi-using-dax-gij</link>
      <guid>https://dev.to/luca1iu/how-to-calculate-a-dynamic-truncated-mean-in-power-bi-using-dax-gij</guid>
      <description>&lt;h2&gt;
  
  
  Why You Need a Truncated Mean
&lt;/h2&gt;

&lt;p&gt;In data analysis, the standard AVERAGE function is a workhorse, but it has a significant weakness: it is highly susceptible to distortion from outliers. A single extreme value, whether high or low, can skew the entire result, misrepresenting the data's true central tendency.&lt;/p&gt;

&lt;p&gt;This is where the truncated mean becomes essential. It provides a more robust measure of average by excluding a specified percentage of the smallest and largest values from the calculation.&lt;/p&gt;

&lt;p&gt;While modern Power BI models have a built-in TRIMMEAN function, this function is often unavailable when using a Live Connection to an older Analysis Services (SSAS) model. This article provides a robust, manual DAX pattern that replicates this functionality and remains fully dynamic, responding to all slicers and filters in your report.&lt;/p&gt;

&lt;h2&gt;
  
  
  The DAX Solution for a Dynamic Truncated Mean
&lt;/h2&gt;

&lt;p&gt;This measure calculates a 20% truncated mean by removing the bottom 10% and top 10% of values before averaging the remaining 80%.&lt;/p&gt;

&lt;p&gt;You can paste this code directly into the "New Measure" formula bar.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;Trimmed Mean (20%) = 
VAR TargetTable = 'FactTable'
VAR TargetColumn = 'FactTable'[MeasureColumn]
VAR LowerPercentile = 0.10 // Defines the bottom 10% to trim
VAR UpperPercentile = 0.90 // Defines the top 10% to trim (1.0 - 0.10)

// 1. Find the value at the 10th percentile
VAR MinThreshold =
    PERCENTILEX.INC(
        FILTER( 
            TargetTable, 
            NOT( ISBLANK( TargetColumn ) ) 
        ),
        TargetColumn,
        LowerPercentile
    )

// 2. Find the value at the 90th percentile
VAR MaxThreshold =
    PERCENTILEX.INC(
        FILTER( 
            TargetTable, 
            NOT( ISBLANK( TargetColumn ) ) 
        ),
        TargetColumn,
        UpperPercentile
    )

// 3. Calculate the average, including only values between the thresholds
RETURN
CALCULATE(
    AVERAGEX(
        FILTER(
            TargetTable,
            TargetColumn &amp;gt;= MinThreshold &amp;amp;&amp;amp;
            TargetColumn &amp;lt;= MaxThreshold
        ),
        TargetColumn
    )
)
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;

&lt;h2&gt;
  
  
  Deconstructing the DAX Logic
&lt;/h2&gt;

&lt;p&gt;This formula works in three distinct steps, all of which execute within the current filter context (e.g., whatever slicers the user has selected).&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;Define Key Variables&lt;/li&gt;
&lt;li&gt;
&lt;code&gt;TargetTable&lt;/code&gt; &amp;amp; &lt;code&gt;TargetColumn&lt;/code&gt;: We assign the table and column names to variables for clean, reusable code. You must change 'FactTable'[MeasureColumn] to match your data model.&lt;/li&gt;
&lt;li&gt;
&lt;code&gt;LowerPercentile&lt;/code&gt; / &lt;code&gt;UpperPercentile&lt;/code&gt;: We define the boundaries. 0.10 and 0.90 mean we are trimming the bottom 10% and top 10%. To trim 5% from each end (a 10% total trim), you would use 0.05 and 0.95.&lt;/li&gt;
&lt;/ol&gt;
&lt;h3&gt;
  
  
  2. Find the Percentile Thresholds
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;code&gt;MinThreshold&lt;/code&gt; &amp;amp; &lt;code&gt;MaxThreshold&lt;/code&gt;: These variables store the actual values that correspond to our percentile boundaries.&lt;/li&gt;
&lt;li&gt;
&lt;code&gt;PERCENTILEX.INC&lt;/code&gt;: We use this "iterator" function because it allows us to first FILTER the table.&lt;/li&gt;
&lt;li&gt;`FILTER(..., NOT(ISBLANK(...))): This is a crucial step. We calculate the percentiles only for rows where our target column is not blank. This prevents BLANK() values from skewing the percentile calculation.&lt;/li&gt;
&lt;li&gt;The result is that &lt;code&gt;MinThreshold&lt;/code&gt; holds the value of the 10th percentile (e.g., 4.5) and &lt;code&gt;MaxThreshold&lt;/code&gt; holds the value of the 90th percentile (e.g., 88.2) for the currently visible data.&lt;/li&gt;
&lt;/ul&gt;
&lt;h3&gt;
  
  
  3. Calculate the Final Average
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;code&gt;RETURN CALCULATE(...)&lt;/code&gt;: The CALCULATE function is the key to making the measure dynamic. It ensures the entire calculation respects the filters applied by any slicers or visuals in the report.&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;code&gt;AVERAGEX(FILTER(...))&lt;/code&gt;: The core of the calculation. We use AVERAGEX to iterate over a table.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;code&gt;FILTER(...)&lt;/code&gt;: We filter our TargetTable a final time. This filter is the "trim." It keeps only the rows where the value in TargetColumn is:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Greater than or equal to&lt;/strong&gt; our MinThreshold&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;AND&lt;/strong&gt;&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Less than or equal to&lt;/strong&gt; our MaxThreshold&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;code&gt;AVERAGEX(..., TargetColumn)&lt;/code&gt;: &lt;code&gt;AVERAGEX&lt;/code&gt; then calculates the simple average of &lt;code&gt;TargetColumn&lt;/code&gt; for only the rows that passed the filter.&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;h2&gt;
  
  
  Conclusion
&lt;/h2&gt;

&lt;p&gt;By implementing this DAX pattern, you create a robust, dynamic, and outlier-resistant KPI. This measure provides a more accurate picture of your data's central tendency and will correctly re-calculate on the fly as users interact with your Power BI report.&lt;/p&gt;


&lt;h2&gt;
  
  
  Explore more
&lt;/h2&gt;


&lt;div class="ltag__user ltag__user__id__1230121"&gt;
    &lt;a href="/luca1iu" class="ltag__user__link profile-image-link"&gt;
      &lt;div class="ltag__user__pic"&gt;
        &lt;img src="https://media2.dev.to/dynamic/image/width=150,height=150,fit=cover,gravity=auto,format=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Fuser%2Fprofile_image%2F1230121%2F2521cc84-ad7d-458c-99e5-b4d82f625a88.jpg" alt="luca1iu image"&gt;
      &lt;/div&gt;
    &lt;/a&gt;
  &lt;div class="ltag__user__content"&gt;
    &lt;h2&gt;
&lt;a class="ltag__user__link" href="/luca1iu"&gt;Jin&lt;/a&gt;Follow
&lt;/h2&gt;
    &lt;div class="ltag__user__summary"&gt;
      &lt;a class="ltag__user__link" href="/luca1iu"&gt;Hello there! 👋 I'm Jin, a Business Intelligence Developer with a passion for all things data. Proficient in Python, SQL, Power BI, Tableau&lt;/a&gt;
    &lt;/div&gt;
  &lt;/div&gt;
&lt;/div&gt;



&lt;p&gt;Thank you for taking the time to explore data-related insights with me. I appreciate your engagement.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://www.linkedin.com/in/lucaliu-data" class="crayons-btn crayons-btn--primary" rel="noopener noreferrer"&gt;🚀 Connect with me on LinkedIn&lt;/a&gt;
&lt;/p&gt;

&lt;p&gt;&lt;a href="https://twitter.com/Luca_DataTeam" class="crayons-btn crayons-btn--primary" rel="noopener noreferrer"&gt;🎃 Connect with me on X&lt;/a&gt;
&lt;/p&gt;

</description>
      <category>powerbi</category>
      <category>tutorial</category>
      <category>dax</category>
      <category>data</category>
    </item>
  </channel>
</rss>
