Skip to content

Commit

Permalink
[fix](outfile/export) refactor the documents of Outfile and Export (
Browse files Browse the repository at this point in the history
apache#1391)

# Versions 

- [x] dev
- [x] 3.0
- [x] 2.1
- [ ] 2.0

# Languages

- [x] Chinese
- [x] English
  • Loading branch information
BePPPower authored and daveyyan committed Jan 15, 2025
1 parent 28dc7cb commit 983feea
Show file tree
Hide file tree
Showing 24 changed files with 2,761 additions and 2,071 deletions.
464 changes: 239 additions & 225 deletions docs/data-operate/export/export-manual.md

Large diffs are not rendered by default.

368 changes: 213 additions & 155 deletions docs/data-operate/export/outfile.md

Large diffs are not rendered by default.

Original file line number Diff line number Diff line change
Expand Up @@ -130,6 +130,13 @@ INTO OUTFILE "file_path"
INTO OUTFILE "file:///home/work/path/result_";
```
#### Explanation of the returned results:
- **FileNumber**: The number of generated files.
- **TotalRows**: The number of rows in the result set.
- **FileSize**: The total size of the exported files in bytes.
- **URL**: The prefix of the exported file paths. Multiple files will be numbered sequentially with suffixes `_0`, `_1`, etc.
#### DataType Mapping
Parquet and ORC file formats have their own data types. The export function of Doris can automatically export the Doris data types to the corresponding data types of the Parquet/ORC file format. The following are the data type mapping relationship of the Doris data types and the Parquet/ORC file format data types:
Expand Down
29 changes: 29 additions & 0 deletions docs/sql-manual/sql-statements/Show-Statements/SHOW-EXPORT.md
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,35 @@ illustrate:
3. You can use ORDER BY to sort any combination of columns
4. If LIMIT is specified, limit matching records are displayed. Otherwise show all

The meaning of each column in the result returned by the `show export` command is as follows:

- JobId: The unique ID of the job
- Label: The label of the export job. If not specified in the export, the system will generate one by default.
- State: Job status:
- PENDING: Job pending scheduling
- EXPORTING: Data export in progress
- FINISHED: Job successful
- CANCELLED: Job failed
- Progress: Job progress. This progress is based on query plans. For example, if there are a total of 10 threads and 3 have been completed, the progress is 30%.
- TaskInfo: Job information displayed in JSON format:
- db: Database name
- tbl: Table name
- partitions: Specified partitions for export. An empty list indicates all partitions.
- column\_separator: Column separator for the export file.
- line\_delimiter: Line delimiter for the export file.
- tablet num: Total number of tablets involved.
- broker: Name of the broker used.
- coord num: Number of query plans.
- max\_file\_size: Maximum size of an export file.
- delete\_existing\_files: Whether to delete existing files and directories in the export directory.
- columns: Specified column names to export, empty value represents exporting all columns.
- format: File format for export
- Path: Export path on the remote storage.
- `CreateTime/StartTime/FinishTime`: Job creation time, scheduling start time, and end time.
- Timeout: Job timeout time in seconds. This time is calculated from CreateTime.
- ErrorMsg: If there is an error in the job, the error reason will be displayed here.
- OutfileInfo: If the job is successfully exported, specific `SELECT INTO OUTFILE` result information will be displayed here.

### Example

1. Show all export tasks of default db
Expand Down
Loading

0 comments on commit 983feea

Please sign in to comment.