EVL – ETL Tool


Products, services and company names referenced in this document may be either trademarks or registered trademarks of their respective owners.

Copyright © 2017–2023 EVL Tool, s.r.o.

Permission is granted to copy, distribute and/or modify this document under the terms of the GNU Free Documentation License, Version 1.3 or any later version published by the Free Software Foundation; with no Invariant Sections, with no Front-Cover Texts, and with no Back-Cover Texts.

Table of Contents

Readsqlite

(since EVL 2.7)

Write to stdout or <f_out> SQLite <table>.

It takes the whole table with columns in order defined by EVD, unless <query> and/or <condition> is specified.

Path to the database file is taken from environment variable ‘$EVL_SQLITE_DATABASE’, unless <db_file> is specified.

Readsqlite

is to be used in EVS job structure definition file. <f_out> is either output file or flow name.

evl readsqlite

is intended for standalone usage, i.e. to be invoked from command line and writing records to standard output.

EVD and EVS are EVL definition files, for details see evl-evd(5) and evl-evs(5).

Synopsis

Readsqlite
  <table> <f_out> (<evd>|-d <inline_evd>)
  [--dbname=<db_file>] [--query=<query>] [-w|--where=<condition>]
  [-y|--text-output]

evl readsqlite
  <table> (<evd>|-d <inline_evd>)
  [--dbname=<db_file>] [--query=<query>] [-w|--where=<condition>]
  [-y|--text-output]
  [-v|--verbose]

evl readsqlite
  ( --help | --usage | --version )

Options

-d, --data-definition=<inline_evd>

either this option or the file <evd> must be presented. Example: -d ’id int, user_id string(6) enc=iso-8859-1’

--dbname=<db_file>

path to the SQLite database file; if this option is not used, database file is taken from environment variable ‘$EVL_SQLITE_DATABASE’.

--query=<query>

Use SQL <query> instead of reading whole table. With this option <table> might be an empty string.

-w, --where=<condition>

use this where condition instead of reading whole table.

-y, --text-output

write the output as text, not binary

Standard options:

--help

print this help and exit

--usage

print short usage information and exit

-v, --verbose

print to stderr info/debug messages of the component

--version

print version and exit

Examples

  1. To read a table ‘my_table’ in EVL job (i.e. in EVS file) from ‘/home/myself/my_db.sqlite’:
    export EVL_SQLITE_DATABASE="/home/myself/my_db.sqlite"
    Readsqlite my_table MYTABLE evd/mytable.evd
    Map        MYTABLE  ...
    
  2. Command line usage of sending table ‘my_table’ from ‘/home/myself/my_db.sqlite’ to standard output:
    export EVL_SQLITE_DATABASE="/home/myself/my_db.sqlite"
    evl readsqlite my_table evd/mytable.evd --text-output
    

    or just

    evl readsqlite –dbname="/home/myself/my_db.sqlite" my_table evd/mytable.evd –text-output