Technology Blog Posts by SAP
Learn how to extend and personalize SAP applications. Follow the SAP technology blog for insights into SAP BTP, ABAP, SAP Analytics Cloud, SAP HANA, and more.
cancel
Showing results for 
Search instead for 
Did you mean: 
Cyane
Advisor
Advisor
567

This Blog I would like to give an introduction of Datasphere "Generic JDBC Connection" to load remote tables from MySQL Database.

Preparation:
        3522872 - How to enable MySQL DB connection with SAP Datasphere - SAP for Me
        Verify if the DB you are attempting to connect to is supported by the CamelJdbcAdapter (DPAgent).
        Refer to SAP HANA Smart Data Integration Product Availability Matrix (PAM) 
Cyane_1-1745915683839.png

 

Step 1. (MySQL Side) Download MySQL Database and MySQL JDBC Driver.

  1. MySQL DatabaseMySQL :: Download MySQL Installer
    (1) Set password for user root
    (2) Prepare test data
    Cyane_3-1745907961034.png

     

  2. MySQL JDBCMySQL :: Download Connector/J
    (1) Download JDBC Driver: Select Operating System -> Platform Independence
    Cyane_2-1745907581225.png(2) Place the JDBC Driver "mysql-connector-j-<jdbc version>.jar" file in the <DPAgent_root>/camel/lib directory
    Cyane_0-1745974873695.png

           Reference: Connecting to MySQL with the Camel JDBC Adapter | SAP Help Portal

Step 2. (Datasphere Side) Create Generic JDBC Connection in Datasphere

  1. Choose Generic JDBC type
    Cyane_6-1745916167633.png
  2. Configure Connection Properities
    (1) JDBC Driver Class: com.mysql.cj.jdbc.Driver (for my MySQL version)
    (2) JDBC URL: jdbc:mysql://<hostname>:<port>/<database_name>?sessionVariables=sql_mode=ANSI_QUOTES
            <hostname>: for localhost is 127.0.0.1
            <port>: default is 3306
            eg. my JDBC URL is: jdbc:mysql://127.0.0.1:3306/cyane_MySQL?sessionVariables=sql_mode=ANSI_QUOTES
    Reference: 3076151 - Preview on Mysql or MariaBD data not working in Datasphere through CamelJDBCAdapter - SAP ...
    (3) User Name: MySQL username (default is root)
    (4) Password: MySQL password you set in Step 1.
    (5) Data Provisioning Agent: Choose an available DPAgent

Cyane_7-1745916947723.png

Step 3. (Datasphere Side) Validate Connection and Import Remote Table

  1. Validate this Generic JDBC Connection
    Attention: Data Flows and Replication Flows are not supported, only Remote Tables are enabled.
    Cyane_1-1745974993847.png
  2.  Data Builder -> Import Remote Table -> Choose Connection -> Choose Table -> Import and Deploy
    Cyane_2-1745975061607.pngCyane_4-1745975172561.pngCyane_5-1745975220991.pngCyane_6-1745975359152.png

     

     

 

 

 

1 Comment