Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Develop JDBC Extension #422

Open
NassimBtk opened this issue Sep 23, 2024 · 1 comment
Open

Develop JDBC Extension #422

NassimBtk opened this issue Sep 23, 2024 · 1 comment
Assignees

Comments

@NassimBtk
Copy link
Member

NassimBtk commented Sep 23, 2024

Specification

JDBC User's Configuration

metricshub.yaml

resources:
  db-host:
    attributes:
    # ...
    protocols:
      sql:
        username: #
        password: #
        url: #  
        timeout: # 
        type: # 
        port: # 
        database: #
Attribute Data Type Description Default Value
username string The username used to authenticate with the database. null
password char[] The password used for authentication (can be encrypted). null
url char[] The connection URL for the database (can be encrypted). null or generated based on type and database.
timeout int The time in seconds before a connection attempt times out. 120 seconds
type string The type of database engine (e.g., oracle, postgresql, mariadb, mssql, informix, derby, h2, ...). null
port int The port number to connect to the database. null or generated based on type
database string The database name to connect to. null

JDBC Source

<source-name>:
   type: sql
   query: # 
Attribute Key Data Type Description
type string Specifies the type of SQL source (sql).
query string The SQL query string to be executed (e.g., SELECT Column1, Column2 FROM TABLE).

To differentiate the current source, which executes inner SQL queries using the internal MetricsHub DB engine, we should consider renaming the type of the inner SQL source to reflect its engine-based nature. A suitable option could be coreSql.

  • Should we support for SELECT * FROM TABLE
    • If yes, we need to define a new attribute columns in the sql source.
  • Should we override the url in a source
    • If yes, we need to define a new attribute url, that overrides the user's url. It that, in the new url, macros should be correctly replaced by the engine.
@NassimBtk
Copy link
Member Author

@bertysentry your thoughts! 😉

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

When branches are created from issues, their pull requests are automatically linked.

3 participants