alter table adds/drops provided column, only supprted for row tables.
alter table adds/drops provided column, only supprted for row tables. For adding a column isAddColumn should be true, else it will be drop column
Append dataframe to cache table in Spark.
Append dataframe to cache table in Spark.
default storage level is MEMORY_AND_DISK
@todo -> return type?
Convert a BaseRelation created for external data sources into a DataFrame
.
Convert a BaseRelation created for external data sources into a DataFrame
.
1.3.0
Caches the specified table in-memory.
Caches the specified table in-memory.
1.3.0
Removes all cached tables from the in-memory cache.
Removes all cached tables from the in-memory cache.
1.3.0
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.
the qualified name of the top-K structure
the base table of the top-K structure, if any, or null
When set to true it will ignore if a table with the same name is present, else it will throw table exist exception
provide lot more details and examples to explain creating and using TopK with time series
Create approximate structure to query top-K with time series support.
Create approximate structure to query top-K with time series support.
the qualified name of the top-K structure
the base table of the top-K structure, if any
When set to true it will ignore if a table with the same name is present, else it will throw table exist exception
provide lot more details and examples to explain creating and using TopK with time series
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.
the qualified name of the top-K structure
the base table of the top-K structure, if any, or null
When set to true it will ignore if a table with the same name is present, else it will throw table exist exception
provide lot more details and examples to explain creating and using TopK with time series
Create approximate structure to query top-K with time series support.
Create approximate structure to query top-K with time series support.
the qualified name of the top-K structure
the base table of the top-K structure, if any
When set to true it will ignore if a table with the same name is present, else it will throw table exist exception
provide lot more details and examples to explain creating and using TopK with time series
Applies a schema to a List of Java Beans.
Applies a schema to a List of Java Beans.
WARNING: Since there is no guaranteed ordering for fields in a Java Bean, SELECT * queries will return the columns in an undefined order.
1.6.0
Applies a schema to an RDD of Java Beans.
Applies a schema to an RDD of Java Beans.
WARNING: Since there is no guaranteed ordering for fields in a Java Bean, SELECT * queries will return the columns in an undefined order.
1.3.0
Applies a schema to an RDD of Java Beans.
Applies a schema to an RDD of Java Beans.
WARNING: Since there is no guaranteed ordering for fields in a Java Bean, SELECT * queries will return the columns in an undefined order.
1.3.0
:: DeveloperApi ::
Creates a DataFrame
from a java.util.List containing Rows using the given schema.
:: DeveloperApi ::
Creates a DataFrame
from a java.util.List containing Rows using the given schema.
It is important to make sure that the structure of every Row of the provided List matches
the provided schema. Otherwise, there will be runtime exception.
1.6.0
:: DeveloperApi ::
Creates a DataFrame
from a JavaRDD containing Rows using the given schema.
:: DeveloperApi ::
Creates a DataFrame
from a JavaRDD containing Rows using the given schema.
It is important to make sure that the structure of every Row of the provided RDD matches
the provided schema. Otherwise, there will be runtime exception.
1.3.0
:: DeveloperApi ::
Creates a DataFrame
from an RDD containing Rows using the given schema.
:: DeveloperApi ::
Creates a DataFrame
from an RDD containing Rows using the given schema.
It is important to make sure that the structure of every Row of the provided RDD matches
the provided schema. Otherwise, there will be runtime exception.
Example:
import org.apache.spark.sql._ import org.apache.spark.sql.types._ val sqlContext = new org.apache.spark.sql.SQLContext(sc) val schema = StructType( StructField("name", StringType, false) :: StructField("age", IntegerType, true) :: Nil) val people = sc.textFile("examples/src/main/resources/people.txt").map( _.split(",")).map(p => Row(p(0), p(1).trim.toInt)) val dataFrame = sqlContext.createDataFrame(people, schema) dataFrame.printSchema // root // |-- name: string (nullable = false) // |-- age: integer (nullable = true) dataFrame.createOrReplaceTempView("people") sqlContext.sql("select name from people").collect.foreach(println)
1.3.0
:: Experimental :: Creates a DataFrame from a local Seq of Product.
:: Experimental :: Creates a DataFrame from a local Seq of Product.
1.3.0
:: 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).
1.3.0
:: 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]
:: Experimental :: Creates a Dataset from a java.util.List of a given type.
:: Experimental ::
Creates a Dataset from a java.util.List of a given type. This method requires an
encoder (to convert a JVM object of type T
to and from the internal Spark SQL representation)
that is generally created automatically through implicits from a SparkSession
, or can be
created explicitly by calling static methods on Encoders.
List<String> data = Arrays.asList("hello", "world"); Dataset<String> ds = spark.createDataset(data, Encoders.STRING());
2.0.0
:: Experimental :: Creates a Dataset from an RDD of a given type.
:: Experimental ::
Creates a Dataset from an RDD of a given type. This method requires an
encoder (to convert a JVM object of type T
to and from the internal Spark SQL representation)
that is generally created automatically through implicits from a SparkSession
, or can be
created explicitly by calling static methods on Encoders.
2.0.0
:: Experimental :: Creates a Dataset from a local Seq of data of a given type.
:: Experimental ::
Creates a Dataset from a local Seq of data of a given type. This method requires an
encoder (to convert a JVM object of type T
to and from the internal Spark SQL representation)
that is generally created automatically through implicits from a SparkSession
, or can be
created explicitly by calling static methods on Encoders.
import spark.implicits._ case class Person(name: String, age: Long) val data = Seq(Person("Michael", 29), Person("Andy", 30), Person("Justin", 19)) val ds = spark.createDataset(data) ds.show() // +-------+---+ // | name|age| // +-------+---+ // |Michael| 29| // | Andy| 30| // | Justin| 19| // +-------+---+
2.0.0
(Scala-specific) Create an external table from the given path based on a data source, a schema and a set of options.
(Scala-specific) Create an external table from the given path based on a data source, a schema and a set of options. Then, returns the corresponding DataFrame.
1.3.0
Create an external table from the given path based on a data source, a schema and a set of options.
Create an external table from the given path based on a data source, a schema and a set of options. Then, returns the corresponding DataFrame.
1.3.0
(Scala-specific) Creates an external table from the given path based on a data source and a set of options.
(Scala-specific) Creates an external table from the given path based on a data source and a set of options. Then, returns the corresponding DataFrame.
1.3.0
Creates an external table from the given path based on a data source and a set of options.
Creates an external table from the given path based on a data source and a set of options. Then, returns the corresponding DataFrame.
1.3.0
Creates an external table from the given path based on a data source and returns the corresponding DataFrame.
Creates an external table from the given path based on a data source and returns the corresponding DataFrame.
1.3.0
Creates an external table from the given path and returns the corresponding DataFrame.
Creates an external table from the given path and returns the corresponding DataFrame. It will use the default data source configured by spark.sql.sources.default.
1.3.0
Create an index on a table.
Create an index on a table.
Index name which goes in the catalog
Fully qualified name of table on which the index is created.
Columns on which the index has to be created with the direction of sorting. Direction can be specified as None.
Options for indexes. For e.g. column table index - ("COLOCATE_WITH"->"CUSTOMER"). row table index - ("INDEX_TYPE"->"GLOBAL HASH") or ("INDEX_TYPE"->"UNIQUE")
Create an index on a table.
Create an index on a table.
Index name which goes in the catalog
Fully qualified name of table on which the index is created.
Columns on which the index has to be created along with the sorting direction.
Sorting direction for indexColumns. The direction of index will be ascending if value is true and descending when value is false. The values in this list must exactly match indexColumns list. Direction can be specified as null in which case ascending is used.
Options for indexes. For e.g. column table index - ("COLOCATE_WITH"->"CUSTOMER"). row table index - ("INDEX_TYPE"->"GLOBAL HASH") or ("INDEX_TYPE"->"UNIQUE")
Create a stratified sample table.
Create a stratified sample table. Java friendly version.
the qualified name of the table
the base table of the sample table, if any, or null
schema of the table
sampling options like QCS, reservoir size etc.
When set to true it will ignore if a table with the same name is present, else it will throw table exist exception
provide lot more details and examples to explain creating and using sample tables with time series and otherwise
Create a stratified sample table.
Create a stratified sample table.
the qualified name of the table
the base table of the sample table, if any
schema of the table
sampling options like QCS, reservoir size etc.
When set to true it will ignore if a table with the same name is present, else it will throw table exist exception
provide lot more details and examples to explain creating and using sample tables with time series and otherwise
Create a stratified sample table.
Create a stratified sample table. Java friendly version.
the qualified name of the table
the base table of the sample table, if any, or null
sampling options like QCS, reservoir size etc.
When set to true it will ignore if a table with the same name is present, else it will throw table exist exception
provide lot more details and examples to explain creating and using sample tables with time series and otherwise
Create a stratified sample table.
Create a stratified sample table.
the qualified name of the table
the base table of the sample table, if any
sampling options like QCS, reservoir size etc.
When set to true it will ignore if a table with the same name is present, else it will throw table exist exception
provide lot more details and examples to explain creating and using sample tables with time series and otherwise
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(Data(1, 2, 3), Data(7, 8, 9), Data(9, 2, 3), Data(4, 2, 3), Data(5, 6, 7)) val dataDF = snc.createDataset(data)(Encoders.product) dataDF.write.insertInto("jdbcTable")
Name of the table
Provider name 'ROW' or 'JDBC'.
Table schema as a string interpreted by provider
Properties for table creation. See options list for different tables. https://github.com/TIBCOSoftware/snappydata /blob/master/docs/programming_guide/tables_in_snappydata.md
When set to true it will ignore if a table with the same name is present, else it will throw table exist exception
DataFrame for the table
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(Data(1, 2, 3), Data(7, 8, 9), Data(9, 2, 3), Data(4, 2, 3), Data(5, 6, 7)) val dataDF = snc.createDataset(data)(Encoders.product) dataDF.write.insertInto("jdbcTable")
Name of the table
Provider name 'ROW' or 'JDBC'.
Table schema as a string interpreted by provider
Properties for table creation. See options list for different tables. https://github.com/TIBCOSoftware/snappydata /blob/master/docs/programming_guide/tables_in_snappydata.md
When set to true it will ignore if a table with the same name is present, else it will throw table exist exception
DataFrame for the table
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(Data(1, 2, 3), Data(7, 8, 9), Data(9, 2, 3), Data(4, 2, 3), Data(5, 6, 7)) val dataDF = snc.createDataset(data)(Encoders.product) snappyContext.createTable(tableName, "column", dataDF.schema, props)
For other external relation providers, use createExternalTable.
Name of the table
Provider name such as 'COLUMN', 'ROW', 'JDBC' etc.
Table schema
Properties for table creation. See options list for different tables. https://github.com/TIBCOSoftware/snappydata /blob/master/docs/programming_guide/tables_in_snappydata.md
When set to true it will ignore if a table with the same name is present, else it will throw table exist exception
DataFrame for the table
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(Data(1, 2, 3), Data(7, 8, 9), Data(9, 2, 3), Data(4, 2, 3), Data(5, 6, 7)) val dataDF = snc.createDataset(data)(Encoders.product) snappyContext.createTable(tableName, "column", dataDF.schema, props)
For other external relation providers, use createExternalTable.
Name of the table
Provider name such as 'COLUMN', 'ROW', 'JDBC' etc.
Table schema
Properties for table creation. See options list for different tables. https://github.com/TIBCOSoftware/snappydata /blob/master/docs/programming_guide/tables_in_snappydata.md
When set to true it will ignore if a table with the same name is present, else it will throw table exist exception
DataFrame for the table
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.
Name of the table
Provider name such as 'COLUMN', 'ROW', 'JDBC', 'PARQUET' etc.
Properties for table creation
When set to true it will ignore if a table with the same name is present, else it will throw table exist exception
DataFrame for the table
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.
Name of the table
Provider name such as 'COLUMN', 'ROW', 'JDBC', 'PARQUET' etc.
Properties for table creation
When set to true it will ignore if a table with the same name is present, else it will throw table exist exception
DataFrame for the table
Delete all rows in table that match passed filter expression
Delete all rows in table that match passed filter expression
table name
SQL WHERE criteria to select rows that will be updated
number of rows deleted
Drops an index on a table
Drops an index on a table
Index name which goes in catalog
Drop if exists, else exit gracefully
Drop a SnappyData table created by a call to SnappyContext.createTable, createExternalTable or registerTempTable.
Drop a SnappyData table created by a call to SnappyContext.createTable, createExternalTable or registerTempTable.
table to be dropped
attempt drop only if the table exists
Drops the temporary table with the given table name in the catalog.
Drops the temporary table with the given table name in the catalog. If the table has been cached/persisted before, it's also unpersisted.
the name of the table to be unregistered.
1.3.0
Returns a DataFrame
with no rows or columns.
Returns a DataFrame
with no rows or columns.
1.3.0
:: Experimental :: A collection of methods that are considered experimental, but can be used to hook into the query planner for advanced functionality.
:: Experimental :: A collection of methods that are considered experimental, but can be used to hook into the query planner for advanced functionality.
1.3.0
Return all the configuration properties that have been set (i.e.
Return all the configuration properties that have been set (i.e. not the default). This creates a new copy of the config properties in the form of a Map.
1.0.0
Return the value of Spark SQL configuration property for the given key.
Return the value of Spark SQL configuration property for the given key. If the key is not set
yet, return defaultValue
.
1.0.0
Return the value of Spark SQL configuration property for the given key.
Return the value of Spark SQL configuration property for the given key.
1.0.0
:: Experimental ::
(Scala-specific) Implicit methods available in Scala for converting
common Scala objects into DataFrame
s.
:: Experimental ::
(Scala-specific) Implicit methods available in Scala for converting
common Scala objects into DataFrame
s.
val sqlContext = new SQLContext(sc) import sqlContext.implicits._
1.3.0
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 = ... * snc.insert(tableName, rows)
number of rows inserted
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
snc.insert(tableName, dataDF.collect(): _*)
number of rows inserted
Returns true if the table is currently cached in-memory.
Returns true if the table is currently cached in-memory.
1.3.0
An interface to register custom org.apache.spark.sql.util.QueryExecutionListeners that listen for execution metrics.
An interface to register custom org.apache.spark.sql.util.QueryExecutionListeners that listen for execution metrics.
Returns a SQLContext as new session, with separated SQL configurations, temporary
tables, registered functions, but sharing the same SparkContext
, cached data and
other things.
Returns a SQLContext as new session, with separated SQL configurations, temporary
tables, registered functions, but sharing the same SparkContext
, cached data and
other things.
1.6.0
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)
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(): _*)
why do we need this method? K is optional in the above method
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.
- The topK structure that is to be queried.
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.
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.
Optional. Number of elements to be queried. This is to be passed only for stream summary
returns the top K elements with their respective frequencies between two time
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?
:: Experimental ::
Creates a DataFrame
with a single LongType column named id
, containing elements
in an range from start
to end
(exclusive) with an step value, with partition number
specified.
:: Experimental ::
Creates a DataFrame
with a single LongType column named id
, containing elements
in an range from start
to end
(exclusive) with an step value, with partition number
specified.
1.4.0
:: Experimental ::
Creates a DataFrame
with a single LongType column named id
, containing elements
in a range from start
to end
(exclusive) with a step value.
:: Experimental ::
Creates a DataFrame
with a single LongType column named id
, containing elements
in a range from start
to end
(exclusive) with a step value.
2.0.0
:: Experimental ::
Creates a DataFrame
with a single LongType column named id
, containing elements
in a range from start
to end
(exclusive) with step value 1.
:: Experimental ::
Creates a DataFrame
with a single LongType column named id
, containing elements
in a range from start
to end
(exclusive) with step value 1.
1.4.0
:: Experimental ::
Creates a DataFrame
with a single LongType column named id
, containing elements
in a range from 0 to end
(exclusive) with step value 1.
:: Experimental ::
Creates a DataFrame
with a single LongType column named id
, containing elements
in a range from 0 to end
(exclusive) with step value 1.
1.4.1
Returns a DataFrameReader that can be used to read non-streaming data in as a
DataFrame
.
Returns a DataFrameReader that can be used to read non-streaming data in as a
DataFrame
.
sqlContext.read.parquet("/path/to/file.parquet") sqlContext.read.schema(schema).json("/path/to/file.json")
1.4.0
:: Experimental ::
Returns a DataStreamReader that can be used to read streaming data in as a DataFrame
.
:: Experimental ::
Returns a DataStreamReader that can be used to read streaming data in as a DataFrame
.
sparkSession.readStream.parquet("/path/to/directory/of/parquet/files") sparkSession.readStream.schema(schema).json("/path/to/directory/of/json/files")
2.0.0
:: DeveloperApi ::
:: DeveloperApi ::
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
Set the given Spark SQL configuration property.
Set the given Spark SQL configuration property.
1.0.0
Set Spark SQL configuration properties.
Set Spark SQL configuration properties.
1.0.0
Set current database/schema.
Set current database/schema.
schema name which goes in the catalog
Executes a SQL query using Spark, returning the result as a DataFrame
.
Executes a SQL query using Spark, returning the result as a DataFrame
. The dialect that is
used for SQL parsing can be configured with 'spark.sql.dialect'.
1.3.0
Run SQL string without any plan caching.
Returns a StreamingQueryManager that allows managing all the
StreamingQueries active on this
context.
Returns a StreamingQueryManager that allows managing all the
StreamingQueries active on this
context.
2.0.0
Returns the specified table as a DataFrame
.
Returns the specified table as a DataFrame
.
1.3.0
Returns the names of tables in the given database as an array.
Returns the names of tables in the given database as an array.
1.3.0
Returns the names of tables in the current database as an array.
Returns the names of tables in the current database as an array.
1.3.0
Returns a DataFrame
containing names of existing tables in the given database.
Returns a DataFrame
containing names of existing tables in the given database.
The returned DataFrame has two columns, tableName and isTemporary (a Boolean
indicating if a table is a temporary one or not).
1.3.0
Returns a DataFrame
containing names of existing tables in the current database.
Returns a DataFrame
containing names of existing tables in the current database.
The returned DataFrame has two columns, tableName and isTemporary (a Boolean
indicating if a table is a temporary one or not).
1.3.0
Empties the contents of the table without deleting the catalog entry.
Empties the contents of the table without deleting the catalog entry.
full table name to be truncated
attempt truncate only if the table exists
A collection of methods for registering user-defined functions (UDF).
A collection of methods for registering user-defined functions (UDF).
The following example registers a Scala closure as UDF:
sqlContext.udf.register("myUDF", (arg1: Int, arg2: String) => arg2 + arg1)
The following example registers a UDF in Java:
sqlContext.udf().register("myUDF", new UDF2<Integer, String, String>() { @Override public String call(Integer arg1, String arg2) { return arg2 + arg1; } }, DataTypes.StringType);
Or, to use Java 8 lambda syntax:
sqlContext.udf().register("myUDF", (Integer arg1, String arg2) -> arg2 + arg1, DataTypes.StringType);
1.3.0
The user-defined functions must be deterministic. Due to optimization, duplicate invocations may be eliminated or the function may even be invoked more times than it is present in the query.
Removes the specified table from the in-memory cache.
Removes the specified table from the in-memory cache.
1.3.0
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" )
table name which needs to be updated
SQL WHERE criteria to select rows that will be updated
A list containing all the updated column values. They MUST match the updateColumn list passed
List of all column names being updated
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" )
table name which needs to be updated
SQL WHERE criteria to select rows that will be updated
A single Row containing all updated column values. They MUST match the updateColumn list passed
List of all column names being updated
(Since version 1.3.0) Use createDataFrame instead.
(Since version 1.3.0) Use createDataFrame instead.
(Since version 1.3.0) Use createDataFrame instead.
(Since version 1.3.0) Use createDataFrame instead.
Construct a DataFrame
representing the database table accessible via JDBC URL
url named table.
Construct a DataFrame
representing the database table accessible via JDBC URL
url named table. The theParts parameter gives a list expressions
suitable for inclusion in WHERE clauses; each one defines one partition
of the DataFrame
.
(Since version 1.4.0) Use read.jdbc() instead.
Construct a DataFrame
representing the database table accessible via JDBC URL
url named table.
Construct a DataFrame
representing the database table accessible via JDBC URL
url named table. Partitions of the table will be retrieved in parallel based on the parameters
passed to this function.
the name of a column of integral type that will be used for partitioning.
the minimum value of columnName
used to decide partition stride
the maximum value of columnName
used to decide partition stride
the number of partitions. the range minValue
-maxValue
will be split
evenly into this many partitions
(Since version 1.4.0) Use read.jdbc() instead.
Construct a DataFrame
representing the database table accessible via JDBC URL
url named table.
Construct a DataFrame
representing the database table accessible via JDBC URL
url named table.
(Since version 1.4.0) Use read.jdbc() instead.
(Since version 1.4.0) Use read.json() instead.
Loads a JSON file (one object per line) and applies the given schema,
returning the result as a DataFrame
.
Loads a JSON file (one object per line) and applies the given schema,
returning the result as a DataFrame
.
(Since version 1.4.0) Use read.json() instead.
Loads a JSON file (one object per line), returning the result as a DataFrame
.
Loads a JSON file (one object per line), returning the result as a DataFrame
.
It goes through the entire dataset once to determine the schema.
(Since version 1.4.0) Use read.json() instead.
Loads a JavaRDD[String] storing JSON objects (one object per record) inferring the
schema, returning the result as a DataFrame
.
Loads a JavaRDD[String] storing JSON objects (one object per record) inferring the
schema, returning the result as a DataFrame
.
(Since version 1.4.0) Use read.json() instead.
Loads an RDD[String] storing JSON objects (one object per record) inferring the
schema, returning the result as a DataFrame
.
Loads an RDD[String] storing JSON objects (one object per record) inferring the
schema, returning the result as a DataFrame
.
(Since version 1.4.0) Use read.json() instead.
Loads an JavaRDD[String] storing JSON objects (one object per record) and applies the given
schema, returning the result as a DataFrame
.
Loads an JavaRDD[String] storing JSON objects (one object per record) and applies the given
schema, returning the result as a DataFrame
.
(Since version 1.4.0) Use read.json() instead.
Loads an RDD[String] storing JSON objects (one object per record) and applies the given schema,
returning the result as a DataFrame
.
Loads an RDD[String] storing JSON objects (one object per record) and applies the given schema,
returning the result as a DataFrame
.
(Since version 1.4.0) Use read.json() instead.
Loads an RDD[String] storing JSON objects (one object per record), returning the result as a
DataFrame
.
Loads an RDD[String] storing JSON objects (one object per record), returning the result as a
DataFrame
.
It goes through the entire dataset once to determine the schema.
(Since version 1.4.0) Use read.json() instead.
Loads an RDD[String] storing JSON objects (one object per record), returning the result as a
DataFrame
.
Loads an RDD[String] storing JSON objects (one object per record), returning the result as a
DataFrame
.
It goes through the entire dataset once to determine the schema.
(Since version 1.4.0) Use read.json() instead.
(Scala-specific) Returns the dataset specified by the given data source and a set of options as a DataFrame, using the given schema as the schema of the DataFrame.
(Scala-specific) Returns the dataset specified by the given data source and a set of options as a DataFrame, using the given schema as the schema of the DataFrame.
(Since version 1.4.0) Use read.format(source).schema(schema).options(options).load() instead.
(Java-specific) Returns the dataset specified by the given data source and a set of options as a DataFrame, using the given schema as the schema of the DataFrame.
(Java-specific) Returns the dataset specified by the given data source and a set of options as a DataFrame, using the given schema as the schema of the DataFrame.
(Since version 1.4.0) Use read.format(source).schema(schema).options(options).load() instead.
(Scala-specific) Returns the dataset specified by the given data source and a set of options as a DataFrame.
(Scala-specific) Returns the dataset specified by the given data source and a set of options as a DataFrame.
(Since version 1.4.0) Use read.format(source).options(options).load() instead.
(Java-specific) Returns the dataset specified by the given data source and a set of options as a DataFrame.
(Java-specific) Returns the dataset specified by the given data source and a set of options as a DataFrame.
(Since version 1.4.0) Use read.format(source).options(options).load() instead.
Returns the dataset stored at path as a DataFrame, using the given data source.
Returns the dataset stored at path as a DataFrame, using the given data source.
(Since version 1.4.0) Use read.format(source).load(path) instead.
Returns the dataset stored at path as a DataFrame, using the default data source configured by spark.sql.sources.default.
Returns the dataset stored at path as a DataFrame, using the default data source configured by spark.sql.sources.default.
(Since version 1.4.0) Use read.load(path) instead.
Loads a Parquet file, returning the result as a DataFrame
.
Loads a Parquet file, returning the result as a DataFrame
. This function returns an empty
DataFrame
if no paths are passed in.
(Since version 1.4.0) Use read.parquet() instead.
Main entry point for SnappyData extensions to Spark. A SnappyContext extends Spark's org.apache.spark.sql.SQLContext to work with Row and Column tables. Any DataFrame can be managed as SnappyData tables and any table can be accessed as a DataFrame. This integrates the SQLContext functionality with the Snappy store.
When running in the embedded mode (i.e. Spark executor collocated with Snappy data store), Applications typically submit Jobs to the Snappy-JobServer (provide link) and do not explicitly create a SnappyContext. A single shared context managed by SnappyData makes it possible to re-use Executors across client connections or applications.
SnappyContext uses a HiveMetaStore for catalog , which is persistent. This enables table metadata info recreated on driver restart.
User should use obtain reference to a SnappyContext instance as below val snc: SnappyContext = SnappyContext.getOrCreate(sparkContext)
Provide links to above descriptions
,document describing the Job server API
https://github.com/TIBCOSoftware/snappydata
https://tibcosoftware.github.io/snappydata/1.3.1/quickstart/snappydataquick_start/