Building the Connection URL

Use the connection URL to supply connection information to the data store that you are accessing. The following is the format of the connection URL for the Simba Apache Spark JDBC Connector, where [Host] is the DNS or IP address of the Spark server and [Port] is the number of the TCP port that the server uses to listen for client requests:

jdbc:spark://[Host]:[Port]

Note:

By default, Spark uses port 10000.

By default, the connector uses the schema named default and authenticates the connection using the user name spark.

You can specify optional settings such as the schema to use or any of the connection properties supported by the connector. For a list of the properties available in the connector, see Connector Configuration Options. If you specify a property that is not supported by the connector, then the connector attempts to apply the property as a Spark server-side property for the client session.

The following is the format of a connection URL that specifies some optional settings:

jdbc:spark://[Host]:[Port]/[Schema];[Property1]=[Value];
[Property2]=[Value];...

For example, to connect to port 11000 on an Spark server installed on the local machine, use a schema named default2, and authenticate the connection using a user name and password, you would use the following connection URL:

jdbc:spark://localhost:11000/default2;AuthMech=3;UID=simba;PWD=simba

Important:

Important:

  • Properties are case-sensitive.
  • Do not duplicate properties in the connection URL.

Note:

If you specify a schema in the connection URL, you can still issue queries on other schemas by explicitly specifying the schema in the query. To inspect your databases and determine the appropriate schema to use, type the show databases command at the Spark command prompt.