Database Administrator Guide > Database Administrator Guide > Loading Data into X100 Tables > Load Data with Spark SQL through the Spark Connector
Was this helpful?
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.
For more information on the Spark Connector, see https://github.com/ActianCorp/spark-vector/tree/master.
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 "target_table"
)""")
2. Load data into Actian X:
sqlContext.sql("INSERT INTO x100_table SELECT * FROM spark_table")
Last modified date: 11/09/2022