Skip to content
datacorner edited this page Dec 2, 2023 · 3 revisions

Using the xesFileDS Data Source

Purpose

The aim of this Data Source is to gather data from an ODBC Database (like SQL Server, SQLite, Oracle, etc.).

Please note that this Data Source is readonly (only for extractors)

There are two ways to use a query by putting the query directly into the configuration file or by using a separate file:

Configuration by using the SQL directly in the configuration file

The specific configuration (as a Datasource) in the configuration file section parameters includes the following parameters:

  • connectionstring: Precise here the ODBC connection String needed to access the database
  • query : SQL Query

Configuration example:

    "classname" : "pipelite.pipelines.sequentialPL",
    "extractors" : [ {
        "id": "S1",
        "classname": "pipelite.datasources.odbcDS",
        "parameters": {
            "connectionstring": "DRIVER={SQLite3};Database=tests/data/dbsample.sqlite",
            "query": "SELECT customer_id, first_name, birthdate FROM Customers;"
        } 
    ... ] ...

Configuration by using a SQL file template

Using a template (in a separate file) is useful as it allows you to manage some placeholders inside that file. By this way you can replace just before the execution those placeholders by their values.

The specific configuration (as a Datasource) in the configuration file section parameters inclues the following parameters:

  • connectionstring: Precise here the ODBC connection String needed to access the database
  • query : file where the SQL query template is stored
  • query-parameters: this JSON object stores the placeholders and corresponding values { "placeholder-name" : "placeholder-value", ... }

Configuration example:

        "classname": "pipelite.datasources.odbcDS",
        "parameters": {
            "connectionstring": "DRIVER={SQLite3};Database=tests/data/dbsample.sqlite",
            "query": "tests/data/myquery.sql",
            "query-parameters": {
                "tablename" : "Customers",
                "fields" : "customer_id, first_name, birthdate"
            }
        } 
    ... ] ...

Is we consider that content of the myquery.sql file:

SELECT $fields 
FROM $tablename;

Before executing the SQL query, pipelite will replace the placeholder, and the real query executed will become:

SELECT customer_id, first_name, birthdate
FROM Customers;

🏠 Home
🔑 Main concepts
💻 Installation
🔨 Configuration
🚀 Running

Supported Data Sources
📄 CSV File
📑 XES File
📃 Excel File
📤 ODBC
🏢 SAP
🎢 ABBYY Timeline

Supported Transformations
🔀 Pass Through
📶 Dataset Profiling
🔂 Concat 2 Data sources
🆖 SubString
🆒 Column Transformation
🔃 Join data sources
🔃 Lookup
🔤 Rename Column Name

Extending pipelite
✅ how to
✅ Adding new Data sources
✅ Adding new Transformers
✅ Adding new Pipelines

Clone this wiki locally