Skip to content

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

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed

Conversation

chobie
Copy link

@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
Contributor

Good request. I will check later

@repeatedly
Copy link
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
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
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
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