Specifies the connection details of the cluster to write to.
Specifies the connection details of the cluster to write to.
Overrides the default cluster specified in the Spark configuration for the duration of this write operation.
A string of the form "IRIS://host:port/namespace" that specifies the cluster to read from.
The user account with which to make the connection to the cluster named in the "url" option above.
The password for the given user account.
The same DataFrameWriter on which this method was invoked.
Specifies the connection details of the cluster to write to.
Specifies the connection details of the cluster to write to.
Overrides the default cluster specified in the Spark configuration for the duration of this write operation.
The connection details of the cluster to write to.
The same DataFrameWriter on which this method was invoked.
Specifies whether or not inserted records should be evenly distributed amongst the available shards of the cluster when saving to a table that is sharded on a system assigned shard key.
Specifies whether or not inserted records should be evenly distributed amongst the available shards of the cluster when saving to a table that is sharded on a system assigned shard key.
When explicitly disabled, every dataset partition attempts to write its records directly into the shard on which its Spark executor also runs. This is often faster, since records no longer need to travel across the network to reach their destination shard, but shifts the responsibility of saving roughly the same number of records to each shard to the user, who will now wish to partition the dataset appropriately before writing it to the cluster.
Has no effect if the table is not sharded, or is sharded using a custom shard key.
true to evenly distribute records amongst the available shards of the cluster, false to save records into shards that are 'closest' to where the partitions of the dataset reside.
The same DataFrameWriter on which this method was invoked.
InterSystems IRIS SQL Reference for more information on the options supported by the CREATE TABLE statement.
Specifies a description for the newly created table.
Specifies a description for the newly created table.
Has no effect if the table already exists and the save mode is anything other than OVERWRITE.
An arbitrary description for the newly created table.
The same DataFrameWriter on which this method was invoked.
InterSystems IRIS SQL Reference for more information on the options supported by the CREATE TABLE statement.
Saves a DataFrame to the given table within the cluster.
Saves a DataFrame to the given table within the cluster.
This enables one to write, for example:
df.write.iris("Owls")
as a convenient shorthand for the more explicit:
df.write.format("com.intersystems.spark") .option("dbtable","Owls") .save()
The following options affect how the operation is performed:
url
: A string of the form "IRIS://host:port/namespace"
that specifies the cluster to which the data will be
written. If omitted, the default cluster specified
via the "spark.iris.master.url" configuration setting
is used instead.user
: The account with which to make the connection to the
cluster named in the "url" option above.password
: The password for the given user account.mode
: Describes how to behave if the target table already
exists.Can be either OVERWRITE, APPEND, IGNORE, or ERROR.
Default = ERROR.
batchsize
: The number of rows to insert per server round trip.Default = 1000.
isolationlevel
:
The transaction isolation level.Can be either NONE, REPEATABLE_READ, READ_COMMITTED, READ_UNCOMMITTED, or SERIALIZABLE.
Corresponds to the standard transaction isolation levels specified by the JDBC Connection object.
Default = READ_UNCOMMITTED.
description
: An optional description for the newly created table.Default = "".
publicrowid
: Specifies that the master RowID field for the newly
created table be publicly visible.Default = false.
shard
: Specifies the shard key for the newly created table.Can be either true, false, or else a comma separated set of field names.
Default = false.
The name of the table to write to.
SQLException
if a database access error occurs.
InterSystems IRIS SQL Reference for more information on the options supported by the CREATE TABLE statement.
Specifies whether or not the master row ID column of the newly created table is to be made publicly visible.
Specifies whether or not the master row ID column of the newly created table is to be made publicly visible.
Has no effect if the table already exists and the save mode is anything other than OVERWRITE.
true for a publicly visible row ID, false otherwise.
The same DataFrameWriter on which this method was invoked.
InterSystems IRIS SQL Reference for more information on the options supported by the CREATE TABLE statement.
Specifies the shard key for the newly created table.
Specifies the shard key for the newly created table.
Has no effect if the table already exists and the save mode is anything other than OVERWRITE.
A (possibly empty) sequence of field names to be used as the user defied shard key. If the sequence is empty then the table will be sharded on the system assigned key.
The same DataFrameWriter on which this method was invoked.
InterSystems IRIS SQL Reference for more information on the options supported by the CREATE TABLE statement.
Specifies whether or not the newly created table is to be sharded.
Specifies whether or not the newly created table is to be sharded.
Has no effect if the table already exists and the save mode is anything other than OVERWRITE.
true to create a sharded table using a shard key assigned by the system, false to create a non sharded table.
The same DataFrameWriter on which this method was invoked.
InterSystems IRIS SQL Reference for more information on the options supported by the CREATE TABLE statement.
© 2024 InterSystems Corporation, Cambridge, MA. All rights reserved. Privacy & Terms Guarantee Accessibility
Extends the given writer with IRIS specific methods.