You are viewing a plain text version of this content. The canonical link for it is here.
Posted to github@arrow.apache.org by GitBox <gi...@apache.org> on 2022/07/27 14:19:32 UTC

[GitHub] [arrow-cookbook] eitsupi opened a new pull request, #233: [R] Recipe for nested json

eitsupi opened a new pull request, #233:
URL: https://github.com/apache/arrow-cookbook/pull/233

   Related to [ARROW-17143](https://issues.apache.org/jira/browse/ARROW-17143)
   
   json files often have a hierarchical structure, but it is surprisingly easy to convert such a json file into a flat data frame by reading it as a data frame with `read_json_arrow` function and then processing it with the `tidyr` functions.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: github-unsubscribe@arrow.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [arrow-cookbook] eitsupi closed pull request #233: [R] Recipe for nested json

Posted by GitBox <gi...@apache.org>.
eitsupi closed pull request #233: [R] Recipe for nested json
URL: https://github.com/apache/arrow-cookbook/pull/233


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: github-unsubscribe@arrow.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [arrow-cookbook] thisisnic commented on a diff in pull request #233: [R] Recipe for nested json

Posted by GitBox <gi...@apache.org>.
thisisnic commented on code in PR #233:
URL: https://github.com/apache/arrow-cookbook/pull/233#discussion_r935476228


##########
r/content/reading_and_writing_data.Rmd:
##########
@@ -304,6 +304,39 @@ test_that("read_json_arrow chunk works as expected", {
 unlink(tf)
 ```
 
+### Discussion

Review Comment:
   Agreed - there's a really delicate balance to be struck here between "explaining how to do things using the arrow package" (desirable) and "explaining how to do things using the tidyverse in general" (undesirable).  We've come up against this in the past, when [writing the recipe for using dplyr verbs in arrow](https://arrow.apache.org/cookbook/r/manipulating-data---tables.html#use-dplyr-verbs-in-arrow), and making a conscious choice _not_ to detail each of the main dplyr verbs that we support (as this is dplyr content and not arrow content).
   
   I think you're right @eitsupi that it could be helpful to point readers in the right direction here but agree with @dragosmg that this level of detail is a little out-of-scope and that a brief sentence with a link would be best in this particular case.



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: github-unsubscribe@arrow.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [arrow-cookbook] dragosmg commented on a diff in pull request #233: [R] Recipe for nested json

Posted by GitBox <gi...@apache.org>.
dragosmg commented on code in PR #233:
URL: https://github.com/apache/arrow-cookbook/pull/233#discussion_r935461579


##########
r/content/reading_and_writing_data.Rmd:
##########
@@ -304,6 +304,39 @@ test_that("read_json_arrow chunk works as expected", {
 unlink(tf)
 ```
 
+### Discussion

Review Comment:
   Thanks for submitting the PR. The content is great, though I'm not entirely convinced it belongs in the Cookbook.
   
   FWIW I think this might be going into too much detail regarding working with JSON imported a list-columns in a dplyr-tidyr workflow. We could say something along the lines of ... once you import / read the data in, you can then work with it in several ways: tidyr or purrr workflows, etc. IMHO working with nested structures is slightly out-of-scope for the cookbook. We could link to the working with nested data tidyr [vignette](https://tidyr.tidyverse.org/articles/nest.html) or Jenny Bryan's working with [list-columns in purrr](https://jennybc.github.io/purrr-tutorial/ls13_list-columns.html).  



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: github-unsubscribe@arrow.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [arrow-cookbook] eitsupi commented on a diff in pull request #233: [R] Recipe for nested json

Posted by GitBox <gi...@apache.org>.
eitsupi commented on code in PR #233:
URL: https://github.com/apache/arrow-cookbook/pull/233#discussion_r950814293


##########
r/content/reading_and_writing_data.Rmd:
##########
@@ -304,6 +304,39 @@ test_that("read_json_arrow chunk works as expected", {
 unlink(tf)
 ```
 
+### Discussion

Review Comment:
   Thank you both for your review. I agree with your remarks and close this.



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: github-unsubscribe@arrow.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org