<?xml version="1.0" encoding="UTF-8"?><rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" version="2.0" xmlns:cc="http://cyber.law.harvard.edu/rss/creativeCommonsRssModule.html">
    <channel>
        <title><![CDATA[Stories by Rajesh Dhanda on Medium]]></title>
        <description><![CDATA[Stories by Rajesh Dhanda on Medium]]></description>
        <link>https://medium.com/@rajeshkrdhanda?source=rss-627164c5226d------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/fit/c/150/150/1*xJOa9AqA-dHp0Y4bGQp9hQ.jpeg</url>
            <title>Stories by Rajesh Dhanda on Medium</title>
            <link>https://medium.com/@rajeshkrdhanda?source=rss-627164c5226d------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Sat, 05 Dec 2026 05:57:46 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@rajeshkrdhanda/feed" rel="self" type="application/rss+xml"/>
        <webMaster><![CDATA[yourfriends@medium.com]]></webMaster>
        <atom:link href="http://medium.superfeedr.com/" rel="hub"/>
        <item>
            <title><![CDATA[Upgrading Data Flow Pipeline @ CARS24]]></title>
            <link>https://medium.com/cars24-data-science-blog/upgrading-data-flow-pipeline-cars24-1b6b8aea48e?source=rss-627164c5226d------2</link>
            <guid isPermaLink="false">https://medium.com/p/1b6b8aea48e</guid>
            <category><![CDATA[mlops]]></category>
            <category><![CDATA[airflow]]></category>
            <category><![CDATA[data-engineering]]></category>
            <category><![CDATA[gcp]]></category>
            <category><![CDATA[snowflake]]></category>
            <dc:creator><![CDATA[Rajesh Dhanda]]></dc:creator>
            <pubDate>Tue, 10 Jan 2023 15:35:35 GMT</pubDate>
            <atom:updated>2023-01-11T05:34:34.613Z</atom:updated>
            <content:encoded><![CDATA[<p>This blog is a continuation of the <a href="https://medium.com/cars24-data-science-blog/optimizing-data-flow-cars24-4c0a17b797d1"><strong>primary blog</strong></a> and focuses on upgrades to optimize cost and execution time. A read through the previous blog is required to understand the context of this.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/610/1*-B8unez-6_WvOsxCZgDW2w.jpeg" /><figcaption>previous workflow</figcaption></figure><h3><strong>Paying for idle CPU</strong></h3><p>In our previous workflow, we sent requests to cloud functions through a pub-sub mechanism. The Snowflake connector within the cloud function executed the query <a href="https://docs.snowflake.com/en/user-guide/python-connector-example.html#performing-a-synchronous-query">synchronously</a>, retrieved data, and uploaded it to the GCS bucket.</p><p>However, in Snowflake, the query duration consists of compile time, Queue overload time, execution time, and more. For a <a href="https://docs.snowflake.com/en/user-guide/python-connector-example.html#performing-a-synchronous-query">synchronous</a> query submission, the Snowflake connector in the cloud function simply waits for the query to complete, resulting in GCP charges for idle CPU. Assuming an average total query duration of just 20 seconds in Snowflake, this would result in approximately 83 hours of extra charges per day for 15,000 jobs.</p><h3>Async query submission</h3><p>To avoid waiting for query completion, we can instead send <a href="https://docs.snowflake.com/en/user-guide/python-connector-example.html#performing-an-asynchronous-query"><strong>async</strong></a> queries to Snowflake. Async query submission returns a <strong>query id</strong> associated with the submitted job. This query id can later be used to check the status of the job and fetch the data. Consequently, we split our cloud function (<strong><em>Snowflake to GCS</em></strong>) into two parts :</p><blockquote><strong>Query ID generator</strong></blockquote><p><a href="https://docs.snowflake.com/en/user-guide/python-connector-example.html#performing-an-asynchronous-query">Async query submission</a>, retrieval of <a href="https://docs.snowflake.com/en/user-guide/python-connector-example.html#retrieving-the-snowflake-query-id">query id</a>, and saving into <a href="https://github.com/edgedb">EdgeDB</a>.</p><blockquote><strong>Query ID data fetcher</strong></blockquote><p>Given a query id, examine the <a href="https://docs.snowflake.com/en/user-guide/python-connector-example.html#checking-the-status-of-a-query">QueryStatus</a> and <a href="https://docs.snowflake.com/en/user-guide/python-connector-example.html#using-the-query-id-to-retrieve-the-results-of-a-query">retrieve</a> data from Snowflake and save it to the GCS bucket.</p><p><em>We require an additional dag to </em><strong><em>routinely harvest all recently submitted query ids from EdgeDB</em></strong><em> and transmit them to the </em><strong><em>Query ID data fetcher</em></strong><em> cloud function.</em></p><h3>Still paying for idle CPU</h3><p>Submitting <a href="https://docs.snowflake.com/en/user-guide/python-connector-example.html#performing-an-asynchronous-query">Asynchronous</a> Queries to Snowflake is a good idea, but it is too fast (subjective to use cases). Submitting lots of async queries with a limited number of max active warehouse instances in Snowflake can lead to an <strong>increased queue on the warehouse followed by lots of queue timeout resulting in lots of job failures</strong>. It is now time to reduce/control the query submission rate on the Snowflake, which can be accomplished by :</p><ol><li>Decrease the Maximum number of instances in Auto-scaling of cloud function. we did it to 1 but still too fast for our use case.</li><li>Control the requests submission rate to pub-sub in dag eventually leading to delays in google sheets update. ( leading to max active runs in dags resulting in abrupt requests submission rate and delay in jobs )</li><li>time.sleep(1.5) in cloud function, ~6.25 hours of idle CPU for 15k jobs.</li></ol><p>Since a minor rise in query submission rate causes many <strong>queue timeouts</strong> and a slight drop causes an increase in <strong>idle CPU time</strong>, we are once more faced with this problem. Although the cost was decreased, we still wished to do so as much as possible.</p><h3>Migrate the <strong>Query ID generator</strong></h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/734/1*5B46AlE3z_ZhWzZ_gQyFnA.png" /><figcaption>Snowflake — GCS flow</figcaption></figure><p>The <a href="https://docs.snowflake.com/en/sql-reference/sql/show-warehouses.html">SHOW WAREHOUSES</a> query provides information on the current number of queued queries in the warehouse and does not require an active warehouse to execute. To optimize the usage of resources, the strategy was to <strong>migrate the Query ID generator from a cloud function to an Airflow DAG</strong>, enabling live monitoring of queued queries in the warehouse at regular intervals. By implementing a minor modification to the Query ID generator, a queue threshold was established for each Query Submission Warehouse, allowing for the submission of queries in batches when the warehouse queue dropped below the threshold. This approach also facilitated the definition and control of query submission rates to the warehouse.</p><h3>Conclusion</h3><p>These upgrades assisted us in lowering costs by improving monitoring and control over the warehouse load. Recent <a href="https://github.com/edgedb">EdgeDB</a> updates that enabled <a href="https://github.com/edgedb/edgedb-ui">EdgeDB UI</a> also assisted us in better monitoring of jobs data.</p><p><em>Authors: </em><a href="https://www.linkedin.com/in/rajesh-dhanda/"><em>Rajesh Dhanda</em></a><em>, ML Engineer, </em><a href="https://www.linkedin.com/in/vijendra-maurya-5a574628/"><em>Vijendra Maurya</em></a><em>, Data Engineer @ CARS24, </em><a href="https://www.linkedin.com/in/swapnesh-khare-21272480/"><em>Swapnesh Khare</em></a><em>, Senior ML Engineer @ CARS24, </em><a href="https://www.linkedin.com/in/abhaykansal/"><em>Abhay Kansal</em></a><em>, Staff Data Scientist @ CARS24</em></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=1b6b8aea48e" width="1" height="1" alt=""><hr><p><a href="https://medium.com/cars24-data-science-blog/upgrading-data-flow-pipeline-cars24-1b6b8aea48e">Upgrading Data Flow Pipeline @ CARS24</a> was originally published in <a href="https://medium.com/cars24-data-science-blog">CARS24 Data Science Blog</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Node Pool Migration in GKE]]></title>
            <link>https://medium.com/@rajeshkrdhanda/node-pool-migration-in-gke-b9b550b49bed?source=rss-627164c5226d------2</link>
            <guid isPermaLink="false">https://medium.com/p/b9b550b49bed</guid>
            <category><![CDATA[istio]]></category>
            <category><![CDATA[knative]]></category>
            <category><![CDATA[gcp]]></category>
            <category><![CDATA[devops]]></category>
            <category><![CDATA[kubernetes]]></category>
            <dc:creator><![CDATA[Rajesh Dhanda]]></dc:creator>
            <pubDate>Sat, 17 Dec 2022 08:41:36 GMT</pubDate>
            <atom:updated>2022-12-17T08:53:58.926Z</atom:updated>
            <content:encoded><![CDATA[<p>This blog, which follows this <a href="https://cloud.google.com/kubernetes-engine/docs/tutorials/migrating-node-pool"><strong>tutorial</strong></a>, focuses on issues encountered during the migration of the default node pool to the custom node pool.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/522/1*ZbZ4UZzGEydF4BFSRbek1A.png" /><figcaption>Default to AMD pool migration</figcaption></figure><h3>Prerequisites</h3><p>A GKE cluster where we installed <a href="https://github.com/kserve"><strong>Kserve</strong></a> through the <a href="https://github.com/kserve/kserve/blob/v0.10.0-rc0/hack/quick_install.sh"><strong>script</strong></a> and deployed some <a href="https://kserve.github.io/website/master/get_started/first_isvc"><strong>InferenceServices</strong></a>.</p><h3>Steps to migrate</h3><ol><li><a href="https://cloud.google.com/kubernetes-engine/docs/how-to/node-pools#console">Add</a> a node pool to the cluster</li></ol><pre>gcloud container node-pools create amd-pool \<br>  --cluster=nodepool-migration-test \<br>  --machine-type=n2d-standard-4 \<br>  --enable-autoscaling --min-nodes=1 --max-nodes=3</pre><pre>kubectl get nodes<br>NAME                                                  STATUS   ROLES    AGE     VERSION<br>gke-nodepool-migration-test-default-pool-20ac9774     Ready    &lt;none&gt;   26m     v1.22.16-gke.1300<br>gke-nodepool-migration-test-amd-pool-c6ac4b0d         Ready    &lt;none&gt;   2m25s   v1.22.16-gke.1300</pre><p>2. <strong>Cordon the existing node pool:</strong> This operation marks the nodes in the existing node pool (default-pool) as <em>unschedulable</em>. Kubernetes stops scheduling new Pods to these nodes once you mark them as <em>unschedulable</em>.</p><pre>for node in $(kubectl get nodes -l cloud.google.com/gke-nodepool=default-pool -o=name); do<br>  kubectl cordon &quot;$node&quot;;<br>done<br><br>node/gke-nodepool-migration-t-default-pool-20ac9774 cordoned</pre><p>3. <strong>Drain the existing node pool:</strong> This operation evicts the workloads running on the nodes of the existing node pool (default-pool) gracefully.</p><pre>for node in $(kubectl get nodes -l cloud.google.com/gke-nodepool=default-pool -o=name); do<br>  kubectl drain --force --ignore-daemonsets --delete-emptydir-data --grace-period=30 &quot;$node&quot;;<br>done</pre><p>4. During step 3, might get some errors for some deployments like</p><pre>Cannot evict pod as it would violate the pod&#39;s disruption budget.</pre><p>5. <a href="https://kubernetes.io/docs/tasks/run-application/configure-pdb/#rounding-logic-when-specifying-percentages">PDB</a> limits the number of Pods of a replicated application that are down simultaneously from voluntary disruptions.</p><pre>kubectl get poddisruptionbudget -A<br><br>NAMESPACE         NAME                   MIN AVAILABLE   MAX UNAVAILABLE   ALLOWED DISRUPTIONS   AGE<br>istio-system      istio-ingressgateway   1               N/A               0                     31m<br>istio-system      istiod                 1               N/A               0                     32m<br>knative-serving   activator-pdb          80%             N/A               0                     30m<br>knative-serving   webhook-pdb            80%             N/A               0                     30m</pre><p>6. In PDB, Values for minAvailable or maxUnavailable can be expressed as integers or as a percentage.</p><ul><li>When you specify an integer, it represents a number of Pods. For instance, if you set minAvailable to 5, then 5 Pods must always be available, even during a disruption.</li><li>When you specify a percentage by setting the value to a string representation of a percentage (eg. &quot;80%&quot;), it represents a percentage of total Pods. For instance, if you set minAvailable to &quot;80%&quot;, then nearest integer round( &quot;80%&quot; of total Pods ) must always be available, even during a disruption.</li></ul><p>6. Check deployments status ( where migration is blocked by PDB ).</p><pre>kubectl get deployments -n istio-system<br><br>NAME                   READY   UP-TO-DATE   AVAILABLE   AGE<br>istio-ingressgateway   1/1     1            1           53m<br>istiod                 1/1     1            1           53m<br><br>kubectl get deployments -n knative-serving<br><br>NAME                    READY   UP-TO-DATE   AVAILABLE   AGE<br>activator               1/1     1            1           54m<br>webhook                 1/1     1            1           54m</pre><p>7. Scale your deployments in order to have MIN AVAILABLE specified by PDB during migration.</p><pre>kubectl scale --replicas=2 deployment/istiod -n istio-system<br>deployment.apps/istiod scaled<br><br>kubectl scale --replicas=2 deployment/istio-ingressgateway -n istio-system<br>deployment.apps/istio-ingressgateway scaled</pre><p>8. whenever a percentage is specified asMIN AVAILABLE in PDB, then during scaling either choose a number to ensure MIN AVAILABLE % availability or better reduce MIN AVAILABLE % and then scale.</p><pre>kubectl get pdb webhook-pdb -n knative-serving -o yaml &gt; knwebhookpdb.yaml<br>kubectl get pdb activator-pdb -n knative-serving -o yaml &gt; knactivator.yaml<br><br># set minAvailable: 40%  in yaml<br><br>kubectl apply -f knwebhookpdb.yaml <br>poddisruptionbudget.policy/webhook-pdb configured<br><br>kubectl apply -f knactivator.yaml   <br>poddisruptionbudget.policy/activator-pdb configured<br><br>kubectl scale --replicas=3 deployment/webhook -n knative-serving<br>deployment.apps/webhook scaled<br><br>kubectl scale --replicas=3 deployment/activator -n knative-serving<br>deployment.apps/activator scaled</pre><p>9. Repeat step 3 and pods blocked by PDB will be evicted.</p><pre>for node in $(kubectl get nodes -l cloud.google.com/gke-nodepool=default-pool -o=name); do<br>&gt;   kubectl drain --force --ignore-daemonsets --delete-emptydir-data --grace-period=30 &quot;$node&quot;;<br>&gt; done<br><br>node/gke-nodepool-migration-t-default-pool-20ac9774-07dz already cordoned<br>Warning: ignoring DaemonSet-managed Pods: kube-system/fluentbit-gke-5rpmr, kube-system/gke-metrics-agent-5ldz5, kube-system/pdcsi-node-gwpl9<br>evicting pod knative-serving/webhook-6475b644f5<br>evicting pod knative-serving/activator-7c9dbf4dcf<br>pod/activator-7c9dbf4dcf evicted<br>pod/webhook-6475b644f5 evicted<br>node/gke-nodepool-migration-t-default-pool-20ac9774 drained</pre><p>10. Scale deployments and PDB to their original values</p><pre>kubectl scale --replicas=1 deployment/istiod -n istio-system<br>deployment.apps/istiod scaled<br><br>kubectl scale --replicas=1 deployment/istio-ingressgateway -n istio-system<br>deployment.apps/istio-ingressgateway scaled<br><br># set minAvailable: 80% or original value in yaml<br><br>kubectl apply -f knwebhookpdb.yaml <br>poddisruptionbudget.policy/webhook-pdb configured<br><br>kubectl apply -f knactivator.yaml   <br>poddisruptionbudget.policy/activator-pdb configured<br><br>kubectl scale --replicas=1 deployment/webhook -n knative-serving<br>deployment.apps/webhook scaled<br><br>kubectl scale --replicas=1 deployment/activator -n knative-serving<br>deployment.apps/activator scaled</pre><p>11. Delete the default pool from the GKE console or</p><pre>gcloud container node-pools delete default-pool --cluster nodepool-migration-test</pre><h3>Conclusion</h3><p>In such scenarios where migration is blocked by PDB, either scale deployments to assure a minimum level of availability during disruption or modify the deployment’s PDB values. We can also take a look at <a href="https://cloud.google.com/anthos/clusters/docs/bare-metal/latest/troubleshooting/remove-node-issues#pod_disruption_budget_conflicts_with_the_number_of_pods_available"><strong>this</strong></a>.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=b9b550b49bed" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Optimizing Data Flow @ CARS24]]></title>
            <link>https://medium.com/cars24-data-science-blog/optimizing-data-flow-cars24-4c0a17b797d1?source=rss-627164c5226d------2</link>
            <guid isPermaLink="false">https://medium.com/p/4c0a17b797d1</guid>
            <category><![CDATA[mlops]]></category>
            <category><![CDATA[google-cloud-functions]]></category>
            <category><![CDATA[pub-sub]]></category>
            <category><![CDATA[snowflake]]></category>
            <category><![CDATA[airflow]]></category>
            <dc:creator><![CDATA[Rajesh Dhanda]]></dc:creator>
            <pubDate>Mon, 31 Oct 2022 08:14:08 GMT</pubDate>
            <atom:updated>2022-10-31T09:29:57.983Z</atom:updated>
            <content:encoded><![CDATA[<p>This blog focuses on how we built a data flow pipeline at Cars24 to optimize the data sync between Snowflake and GSheet.</p><p>Teams from different departments use Google Sheets for day-to-day analysis and require the latest data from Snowflake to be synced to their respective GSheets. There are hundreds of such sheets, running thousands of queries that run at different frequencies.</p><p>Teams provide details like Google Sheet ID, query to fetch data from Snowflake, update frequency, etc in a table. This table is maintained by the Data Engineers and the data from the table is used to update google sheets referenced using <strong>Spreadsheet_ID </strong>and<strong> Name_range</strong>.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*6XUo8kUH9_XhfuD8w9A4kw.png" /><figcaption><strong>main table</strong></figcaption></figure><h3>Previous workflow</h3><p>To update the data from Snowflake to thousands of GSheets, cron jobs were scheduled on an instance where each job runs a unique query on Snowflake, fetches the data, and updates it to the respective GSheet.</p><h4>Problems with cron jobs</h4><p>In isolation, running such queries is not an issue. But, as frequencies overlap, the system fetching the data from Snowflake can easily exhaust its resources. Increasing the system specs would only serve as a temporary solution as there is no upper bound on data or even the number of sheets. A few other issues include:</p><ol><li><strong>Alerting: </strong>Cron can’t alert you if the job <strong>fails</strong> or has <strong>never</strong> started</li><li><strong>Retries: </strong>In case of job failure, there is no option to retry the failed tasks, one would need to manually code the retry logic</li><li><strong>Logging:<em> </em></strong>Manual logging logic needs to be implemented</li></ol><p><strong>Improved Workflow</strong></p><p>We need to run these jobs in isolation so that they do not exhaust the resources, even if there are hundreds of jobs running at the same time. Additionally, we need to save the point of failure for every job. This includes the data fetched from Snowflake and the run status for a GSheet.</p><h3>Replacing cron jobs with Cloud Functions</h3><p>To implement isolation, we use <a href="https://cloud.google.com/functions">Cloud Functions</a>. Each function does a job for a specific GSheet and these can be increased as permitted by quota and Snowflake load. This also solves our problem of logging, which is now maintained through Cloud Logging.</p><p>Additionally, these cloud functions can also make decisions on blocking any job request temporarily or permanently based on the errors caught during the execution e.g. invalid snowflake query, sheet edit permission not given by the respective team etc. Not only does this reduce the load on cloud functions, but also helps us to build logic on whether to process the request or set the next processing time for a blocked sheet.</p><p><strong>Data and Status storage</strong></p><p>To avoid a re-run of a Snowflake query in case of failure or check the data which caused an upload failure, we need to save it and also log its run status. We use<a href="https://cloud.google.com/storage"> GCS</a> as the intermediate layer to store data and <a href="https://www.edgedb.com/">EdgeDB</a> to store every job status. The status of a sheet present in EdgeDB decides whether it is eligible for a run at its frequency time or not and also maintains its last failure reason.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/599/1*yD5wNuUHCSFYcwp5cHFvjw.png" /><figcaption>storing job run status into Edgedb</figcaption></figure><h3>Cloud Functions</h3><p>There are 3 cloud functions for improved workflow:</p><blockquote><strong>Snowflake to GCS</strong></blockquote><p>For each given query of a google sheet id and name range, this cloud function will fetch data from snowflake and save the data to the GCS bucket in parquet format (unique name using <strong>Spreadsheet_ID </strong>and<strong> Name range</strong>). The job run status along with other job details will be returned in the response and updated in EdgeDB.</p><blockquote><strong>GCS to Google sheet</strong></blockquote><p>After uploading the data to the GCS bucket, this cloud function will pick the data from the bucket and upload it into the specified google sheet and name range. The job run status along with other job details will be returned in the response and updated in EdgeDB.</p><blockquote><strong>EdgeDB update and Push Notifications</strong></blockquote><p>This cloud function receives responses from the above two cloud functions, updates edgedb and pushes notifications to a slack channel based on the job completion status. <strong>To reduce overhead on the slack channel, notifications are sent only for failed jobs</strong>.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/553/1*shYvc9Mrh-lnQBqB2JylyQ.png" /><figcaption>workflow with cloud functions</figcaption></figure><h3><strong>Workflow Automation</strong></h3><p>Just like cron, we need to automate our runs of cloud functions. The <strong>Frequency </strong>(containing cron run expressions) column in the main table decides when to schedule a job for a GSheet. We use <a href="https://airflow.apache.org/"><strong>Airflow</strong></a> to orchestrate these jobs. Airflow schedules execute and monitor the workflows using Directed Acyclic Graphs (DAGs) of tasks. The main advantages of using Airflow are:</p><ol><li><strong>Monitoring: </strong>Airflow provides the webserver to manage, monitor, access logs, and visualize the dags</li><li><strong>Retry: </strong>Handle errors and failures gracefully. Automatically retry when a task fails</li><li><strong>Alerts: </strong>Build a custom dag failure alert ( Slack and Emails ) and specify it as <em>on_failure_callback </em>in the dag file</li><li>Tasks can pass parameters to other downstream tasks and trigger other dags with specified execution times</li></ol><p><strong><em>There are 4 DAGs to complete our workflow:</em></strong></p><blockquote><strong>Edgedb Update</strong></blockquote><p>Update data in Edgedb from the main table.</p><blockquote><strong>Current hour schedules</strong></blockquote><p>Fetch all frequencies from edgedb for which google sheets need to be updated in the current hour. Find the corresponding execution time for fetched frequencies and create DagRun for the dag <strong><em>SNF-GCS-Requests</em></strong> in the current hour.</p><blockquote><strong>SNF-GCS-Requests</strong></blockquote><p>Triggered by <strong><em>Current hour schedules </em></strong>at a specific<strong><em> </em></strong>execution time<strong><em> </em></strong>with a specific frequency as input to dag. Dag will fetch all requests from edgedb and publish messages to Pub-Sub which eventually triggers ( <strong>Snowflake to GCS ) </strong>cloud function.</p><blockquote><strong>GCS-SHEET-Requests</strong></blockquote><p>This dag fetches all file info from the GCS bucket and publishes it as messages to Pub-Sub which eventually triggers the ( <strong>GCS to Google sheet ) </strong>cloud function.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/610/1*UCwoYdRjGa3ShWHTT1gjoQ.png" /><figcaption>Admin just has to maintain the main sheet</figcaption></figure><h3>Conclusion</h3><p>This optimization of the data flow has enabled us to run jobs with almost no downtime. The logging and monitoring of the runs help us to timely fix the issues and also inform the stakeholders of any sync delay. Through Cloud Functions, we can also control how much load we put on Snowflake and effectively monitor the run times.</p><p><em>Authors: </em><a href="https://www.linkedin.com/in/rajesh-dhanda/"><em>Rajesh Dhanda</em></a><em>, ML Engineer, </em><a href="https://www.linkedin.com/in/vijendra-maurya-5a574628/"><em>Vijendra Maurya</em></a><em>, Data Engineer @ CARS24, </em><a href="https://www.linkedin.com/in/swapnesh-khare-21272480/"><em>Swapnesh Khare</em></a><em>, Senior ML Engineer @ CARS24, </em><a href="https://www.linkedin.com/in/abhaykansal/"><em>Abhay Kansal</em></a><em>, Staff Data Scientist @ CARS24</em></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=4c0a17b797d1" width="1" height="1" alt=""><hr><p><a href="https://medium.com/cars24-data-science-blog/optimizing-data-flow-cars24-4c0a17b797d1">Optimizing Data Flow @ CARS24</a> was originally published in <a href="https://medium.com/cars24-data-science-blog">CARS24 Data Science Blog</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
    </channel>
</rss>