

{"id":2611,"date":"2017-05-20T11:21:28","date_gmt":"2017-05-20T11:21:28","guid":{"rendered":"http:\/\/data-flair.training\/blogs\/?p=2611"},"modified":"2018-11-16T13:55:38","modified_gmt":"2018-11-16T08:25:38","slug":"spark-sql-optimization","status":"publish","type":"post","link":"https:\/\/data-flair.training\/blogs\/spark-sql-optimization\/","title":{"rendered":"Spark SQL Optimization &#8211; Understanding the Catalyst Optimizer"},"content":{"rendered":"<h2>1. Objective<\/h2>\n<p>The goal of this <a href=\"http:\/\/data-flair.training\/blogs\/apache-spark-tutorial-quickstart-introduction\/\"><strong>Apache Spark<\/strong> tutorial<\/a> is to describe the<strong> Spark SQL Optimization framework<\/strong> and how it allows developers to express complex query transformations in very few lines of code. we will also describe How <strong>Spark SQL<\/strong> improves the execution time of queries by greatly improving its query optimization capabilities. We will also cover what is an optimization, why catalyst optimizer, what are its fundamental units of working and the phases of Spark execution flow in this tutorial.<\/p>\n<div id=\"attachment_42324\" style=\"width: 1210px\" class=\"wp-caption aligncenter\"><a href=\"https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2017\/05\/Spark-SQL-Optimization-2.jpg\"><img loading=\"lazy\" decoding=\"async\" aria-describedby=\"caption-attachment-42324\" class=\"size-full wp-image-42324\" src=\"https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2017\/05\/Spark-SQL-Optimization-2.jpg\" alt=\"Spark SQL Optimization - Understanding the Catalyst Optimizer\" width=\"1200\" height=\"628\" srcset=\"https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2017\/05\/Spark-SQL-Optimization-2.jpg 1200w, https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2017\/05\/Spark-SQL-Optimization-2-150x79.jpg 150w, https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2017\/05\/Spark-SQL-Optimization-2-300x157.jpg 300w, https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2017\/05\/Spark-SQL-Optimization-2-768x402.jpg 768w, https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2017\/05\/Spark-SQL-Optimization-2-1024x536.jpg 1024w, https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2017\/05\/Spark-SQL-Optimization-2-520x272.jpg 520w\" sizes=\"auto, (max-width: 1200px) 100vw, 1200px\" \/><\/a><p id=\"caption-attachment-42324\" class=\"wp-caption-text\">Spark SQL Optimization &#8211; Understanding the Catalyst Optimizer<\/p><\/div>\n<h2>2. Introduction to Apache Spark SQL Optimization<\/h2>\n<p>&#8220;The term <strong>optimization<\/strong> refers to a process in which a system is modified in such a way that it work more efficiently or it uses fewer resources.&#8221;<br \/>\n<strong><a href=\"http:\/\/data-flair.training\/blogs\/spark-sql-tutorial\/\">Spark SQL<\/a><\/strong> is the most technically involved component of Apache Spark. Spark SQL deals with both SQL queries and DataFrame API. In the depth of Spark SQL there lies a <strong>catalyst optimizer<\/strong>.\u00a0Catalyst optimization allows some advanced programming language features that allow you to build an extensible query optimizer.<br \/>\nA new extensible optimizer called Catalyst emerged to implement Spark SQL. This optimizer is based on functional programming construct in <strong><a href=\"http:\/\/data-flair.training\/blogs\/why-you-should-learn-scala-introductory-tutorial\/\">Scala<\/a><\/strong>.<br \/>\nCatalyst Optimizer supports both <strong>rule-based<\/strong> and <strong>cost-based<\/strong> optimization. In <em>rule-based optimization<\/em> the rule based optimizer use set of rule to determine how to execute the query. While the <em>cost based optimization<\/em> finds the most suitable way to carry out SQL statement. In cost-based optimization, multiple plans are generated using rules and then their cost is computed.<\/p>\n<h2>3. What is the need of Catalyst Optimizer?<\/h2>\n<p>There are two purposes behind Catalyst\u2019s extensible design:<\/p>\n<ul>\n<li>We want to add the easy solution to tackle various problems with <strong><a href=\"http:\/\/data-flair.training\/blogs\/why-learn-big-data-use-cases\/\">Bigdata<\/a><\/strong> like a problem with semi-structured data and advanced <a href=\"http:\/\/data-flair.training\/blogs\/data-analytics-comprehensive-guide\/\">data analytics<\/a>.<\/li>\n<li>We want an easy way such that external developers can extend the optimizer.<\/li>\n<\/ul>\n<h2>4. Fundamentals of Catalyst Optimizer<\/h2>\n<p>Catalyst optimizer makes use of standard <a href=\"http:\/\/data-flair.training\/blogs\/scala-features-comprehensive-guide\/\">features of Scala programming<\/a> like pattern matching. In the depth, Catalyst contains the <strong>tree<\/strong> and the set of<strong> rules<\/strong> to manipulate the tree. There are specific libraries to process relational queries. There are various rule sets which handle different phases of query execution like <em>analysis<\/em>,<em> query optimization, physical planning,<\/em> and <em>code generation<\/em> to compile parts of queries to Java bytecode. Let&#8217;s discuss the tree and rules is detail-<\/p>\n<h3>4.1. Trees<\/h3>\n<p>A tree is the main data type in the catalyst. A tree contains node object. For each node, there is a node. A node can have one or more children. New nodes are defined as subclasses of TreeNode class. These objects are immutable in nature. The objects can be manipulated using functional transformation. See <a href=\"http:\/\/data-flair.training\/blogs\/rdd-transformations-actions-apis-apache-spark\/\">RDD Transformations and Actions Guide<\/a> for more details about Functional transformations.<br \/>\nFor example, if we have three node classes: <strong>worth<\/strong>, <strong>attribute<\/strong>, and <strong>sub<\/strong> in which-<\/p>\n<ul>\n<li>worth(value: Int): a constant value<\/li>\n<li>attribute(name: String)<\/li>\n<li>sub (left: TreeNode, right: TreeNode): subtraction of two expressions.<\/li>\n<\/ul>\n<div id=\"attachment_2615\" style=\"width: 586px\" class=\"wp-caption aligncenter\"><a href=\"https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2017\/05\/spark-sql-catalyst-optimizer-tree-example.jpg\"><img loading=\"lazy\" decoding=\"async\" aria-describedby=\"caption-attachment-2615\" class=\"wp-image-2615 size-full\" src=\"https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2017\/05\/spark-sql-catalyst-optimizer-tree-example.jpg\" alt=\"spark-sql-catalyst-optimizer-tree-example\" width=\"576\" height=\"355\" srcset=\"https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2017\/05\/spark-sql-catalyst-optimizer-tree-example.jpg 576w, https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2017\/05\/spark-sql-catalyst-optimizer-tree-example-150x92.jpg 150w, https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2017\/05\/spark-sql-catalyst-optimizer-tree-example-300x185.jpg 300w\" sizes=\"auto, (max-width: 576px) 100vw, 576px\" \/><\/a><p id=\"caption-attachment-2615\" class=\"wp-caption-text\">spark-sql-catalyst-optimizer-tree-example<\/p><\/div>\n<p>Then a tree will look like-<\/p>\n<h3>4.2. Rules<\/h3>\n<p>We can manipulate tree using <strong>rules<\/strong>. We can define rules as a function from one tree to another tree. With rule we can run arbitrary code on input tree, the common approach to use a pattern matching function and replace subtree with a specific structure. In a tree with the help of <strong>transform function<\/strong>, we can recursively apply pattern matching on all the node of a tree. We get the pattern that matches each pattern to a result.<br \/>\nFor example-<br \/>\n<em>tree.transform {case Sub(worth(c1),worth(c2)) =&gt; worth(c1+c2) }<\/em><br \/>\nThe expression that is passed during pattern matching to transform is a partial function. By partial function, it means it only needs to match to a subset of all possible input trees. Catalyst will see, to which part of a tree the given rule applies, and will automatically skip over the tree that does not match. With the same transform call, the rule can match multiple patterns.<br \/>\nFor example-<br \/>\n<em> tree.transform {<\/em><br \/>\n<em>case Sub(worth(c1), worth(c2)) =&gt;worth(c1-c2)<\/em><br \/>\n<em>case Sub(left , worth(0)) =&gt; left<\/em><br \/>\n<em>case Sub(worth(0), right) =&gt; right<\/em><br \/>\n<em>}<\/em><br \/>\nTo fully transform a tree, rule may be needed to execute multiple time.<br \/>\nCatalyst work by grouping rules into batches and these batches are executed until a fixed point is achieved. Fixed point is a point after which tree stops changing even after applying rules.<\/p>\n<h2>5. Spark SQL Execution Plan<\/h2>\n<p>After the detailed introduction of Apache Spark SQL catalyst optimizer, now we will discuss the Spark SQL query execution phases. In four phases we use Catalyst\u2019s general tree transformation framework:<\/p>\n<ul>\n<li>Analysis<\/li>\n<li>Logical Optimization<\/li>\n<li>Physical planning<\/li>\n<li>Code generation<\/li>\n<\/ul>\n<div id=\"attachment_2617\" style=\"width: 1517px\" class=\"wp-caption aligncenter\"><a href=\"https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2017\/05\/Spark-SQL-execution-query-plan.jpg\"><img loading=\"lazy\" decoding=\"async\" aria-describedby=\"caption-attachment-2617\" class=\"wp-image-2617 size-full\" src=\"https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2017\/05\/Spark-SQL-execution-query-plan.jpg\" alt=\"Spark-SQL-execution-query-plan\" width=\"1507\" height=\"768\" srcset=\"https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2017\/05\/Spark-SQL-execution-query-plan.jpg 1507w, https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2017\/05\/Spark-SQL-execution-query-plan-150x76.jpg 150w, https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2017\/05\/Spark-SQL-execution-query-plan-300x153.jpg 300w, https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2017\/05\/Spark-SQL-execution-query-plan-768x391.jpg 768w, https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2017\/05\/Spark-SQL-execution-query-plan-1024x522.jpg 1024w\" sizes=\"auto, (max-width: 1507px) 100vw, 1507px\" \/><\/a><p id=\"caption-attachment-2617\" class=\"wp-caption-text\">Phases-of-Spark-SQL-Execution-plan<\/p><\/div>\n<h3>5.1. Analysis<\/h3>\n<p>Spark SQL Optimization starts from relation to be computed. It is computed either from <strong>abstract syntax tree (AST)<\/strong> returned by <strong>SQL parser<\/strong> or<a href=\"http:\/\/data-flair.training\/blogs\/apache-spark-dataframe-tutorial\/\"> dataframe<\/a> object created using API. Both may contain unresolved attribute references or relations. By unresolved attribute, it means we don\u2019t know its type or have not matched it to an input table. Spark SQL make use of Catalyst rules and a Catalog object that track data in all data sources to resolve these attributes. It starts by creating an unresolved logical plan, and then apply the following steps:<\/p>\n<ul>\n<li>Search relation BY NAME FROM CATALOG.<\/li>\n<li>Map the name attribute, for example, col, to the input provided given operator\u2019s children.<\/li>\n<li>Determine which attributes match to the same value to give them unique ID.<\/li>\n<li>Propagate and push type through expressions.<\/li>\n<\/ul>\n<h3>5.2. Logical Optimization<\/h3>\n<p>In this phase of Spark SQL optimization, the standard rule-based optimization is applied to the logical plan. It includes <strong>constant folding<\/strong>, <strong>predicate pushdown<\/strong>, <strong>projection pruning<\/strong> and other rules. It became extremely easy to add a rule for various situations.<\/p>\n<h3>5.3. Physical Planning<\/h3>\n<p>There are about 500 lines of code in the physical planning rules. In this phase, one or more physical plan is formed from the logical plan, using physical operator matches the Spark execution engine. And it selects the plan using the cost model. It uses Cost-based optimization only to select join algorithms. For small relation SQL uses broadcast join, the framework supports broader use of cost-based optimization. It can estimate the cost recursively for the whole tree using the rule.<br \/>\nRule-based physical optimization, such as pipelining projections or filters into one Spark <em>map <\/em>Operation is also carried out by the physical planner. Apart from this, it can also push operations from the logical plan into data sources that support predicate or projection pushdown.<\/p>\n<h3>5.4. Code Generation<\/h3>\n<p>The final phase of Spark SQL optimization is code generation. It involves generating Java bytecode to run on each machine. Catalyst uses the special feature of Scala language, &#8220;<strong>Quasiquotes<\/strong>&#8221; to make code generation easier because it is very tough to build code generation engines. Quasiquotes lets the programmatic construction of abstract syntax trees (ASTs) in the Scala language, which can then be fed to the Scala compiler at runtime to generate bytecode. With the help of a catalyst, we can transform a tree representing an expression in SQL to an AST for Scala code to evaluate that expression, and then compile and run the generated code.<\/p>\n<h2>6. Conclusion<\/h2>\n<p>Hence, Spark SQL optimization enhances\u00a0the productivity of developers and the performance of the queries that they write. A good query optimizer automatically rewrites relational queries to execute more efficiently, using techniques such as filtering data early, utilizing available indexes, and even ensuring different data sources are joined in the most efficient order.<br \/>\nBy performing these transformations, the optimizer improves the execution times of relational queries and frees the developer from focusing on the semantics of their application instead of its performance.<br \/>\nCatalyst makes use of Scala\u2019s powerful features such as pattern matching and runtime metaprogramming to allow developers to concisely specify complex relational optimizations.<br \/>\n<strong>See Also-<\/strong><\/p>\n<ul>\n<li><a href=\"http:\/\/data-flair.training\/blogs\/apache-spark-rdd-vs-dataframe-vs-dataset\/\">Apache Spark RDD vs DataFrame vs DataSet.<\/a><\/li>\n<li><a href=\"http:\/\/data-flair.training\/blogs\/apache-spark-performance-tuning\/\">Apache Spark Performance tuning best practices.<\/a><\/li>\n<\/ul>\n","protected":false},"excerpt":{"rendered":"<p>1. Objective The goal of this Apache Spark tutorial is to describe the Spark SQL Optimization framework and how it allows developers to express complex query transformations in very few lines of code. we&#46;&#46;&#46;<\/p>\n","protected":false},"author":6,"featured_media":42324,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[10],"tags":[900,917,13036,13115,13120],"class_list":["post-2611","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-spark","tag-apache-spark-catalyst-optimizer","tag-apache-spark-execution-plan","tag-spark-catalyst-framework","tag-spark-sql-catalyst-optimizer","tag-spark-sql-optimization"],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v27.8 - https:\/\/yoast.com\/product\/yoast-seo-wordpress\/ -->\n<title>Spark SQL Optimization - Understanding the Catalyst Optimizer - DataFlair<\/title>\n<meta name=\"description\" content=\"what is Spark SQL optimization &amp; Spark SQL catalyst logical plan,physical plan,code generation,features of Catalyst optimizer,Rule &amp; cost based optimization\" \/>\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\/spark-sql-optimization\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"Spark SQL Optimization - Understanding the Catalyst Optimizer - DataFlair\" \/>\n<meta property=\"og:description\" content=\"what is Spark SQL optimization &amp; Spark SQL catalyst logical plan,physical plan,code generation,features of Catalyst optimizer,Rule &amp; cost based optimization\" \/>\n<meta property=\"og:url\" content=\"https:\/\/data-flair.training\/blogs\/spark-sql-optimization\/\" \/>\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-05-20T11:21:28+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2018-11-16T08:25:38+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2017\/05\/Spark-SQL-Optimization-2.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=\"7 minutes\" \/>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"Spark SQL Optimization - Understanding the Catalyst Optimizer - DataFlair","description":"what is Spark SQL optimization & Spark SQL catalyst logical plan,physical plan,code generation,features of Catalyst optimizer,Rule & cost based optimization","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\/spark-sql-optimization\/","og_locale":"en_US","og_type":"article","og_title":"Spark SQL Optimization - Understanding the Catalyst Optimizer - DataFlair","og_description":"what is Spark SQL optimization & Spark SQL catalyst logical plan,physical plan,code generation,features of Catalyst optimizer,Rule & cost based optimization","og_url":"https:\/\/data-flair.training\/blogs\/spark-sql-optimization\/","og_site_name":"DataFlair","article_publisher":"https:\/\/www.facebook.com\/DataFlairWS\/","article_published_time":"2017-05-20T11:21:28+00:00","article_modified_time":"2018-11-16T08:25:38+00:00","og_image":[{"width":1200,"height":628,"url":"https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2017\/05\/Spark-SQL-Optimization-2.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":"7 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/data-flair.training\/blogs\/spark-sql-optimization\/#article","isPartOf":{"@id":"https:\/\/data-flair.training\/blogs\/spark-sql-optimization\/"},"author":{"name":"DataFlair Team","@id":"https:\/\/data-flair.training\/blogs\/#\/schema\/person\/2c58ecb4f73a39f0ef993f1ddfcd7b89"},"headline":"Spark SQL Optimization &#8211; Understanding the Catalyst Optimizer","datePublished":"2017-05-20T11:21:28+00:00","dateModified":"2018-11-16T08:25:38+00:00","mainEntityOfPage":{"@id":"https:\/\/data-flair.training\/blogs\/spark-sql-optimization\/"},"wordCount":1314,"commentCount":1,"publisher":{"@id":"https:\/\/data-flair.training\/blogs\/#organization"},"image":{"@id":"https:\/\/data-flair.training\/blogs\/spark-sql-optimization\/#primaryimage"},"thumbnailUrl":"https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2017\/05\/Spark-SQL-Optimization-2.jpg","keywords":["apache spark catalyst optimizer","Apache Spark execution plan","Spark catalyst framework","Spark SQL catalyst optimizer","Spark SQL optimization"],"articleSection":["Apache Spark Tutorials"],"inLanguage":"en-US","potentialAction":[{"@type":"CommentAction","name":"Comment","target":["https:\/\/data-flair.training\/blogs\/spark-sql-optimization\/#respond"]}]},{"@type":"WebPage","@id":"https:\/\/data-flair.training\/blogs\/spark-sql-optimization\/","url":"https:\/\/data-flair.training\/blogs\/spark-sql-optimization\/","name":"Spark SQL Optimization - Understanding the Catalyst Optimizer - DataFlair","isPartOf":{"@id":"https:\/\/data-flair.training\/blogs\/#website"},"primaryImageOfPage":{"@id":"https:\/\/data-flair.training\/blogs\/spark-sql-optimization\/#primaryimage"},"image":{"@id":"https:\/\/data-flair.training\/blogs\/spark-sql-optimization\/#primaryimage"},"thumbnailUrl":"https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2017\/05\/Spark-SQL-Optimization-2.jpg","datePublished":"2017-05-20T11:21:28+00:00","dateModified":"2018-11-16T08:25:38+00:00","description":"what is Spark SQL optimization & Spark SQL catalyst logical plan,physical plan,code generation,features of Catalyst optimizer,Rule & cost based optimization","breadcrumb":{"@id":"https:\/\/data-flair.training\/blogs\/spark-sql-optimization\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/data-flair.training\/blogs\/spark-sql-optimization\/"]}]},{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/data-flair.training\/blogs\/spark-sql-optimization\/#primaryimage","url":"https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2017\/05\/Spark-SQL-Optimization-2.jpg","contentUrl":"https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2017\/05\/Spark-SQL-Optimization-2.jpg","width":1200,"height":628,"caption":"Spark SQL Optimization - Understanding the Catalyst Optimizer"},{"@type":"BreadcrumbList","@id":"https:\/\/data-flair.training\/blogs\/spark-sql-optimization\/#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":"Spark SQL Optimization &#8211; Understanding the Catalyst Optimizer"}]},{"@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\/2611","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=2611"}],"version-history":[{"count":6,"href":"https:\/\/data-flair.training\/blogs\/wp-json\/wp\/v2\/posts\/2611\/revisions"}],"predecessor-version":[{"id":42326,"href":"https:\/\/data-flair.training\/blogs\/wp-json\/wp\/v2\/posts\/2611\/revisions\/42326"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/data-flair.training\/blogs\/wp-json\/wp\/v2\/media\/42324"}],"wp:attachment":[{"href":"https:\/\/data-flair.training\/blogs\/wp-json\/wp\/v2\/media?parent=2611"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/data-flair.training\/blogs\/wp-json\/wp\/v2\/categories?post=2611"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/data-flair.training\/blogs\/wp-json\/wp\/v2\/tags?post=2611"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}