When I run td command as a part of ETL workflow, I need to parse stdout message to know error or status. But it is hard and fragile. If the command writes the result into a file, integrating to ETL tools becomes much easier. And because ETL tools use shell script, the file format should be shell-friendly format.
For example,
td query ... --status status.sh # writes status.sh
source status.sh
echo $job_id
td job:show -w $job_id --status status.sh
source status.sh
echo $elapsed
echo $status
td import:show ... --status status.sh
source status.sh
echo $valid_records
echo $error_records
When I run td command as a part of ETL workflow, I need to parse stdout message to know error or status. But it is hard and fragile. If the command writes the result into a file, integrating to ETL tools becomes much easier. And because ETL tools use shell script, the file format should be shell-friendly format.
For example,