Skip to content
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

spread_all() fails if JSON has two different obvious types (numeric/character) if the more restrictive type comes first. #149

Open
captbrando opened this issue Jan 25, 2025 · 0 comments

Comments

@captbrando
Copy link

Been struggling with Azure activity audit data and two operation types, ListViewed and ListItemDeleted, return Character arrays, while everything else is either a numeric/double or NA. This causes a failure when running spread_all():

Error in `z[, final_columns, drop = FALSE]`:
! Can't subset columns that don't exist.
✖ Column `ListBaseType` doesn't exist.

The way to fix this was to split those records out into a separate data frame, change the data type for the more restrictive to more permissive (double->character), and then go from there. spread_all() should pick the less restrictive type when required.

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

No branches or pull requests

1 participant