You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Commit 193db4f
Browse filesBrowse the repository at this point in the historyBrowse files
Add measurement files, time ranges, progress and logs to export-data (#18987)
* Add measurement files, time ranges, progress and logs to export-data
- -mf/--measurement_file exports the measurements matched by the IoTDB path
patterns in a file, one output per measurement named by its full path.
The whole file is validated before any query, and each unmatched pattern
is reported with its line.
- -start_time/-end_time form an inclusive interval for measurement-file and
automatic Table exports. Queries run as written and report the ignored
bounds as a WARNING.
- Progress is reported every two seconds: one redrawn line in a terminal,
one line per update otherwise, with an ETA in measurement-file mode.
- Every run appends a JSON Lines log, <target>/log_export_data_<time>.log
by default or the path given with -l/--export_data_log, ending with one
FINISH event. The console ends with the summary, after the log path.
- CSV and SQL files are split by data rows; the INSERT statements of one
row stay in one file.
- Ctrl+C and SIGTERM stop at the next row, close the query and the session
and exit with 130 or 143; failures exit with 1.
- A Table query exported as SQL or TsFile still writes to the table it
reads, as in #18828; -table is ignored with a WARNING, and every query is
checked before the first one runs.
* Check the columns of Table SQL/TsFile export queries
- A Table query exported as SQL or TsFile must select * or column names
from one table of -db. Aliases, expressions and FILL would write values
the table does not hold under its column names, so they are rejected,
as are EXPLAIN, set operations, column aliases and subqueries without a
table.
- The query must return the time column and at least one FIELD column,
each column once; TsFile queries also need every TAG column. The
columns are checked against the table before the first query runs and
again against the columns the query returns.
- Export option descriptions move to Constants, keeping their lines within
100 characters, and the -q and -db help text is shortened.
* Read Table TsFile export values through a TypeService
The repository architecture test allows switches on TSDataType only
inside a TypeService, and ExportDataTable.exportTsFile switched on the
column type for every value. It now resolves one reader per column from
a TypeService, keeping the same getters: getLong for TIMESTAMP, getDate
for DATE, getBlob for BLOB and getObject for the other types.
"Query to export. Table SQL/TsFile queries require a single table without joins, subqueries or CTEs. Overrides -table, -start_time and -end_time. (optional)";
"Multiple CSV headers resolve to the same target column.";
@@ -116,4 +116,155 @@ private CliMessages() {}
116
116
publicstaticfinalStringLOG_INPUT_TIME_FORMAT_ARG_NOT_SUPPORTED_00172A7B = "Input time format {} is not supported, ";
117
117
publicstaticfinalStringLOG_PLEASE_INPUT_LIKE_YYYY_MM_DD_HH_MM_SS_SSS_9318BFC7 = "please input like yyyy-MM-dd\\ HH:mm:ss.SSS or yyyy-MM-dd'T'HH:mm:ss.SSS%n";
0 commit comments