Git Product home page Git Product logo

dremio-sybase-connector's Introduction

Dremio Sybase ARP Connector

Build Status

The Sybase connector allows Dremio to connect to and query data in Sybase ASE.

Building and Installation

  1. In root directory with the pom.xml file run mvn clean install
  2. Take the resulting .jar file in the target folder and put it in the $DREMIO_HOME/jars folder in Dremio
  3. Download the Sybase JDBC driver from DBeaver (https://dbeaver.io/files/jdbc/drivers/sybase/jconnect/jconn4.jar) and put in in the $DREMIO_HOME/jars/3rdparty folder.
  4. Restart Dremio

WARNING - When upgrading from v4.1 to v4.2 of the connector you will need to recreate the datasource as this new formatting is not back compatible with previously created connections

ARP Overview

The Advanced Relational Pushdown (ARP) Framework allows for the creation of Dremio plugins for any data source which has a JDBC driver and accepts SQL as a query language. It allows for a mostly code-free creation of a plugin, allowing for modification of queries issued by Dremio using a configuration file.

There are two files that are necessary for creation of an ARP-based plugin: the storage plugin configuration, which is code, and the plugin ARP file, which is a YAML (https://yaml.org/) file.

The storage plugin configuration file tells Dremio what the name of the plugin should be, what connection options should be displayed in the source UI, what the name of the ARP file is, which JDBC driver to use and how to make a connection to the JDBC driver.

The ARP YAML file is what is used to modify the SQL queries that are sent to the JDBC driver, allowing you to specify support for different data types and functions, as well as rewrite them if tweaks need to be made for your specific data source.

ARP File Format

The ARP file is broken down into several sections:

metadata

  • This section outlines some high level metadata about the plugin.

syntax

  • This section allows for specifying some general syntax items like the identifier quote character.

data_types

  • This section outlines which data types are supported by the plugin, their names as they appear in the JDBC driver, and how they map to Dremio types.

relational_algebra - This section is divided up into a number of other subsections:

  • aggregation
    • Specify what aggregate functions, such as SUM, MAX, etc, are supported and what signatures they have. You can also specify a rewrite to alter the SQL for how this is issued.
  • except/project/join/sort/union/union_all/values
    • These sections indicate if the specific operation is supported or not.
  • expressions
    • This section outlines general operations that are supported. The main sections are:
  • operators
    • Outlines which scalar functions, such as SIN, SUBSTR, LOWER, etc, are supported, along with the signatures of these functions which are supported. Finally, you can also specify a rewrite to alter the SQL for how this is issued.
  • variable_length_operators
    • The same as operators, but allows specification of functions which may have a variable number of arguments, such as AND and OR.

If an operation or function is not specified in the ARP file, then Dremio will handle the operation itself. Any operations which are indicated as supported but need to be stacked on operations which are not will not be pushed down to the SQL query.

dremio-sybase-connector's People

Contributors

acryljonny avatar amarantolaw avatar

Stargazers

Tanaka M avatar Bruno Gomes avatar

Watchers

James Cloos avatar

dremio-sybase-connector's Issues

How to Retrieve User Defined Datatype (UDDT)?

Hi,

I have encounter issue that user defined datatype can't be read. I tried to define the type in ARP but no luck.

Example

user_id_type which is char in sybase

Error

Source XXX returned error 'JZ0P8: The RSMDA Column Type Name you requested is unknown. This is a SAP internal error; please report it to technical support.

Cataloging fails on tempdb when setting up ARP connection

Can we force a skip on tempdb when setting up a Sybase connection.

Right now it just spins and never finishes. If I Cancel the setup and Restart the server I can see the Sybase datasource and all database from "a???" to "tempdb", but other databases after tempdb are not showing up and are not accessible even if I manually put the database into the web url.

For example if I had the following databases:

sales_db
tempdb
trade_db

If I force the setup to cancel and restart the server, I just see:
sales_db
tempdb

tempdb is a odd beast and I think the setup is crashing on it..

Only system tables shows up

I built the plug-in with Dremio 3.3.2 and I ran into several problems. (Modified POM.xml with Dremio 3.3.2)

A. Only system tables show up in Sources. I see all the sys* tables under dbo, but I don't see any other dbo or non-dbo tables.

B. The Source catalog froze when building the list of sources. It managed to catalog 18 databases from A to C, but froze trying to catalog database D to Z. We have a pretty large Sybase ASE installation with over a hundred databases on the server.

I used my own non-DBO login to setup the Sybase ASE connection in Dremio.

Missing DBO in SQL Statements when joins or where conditions addded.

Iโ€™m not sure if this is a problem with the Community Plug-In or with the ARP.

A normal SQL statement for Sybase would look something like:

select a.key, a.column_a, b.column_b
from mydb.dbo.my_table1 a
join mydb.dbo.my_table2 b on b.key = a.key

Dremio should be converting this internally to:

select mydb.dbo.my_table1.key, mydb.dbo.my_table1.column_a, mydb.dbo.my_table2.column_b
from mydb.dbo.my_table1
join mydb.dbo.my_table2 on mydb.dbo.my_table2.key = mydb.dbo.my_table1.key

However in the logs I'm seeing:

select mydb.my_table1.key, mydb.my_table1.column_a, mydb.my_table2.column_b
from mydb.dbo.my_table1
join mydb.dbo.my_table2 on mydb.my_table2.key = mydb.my_table1.key

"dbo" is missing from the columns and where conditions..

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.