Hi Guest

MobileUser

1 HomePage 1 Jobs 1 WalkIn 1Articles  

Cat Exam

 :) Latest Topic
AJAX
VB.NET
SQL Query
UDDI
CLASS
JavaScript Questions
SharePoint Interview
SilverLight
WCF
general knowledge
 ASP.NET
 :) Hot Jobs
 
 :) Latest Articles


  

 
DogFood


Spark Sql Questions and Answers
Question Posted on 28 Mar 2018

Home >> Test and Papers >> Spark SQL >> Spark Sql Questions and Answers




Below are the spark questions and answers
(1)Email is an example of structured data
(i)Presentations is an example of structured data
(ii)Photos is an example of unstructured data
(iii)Webpages is an example of structured data

(2)What is RDD?
(i)Relational Distributed Database
(ii)Resilient Distributed Datasets
(iii)Remote Distributed Database
(iv)Resilient Distributed Database

(3)Which is the entry point used in Spark 2.0?
(i)SqlContext
(ii)HiveContext
(iii)SparkSession

(4)Which of these code snippet is the correct format to run SQL queries?
(i)display(spark.sqlContext("select * from Fresco"))
(ii)print(spark.sql("select * from Fresco"))
(iii)display(spark.sql("select * from Fresco"))
(iv)show(spark.sql("select * from Fresco"))

(5)The SQL queries/API calls are converted to -------------------------
(i)Language-neutral expressions
(ii)Platform-neutral expressions
(iii)Logical-neutral expressions
(iv)Logical expressions---

(6)Spark SQL allows users to load and query data from different data sources. Which property of Spark SQL is referred to here?.
(i)Unified Data Access
(ii)Scalability
(iii)Hive Compatibility
(iv)Integrated

(7)Which is the entry point used in Spark 2.0?
(i)SparkSession
(ii)SparkContext
(iii)SqlContext
(iv)HiveContext

(8)Which is true about DataSource API
(i)Build in support to read data from various input formats like Hive, Avro, JSON, JDBC, Parquet, etc.
(ii)None of the options
(iii)and Build in support to read data from various input formats like Hive, Avro, JSON, JDBC, Parquet, etc.
(iv)The top layer in the Spark SQL architecture.

(9)To implement a custom untyped user-defined aggregation function, the user has to extend the which class
(i)None of the options
(ii)UserDefinedAggregateFunction
(iii)UDFAggregateFunction
(iv)UserDefinedFunction

(10)Which supports cost-based optimization and rule-based optimization
(i)SQL Service
(ii)DataSource API
(iii)DataFrame API
(iv)SQL Interpreter and Optimiser

(11)How to display the content of the DataFrame
(i)df.view()
(ii)df.list()
(iii)None of the options
(iv)df.show()

(12)Syntax to create a DataFrame based on the content of a JSON file
(i)spark.textfile("examples/src/main/resources/data.json")
(ii)spark.read("examples/src/main/resources/data.json")
(iii)spark.read.json("examples/src/main/resources/data.json")
(iv)spark.json("examples/src/main/resources/data.json")

(13)When SQL run from the other programming language the result will be-
(i)Neither DataFrame nor Dataset
(ii)DataFrame
(iii)DataSet
(iv)Either DataFrame or Dataset

(14)Functions of Spark SQL is/are
(i)All the options
(ii)Providing rich integration between SQL and regular Python/Java/Scala code
(iii)Querying data using SQL statements
(iv)Loading data from a variety of structured sources

(15)Does Dataset API support Python and R.
(i)yes
(ii)No

(16)Which of the following is true about DataFrame?
(i)DataFrame API have provision for compile time type safety and DataFrames provide a more user-friendly API than RDDs.
(ii)DataFrame API have provision for compile time type safety.
(iii)DataFrames provide a more user-friendly API than RDDs.
(iv)None of the options

(17)How to see the Structure (Schema) of the DataFrame
(i)df.view()
(ii)None of the options
(iii)df.printSchema()
(iv)df.schema()

(18)DataFrame: Supports the programming languages like ___
(i)Java, Scala and R
(ii)Java and Scala
(iii)Java,Python,Scala and R
(iv)Java and python

(19)Which creates DataFrame objects and executes SQL queries
(i)SQL Interpreter and Optimiser
(ii)DataSource API
(iii)SQL Service
(iv)DataFrame API

(20)Which of the following is true for Spark SQL?
(i)Provides an execution platform for all the Spark applications
(ii)It enables users to run SQL / HQL queries on the top of Spark.
(iii)It is the kernel of Spark
(iv)Enables powerful interactive and data analytics application across live streaming data

(21)Which of the following are uses of Apache Spark SQL?
(i)It executes SQL queries.
(ii)When we run SQL within another programming language we will get the result as Dataset/DataFrame.
(iii)All the options
(iv)We can read data from existing Hive installation using SparkSQL.

(22)We can create DataFrame using-
(i)Tables in Hive
(ii)Structured data files
(iii)All the options
(iv)External databases

(23)User-defined aggregations in Spark SQL
(i)UnTyped
(ii)None of the options
(iii)Both UnTyped and Type-Safe
(iv)Type-Safe

(24)Which of the following is not true for Catalyst Optimizer?
(i)The core of Spark SQL
(ii)Does not support rule-based optimization
(iii)Based on functional programming construct in Scala
(iv)Provides advanced programming language features to build a query optimizer

(25)___ is the entry point to interact with underlying Spark functionality
(i)StreamingContext
(ii)SparkSession
(iii)SQLContext
(iv)SparkContext

(26)The Dataset API is accessible in-
(i)Java only
(ii)None of the options
(iii)Scala Only
(iv)Java and Scala

(27)Which of the following the data is organised into named coloumn?
(i)Dataframe
(ii)RDD
(iii)RDD and DataFrame
(iv)Dataset

Answer
(1)(ii)
(2)(ii)
(3)(iii)
(4)(iii)
(5)(i)
(6)(i)
(7)(i)
(8)(i)
(9)(ii)
(10)(iv)
(11)(iv)
(12)(iii)
(13)(iv)
(14)(i)
(15)(ii)
(16)(iii)
(17)(iii)
(18)(iii)
(19)(iii)
(20)(ii)
(22)(iii)
(23)(iii)
(24)(ii)
(25)(ii)
(26)(iv)
0
0



 
 Input Your Comments Or suggestions(If Any)
 Name
 Email(optional)
 Comments


Other Important Questions
DataFrames allows
Dataframe was introduced in which Spark release?
Application can create DataFrame easily with a SparkSession from _____
Complex data types in Spark SQL are
Compile-time safety is not provided in






 
Top Searches:asp net questions vb net questions sql query uddl questions class javascript Questions sharepoint interview questions and concept silverlight questions and concept wcf questions beans general knowledge ajax questions
PHP | Biztalk | Testing | SAP | HR |