Writemysql
(since EVL 2.4)
Write stdin or <f_in>
into <table>
of MariaDB/MySQL. If the table is not empty, it is
truncated unless "–append" option is used.
Password is taken from $HOME/.mysqlpass file, unless other file is specified by ‘--defaults-extra-file=<file>’.
- Writemysql
-
is to be used in EVS job structure definition file.
<f_in>
is either input file or flow name. - evl writemysql
-
is intended for standalone usage, i.e. to be invoked from command line and reading records from standard input.
EVD and EVS are EVL definition files, for details see evl-evd(5) and evl-evs(5).
Synopsis
Writemysql <f_in> [<database>.]<table> (<evd>|-d <inline_evd>) [-x|--text-input] [-a|--append] [--dbname=<database>] [--host=<hostname>] [--port=<port>] [--username=<user>] [--mysql=<mysql-options>] evl writemysql [<database>.]<table> (<evd>|-d <inline_evd>) [-x|--text-input] [-a|--append] [--dbname=<database>] [--host=<hostname>] [--port=<port>] [--username=<user>] [--mysql=<mysql-options>] [-v|--verbose] evl writemysql ( --help | --usage | --version )
Options
- -d, --data-definition=<inline_evd>
-
either this option or the file <evd> must be presented. Example: -d ’id int, name string, started timestamp’
- -a, --append
-
target table is appended, not truncated
- -x, --text-input
-
suppose the input 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
’mysql’ options:
- --dbname=<database>
-
this option is provided to ‘mysql’ command as ‘--database=<database>’
- --host=<hostname>
-
this option is provided to ‘mysql’ command
- --port=<port>
-
using other than standard port 3306. This option is provided to ‘mysql’ command.
- --username=<mysqluser>
-
if not mentioned, then current system username is used as mysql user. This option is provided to ‘mysql’ command as ‘--user=<mysqluser>’.
- --mysql=<mysql-options>
-
other mysql options can be specified here