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–2022 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

Sortgroup

(since EVL 2.0)

By having sorted input by <group_key>, sort within groups defined by such <group_key> according to <key>. So output is sorted by <group_key>,<key>. At the moment it uses only traditional sort order (i.e. like LC_ALL=C), not national.

Sortgroup

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

evl sortgroup

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

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

Synopsis

Sortgroup
  <f_in> <f_out> (<evd>|-d <inline_evd) -g <group_key> -k <key>
  [-c|--check-sort] [-i|--ignore-case]
  [--validate] [-x|--text-input] [-y|--text-output]

evl sortgroup
  (<evd>|-d <inline_evd) -k <key> -g <group_key>
  [-c|--check-sort] [-i|--ignore-case]
  [--validate] [-x|--text-input] [-y|--text-output]
  [-v|--verbose]

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

Options

-c, --check-sort

check if the input is really sorted by <key>

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

either this option or the file <evd> must be presented. Example: ‘-d 'id int, user_id string(6)'

-g, --group-key=<group_key>

input is sorted via this key, where <group_key> is comma separated list of fields with type (default type is ASC). Example: ‘-k 'id,user_id DESC'

-i, --ignore-case

ignore case sensitivity for key fields

-k, --key=<key>

sort via this key within each group of records with same <group_key>. <group_key> is comma separated list of fields with type (default type is ASC). Example: ‘-k 'modify_dt ASC'

--validate

without this option, no fields are checked against data types. With this option, all output fields are checked

-x, --text-input

suppose the input as text, not binary

-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. Suppose having a dataset already sorted by field ‘customer’. TBA