Load Data with Spark SQL through the Spark Connector
The Spark Connector lets you interact with an Actian X database that contains X100 tables using Apache Spark.
To load data using Spark SQL
1. Create an X100 table using Spark SQL:
sqlContext.sql("""CREATE TEMPORARY VIEW x100_table
USING com.actian.spark_vector.sql.DefaultSource
OPTIONS (
host "actianxhost",
instance "II",
database "databasename",
table "x100_table"
)""")
2. Load data into Actian X:
sqlContext.sql("INSERT INTO x100_table SELECT * FROM spark_table")
Last modified date: 08/14/2024