Skip to content

[Feature Request] add batch option to td job:result and td query.#20

Closed
chobie wants to merge 1 commit into
treasure-data:masterfrom
chobie:add-batch-option-to-job-result
Closed

[Feature Request] add batch option to td job:result and td query.#20
chobie wants to merge 1 commit into
treasure-data:masterfrom
chobie:add-batch-option-to-job-result

Conversation

@chobie
Copy link
Copy Markdown

@chobie chobie commented Oct 3, 2013

This idea comes from MySQL's batch mode. That mode print the results using tab as the column separator, with each row on a new line.

This feature is very useful when copying the result and past it to Microsoft Excel or some applications.

for example:

$ bin/td query -d testdb -B -w "select v['code'] as code, count(1) as cnt from www_access group by v['code']"

 ----------------------------------------------------------------
  MapReduce time taken: 22.501 seconds
  Time taken: 22.782 seconds
Status     : success
Result     :

404 17
500 2
200 4981

also I think changing format option is good solution too. It is better to print other format if it enable without output option.

Thanks,

This idea comes from MySQL's batch mode. You know that mode print the results using
tab as the column separator, with each row on a new line.

This feature is very useful when copying result and past to Microsoft Excel and some Applications.
@ghost ghost assigned repeatedly Oct 3, 2013
@repeatedly
Copy link
Copy Markdown
Contributor

Good request. I will check later

@repeatedly
Copy link
Copy Markdown
Contributor

This pull request is set of #19 , right?
These pull requests seem to good so I will merge it after discussed with other users.

@chobie
Copy link
Copy Markdown
Author

chobie commented Oct 28, 2013

It's not a set of #19 as this PR makes easy to copy from terminal :) But it would be nice

@repeatedly
Copy link
Copy Markdown
Contributor

We added --format option to each command and changed query's --format option behaviour

836ac51
ad5c54e

In this result, we can use 'csv', 'tsv' and 'json' for output result format instead of default table format.
Does this fit your case?

@repeatedly
Copy link
Copy Markdown
Contributor

If you have further question, please re-open this issue.

@repeatedly repeatedly closed this Dec 22, 2013
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants