Database Export
Use the db-export
command to read from a Redis database and writes to a SQL database.
Ensure RIOT-X has the relevant JDBC driver for your database. See Drivers for more details. |
The general usage is:
riotx db-export --jdbc-url <jdbc url> SQL
To show the full usage, run:
riotx db-export --help
Example: export to PostgreSQL
riotx db-export \
"INSERT INTO mytable (id, field1, field2) \
VALUES (CAST(:id AS SMALLINT), :field1, :field2)" \
--jdbc-url jdbc:postgresql://localhost:5432/mydb \
--jdbc-user myuser \
--jdbc-pass mypass