Skip to content

Commit b45ef05

Browse files
committed
update some old join docs
1 parent 6edc037 commit b45ef05

File tree

2 files changed

+14
-14
lines changed

2 files changed

+14
-14
lines changed

docs/examples/UserGuide/ex_joining.jl

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -6,22 +6,22 @@
66

77
# ## Equi Joins
88
# Equi joins can be written in any of the following ways, and the key column will be dropped from the right hand (new) table to avoid duplication.
9-
# - `@left_join(t(table), "table2", key_col)`
10-
# - `@left_join(t(table), "table2", key_col = key_col2)`
9+
# - `@left_join(table, "table2", key_col)`
10+
# - `@left_join(table, "table2", key_col = key_col2)`
1111
# To join mutliple columns, separate the different pairs with a `,`
12-
# - `@left_join(t(table), "table2", key_col == key_col2, key2 == key2)`
12+
# - `@left_join(table, "table2", key_col == key_col2, key2 == key2)`
1313

1414
# ## Inequality Joins
1515
# Inequality joins or non-equi-joins use the same syntax, just with a inequality operators
16-
# - `@left_join(t(table), "table2", key_col >= key_col2, key2 < key2)`
16+
# - `@left_join(table, "table2", key_col >= key_col2, key2 < key2)`
1717

1818
# ## AsOf
1919
# To use an AsOf or rolling join, simply wrap the inequality in `closest. Of note, at this time, only one inequality can be supported at a time with AsOf joins
20-
# - `@left_join(t(table), "table2", closest(key_col >= key_col2), key2 == key2)`
20+
# - `@left_join(table, "table2", closest(key_col >= key_col2), key2 == key2)`
2121

2222
# When the joining table is already availabe on the database, a string of the table name used as shown above.
2323
# However, the joining table can also be a TidierDB query, in which case, the query is written as follows
24-
# - `@left_join(t(table),query, key)`
24+
# - `@left_join(table,query, key)`
2525

2626
# ## Examples
2727
# Examples below will cover how to join tables with different schemas in different databases,

src/docstrings.jl

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -882,7 +882,7 @@ julia> query = @chain dt(db, "df_join") begin
882882
end;
883883
884884
julia> @chain dfm begin
885-
@left_join(t(query), id == id2)
885+
@left_join(query, id == id2)
886886
@collect
887887
end
888888
10×6 DataFrame
@@ -902,14 +902,14 @@ julia> @chain dfm begin
902902
903903
julia> @chain dfm begin
904904
@mutate(test = percent * 100)
905-
@left_join(t(dfj), test <= score, id = id2)
905+
@left_join(dfj, test <= score, id = id2)
906906
@collect
907907
end;
908908
909909
910910
julia> @chain dfm begin
911911
@mutate(test = percent * 200)
912-
@left_join(t(dfj), closest(test >= score)) # asof join
912+
@left_join(dfj, closest(test >= score)) # asof join
913913
@collect
914914
end;
915915
```
@@ -949,7 +949,7 @@ julia> db = connect(duckdb());
949949
julia> dfj = dt(db, df2, "df_join");
950950
951951
julia> @chain dt(db, df, "df_view") begin
952-
@right_join(t(dfj), id == id2)
952+
@right_join(dfj, id == id2)
953953
@arrange(score)
954954
@collect
955955
end
@@ -970,7 +970,7 @@ julia> query = @chain dfj begin
970970
end;
971971
972972
julia> @chain dt(db, df, "df_view") begin
973-
@right_join(t(query), id == id2)
973+
@right_join(query, id == id2)
974974
@collect
975975
end
976976
6×6 DataFrame
@@ -1019,7 +1019,7 @@ julia> db = connect(duckdb());
10191019
julia> dfj = dt(db, df2, "df_join");
10201020
10211021
julia> @chain dt(db, df, "df_view") begin
1022-
@inner_join(t(dfj), id == id2)
1022+
@inner_join(dfj, id == id2)
10231023
@collect
10241024
end
10251025
5×6 DataFrame
@@ -1120,7 +1120,7 @@ julia> db = connect(duckdb());
11201120
julia> dfj = dt(db, df2, "df_join");
11211121
11221122
julia> @chain dt(db, df, "df_view") begin
1123-
@semi_join(t(dfj), id == id2)
1123+
@semi_join(dfj, id == id2)
11241124
@collect
11251125
end
11261126
5×4 DataFrame
@@ -1168,7 +1168,7 @@ julia> db = connect(duckdb());
11681168
julia> dfj = dt(db, df2, "df_join");
11691169
11701170
julia> @chain dt(db, df, "df_view") begin
1171-
@anti_join(t(dfj), id == id2)
1171+
@anti_join(dfj, id == id2)
11721172
@collect
11731173
end
11741174
5×4 DataFrame

0 commit comments

Comments
 (0)