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
add ability to export as newline separated JSON (nsj) #5101
Conversation
@@ -298,14 +306,15 @@ def csv_writer(filename, fields, delimiter, task_queue, error_queue): | |||
pass | |||
|
|||
def launch_writer(format, directory, db, table, fields, delimiter, task_queue, error_queue): | |||
if format == "json": | |||
if format == "json" or format == "nsj": | |||
filename = directory + "/%s/%s.json" % (db, table) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think the file extension should reflect the data type - since the file can't be parsed as valid JSON, it shouldn't be named with a .json
.
@tayloramurphy, this looks pretty good to me, thanks for the pull request! I think |
I like Thanks for the input! |
0746ec4
to
67bcc7a
Compare
@Tryneus Updated appropriately. It looks better as |
@tayloramurphy, awesome! I almost forgot - one last thing before we can merge it, could you sign our CLA at http://rethinkdb.com/community/cla/? |
Done. I tried to do it earlier but it wouldn't load properly b/c of mixed content types. Seems to have submitted properly this time. |
@tayloramurphy, cool, merging. Thanks again for the pull request! |
add ability to export as newline separated JSON (nsj)
Added ability to export as newline separated JSON (nsj) as well as appropriate language.
Also added language to import.py that indicates nsj is already accepted as an import type.