

{"id":1688,"date":"2017-03-15T08:09:03","date_gmt":"2017-03-15T08:09:03","guid":{"rendered":"http:\/\/data-flair.training\/blogs\/?p=1688"},"modified":"2018-11-21T11:51:37","modified_gmt":"2018-11-21T06:21:37","slug":"apache-spark-streaming-transformation-operations","status":"publish","type":"post","link":"https:\/\/data-flair.training\/blogs\/apache-spark-streaming-transformation-operations\/","title":{"rendered":"Apache Spark Streaming Transformation Operations"},"content":{"rendered":"<div class='__iawmlf-post-loop-links' style='display:none;' data-iawmlf-post-links='[{&quot;id&quot;:2375,&quot;href&quot;:&quot;http:\\\/\\\/spark.apache.org\\\/docs\\\/latest\\\/programming-guide.html&quot;,&quot;archived_href&quot;:&quot;http:\\\/\\\/web-wp.archive.org\\\/web\\\/20250929044727\\\/https:\\\/\\\/spark.apache.org\\\/docs\\\/latest\\\/programming-guide.html&quot;,&quot;redirect_href&quot;:&quot;&quot;,&quot;checks&quot;:[{&quot;date&quot;:&quot;2025-12-11 05:20:04&quot;,&quot;http_code&quot;:206},{&quot;date&quot;:&quot;2025-12-18 02:41:29&quot;,&quot;http_code&quot;:206},{&quot;date&quot;:&quot;2025-12-21 02:54:04&quot;,&quot;http_code&quot;:206},{&quot;date&quot;:&quot;2025-12-25 23:39:14&quot;,&quot;http_code&quot;:206},{&quot;date&quot;:&quot;2025-12-30 09:13:50&quot;,&quot;http_code&quot;:206},{&quot;date&quot;:&quot;2026-01-05 03:36:12&quot;,&quot;http_code&quot;:206},{&quot;date&quot;:&quot;2026-01-19 09:54:36&quot;,&quot;http_code&quot;:206},{&quot;date&quot;:&quot;2026-01-24 11:02:35&quot;,&quot;http_code&quot;:206},{&quot;date&quot;:&quot;2026-01-27 11:24:32&quot;,&quot;http_code&quot;:206},{&quot;date&quot;:&quot;2026-01-31 10:41:14&quot;,&quot;http_code&quot;:206},{&quot;date&quot;:&quot;2026-02-04 14:55:46&quot;,&quot;http_code&quot;:206},{&quot;date&quot;:&quot;2026-02-08 00:20:37&quot;,&quot;http_code&quot;:206},{&quot;date&quot;:&quot;2026-02-24 10:23:07&quot;,&quot;http_code&quot;:206},{&quot;date&quot;:&quot;2026-03-11 09:29:04&quot;,&quot;http_code&quot;:206},{&quot;date&quot;:&quot;2026-03-14 09:32:25&quot;,&quot;http_code&quot;:206},{&quot;date&quot;:&quot;2026-03-31 07:54:27&quot;,&quot;http_code&quot;:206},{&quot;date&quot;:&quot;2026-04-24 11:21:57&quot;,&quot;http_code&quot;:206},{&quot;date&quot;:&quot;2026-05-03 07:41:44&quot;,&quot;http_code&quot;:206},{&quot;date&quot;:&quot;2026-05-07 16:34:40&quot;,&quot;http_code&quot;:206},{&quot;date&quot;:&quot;2026-05-14 06:22:46&quot;,&quot;http_code&quot;:206},{&quot;date&quot;:&quot;2026-05-23 08:26:09&quot;,&quot;http_code&quot;:206},{&quot;date&quot;:&quot;2026-05-30 20:50:35&quot;,&quot;http_code&quot;:206}],&quot;broken&quot;:false,&quot;last_checked&quot;:{&quot;date&quot;:&quot;2026-05-30 20:50:35&quot;,&quot;http_code&quot;:206},&quot;process&quot;:&quot;done&quot;}]'><\/div>\n<h2>1. Objective<\/h2>\n<p>Through this <a href=\"http:\/\/data-flair.training\/blogs\/apache-spark-introduction-comprehensive-tutorial-guide-beginners\/\">Apache Spark<\/a> Transformation Operations tutorial, you will learn about various Apache Spark streaming transformation operations with example being used by Spark professionals for playing with <a href=\"http:\/\/data-flair.training\/blogs\/important-apache-spark-terminologies-and-concepts-you-must-know\/\">Apache Spark<\/a> Streaming concepts. You will learn the Streaming operations like Spark Map operation, flatmap operation, Spark filter operation, count operation, Spark ReduceByKey operation, Spark CountByValue operation with example and Spark UpdateStateByKey operation with example that will help you in your Spark jobs.<\/p>\n<div id=\"attachment_43083\" style=\"width: 1210px\" class=\"wp-caption aligncenter\"><a href=\"https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2017\/03\/Apache-Spark-Streaming-Transformation-Operations-01.jpg\"><img loading=\"lazy\" decoding=\"async\" aria-describedby=\"caption-attachment-43083\" class=\"size-full wp-image-43083\" src=\"https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2017\/03\/Apache-Spark-Streaming-Transformation-Operations-01.jpg\" alt=\"Apache Spark Streaming Transformation Operations\" width=\"1200\" height=\"628\" srcset=\"https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2017\/03\/Apache-Spark-Streaming-Transformation-Operations-01.jpg 1200w, https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2017\/03\/Apache-Spark-Streaming-Transformation-Operations-01-150x79.jpg 150w, https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2017\/03\/Apache-Spark-Streaming-Transformation-Operations-01-300x157.jpg 300w, https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2017\/03\/Apache-Spark-Streaming-Transformation-Operations-01-768x402.jpg 768w, https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2017\/03\/Apache-Spark-Streaming-Transformation-Operations-01-1024x536.jpg 1024w, https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2017\/03\/Apache-Spark-Streaming-Transformation-Operations-01-520x272.jpg 520w\" sizes=\"auto, (max-width: 1200px) 100vw, 1200px\" \/><\/a><p id=\"caption-attachment-43083\" class=\"wp-caption-text\">Apache Spark Streaming Transformation Operations<\/p><\/div>\n<h2>2. Introduction to Apache Spark Streaming Transformation Operations<\/h2>\n<p>Before we start learning the various Streaming operations in Spark, let us revise <a href=\"http:\/\/data-flair.training\/blogs\/apache-spark-streaming-comprehensive-guide\/\">Spark Streaming concepts<\/a>.<br \/>\nBelow are the various most common Streaming transformation functions being used in Spark industry:<\/p>\n<h3>a. map()<\/h3>\n<p>Map function in Spark passes each element of the source DStream through a function and returns a new DStream.<br \/>\n<strong>Spark map() example<\/strong><br \/>\n[php]val conf = new SparkConf().setMaster(&#8220;local[2]&#8221;) .setAppName(&#8220;MapOpTest&#8221;)<br \/>\nval ssc = new StreamingContext(conf , Seconds(1))<br \/>\nval words = ssc.socketTextStream(&#8220;localhost&#8221;, 9999)<br \/>\nval ans = words.map { word =&gt; (&#8220;hello&#8221; ,word ) } \/\/ map hello with each line<br \/>\nans.print()<br \/>\nssc.start() \/\/ Start the computation<br \/>\nssc.awaitTermination() \/\/ Wait for termination<br \/>\n}[\/php]<\/p>\n<h3>b. flatMap()<\/h3>\n<p>FlatMap function in Spark is similar to Spark map function, but in flatmap, input item can be mapped to 0 or more output items. This creates <a href=\"http:\/\/data-flair.training\/blogs\/comparison-between-map-vs-flatmap-operation-spark\/\">difference between map and flatmap operations<\/a> in spark.<br \/>\n<strong>Spark FlatMap Example<\/strong><br \/>\n[php]val lines = ssc.socketTextStream(&#8220;localhost&#8221;, 9999)<br \/>\nval words = lines.flatMap(_.split(&#8221; &#8220;)) \/\/ for each line it split the words by space<br \/>\nval pairs = words.map(word =&gt; (word, 1))<br \/>\nval wordCounts = pairs.reduceByKey(_ + _)<br \/>\nwordCounts.print()[\/php]<\/p>\n<h3>c. filter()<\/h3>\n<p>Filter function in Apache Spark returns selects only those records of the source DStream on which func returns true and returns a new DStream of those records.<br \/>\n<strong>Spark Filter function example<\/strong><br \/>\n[php]val lines = ssc.socketTextStream(&#8220;localhost&#8221;, 9999)<br \/>\nval words = lines.flatMap(_.split(&#8221; &#8220;))<br \/>\nval output = words.filter { word =&gt; word.startsWith(&#8220;s&#8221;) } \/\/ filter the words starts with letter\u201cs\u201d<br \/>\noutput.print()[\/php]<\/p>\n<div id=\"attachment_34875\" style=\"width: 812px\" class=\"wp-caption aligncenter\"><a href=\"https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2017\/03\/Apache-Spark-Streaming-Transformation-Operations-1.jpg\"><img loading=\"lazy\" decoding=\"async\" aria-describedby=\"caption-attachment-34875\" class=\"size-full wp-image-34875\" src=\"https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2017\/03\/Apache-Spark-Streaming-Transformation-Operations-1.jpg\" alt=\"Apache Spark Streaming Transformation Operations\" width=\"802\" height=\"420\" srcset=\"https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2017\/03\/Apache-Spark-Streaming-Transformation-Operations-1.jpg 802w, https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2017\/03\/Apache-Spark-Streaming-Transformation-Operations-1-150x79.jpg 150w, https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2017\/03\/Apache-Spark-Streaming-Transformation-Operations-1-300x157.jpg 300w, https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2017\/03\/Apache-Spark-Streaming-Transformation-Operations-1-768x402.jpg 768w, https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2017\/03\/Apache-Spark-Streaming-Transformation-Operations-1-520x272.jpg 520w\" sizes=\"auto, (max-width: 802px) 100vw, 802px\" \/><\/a><p id=\"caption-attachment-34875\" class=\"wp-caption-text\">Apache Spark Streaming Transformation Operations<\/p><\/div>\n<h3>d. reduceByKey(func, [numTasks])<\/h3>\n<p>When called on a DStream of (K, V) pairs, ReduceByKey function in Spark returns a new DStream of (K, V) pairs where the values for each key are aggregated using the given reduce function.<br \/>\n<strong>Spark reduceByKey example<\/strong><br \/>\n[php]val lines = ssc.socketTextStream(&#8220;localhost&#8221;, 9999)<br \/>\nval words = lines.flatMap(_.split(&#8221; &#8220;))<br \/>\nval pairs = words.map(word =&gt; (word, 1))<br \/>\nval wordCounts = pairs.reduceByKey(_ + _)<br \/>\nwordCounts.print()[\/php]<\/p>\n<h3>e. countByValue()<\/h3>\n<p>CountByValue function in Spark is called on a DStream of elements of type K and it returns a new DStream of (K, Long) pairs where the value of each key is its frequency in each <a href=\"http:\/\/data-flair.training\/blogs\/rdd-transformations-actions-apis-apache-spark\/\">Spark RDD<\/a> of the source DStream.<br \/>\n<strong>Spark CountByValue function example<\/strong><br \/>\n[php]val line = ssc.socketTextStream(&#8220;localhost&#8221;, 9999)<br \/>\nval words = line.flatMap(_.split(&#8221; &#8220;))<br \/>\nwords.countByValue().print()[\/php]<\/p>\n<h3>f. UpdateStateByKey()<\/h3>\n<p>The updateStateByKey operation allows you to maintain arbitrary state while continuously updating it with new information. To use this, you will have to do two steps.<br \/>\n<strong>Define the state<\/strong> &#8211; The state can be an arbitrary data type.<br \/>\n<strong>Define the state update function<\/strong> &#8211; Specify with a function how to update the state using the previous state and the new values from an input stream.<br \/>\nIn every batch, Spark will apply the state update function for all existing keys, regardless of whether they have new data in a batch or not. If the update function returns None then the key-value pair will be eliminated.<br \/>\n<strong>Spark UpdateByKey Example<\/strong><br \/>\n[php]def updateFunc(values: Seq[Int], state: Option[Int]): Option[Int] = {<br \/>\nval currentCount = values.sum<br \/>\nval previousCount = state.getOrElse(0)<br \/>\nSome(currentCount + previousCount)<br \/>\n}<br \/>\nval ssc = new StreamingContext(conf , Seconds(10))<br \/>\nval line = ssc.socketTextStream(&#8220;localhost&#8221;, 9999)<br \/>\nssc.checkpoint(&#8220;\/home\/asus\/checkpoints\/&#8221;) \/\/ Here .\/checkpoints\/ are the directory where all checkpoints are stored.<br \/>\nval words = line.flatMap(_.split(&#8221; &#8220;))<br \/>\nval pairs = words.map(word =&gt; (word, 1))<br \/>\nval globalCountStream = pairs.updateStateByKey(updateFunc)<br \/>\nglobalCountStream.print()<br \/>\nssc.start() \/\/ Start the computation<br \/>\nssc.awaitTermination()[\/php]<br \/>\nFor more Spark operations and examples, \u00a0you can refer <a href=\"http:\/\/data-flair.training\/blogs\/best-books-apache-spark-scala\/\">Best books to master Apache Spark.<\/a><br \/>\nSource:<br \/>\n<a href=\"http:\/\/spark.apache.org\/docs\/latest\/programming-guide.html\">http:\/\/spark.apache.org\/docs\/latest\/programming-guide.html<\/a><\/p>\n","protected":false},"excerpt":{"rendered":"<p>1. Objective Through this Apache Spark Transformation Operations tutorial, you will learn about various Apache Spark streaming transformation operations with example being used by Spark professionals for playing with Apache Spark Streaming concepts. You&#46;&#46;&#46;<\/p>\n","protected":false},"author":6,"featured_media":43083,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[10],"tags":[896,952,953,13140],"class_list":["post-1688","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-spark","tag-apache-spark","tag-apache-spark-streaming","tag-apache-spark-streaming-operations","tag-spark-transformation-operations"],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v27.4 - https:\/\/yoast.com\/product\/yoast-seo-wordpress\/ -->\n<title>Apache Spark Streaming Transformation Operations - DataFlair<\/title>\n<meta name=\"description\" content=\"Spark Streaming transformation operations.What is Spark streaming &amp; transformation operations in Spark-UpdateByKey(),CountByValue(),ReduceByKey(),filter()\" \/>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/data-flair.training\/blogs\/apache-spark-streaming-transformation-operations\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"Apache Spark Streaming Transformation Operations - DataFlair\" \/>\n<meta property=\"og:description\" content=\"Spark Streaming transformation operations.What is Spark streaming &amp; transformation operations in Spark-UpdateByKey(),CountByValue(),ReduceByKey(),filter()\" \/>\n<meta property=\"og:url\" content=\"https:\/\/data-flair.training\/blogs\/apache-spark-streaming-transformation-operations\/\" \/>\n<meta property=\"og:site_name\" content=\"DataFlair\" \/>\n<meta property=\"article:publisher\" content=\"https:\/\/www.facebook.com\/DataFlairWS\/\" \/>\n<meta property=\"article:published_time\" content=\"2017-03-15T08:09:03+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2018-11-21T06:21:37+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2017\/03\/Apache-Spark-Streaming-Transformation-Operations-01.jpg\" \/>\n\t<meta property=\"og:image:width\" content=\"1200\" \/>\n\t<meta property=\"og:image:height\" content=\"628\" \/>\n\t<meta property=\"og:image:type\" content=\"image\/jpeg\" \/>\n<meta name=\"author\" content=\"DataFlair Team\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:creator\" content=\"@DataFlairWS\" \/>\n<meta name=\"twitter:site\" content=\"@DataFlairWS\" \/>\n<meta name=\"twitter:label1\" content=\"Written by\" \/>\n\t<meta name=\"twitter:data1\" content=\"DataFlair Team\" \/>\n\t<meta name=\"twitter:label2\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data2\" content=\"3 minutes\" \/>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"Apache Spark Streaming Transformation Operations - DataFlair","description":"Spark Streaming transformation operations.What is Spark streaming & transformation operations in Spark-UpdateByKey(),CountByValue(),ReduceByKey(),filter()","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/data-flair.training\/blogs\/apache-spark-streaming-transformation-operations\/","og_locale":"en_US","og_type":"article","og_title":"Apache Spark Streaming Transformation Operations - DataFlair","og_description":"Spark Streaming transformation operations.What is Spark streaming & transformation operations in Spark-UpdateByKey(),CountByValue(),ReduceByKey(),filter()","og_url":"https:\/\/data-flair.training\/blogs\/apache-spark-streaming-transformation-operations\/","og_site_name":"DataFlair","article_publisher":"https:\/\/www.facebook.com\/DataFlairWS\/","article_published_time":"2017-03-15T08:09:03+00:00","article_modified_time":"2018-11-21T06:21:37+00:00","og_image":[{"width":1200,"height":628,"url":"https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2017\/03\/Apache-Spark-Streaming-Transformation-Operations-01.jpg","type":"image\/jpeg"}],"author":"DataFlair Team","twitter_card":"summary_large_image","twitter_creator":"@DataFlairWS","twitter_site":"@DataFlairWS","twitter_misc":{"Written by":"DataFlair Team","Est. reading time":"3 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/data-flair.training\/blogs\/apache-spark-streaming-transformation-operations\/#article","isPartOf":{"@id":"https:\/\/data-flair.training\/blogs\/apache-spark-streaming-transformation-operations\/"},"author":{"name":"DataFlair Team","@id":"https:\/\/data-flair.training\/blogs\/#\/schema\/person\/2c58ecb4f73a39f0ef993f1ddfcd7b89"},"headline":"Apache Spark Streaming Transformation Operations","datePublished":"2017-03-15T08:09:03+00:00","dateModified":"2018-11-21T06:21:37+00:00","mainEntityOfPage":{"@id":"https:\/\/data-flair.training\/blogs\/apache-spark-streaming-transformation-operations\/"},"wordCount":678,"commentCount":0,"publisher":{"@id":"https:\/\/data-flair.training\/blogs\/#organization"},"image":{"@id":"https:\/\/data-flair.training\/blogs\/apache-spark-streaming-transformation-operations\/#primaryimage"},"thumbnailUrl":"https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2017\/03\/Apache-Spark-Streaming-Transformation-Operations-01.jpg","keywords":["apache spark","Apache Spark streaming","apache spark streaming operations","spark transformation operations"],"articleSection":["Apache Spark Tutorials"],"inLanguage":"en-US","potentialAction":[{"@type":"CommentAction","name":"Comment","target":["https:\/\/data-flair.training\/blogs\/apache-spark-streaming-transformation-operations\/#respond"]}]},{"@type":"WebPage","@id":"https:\/\/data-flair.training\/blogs\/apache-spark-streaming-transformation-operations\/","url":"https:\/\/data-flair.training\/blogs\/apache-spark-streaming-transformation-operations\/","name":"Apache Spark Streaming Transformation Operations - DataFlair","isPartOf":{"@id":"https:\/\/data-flair.training\/blogs\/#website"},"primaryImageOfPage":{"@id":"https:\/\/data-flair.training\/blogs\/apache-spark-streaming-transformation-operations\/#primaryimage"},"image":{"@id":"https:\/\/data-flair.training\/blogs\/apache-spark-streaming-transformation-operations\/#primaryimage"},"thumbnailUrl":"https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2017\/03\/Apache-Spark-Streaming-Transformation-Operations-01.jpg","datePublished":"2017-03-15T08:09:03+00:00","dateModified":"2018-11-21T06:21:37+00:00","description":"Spark Streaming transformation operations.What is Spark streaming & transformation operations in Spark-UpdateByKey(),CountByValue(),ReduceByKey(),filter()","breadcrumb":{"@id":"https:\/\/data-flair.training\/blogs\/apache-spark-streaming-transformation-operations\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/data-flair.training\/blogs\/apache-spark-streaming-transformation-operations\/"]}]},{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/data-flair.training\/blogs\/apache-spark-streaming-transformation-operations\/#primaryimage","url":"https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2017\/03\/Apache-Spark-Streaming-Transformation-Operations-01.jpg","contentUrl":"https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2017\/03\/Apache-Spark-Streaming-Transformation-Operations-01.jpg","width":1200,"height":628,"caption":"Apache Spark Streaming Transformation Operations"},{"@type":"BreadcrumbList","@id":"https:\/\/data-flair.training\/blogs\/apache-spark-streaming-transformation-operations\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Blog Home","item":"https:\/\/data-flair.training\/blogs\/"},{"@type":"ListItem","position":2,"name":"Apache Spark Tutorials","item":"https:\/\/data-flair.training\/blogs\/category\/spark\/"},{"@type":"ListItem","position":3,"name":"Apache Spark Streaming Transformation Operations"}]},{"@type":"WebSite","@id":"https:\/\/data-flair.training\/blogs\/#website","url":"https:\/\/data-flair.training\/blogs\/","name":"DataFlair","description":"Learn Today. Lead Tomorrow.","publisher":{"@id":"https:\/\/data-flair.training\/blogs\/#organization"},"potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/data-flair.training\/blogs\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"en-US"},{"@type":"Organization","@id":"https:\/\/data-flair.training\/blogs\/#organization","name":"DataFlair","url":"https:\/\/data-flair.training\/blogs\/","logo":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/data-flair.training\/blogs\/#\/schema\/logo\/image\/","url":"https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2016\/07\/Data-Flair.png","contentUrl":"https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2016\/07\/Data-Flair.png","width":106,"height":48,"caption":"DataFlair"},"image":{"@id":"https:\/\/data-flair.training\/blogs\/#\/schema\/logo\/image\/"},"sameAs":["https:\/\/www.facebook.com\/DataFlairWS\/","https:\/\/x.com\/DataFlairWS","https:\/\/www.linkedin.com\/company\/dataflair-web-services-pvt-ltd\/","https:\/\/www.youtube.com\/user\/DataFlairWS"]},{"@type":"Person","@id":"https:\/\/data-flair.training\/blogs\/#\/schema\/person\/2c58ecb4f73a39f0ef993f1ddfcd7b89","name":"DataFlair Team","image":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/secure.gravatar.com\/avatar\/1ce4a0e3e542444fc73bbebf83e89e8b73e2d95ccb1fcee64da9945f078b97c5?s=96&d=mm&r=g","url":"https:\/\/secure.gravatar.com\/avatar\/1ce4a0e3e542444fc73bbebf83e89e8b73e2d95ccb1fcee64da9945f078b97c5?s=96&d=mm&r=g","contentUrl":"https:\/\/secure.gravatar.com\/avatar\/1ce4a0e3e542444fc73bbebf83e89e8b73e2d95ccb1fcee64da9945f078b97c5?s=96&d=mm&r=g","caption":"DataFlair Team"},"description":"The DataFlair Team provides industry-driven content on programming, Java, Python, C++, DSA, AI, ML, data Science, Android, Flutter, MERN, Web Development, and technology. Our expert educators focus on delivering value-packed, easy-to-follow resources for tech enthusiasts and professionals.","url":"https:\/\/data-flair.training\/blogs\/author\/dfteam2\/"}]}},"amp_enabled":true,"_links":{"self":[{"href":"https:\/\/data-flair.training\/blogs\/wp-json\/wp\/v2\/posts\/1688","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/data-flair.training\/blogs\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/data-flair.training\/blogs\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/data-flair.training\/blogs\/wp-json\/wp\/v2\/users\/6"}],"replies":[{"embeddable":true,"href":"https:\/\/data-flair.training\/blogs\/wp-json\/wp\/v2\/comments?post=1688"}],"version-history":[{"count":5,"href":"https:\/\/data-flair.training\/blogs\/wp-json\/wp\/v2\/posts\/1688\/revisions"}],"predecessor-version":[{"id":43085,"href":"https:\/\/data-flair.training\/blogs\/wp-json\/wp\/v2\/posts\/1688\/revisions\/43085"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/data-flair.training\/blogs\/wp-json\/wp\/v2\/media\/43083"}],"wp:attachment":[{"href":"https:\/\/data-flair.training\/blogs\/wp-json\/wp\/v2\/media?parent=1688"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/data-flair.training\/blogs\/wp-json\/wp\/v2\/categories?post=1688"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/data-flair.training\/blogs\/wp-json\/wp\/v2\/tags?post=1688"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}