spark_open()

Description:

Create a Spark database connection.

Syntax:

spark_open([config])

 

Note:

External library function (See External Library Guide).

 

The function connects to a Spark database by loading the corresponding configuration file and return a database connection string.

Parameter:

config

.properties configuration file, which needs to be put into scu-spark-cli-xxx.jar (see External Library Guide). It is a local connection by default.

Option:

@i

When parameter config is present, connect to a Spark database using Iceberg format; connect to one using Hudi format by default.

Return value:

Cursor

Example:

 

A

 

1

=spark_open()

Create a local connection.

2

>spark_close(A1)

 

3

=spark_open("spark.properties")

Connect to a Spark database.

4

>spark_close(A3)

 

5

=spark_open("hudi.properties")

Connect to a Spark database using Hudi format.

6

>spark_close(A5)

 

7

=spark_open@i("iceberg.properties")

Connect to a Spark database using Iceberg format.

8

>spark_close(A7)

 

9

=spark_open("hudi-s3.properties")

Connect to a Spark database using Hudi format used with S3.

10

>spark_close(A9)

 

11

=spark_open@i("iceberg-s3.properties")

Connect to a Spark database using Iceberg format used with S3.

12

>spark_close(A11)