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

dm_disambiguate_cols() should optionally support the use RHS of column names for joins #685

Open
krlmlr opened this issue Oct 27, 2021 · 0 comments
Labels
enhancement New feature or request
Milestone

Comments

@krlmlr
Copy link
Collaborator

krlmlr commented Oct 27, 2021

Need to check what this example (and perhaps others) looks like after #662.

library(dm)
#> 
#> Attaching package: 'dm'
#> The following object is masked from 'package:stats':
#> 
#>     filter
library(tidyverse)

person <- tibble(id = 1, person = "Joe")
hobby <- tibble(id = 1:2, person_id = 1, hobby = c("R Programming", "Basketball"))

dm <-
  dm(person, hobby) %>%
  dm_add_pk(person, id) %>%
  dm_add_pk(hobby, id) %>%
  dm_add_fk(hobby, id, person, id)

dm %>%
  dm_disambiguate_cols() %>%
  dm_flatten_to_tbl(hobby)
#> # A tibble: 2 × 4
#>      id person_id hobby         person
#>   <dbl>     <dbl> <chr>         <chr> 
#> 1     1         1 R Programming Joe   
#> 2     2         1 Basketball    <NA>

Created on 2021-10-27 by the reprex package (v2.0.1)

@krlmlr krlmlr added this to the 0.3.0 milestone Oct 27, 2021
@krlmlr krlmlr modified the milestones: 0.3.0, 0.3.1 Nov 16, 2021
@krlmlr krlmlr changed the title Should dm_flatten_to_tbl() and dm_squash_to_tbl() use RHS column names for joins? dm_disambiguate_cols() should optionally support the use RHS of column names for joins Jun 6, 2022
@krlmlr krlmlr added the enhancement New feature or request label Jun 6, 2022
@krlmlr krlmlr modified the milestones: 1.0.1, bluesky Jun 6, 2022
@krlmlr krlmlr modified the milestones: bluesky, api Aug 20, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Development

No branches or pull requests

1 participant