0
Hello! I have two tables in the database and they are linked by a FK, as I create a third data.frame with the data of both tables linked by FK.
I mean, I have:
dataframe1 <- tbl(con, "TabelaLegado1")
dataframe1 <- as_tibble(dataframe1 %>% select(id, nome))
dataframe2 <- tbl(con, "TabelaLegado2")
dataframe2 <- as_tibble(dataframe2 %>% select(id, texto, id_tabela_legado1))
I need to take the "name" of Tabelalegado1 and the id, text of Tabelalegado2, in a Tabelalegado3, and that these two tables are linked by the id of Tabelalegado1, and the id_tabela_legado1 of Tabelalegado2 to bring the right data to this third table.
Can be with R base
help('merge')
or withhelp('dplyr::left_join')
(orinner_join
,right_join
, etc). It is hard to say without seeing the data.– Rui Barradas
Thank you very much!
– Theorp