{"id":2021,"date":"2018-01-13T04:23:11","date_gmt":"2018-01-13T04:23:11","guid":{"rendered":"https:\/\/techvidvan.com\/tutorials\/?p=744"},"modified":"2018-01-13T04:23:11","modified_gmt":"2018-01-13T04:23:11","slug":"apache-spark-sql-tutorial","status":"publish","type":"post","link":"https:\/\/techvidvan.com\/tutorials\/apache-spark-sql-tutorial\/","title":{"rendered":"Apache Spark SQL Tutorial : Quick Guide For Beginners"},"content":{"rendered":"<p>This blog completely aims to learn detailed concepts of <strong>Apache Spark SQL<\/strong>, supports structured data processing. Also, offers to work with datasets in Spark, integrated APIs in Python, Scala, and Java.<\/p>\n<p>In this sparkSQL tutorial, we will explain components of Spark SQL like, datasets and data frames. Moreover, we will also cover Apache Spark SQL catalyst optimizer. To learn concept deeply, we will also study the need for Spark SQL in Spark.<\/p>\n<p>By the end, we will go through Spark SQL advantage, and disadvantages to understand better.<\/p>\n<h3>Spark SQL Introduction<\/h3>\n<p>Spark SQL supports <em>distributed in-memory<\/em> computations on the huge scale. It is a spark module for structured data processing. It gives information about the structure of both data &amp; computation takes place.<\/p>\n<p>This extra information helps SQL to perform extra optimizations. The major aspect of Spark SQL is that we can <em>execute SQL queries<\/em>. It can also <span class=\"passivevoice\">be used<\/span> to read data from an existing hive installation. When SQL runs in another programming language, then results come as dataset\/dataframe.<\/p>\n<p>By using the command-line or over JDBC\/ODBC, we can interact with the SQL interface.<\/p>\n<p>Spark SQL offers three <em>main capabilities<\/em> for using structured and semi-structured data. They are following below:<\/p>\n<ul>\n<li>Spark SQL \u00a0provides a dataframe abstraction in Python, Java, and Scala. It simplifies working with structured datasets. In Spark, SQL dataframes are same as tables in a <em>relational database<\/em>.<\/li>\n<li>Spark SQL can<em> read and write data in various structured formats<\/em>, such as JSON, hive tables, and parquet.<\/li>\n<li>By using SQL, we can query the data, <em>both inside a Spark program and from external tools that connect to Spark SQL<\/em>.<\/li>\n<\/ul>\n<p>Same as Spark in Spark SQL, developers can switch back and forth between different APIs. Thus, it is the most natural way to express a given transformation.<\/p>\n<h3>Why Spark SQL Came Into Picture?<\/h3>\n<p>As Apache Hive, Spark SQL also originated to run on top of Spark and is now integrated with the Spark stack. There were certain limitations of Apache Hive as list-up below. Spark SQL was come into the picture to overcome these drawbacks and replace Apache Hive.<\/p>\n<p><b>Limitations With Hive:<\/b><\/p>\n<ul>\n<li><em>As for executing the ad-hoc queries<\/em>, Hive launches MapReduce jobs internally. When it comes to the analysis of medium-sized datasets (10 to 200 GB) <a href=\"http:\/\/techvidvan.com\/tutorials\/mapreduce-job-optimization-techniques\/\">MapReduce<\/a> lags in the performance.<\/li>\n<li>There is <em>no resume capability in Hive.<\/em> So, if the processing dies in the middle of a workflow, we cannot resume from where it got stuck.<\/li>\n<li><em>When trash is enabled Hive, we cannot drop encrypted databases in cascade<\/em>, that leads to an execution error. Afterwards, \u00a0users have to use purge option to skip trash instead of drop.<\/li>\n<\/ul>\n<p>Due to these drawbacks, \u00a0Spark SQL performace is better and it comes in picture.<\/p>\n<h3>Spark SQL Datasets<\/h3>\n<p>It is an interface, provides the advantages of RDDs with the comfort of Spark SQL\u2019s execution engine. It is a distributed collection of data to construct a dataset, we can use JVM objects. Afterwards, it can manipulate using functional transformations such as map, flatMap, filter, etc. and many more.<\/p>\n<p>In two languages, dataset API is available like Scala and Java. R and Python do not support dataset API. But, as Python is very dynamic in nature. It provides many of the benefits of the dataset API, such as we can access the field of a row by name naturally row.columnName.<\/p>\n<h3>Spark SQL DataFrames<\/h3>\n<p>As similar as RDD, dataframes are also <em>immutable in nature<\/em>. In dataframes, data <span class=\"passivevoice\">is organized<\/span> into named columns. Also, they are similar to a relational database. It <span class=\"passivevoice\">is designed<\/span> large data sets processing even easier.<\/p>\n<p>There are following ways to create dataframes such as:<\/p>\n<ul>\n<li>With structured data files<\/li>\n<li>From tables in Hive<\/li>\n<li>With external databases<\/li>\n<li>By using existing RDD<\/li>\n<\/ul>\n<p>Dataframes provides <em>richer optimizations<\/em> to us. API of dataframes is available in Scala, Java, Python, and R as well. Dataframe is represented by a <em>dataset of rows in Scala and Java<\/em>. It is simply a type alias of dataset[Row] in Scala API.<\/p>\n<p>Whereas in Java API, users need to use dataset&lt;Row&gt; to represent a dataframe. SQL provides a domain specific language API to manipulate our distributed data. It also makes Spark accessible to a wider audience, beyond specialized data engineers.<\/p>\n<h4>Features of Spark SQL DataFrame<\/h4>\n<p>Few characteristics of dataframe in spark are:<\/p>\n<ol>\n<li>It provides an ability to process the data in the <em>size of kilobytes to petabytes<\/em>. Even on a single node cluster to large cluster.<\/li>\n<li>Dataframes supports different<em> data formats<\/em>, such as Avro, csv, elastic search, and cassandra. It also supports storage systems like HDFS, HIVE tables, MySQL, etc.<\/li>\n<li>By using Spark-core, it can be easily integrated with all big data tools and frameworks.<\/li>\n<li>\u00a0Dataframes provides API for Python, Java, Scala, as well as R programming.<\/li>\n<\/ol>\n<h3>Spark Catalyst Optimizer<\/h3>\n<p>We can say, most of the power of Spark SQL comes due to <strong>catalyst optimizer<\/strong>. It primarily leverages functional programming constructs of Scala such as <em>pattern matching<\/em>. Catalyst optimizer offers a general framework for transforming trees.<\/p>\n<p>Those we can use to perform analysis, optimization, planning, and runtime code generation.<\/p>\n<p>Generally, there are two<em> primary goals<\/em> of catalyst optimizer:<\/p>\n<ul>\n<li>It makes <em>adding new optimization techniques<\/em> easy.<\/li>\n<li>This optimizer also <em>enables external developers to extend the optimizer<\/em>.<\/li>\n<\/ul>\n<p>Basically, in four phases, it uses catalyst&#8217;s transformation framework such as :<\/p>\n<ul>\n<li>By analyzing a logical plan to resolve references<\/li>\n<li>With logical plan optimization<\/li>\n<li>By physical planning<\/li>\n<li>With code generation to compile the parts of the query to Java bytecode<\/li>\n<\/ul>\n<p>In addition, it optimizes all the queries written in Spark SQL and dataframe DSL. It enhances the speed of the system. Optimizer helps us to run queries much faster than their counter RDD part. As much as fast speed, it will have more performance it will increase.<\/p>\n<p>There is a library \u201cSpark Catalyst\u201d as a rule-based system. \u00a0Each rule focusses on the specific optimization. Likewise,<i>\u00a0constantfolding<\/i> focus on eliminating <i>constant expression<\/i> from the query.<\/p>\n<h3>Features of Spark SQL<\/h3>\n<div id=\"attachment_73124\" style=\"width: 1210px\" class=\"wp-caption aligncenter\"><a href=\"https:\/\/techvidvan.com\/tutorials\/wp-content\/uploads\/sites\/2\/2019\/11\/Features-of-Spark-SQL-01.jpg\"><img loading=\"lazy\" decoding=\"async\" aria-describedby=\"caption-attachment-73124\" class=\"wp-image-73124 size-full\" src=\"https:\/\/techvidvan.com\/tutorials\/wp-content\/uploads\/sites\/2\/2019\/11\/Features-of-Spark-SQL-01.jpg\" alt=\"features of spark sql\" width=\"1200\" height=\"628\" \/><\/a><p id=\"caption-attachment-73124\" class=\"wp-caption-text\">Apache Spark SQL- Features<\/p><\/div>\n<h4>1. Spark SQL is Integrated<\/h4>\n<p>With integrated APIs in Python, Scala etc. we query structured data as RDD in Spark. Due to integration, we can easily run SQL queries alongside complex analytic algorithms.<\/p>\n<h4>2. Unified data access<\/h4>\n<p>For working with structured data, Schema-RDDs provide a single interface. Also, includes Apache Hive tables, parquet files, and JSON files.<\/p>\n<h4>3. Hive compatibility<\/h4>\n<p>It reuses the Hive front-end and meta store. In SparkSQL, we can have full compatibility with current Hive data, queries and UDFs.<\/p>\n<h4>4. Standard connectivity<\/h4>\n<p>Offers server mode with the connectivity of industry standard JDBC and ODBC.<\/p>\n<h4>5. Scalability<\/h4>\n<p>We can use the same engine for both interactive as well as long queries.<\/p>\n<h4>6. Performance optimization<\/h4>\n<p>In SparkSQL, each SQL query converts to a logical plan. This is possible by using the query optimization engine. Moreover, it converts to many physical execution plans. It selects the most optimal physical plan for execution of the entire plan.<\/p>\n<h4>7. For batch processing of Hive tables<\/h4>\n<p>For fast batch processing of Hive tables, we can use Spark SQL.<\/p>\n<h3>Uses of Spark SQL<\/h3>\n<ul>\n<li>Most importantly, it executes SQL queries.<\/li>\n<li>We can read data from existing Hive installation by using SparkSQL.<\/li>\n<li>While we run SQL, at another programming language, it results in a dataset\/dataframe.<\/li>\n<\/ul>\n<h3>Functions defined by Spark SQL<\/h3>\n<p>There are following functions defined by Spark SQL, such as :<\/p>\n<div id=\"attachment_73134\" style=\"width: 1210px\" class=\"wp-caption aligncenter\"><a href=\"https:\/\/techvidvan.com\/tutorials\/wp-content\/uploads\/sites\/2\/2019\/11\/Functions-of-Spark-SQL-01.jpg\"><img loading=\"lazy\" decoding=\"async\" aria-describedby=\"caption-attachment-73134\" class=\"wp-image-73134 size-full\" src=\"https:\/\/techvidvan.com\/tutorials\/wp-content\/uploads\/sites\/2\/2019\/11\/Functions-of-Spark-SQL-01.jpg\" alt=\"functions of spark sql\" width=\"1200\" height=\"628\" \/><\/a><p id=\"caption-attachment-73134\" class=\"wp-caption-text\">Apache Spark SQL- Functions<\/p><\/div>\n<h4>1. User Defined Functions (UDFs)<\/h4>\n<p>It takes values from a single row as input. Afterwards, it generates a single return value for every input row.<\/p>\n<h4>2. Basic aggregate functions<\/h4>\n<p><b> <\/b>It operates on a group of rows, then calculates a single return value per group.<\/p>\n<h4>3. Window aggregate functions<\/h4>\n<p>It operates on a group of rows. It also calculates a single return value for each row in a group.<b><\/b><\/p>\n<h4>4. Built-in function<\/h4>\n<p>Spark SQL offers a built-in function to process the column value.<\/p>\n<p>By using the following command we can access built-in function:<\/p>\n<p><b><i>Import org.apache.spark.sql.functions<\/i><\/b><\/p>\n<h3>Disadvantages of Spark SQL<\/h3>\n<p>There are also several disadvantages of working with SparkSQL. Let\u2019s discuss them one by one:<\/p>\n<div id=\"attachment_73106\" style=\"width: 1210px\" class=\"wp-caption aligncenter\"><a href=\"https:\/\/techvidvan.com\/tutorials\/wp-content\/uploads\/sites\/2\/2019\/11\/Disadvantages-of-Spark-SQL-01.jpg\"><img loading=\"lazy\" decoding=\"async\" aria-describedby=\"caption-attachment-73106\" class=\"wp-image-73106 size-full\" src=\"https:\/\/techvidvan.com\/tutorials\/wp-content\/uploads\/sites\/2\/2019\/11\/Disadvantages-of-Spark-SQL-01.jpg\" alt=\"disadvantages of spark sql\" width=\"1200\" height=\"628\" \/><\/a><p id=\"caption-attachment-73106\" class=\"wp-caption-text\">Apache Spark SQL &#8211; Disadvantages<\/p><\/div>\n<h4>1. Unsupportive union type<\/h4>\n<p><b> <\/b>It is impossible to create or read a table containing union fields.<\/p>\n<h4>2. No error for oversize of varchar type<\/h4>\n<p>While we work with SparkSQL, \u00a0it considers varchar as a string. Therefore it has no size limit.<\/p>\n<h4>3. No support for transactional table<\/h4>\n<p><b> <\/b>In SQL, Hive transactions are not supported.<\/p>\n<h4>4. Unsupportive char type<\/h4>\n<p><b> <\/b>In SparkSQL char type (fixed-length strings) are not supported.<\/p>\n<h3>Conclusion<\/h3>\n<p>As a result, <strong>Spark SQL<\/strong> provides the most natural way to express the structured data. It is a module of Apache Spark which analyses the structured data. Working with SQL Spark enhances the compatibility of the system.<\/p>\n<p>As discussed earlier, SparkSQL provides <em>scalability<\/em> and also offers<em> standard connectivity<\/em>. Hence, it enhances the efficiency of the system.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>This blog completely aims to learn detailed concepts of Apache Spark SQL, supports structured data processing. Also, offers to work with datasets in Spark, integrated APIs in Python, Scala, and Java. In this sparkSQL&#46;&#46;&#46;<\/p>\n","protected":false},"author":1,"featured_media":73059,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[614],"tags":[809,810,811,812,813,814,815,816,817,818,819,820],"class_list":["post-2021","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-apache-spark","tag-apache-spark-sql-quick-introduction-guide","tag-apache-sparksql","tag-introduction-on-apache-spark-sql-quick-guide","tag-spark-sql-an-introductory-guide-for-beginners","tag-spark-sql-example","tag-spark-sql-in-spark","tag-spark-sql-performance","tag-spark-sql-programming-guide-spark-1-2-1-apache-spark","tag-spark-sql-quick-guide","tag-spark-sql-tutorial","tag-sql-in-spark","tag-sql-programming"],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v27.7 - https:\/\/yoast.com\/product\/yoast-seo-wordpress\/ -->\n<title>Apache Spark SQL Tutorial : Quick Guide For Beginners - TechVidvan<\/title>\n<meta name=\"description\" content=\"Spark SQL- SparkSQL introduction, SQL features, functions of Spark SQL, uses of Spark SQL, spark SQL datasets,spark SQL dataframes, Spark Catalyst Optimizer, Disadvantages of Spark SQL\" \/>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/techvidvan.com\/tutorials\/apache-spark-sql-tutorial\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"Apache Spark SQL Tutorial : Quick Guide For Beginners - TechVidvan\" \/>\n<meta property=\"og:description\" content=\"Spark SQL- SparkSQL introduction, SQL features, functions of Spark SQL, uses of Spark SQL, spark SQL datasets,spark SQL dataframes, Spark Catalyst Optimizer, Disadvantages of Spark SQL\" \/>\n<meta property=\"og:url\" content=\"https:\/\/techvidvan.com\/tutorials\/apache-spark-sql-tutorial\/\" \/>\n<meta property=\"og:site_name\" content=\"TechVidvan\" \/>\n<meta property=\"article:publisher\" content=\"https:\/\/www.facebook.com\/TechVidvan\/\" \/>\n<meta property=\"article:published_time\" content=\"2018-01-13T04:23:11+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/techvidvan.com\/tutorials\/wp-content\/uploads\/2019\/11\/Apache-Spark-SQL-Tutorial.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=\"TechVidvan Team\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:creator\" content=\"@vidvantech\" \/>\n<meta name=\"twitter:site\" content=\"@vidvantech\" \/>\n<meta name=\"twitter:label1\" content=\"Written by\" \/>\n\t<meta name=\"twitter:data1\" content=\"TechVidvan Team\" \/>\n\t<meta name=\"twitter:label2\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data2\" content=\"8 minutes\" \/>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"Apache Spark SQL Tutorial : Quick Guide For Beginners - TechVidvan","description":"Spark SQL- SparkSQL introduction, SQL features, functions of Spark SQL, uses of Spark SQL, spark SQL datasets,spark SQL dataframes, Spark Catalyst Optimizer, Disadvantages of Spark SQL","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:\/\/techvidvan.com\/tutorials\/apache-spark-sql-tutorial\/","og_locale":"en_US","og_type":"article","og_title":"Apache Spark SQL Tutorial : Quick Guide For Beginners - TechVidvan","og_description":"Spark SQL- SparkSQL introduction, SQL features, functions of Spark SQL, uses of Spark SQL, spark SQL datasets,spark SQL dataframes, Spark Catalyst Optimizer, Disadvantages of Spark SQL","og_url":"https:\/\/techvidvan.com\/tutorials\/apache-spark-sql-tutorial\/","og_site_name":"TechVidvan","article_publisher":"https:\/\/www.facebook.com\/TechVidvan\/","article_published_time":"2018-01-13T04:23:11+00:00","og_image":[{"width":1200,"height":628,"url":"https:\/\/techvidvan.com\/tutorials\/wp-content\/uploads\/2019\/11\/Apache-Spark-SQL-Tutorial.jpg","type":"image\/jpeg"}],"author":"TechVidvan Team","twitter_card":"summary_large_image","twitter_creator":"@vidvantech","twitter_site":"@vidvantech","twitter_misc":{"Written by":"TechVidvan Team","Est. reading time":"8 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/techvidvan.com\/tutorials\/apache-spark-sql-tutorial\/#article","isPartOf":{"@id":"https:\/\/techvidvan.com\/tutorials\/apache-spark-sql-tutorial\/"},"author":{"name":"TechVidvan Team","@id":"https:\/\/techvidvan.com\/tutorials\/#\/schema\/person\/e9c26e74dd3d87421f7ada9433b8cd22"},"headline":"Apache Spark SQL Tutorial : Quick Guide For Beginners","datePublished":"2018-01-13T04:23:11+00:00","mainEntityOfPage":{"@id":"https:\/\/techvidvan.com\/tutorials\/apache-spark-sql-tutorial\/"},"wordCount":1478,"commentCount":0,"publisher":{"@id":"https:\/\/techvidvan.com\/tutorials\/#organization"},"image":{"@id":"https:\/\/techvidvan.com\/tutorials\/apache-spark-sql-tutorial\/#primaryimage"},"thumbnailUrl":"https:\/\/techvidvan.com\/tutorials\/wp-content\/uploads\/2019\/11\/Apache-Spark-SQL-Tutorial.jpg","keywords":["Apache Spark SQL - Quick Introduction Guide","Apache SparkSQL","Introduction on Apache Spark SQL : Quick guide","Spark SQL - An Introductory Guide for Beginners","Spark SQL example","spark SQL in Spark","Spark SQL performance","Spark SQL Programming Guide - Spark 1.2.1 ... - Apache Spark","Spark SQL Quick Guide","Spark SQL tutorial","SQL in spark","SQL programming"],"articleSection":["Spark Tutorials"],"inLanguage":"en-US","potentialAction":[{"@type":"CommentAction","name":"Comment","target":["https:\/\/techvidvan.com\/tutorials\/apache-spark-sql-tutorial\/#respond"]}]},{"@type":"WebPage","@id":"https:\/\/techvidvan.com\/tutorials\/apache-spark-sql-tutorial\/","url":"https:\/\/techvidvan.com\/tutorials\/apache-spark-sql-tutorial\/","name":"Apache Spark SQL Tutorial : Quick Guide For Beginners - TechVidvan","isPartOf":{"@id":"https:\/\/techvidvan.com\/tutorials\/#website"},"primaryImageOfPage":{"@id":"https:\/\/techvidvan.com\/tutorials\/apache-spark-sql-tutorial\/#primaryimage"},"image":{"@id":"https:\/\/techvidvan.com\/tutorials\/apache-spark-sql-tutorial\/#primaryimage"},"thumbnailUrl":"https:\/\/techvidvan.com\/tutorials\/wp-content\/uploads\/2019\/11\/Apache-Spark-SQL-Tutorial.jpg","datePublished":"2018-01-13T04:23:11+00:00","description":"Spark SQL- SparkSQL introduction, SQL features, functions of Spark SQL, uses of Spark SQL, spark SQL datasets,spark SQL dataframes, Spark Catalyst Optimizer, Disadvantages of Spark SQL","breadcrumb":{"@id":"https:\/\/techvidvan.com\/tutorials\/apache-spark-sql-tutorial\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/techvidvan.com\/tutorials\/apache-spark-sql-tutorial\/"]}]},{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/techvidvan.com\/tutorials\/apache-spark-sql-tutorial\/#primaryimage","url":"https:\/\/techvidvan.com\/tutorials\/wp-content\/uploads\/2019\/11\/Apache-Spark-SQL-Tutorial.jpg","contentUrl":"https:\/\/techvidvan.com\/tutorials\/wp-content\/uploads\/2019\/11\/Apache-Spark-SQL-Tutorial.jpg","width":1200,"height":628,"caption":"apache spark sql tutorial"},{"@type":"BreadcrumbList","@id":"https:\/\/techvidvan.com\/tutorials\/apache-spark-sql-tutorial\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/techvidvan.com\/tutorials\/"},{"@type":"ListItem","position":2,"name":"Apache Spark SQL Tutorial : Quick Guide For Beginners"}]},{"@type":"WebSite","@id":"https:\/\/techvidvan.com\/tutorials\/#website","url":"https:\/\/techvidvan.com\/tutorials\/","name":"TechVidvan Blogs","description":"","publisher":{"@id":"https:\/\/techvidvan.com\/tutorials\/#organization"},"potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/techvidvan.com\/tutorials\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"en-US"},{"@type":"Organization","@id":"https:\/\/techvidvan.com\/tutorials\/#organization","name":"TechVidvan","url":"https:\/\/techvidvan.com\/tutorials\/","logo":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/techvidvan.com\/tutorials\/#\/schema\/logo\/image\/","url":"https:\/\/techvidvan.com\/tutorials\/wp-content\/uploads\/2024\/03\/techvidvan-logo-200x50-1.webp","contentUrl":"https:\/\/techvidvan.com\/tutorials\/wp-content\/uploads\/2024\/03\/techvidvan-logo-200x50-1.webp","width":200,"height":50,"caption":"TechVidvan"},"image":{"@id":"https:\/\/techvidvan.com\/tutorials\/#\/schema\/logo\/image\/"},"sameAs":["https:\/\/www.facebook.com\/TechVidvan\/","https:\/\/x.com\/vidvantech"]},{"@type":"Person","@id":"https:\/\/techvidvan.com\/tutorials\/#\/schema\/person\/e9c26e74dd3d87421f7ada9433b8cd22","name":"TechVidvan Team","description":"The TechVidvan Team delivers practical, beginner-friendly tutorials on programming, Java, Python, C++, DSA, AI, ML, data Science, Android, Flutter, MERN, Web Development, and technology. Our experts are here to help you upskill and excel in today\u2019s tech industry."}]}},"amp_enabled":true,"_links":{"self":[{"href":"https:\/\/techvidvan.com\/tutorials\/wp-json\/wp\/v2\/posts\/2021","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/techvidvan.com\/tutorials\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/techvidvan.com\/tutorials\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/techvidvan.com\/tutorials\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/techvidvan.com\/tutorials\/wp-json\/wp\/v2\/comments?post=2021"}],"version-history":[{"count":0,"href":"https:\/\/techvidvan.com\/tutorials\/wp-json\/wp\/v2\/posts\/2021\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/techvidvan.com\/tutorials\/wp-json\/wp\/v2\/media\/73059"}],"wp:attachment":[{"href":"https:\/\/techvidvan.com\/tutorials\/wp-json\/wp\/v2\/media?parent=2021"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/techvidvan.com\/tutorials\/wp-json\/wp\/v2\/categories?post=2021"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/techvidvan.com\/tutorials\/wp-json\/wp\/v2\/tags?post=2021"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}