How to create a TIBCO Data Virtualization custom adapter for SparkSQL datasource?

How to create a TIBCO Data Virtualization custom adapter for SparkSQL datasource?

book

Article ID: KB0075997

calendar_today

Updated On:

Products Versions
TIBCO Data Virtualization 8.x and higher

Description

How to create a TIBCO Data Virtualization custom adapter to connect SparkSQL datasource?

Issue/Introduction

This article will explain the process of creating a TIBCO Data Virtualization custom adapter to connect SparkSQL datasource.

Resolution

Prerequisite: SparkJDBC4.jar

Follow the steps here to create this custom adapter:

Step 1: Open Studio >> Create New Datasource >> New Adapter 
a. Enter the custom adapter details in the ‘ New Adapter information’ box.  
b. Enter a name to the custom adapter and select “Parent adapter” as “Generic JDBC”. 
c. Enter Adapter Class Name as "com.simba.spark.jdbc4.Driver"
d. Obtain a JDBC URL pattern

  User-added image

Step 2: A Warning dialog box will pop up with a note about copying the JDBC adapter jar files
 
Step 3:  Copy the JAR file or files into the location specified in the Warning dialog (i.e. into the  conf/adapters/sparkSQL folder)

Note: Restart the TDV server to load sparkJDBC JAR
 
Step 4 : Close the warning dialog and Click the "Next" button to bring up the ‘New Physical Data Source’ dialog 
  
IMPORTANT: If you continue to see the Warning dialog at this point, make sure that you have:
(a)     Copied the JAR files to the correct location 
(b)     At least one of the JAR files contains the class name that you entered as ‘Adapter Class Name’
(c)     If (a) and (b)  does not help, restart both TDV and Studio. This will help to clear their cache and reload the JAR files afresh

Step 5 :Type in the new data source details
 
Step 6 : The custom adapter is created, and appears in the Studio Left-hand panel

Step 7 : Select 'SparkSQL' datasource and provide the following details
In the “ Basic” tab, enter the values for “Login” and “password”.
In the " Advance" tab, provide actual JDBC connection string

Step 8: Click "Test Connection" to verify connectivity.