Class/Object

org.apache.spark.sql

SnappySession

Related Docs: object SnappySession | package sql

Permalink

class SnappySession extends SparkSession

Self Type
SnappySession
Linear Supertypes
SparkSession, internal.Logging, Closeable, AutoCloseable, Serializable, Serializable, AnyRef, Any
Ordering
  1. Alphabetic
  2. By Inheritance
Inherited
  1. SnappySession
  2. SparkSession
  3. Logging
  4. Closeable
  5. AutoCloseable
  6. Serializable
  7. Serializable
  8. AnyRef
  9. Any
  1. Hide All
  2. Show All
Visibility
  1. Public
  2. All

Instance Constructors

  1. new SnappySession(_sc: SparkContext)

    Permalink

Value Members

  1. final def !=(arg0: Any): Boolean

    Permalink
    Definition Classes
    AnyRef → Any
  2. final def ##(): Int

    Permalink
    Definition Classes
    AnyRef → Any
  3. final def ==(arg0: Any): Boolean

    Permalink
    Definition Classes
    AnyRef → Any
  4. def appendToTempTableCache(df: DataFrame, table: String, storageLevel: StorageLevel = StorageLevel.MEMORY_AND_DISK): Unit

    Permalink

    Append dataframe to cache table in Spark.

    Append dataframe to cache table in Spark.

    storageLevel

    default storage level is MEMORY_AND_DISK

    returns

    @todo -> return type?

    Annotations
    @DeveloperApi()
  5. final def asInstanceOf[T0]: T0

    Permalink
    Definition Classes
    Any
  6. def baseRelationToDataFrame(baseRelation: BaseRelation): DataFrame

    Permalink
    Definition Classes
    SparkSession
  7. lazy val catalog: Catalog

    Permalink
    Definition Classes
    SparkSession
  8. def clear(): Unit

    Permalink
  9. def clearPlanCache(): Unit

    Permalink
  10. def clone(): AnyRef

    Permalink
    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  11. def close(): Unit

    Permalink

    Close the session which will be unusable after this call.

    Close the session which will be unusable after this call.

    Definition Classes
    SnappySession → SparkSession → Closeable → AutoCloseable
  12. lazy val conf: RuntimeConfig

    Permalink
    Definition Classes
    SparkSession
  13. def createApproxTSTopK(topKName: String, baseTable: String, keyColumnName: String, topkOptions: Map[String, String], allowExisting: Boolean): DataFrame

    Permalink

    Create approximate structure to query top-K with time series support.

    Create approximate structure to query top-K with time series support. Java friendly api.

    topKName

    the qualified name of the top-K structure

    baseTable

    the base table of the top-K structure, if any, or null

    allowExisting

    When set to true it will ignore if a table with the same name is present, else it will throw table exist exception

    To do

    provide lot more details and examples to explain creating and using TopK with time series

  14. def createApproxTSTopK(topKName: String, baseTable: Option[String], keyColumnName: String, topkOptions: Map[String, String], allowExisting: Boolean): DataFrame

    Permalink

    Create approximate structure to query top-K with time series support.

    Create approximate structure to query top-K with time series support.

    topKName

    the qualified name of the top-K structure

    baseTable

    the base table of the top-K structure, if any

    allowExisting

    When set to true it will ignore if a table with the same name is present, else it will throw table exist exception

    To do

    provide lot more details and examples to explain creating and using TopK with time series

  15. def createApproxTSTopK(topKName: String, baseTable: String, keyColumnName: String, inputDataSchema: StructType, topkOptions: Map[String, String], allowExisting: Boolean): DataFrame

    Permalink

    Create approximate structure to query top-K with time series support.

    Create approximate structure to query top-K with time series support. Java friendly api.

    topKName

    the qualified name of the top-K structure

    baseTable

    the base table of the top-K structure, if any, or null

    allowExisting

    When set to true it will ignore if a table with the same name is present, else it will throw table exist exception

    To do

    provide lot more details and examples to explain creating and using TopK with time series

  16. def createApproxTSTopK(topKName: String, baseTable: Option[String], keyColumnName: String, inputDataSchema: StructType, topkOptions: Map[String, String], allowExisting: Boolean = false): DataFrame

    Permalink

    Create approximate structure to query top-K with time series support.

    Create approximate structure to query top-K with time series support.

    topKName

    the qualified name of the top-K structure

    baseTable

    the base table of the top-K structure, if any

    allowExisting

    When set to true it will ignore if a table with the same name is present, else it will throw table exist exception

    To do

    provide lot more details and examples to explain creating and using TopK with time series

  17. def createDataFrame(data: List[_], beanClass: Class[_]): DataFrame

    Permalink
    Definition Classes
    SparkSession
  18. def createDataFrame(rdd: JavaRDD[_], beanClass: Class[_]): DataFrame

    Permalink
    Definition Classes
    SparkSession
  19. def createDataFrame(rdd: RDD[_], beanClass: Class[_]): DataFrame

    Permalink
    Definition Classes
    SparkSession
  20. def createDataFrame(rows: List[Row], schema: StructType): DataFrame

    Permalink
    Definition Classes
    SparkSession
    Annotations
    @DeveloperApi() @Evolving()
  21. def createDataFrame(rowRDD: JavaRDD[Row], schema: StructType): DataFrame

    Permalink
    Definition Classes
    SparkSession
    Annotations
    @DeveloperApi() @Evolving()
  22. def createDataFrame(rowRDD: RDD[Row], schema: StructType): DataFrame

    Permalink
    Definition Classes
    SparkSession
    Annotations
    @DeveloperApi() @Evolving()
  23. def createDataFrame[A <: Product](data: Seq[A])(implicit arg0: scala.reflect.api.JavaUniverse.TypeTag[A]): DataFrame

    Permalink
    Definition Classes
    SparkSession
    Annotations
    @Experimental() @Evolving()
  24. def createDataFrame[A <: Product](rdd: RDD[A])(implicit arg0: scala.reflect.api.JavaUniverse.TypeTag[A]): DataFrame

    Permalink
    Definition Classes
    SparkSession
    Annotations
    @Experimental() @Evolving()
  25. def createDataFrameUsingRDD[A <: Product](rdd: RDD[A])(implicit arg0: scala.reflect.api.JavaUniverse.TypeTag[A]): DataFrame

    Permalink

    :: Experimental :: Creates a DataFrame from an RDD of Product (e.g.

    :: Experimental :: Creates a DataFrame from an RDD of Product (e.g. case classes, tuples). This method handles generic array datatype like Array[Decimal]

  26. def createDataset[T](data: RDD[T])(implicit arg0: Encoder[T]): Dataset[T]

    Permalink
    Definition Classes
    SnappySession → SparkSession
  27. def createDataset[T](data: List[T])(implicit arg0: Encoder[T]): Dataset[T]

    Permalink
    Definition Classes
    SparkSession
    Annotations
    @Experimental() @Evolving()
  28. def createDataset[T](data: Seq[T])(implicit arg0: Encoder[T]): Dataset[T]

    Permalink
    Definition Classes
    SparkSession
    Annotations
    @Experimental() @Evolving()
  29. def createIndex(indexName: String, baseTable: String, indexColumns: Map[String, Option[SortDirection]], options: Map[String, String]): Unit

    Permalink

    Create an index on a table.

    Create an index on a table.

    indexName

    Index name which goes in the catalog

    baseTable

    Fully qualified name of table on which the index is created.

    indexColumns

    Columns on which the index has to be created with the direction of sorting. Direction can be specified as None.

    options

    Options for indexes. For e.g. column table index - ("COLOCATE_WITH"->"CUSTOMER"). row table index - ("INDEX_TYPE"->"GLOBAL HASH") or ("INDEX_TYPE"->"UNIQUE")

  30. def createIndex(indexName: String, baseTable: String, indexColumns: Map[String, Boolean], options: Map[String, String]): Unit

    Permalink

    Create an index on a table.

    Create an index on a table.

    indexName

    Index name which goes in the catalog

    baseTable

    Fully qualified name of table on which the index is created.

    indexColumns

    Columns on which the index has to be created along with the sorting direction.The direction of index will be ascending if value is true and descending when value is false. Direction can be specified as null

    options

    Options for indexes. For e.g. column table index - ("COLOCATE_WITH"->"CUSTOMER"). row table index - ("INDEX_TYPE"->"GLOBAL HASH") or ("INDEX_TYPE"->"UNIQUE")

  31. def createSampleTable(tableName: String, baseTable: String, schema: StructType, samplingOptions: Map[String, String], allowExisting: Boolean): DataFrame

    Permalink

    Create a stratified sample table.

    Create a stratified sample table. Java friendly version.

    tableName

    the qualified name of the table

    baseTable

    the base table of the sample table, if any, or null

    schema

    schema of the table

    samplingOptions

    sampling options like QCS, reservoir size etc.

    allowExisting

    When set to true it will ignore if a table with the same name is present, else it will throw table exist exception

    To do

    provide lot more details and examples to explain creating and using sample tables with time series and otherwise

  32. def createSampleTable(tableName: String, baseTable: Option[String], schema: StructType, samplingOptions: Map[String, String], allowExisting: Boolean = false): DataFrame

    Permalink

    Create a stratified sample table.

    Create a stratified sample table.

    tableName

    the qualified name of the table

    baseTable

    the base table of the sample table, if any

    schema

    schema of the table

    samplingOptions

    sampling options like QCS, reservoir size etc.

    allowExisting

    When set to true it will ignore if a table with the same name is present, else it will throw table exist exception

    To do

    provide lot more details and examples to explain creating and using sample tables with time series and otherwise

  33. def createSampleTable(tableName: String, baseTable: String, samplingOptions: Map[String, String], allowExisting: Boolean): DataFrame

    Permalink

    Create a stratified sample table.

    Create a stratified sample table. Java friendly version.

    tableName

    the qualified name of the table

    baseTable

    the base table of the sample table, if any, or null

    samplingOptions

    sampling options like QCS, reservoir size etc.

    allowExisting

    When set to true it will ignore if a table with the same name is present, else it will throw table exist exception

    To do

    provide lot more details and examples to explain creating and using sample tables with time series and otherwise

  34. def createSampleTable(tableName: String, baseTable: Option[String], samplingOptions: Map[String, String], allowExisting: Boolean): DataFrame

    Permalink

    Create a stratified sample table.

    Create a stratified sample table.

    tableName

    the qualified name of the table

    baseTable

    the base table of the sample table, if any

    samplingOptions

    sampling options like QCS, reservoir size etc.

    allowExisting

    When set to true it will ignore if a table with the same name is present, else it will throw table exist exception

    To do

    provide lot more details and examples to explain creating and using sample tables with time series and otherwise

  35. def createTable(tableName: String, provider: String, schemaDDL: String, options: Map[String, String], allowExisting: Boolean): DataFrame

    Permalink

    Creates a SnappyData managed JDBC table which takes a free format ddl string.

    Creates a SnappyData managed JDBC table which takes a free format ddl string. The ddl string should adhere to syntax of underlying JDBC store. SnappyData ships with inbuilt JDBC store, which can be accessed by Row format data store. The option parameter can take connection details.

       val props = Map(
         "url" -> s"jdbc:derby:$path",
         "driver" -> "org.apache.derby.jdbc.EmbeddedDriver",
         "poolImpl" -> "tomcat",
         "user" -> "app",
         "password" -> "app"
       )
    
    val schemaDDL = "(OrderId INT NOT NULL PRIMARY KEY,ItemId INT, ITEMREF INT)"
    snappyContext.createTable("jdbcTable", "jdbc", schemaDDL, props)

    Any DataFrame of the same schema can be inserted into the JDBC table using DataFrameWriter API.

    e.g.

    case class Data(col1: Int, col2: Int, col3: Int)
    
    val data = Seq(Seq(1, 2, 3), Seq(7, 8, 9), Seq(9, 2, 3), Seq(4, 2, 3), Seq(5, 6, 7))
    val rdd = sc.parallelize(data, data.length).map(s => new Data(s(0), s(1), s(2)))
    val dataDF = snc.createDataFrame(rdd)
    dataDF.write.insertInto("jdbcTable")
    tableName

    Name of the table

    provider

    Provider name 'ROW' or 'JDBC'.

    schemaDDL

    Table schema as a string interpreted by provider

    options

    Properties for table creation. See options list for different tables. https://github .com/SnappyDataInc/snappydata/blob/master/docs/rowAndColumnTables.md

    allowExisting

    When set to true it will ignore if a table with the same name is present, else it will throw table exist exception

    returns

    DataFrame for the table

    Annotations
    @Experimental()
  36. def createTable(tableName: String, provider: String, schemaDDL: String, options: Map[String, String], allowExisting: Boolean): DataFrame

    Permalink

    Creates a SnappyData managed JDBC table which takes a free format ddl string.

    Creates a SnappyData managed JDBC table which takes a free format ddl string. The ddl string should adhere to syntax of underlying JDBC store. SnappyData ships with inbuilt JDBC store, which can be accessed by Row format data store. The option parameter can take connection details.

       val props = Map(
         "url" -> s"jdbc:derby:$path",
         "driver" -> "org.apache.derby.jdbc.EmbeddedDriver",
         "poolImpl" -> "tomcat",
         "user" -> "app",
         "password" -> "app"
       )
    
    val schemaDDL = "(OrderId INT NOT NULL PRIMARY KEY,ItemId INT, ITEMREF INT)"
    snappyContext.createTable("jdbcTable", "jdbc", schemaDDL, props)

    Any DataFrame of the same schema can be inserted into the JDBC table using DataFrameWriter API.

    e.g.

    case class Data(col1: Int, col2: Int, col3: Int)
    
    val data = Seq(Seq(1, 2, 3), Seq(7, 8, 9), Seq(9, 2, 3), Seq(4, 2, 3), Seq(5, 6, 7))
    val rdd = sc.parallelize(data, data.length).map(s => new Data(s(0), s(1), s(2)))
    val dataDF = snc.createDataFrame(rdd)
    dataDF.write.insertInto("jdbcTable")
    tableName

    Name of the table

    provider

    Provider name 'ROW' or 'JDBC'.

    schemaDDL

    Table schema as a string interpreted by provider

    options

    Properties for table creation. See options list for different tables. https://github .com/SnappyDataInc/snappydata/blob/master/docs/rowAndColumnTables.md

    allowExisting

    When set to true it will ignore if a table with the same name is present, else it will throw table exist exception

    returns

    DataFrame for the table

  37. def createTable(tableName: String, provider: String, schema: StructType, options: Map[String, String], allowExisting: Boolean): DataFrame

    Permalink

    Creates a SnappyData managed table.

    Creates a SnappyData managed table. Any relation providers (e.g. row, column etc) supported by SnappyData can be created here.

    case class Data(col1: Int, col2: Int, col3: Int)
    val props = Map.empty[String, String]
    val data = Seq(Seq(1, 2, 3), Seq(7, 8, 9), Seq(9, 2, 3), Seq(4, 2, 3), Seq(5, 6, 7))
    val rdd = sc.parallelize(data, data.length).map(s => new Data(s(0), s(1), s(2)))
    val dataDF = snc.createDataFrame(rdd)
    snappyContext.createTable(tableName, "column", dataDF.schema, props)

    For other external relation providers, use createExternalTable.

    tableName

    Name of the table

    provider

    Provider name such as 'COLUMN', 'ROW', 'JDBC' etc.

    schema

    Table schema

    options

    Properties for table creation. See options list for different tables. https://github .com/SnappyDataInc/snappydata/blob/master/docs/rowAndColumnTables.md

    allowExisting

    When set to true it will ignore if a table with the same name is present, else it will throw table exist exception

    returns

    DataFrame for the table

    Annotations
    @Experimental()
  38. def createTable(tableName: String, provider: String, schema: StructType, options: Map[String, String], allowExisting: Boolean = false): DataFrame

    Permalink

    Creates a SnappyData managed table.

    Creates a SnappyData managed table. Any relation providers (e.g. row, column etc) supported by SnappyData can be created here.

    case class Data(col1: Int, col2: Int, col3: Int)
    val props = Map.empty[String, String]
    val data = Seq(Seq(1, 2, 3), Seq(7, 8, 9), Seq(9, 2, 3), Seq(4, 2, 3), Seq(5, 6, 7))
    val rdd = sc.parallelize(data, data.length).map(s => new Data(s(0), s(1), s(2)))
    val dataDF = snc.createDataFrame(rdd)
    snappyContext.createTable(tableName, "column", dataDF.schema, props)

    For other external relation providers, use createExternalTable.

    tableName

    Name of the table

    provider

    Provider name such as 'COLUMN', 'ROW', 'JDBC' etc.

    schema

    Table schema

    options

    Properties for table creation. See options list for different tables. https://github .com/SnappyDataInc/snappydata/blob/master/docs/rowAndColumnTables.md

    allowExisting

    When set to true it will ignore if a table with the same name is present, else it will throw table exist exception

    returns

    DataFrame for the table

  39. def createTable(tableName: String, provider: String, options: Map[String, String], allowExisting: Boolean): DataFrame

    Permalink

    Creates a SnappyData managed table.

    Creates a SnappyData managed table. Any relation providers (e.g. row, column etc) supported by SnappyData can be created here.

    val airlineDF = snappyContext.createTable(stagingAirline,
      "column", Map("buckets" -> "29"))

    For other external relation providers, use createExternalTable.

    tableName

    Name of the table

    provider

    Provider name such as 'COLUMN', 'ROW', 'JDBC' etc.

    options

    Properties for table creation

    allowExisting

    When set to true it will ignore if a table with the same name is present, else it will throw table exist exception

    returns

    DataFrame for the table

    Annotations
    @Experimental()
  40. def createTable(tableName: String, provider: String, options: Map[String, String], allowExisting: Boolean): DataFrame

    Permalink

    Creates a SnappyData managed table.

    Creates a SnappyData managed table. Any relation providers (e.g. row, column etc) supported by SnappyData can be created here.

    val airlineDF = snappyContext.createTable(stagingAirline,
      "column", Map("buckets" -> "29"))

    For other external relation providers, use createExternalTable.

    tableName

    Name of the table

    provider

    Provider name such as 'COLUMN', 'ROW', 'JDBC' etc.

    options

    Properties for table creation

    allowExisting

    When set to true it will ignore if a table with the same name is present, else it will throw table exist exception

    returns

    DataFrame for the table

  41. def delete(tableName: String, filterExpr: String): Int

    Permalink

    Delete all rows in table that match passed filter expression

    Delete all rows in table that match passed filter expression

    tableName

    table name

    filterExpr

    SQL WHERE criteria to select rows that will be updated

    returns

    number of rows deleted

    Annotations
    @DeveloperApi()
  42. def dropIndex(indexName: QualifiedTableName, ifExists: Boolean): Unit

    Permalink

    Drops an index on a table

  43. def dropIndex(indexName: String, ifExists: Boolean): Unit

    Permalink

    Drops an index on a table

    Drops an index on a table

    indexName

    Index name which goes in catalog

    ifExists

    Drop if exists, else exit gracefully

  44. def dropTable(tableName: String, ifExists: Boolean = false): Unit

    Permalink

    Drop a SnappyData table created by a call to SnappySession.createTable, Catalog.createExternalTable or Dataset.createOrReplaceTempView.

    Drop a SnappyData table created by a call to SnappySession.createTable, Catalog.createExternalTable or Dataset.createOrReplaceTempView.

    tableName

    table to be dropped

    ifExists

    attempt drop only if the table exists

  45. lazy val emptyDataFrame: DataFrame

    Permalink
    Definition Classes
    SparkSession
  46. def emptyDataset[T](implicit arg0: Encoder[T]): Dataset[T]

    Permalink
    Definition Classes
    SparkSession
    Annotations
    @Experimental() @Evolving()
  47. final def eq(arg0: AnyRef): Boolean

    Permalink
    Definition Classes
    AnyRef
  48. def equals(arg0: Any): Boolean

    Permalink
    Definition Classes
    AnyRef → Any
  49. def experimental: ExperimentalMethods

    Permalink
    Definition Classes
    SparkSession
    Annotations
    @Experimental() @Unstable()
  50. def finalize(): Unit

    Permalink
    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( classOf[java.lang.Throwable] )
  51. def getClass(ctx: CodegenContext, baseTypes: Seq[(DataType, Boolean)], keyTypes: Seq[(DataType, Boolean)], types: Seq[(DataType, Boolean)], multimap: Boolean): Option[(String, String)]

    Permalink

    Get name of a previously registered class using addClass.

  52. final def getClass(): Class[_]

    Permalink
    Definition Classes
    AnyRef → Any
  53. def getDictionaryCode(ctx: CodegenContext, keyVar: String): Option[DictionaryCode]

    Permalink

    Get DictionaryCode for a previously registered variable in ExprCode using addDictionaryCode.

  54. def getPreviousQueryHints: Map[String, String]

    Permalink
  55. def hashCode(): Int

    Permalink
    Definition Classes
    AnyRef → Any
  56. def initializeLogIfNecessary(isInterpreter: Boolean): Unit

    Permalink
    Attributes
    protected
    Definition Classes
    Logging
  57. def insert(tableName: String, rows: ArrayList[ArrayList[_]]): Int

    Permalink

    Insert one or more org.apache.spark.sql.Row into an existing table

    Insert one or more org.apache.spark.sql.Row into an existing table

    java.util.ArrayList[java.util.ArrayList[_] rows = ...    *
     snSession.insert(tableName, rows)
    tableName

    table name for the insert operation

    rows

    list of rows to be inserted into the table

    returns

    number of rows inserted

    Annotations
    @Experimental()
  58. def insert(tableName: String, rows: Row*): Int

    Permalink

    Insert one or more org.apache.spark.sql.Row into an existing table

    Insert one or more org.apache.spark.sql.Row into an existing table

    snSession.insert(tableName, dataDF.collect(): _*)

    If insert is on a column table then a row insert can trigger an overflow to column store form row buffer. If the overflow fails due to some condition like low memory , then the overflow fails and exception is thrown, but row buffer values are kept as it is. Any user level counter of number of rows inserted might be invalid in such a case.

    tableName

    table name for the insert operation

    rows

    list of rows to be inserted into the table

    returns

    number of rows inserted

    Annotations
    @DeveloperApi()
  59. final def isInstanceOf[T0]: Boolean

    Permalink
    Definition Classes
    Any
  60. def isTraceEnabled(): Boolean

    Permalink
    Attributes
    protected
    Definition Classes
    Logging
  61. def listenerManager: ExecutionListenerManager

    Permalink
    Definition Classes
    SparkSession
    Annotations
    @Experimental() @Evolving()
  62. def log: Logger

    Permalink
    Attributes
    protected
    Definition Classes
    Logging
  63. def logDebug(msg: ⇒ String, throwable: Throwable): Unit

    Permalink
    Attributes
    protected
    Definition Classes
    Logging
  64. def logDebug(msg: ⇒ String): Unit

    Permalink
    Attributes
    protected
    Definition Classes
    Logging
  65. def logError(msg: ⇒ String, throwable: Throwable): Unit

    Permalink
    Attributes
    protected
    Definition Classes
    Logging
  66. def logError(msg: ⇒ String): Unit

    Permalink
    Attributes
    protected
    Definition Classes
    Logging
  67. def logInfo(msg: ⇒ String, throwable: Throwable): Unit

    Permalink
    Attributes
    protected
    Definition Classes
    Logging
  68. def logInfo(msg: ⇒ String): Unit

    Permalink
    Attributes
    protected
    Definition Classes
    Logging
  69. def logName: String

    Permalink
    Attributes
    protected
    Definition Classes
    Logging
  70. def logTrace(msg: ⇒ String, throwable: Throwable): Unit

    Permalink
    Attributes
    protected
    Definition Classes
    Logging
  71. def logTrace(msg: ⇒ String): Unit

    Permalink
    Attributes
    protected
    Definition Classes
    Logging
  72. def logWarning(msg: ⇒ String, throwable: Throwable): Unit

    Permalink
    Attributes
    protected
    Definition Classes
    Logging
  73. def logWarning(msg: ⇒ String): Unit

    Permalink
    Attributes
    protected
    Definition Classes
    Logging
  74. final def ne(arg0: AnyRef): Boolean

    Permalink
    Definition Classes
    AnyRef
  75. def newSession(): SnappySession

    Permalink

    Start a new session with isolated SQL configurations, temporary tables, registered functions are isolated, but sharing the underlying SparkContext and cached data.

    Start a new session with isolated SQL configurations, temporary tables, registered functions are isolated, but sharing the underlying SparkContext and cached data.

    Note: Other than the SparkContext, all shared state is initialized lazily. This method will force the initialization of the shared state to ensure that parent and child sessions are set up with the same shared state. If the underlying catalog implementation is Hive, this will initialize the metastore, which may take some time.

    Definition Classes
    SnappySession → SparkSession
    Since

    2.0.0

  76. final def notify(): Unit

    Permalink
    Definition Classes
    AnyRef
  77. final def notifyAll(): Unit

    Permalink
    Definition Classes
    AnyRef
  78. def onlyParseSQL(sqLText: String): LogicalPlan

    Permalink
  79. def parseDataType(dataTypeString: String): DataType

    Permalink
    Attributes
    protected[org.apache.spark.sql]
    Definition Classes
    SparkSession
  80. final def prepareSQL(sqlText: String): LogicalPlan

    Permalink
  81. def put(tableName: String, rows: ArrayList[ArrayList[_]]): Int

    Permalink

    Upsert one or more org.apache.spark.sql.Row into an existing table

    Upsert one or more org.apache.spark.sql.Row into an existing table

    java.util.ArrayList[java.util.ArrayList[_] rows = ...    *
     snSession.put(tableName, rows)
    tableName

    table name for the put operation

    rows

    list of rows to be put on the table

    returns

    number of rows successfully put

    Annotations
    @Experimental()
  82. def put(tableName: String, rows: Row*): Int

    Permalink

    Upsert one or more org.apache.spark.sql.Row into an existing table

    Upsert one or more org.apache.spark.sql.Row into an existing table

    snSession.put(tableName, dataDF.collect(): _*)
    tableName

    table name for the put operation

    rows

    list of rows to be put on the table

    returns

    number of rows successfully put

    Annotations
    @DeveloperApi()
  83. def queryApproxTSTopK(topK: String, startTime: Long, endTime: Long, k: Int): DataFrame

    Permalink
  84. def queryApproxTSTopK(topKName: String, startTime: Long, endTime: Long): DataFrame

    Permalink

    To do

    why do we need this method? K is optional in the above method

  85. def queryApproxTSTopK(topKName: String, startTime: String = null, endTime: String = null, k: Int = 1): DataFrame

    Permalink

    Fetch the topK entries in the Approx TopK synopsis for the specified time interval.

    Fetch the topK entries in the Approx TopK synopsis for the specified time interval. See _createTopK_ for how to create this data structure and associate this to a base table (i.e. the full data set). The time interval specified here should not be less than the minimum time interval used when creating the TopK synopsis.

    topKName

    - The topK structure that is to be queried.

    startTime

    start time as string of the format "yyyy-mm-dd hh:mm:ss". If passed as null, oldest interval is considered as the start interval.

    endTime

    end time as string of the format "yyyy-mm-dd hh:mm:ss". If passed as null, newest interval is considered as the last interval.

    k

    Optional. Number of elements to be queried. This is to be passed only for stream summary

    returns

    returns the top K elements with their respective frequencies between two time

    To do

    provide an example and explain the returned DataFrame. Key is the attribute stored but the value is a struct containing count_estimate, and lower, upper bounds? How many elements are returned if K is not specified?

  86. def range(start: Long, end: Long, step: Long, numPartitions: Int): Dataset[Long]

    Permalink
    Definition Classes
    SparkSession
    Annotations
    @Experimental() @Evolving()
  87. def range(start: Long, end: Long, step: Long): Dataset[Long]

    Permalink
    Definition Classes
    SparkSession
    Annotations
    @Experimental() @Evolving()
  88. def range(start: Long, end: Long): Dataset[Long]

    Permalink
    Definition Classes
    SparkSession
    Annotations
    @Experimental() @Evolving()
  89. def range(end: Long): Dataset[Long]

    Permalink
    Definition Classes
    SparkSession
    Annotations
    @Experimental() @Evolving()
  90. def read: DataFrameReader

    Permalink
    Definition Classes
    SparkSession
  91. def readStream: DataStreamReader

    Permalink
    Definition Classes
    SparkSession
    Annotations
    @Experimental() @Evolving()
  92. def saveStream[T](stream: DStream[T], aqpTables: Seq[String], transformer: Option[(RDD[T]) ⇒ RDD[Row]])(implicit v: scala.reflect.api.JavaUniverse.TypeTag[T]): Unit

    Permalink

    :: DeveloperApi ::

    :: DeveloperApi ::

    Annotations
    @DeveloperApi()
    To do

    do we need this anymore? If useful functionality, make this private to sql package ... SchemaDStream should use the data source API? Tagging as developer API, for now

  93. lazy val sessionCatalog: SnappyStoreHiveCatalog

    Permalink
  94. lazy val sessionState: SnappySessionState

    Permalink

    State isolated across sessions, including SQL configurations, temporary tables, registered functions, and everything else that accepts a org.apache.spark.sql.internal.SQLConf.

    State isolated across sessions, including SQL configurations, temporary tables, registered functions, and everything else that accepts a org.apache.spark.sql.internal.SQLConf.

    Definition Classes
    SnappySession → SparkSession
  95. def setPreparedQuery(preparePhase: Boolean, paramSet: Option[ParameterValueSet]): Unit

    Permalink
  96. def setSchema(schemaName: String): Unit

    Permalink

    Set current database/schema.

    Set current database/schema.

    schemaName

    schema name which goes in the catalog

  97. def snappyParser: SnappyParser

    Permalink
  98. val sparkContext: SparkContext

    Permalink
    Definition Classes
    SparkSession
  99. def sql(sqlText: String): CachedDataFrame

    Permalink
    Definition Classes
    SnappySession → SparkSession
  100. val sqlContext: SnappyContext

    Permalink

    A wrapped version of this session in the form of a SQLContext, for backward compatibility.

    A wrapped version of this session in the form of a SQLContext, for backward compatibility.

    Definition Classes
    SnappySession → SparkSession
    Since

    2.0.0

  101. def sqlUncached(sqlText: String): DataFrame

    Permalink
  102. def stop(): Unit

    Permalink
    Definition Classes
    SparkSession
  103. def streams: StreamingQueryManager

    Permalink
    Definition Classes
    SparkSession
    Annotations
    @Experimental() @Unstable()
  104. final def synchronized[T0](arg0: ⇒ T0): T0

    Permalink
    Definition Classes
    AnyRef
  105. def table(tableName: String): DataFrame

    Permalink
    Definition Classes
    SparkSession
  106. def time[T](f: ⇒ T): T

    Permalink
    Definition Classes
    SparkSession
    Annotations
    @Stable()
  107. def toString(): String

    Permalink
    Definition Classes
    AnyRef → Any
  108. def truncateTable(tableName: String, ifExists: Boolean = false): Unit

    Permalink

    Empties the contents of the table without deleting the catalog entry.

    Empties the contents of the table without deleting the catalog entry.

    tableName

    full table name to be truncated

    ifExists

    attempt truncate only if the table exists

  109. def udf: UDFRegistration

    Permalink
    Definition Classes
    SparkSession
  110. def update(tableName: String, filterExpr: String, newColumnValues: ArrayList[_], updateColumns: ArrayList[String]): Int

    Permalink

    Update all rows in table that match passed filter expression

    Update all rows in table that match passed filter expression

    snappyContext.update("jdbcTable", "ITEMREF = 3" , Row(99) , "ITEMREF" )
    tableName

    table name which needs to be updated

    filterExpr

    SQL WHERE criteria to select rows that will be updated

    newColumnValues

    A list containing all the updated column values. They MUST match the updateColumn list passed

    updateColumns

    List of all column names being updated

    Annotations
    @Experimental()
  111. def update(tableName: String, filterExpr: String, newColumnValues: Row, updateColumns: String*): Int

    Permalink

    Update all rows in table that match passed filter expression

    Update all rows in table that match passed filter expression

    snappyContext.update("jdbcTable", "ITEMREF = 3" , Row(99) , "ITEMREF" )
    tableName

    table name which needs to be updated

    filterExpr

    SQL WHERE criteria to select rows that will be updated

    newColumnValues

    A single Row containing all updated column values. They MUST match the updateColumn list passed

    updateColumns

    List of all column names being updated

    Annotations
    @DeveloperApi()
  112. def version: String

    Permalink
    Definition Classes
    SparkSession
  113. final def wait(): Unit

    Permalink
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  114. final def wait(arg0: Long, arg1: Int): Unit

    Permalink
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  115. final def wait(arg0: Long): Unit

    Permalink
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )

Inherited from SparkSession

Inherited from internal.Logging

Inherited from Closeable

Inherited from AutoCloseable

Inherited from Serializable

Inherited from Serializable

Inherited from AnyRef

Inherited from Any

basic

Ungrouped