Skip to content

Commit

Permalink
improve joins docstrings
Browse files Browse the repository at this point in the history
  • Loading branch information
drizk1 committed Jan 7, 2025
1 parent 23fa1aa commit 1a05bc0
Showing 1 changed file with 30 additions and 18 deletions.
48 changes: 30 additions & 18 deletions src/docstrings.jl
Original file line number Diff line number Diff line change
Expand Up @@ -609,9 +609,11 @@ const docstring_left_join =
@left_join(sql_query, join_table, orignal_table_col == new_table_col)
Perform a left join between two SQL queries based on a specified condition.
This syntax here is slightly different than TidierData.jl, however, because
SQL does not drop the joining column, for the metadata storage, it is
preferrable for the names to be different
Joins can be equi joins or inequality joins. For equi joins, the joining table
key column is dropped. Inequality joins can be made into AsOf or rolling joins
by wrapping the inequality in closest(key >= key2). With inequality joins, the
columns from both tables are kept. Multiple joining criteria can be added, but
need to be separated by commas, ie `closest(key >= key2), key3 == key3`
# Arguments
- `sql_query`: The primary SQL query to operate on.
Expand Down Expand Up @@ -684,9 +686,11 @@ const docstring_right_join =
@right_join(sql_query, join_table, orignal_table_col == new_table_col)
Perform a right join between two SQL queries based on a specified condition.
This syntax here is slightly different than TidierData.jl, however, because
SQL does not drop the joining column, for the metadata storage, it is
preferrable for the names to be different
Joins can be equi joins or inequality joins. For equi joins, the joining table
key column is dropped. Inequality joins can be made into AsOf or rolling joins
by wrapping the inequality in closest(key >= key2). With inequality joins, the
columns from both tables are kept. Multiple joining criteria can be added, but
need to be separated by commas, ie `closest(key >= key2), key3 == key3`
# Arguments
- `sql_query`: The primary SQL query to operate on.
Expand Down Expand Up @@ -753,9 +757,11 @@ const docstring_inner_join =
@inner_join(sql_query, join_table, orignal_table_col == new_table_col)
Perform an inner join between two SQL queries based on a specified condition.
This syntax here is slightly different than TidierData.jl, however, because
SQL does not drop the joining column, for the metadata storage, it is
preferrable for the names to be different
Joins can be equi joins or inequality joins. For equi joins, the joining table
key column is dropped. Inequality joins can be made into AsOf or rolling joins
by wrapping the inequality in closest(key >= key2). With inequality joins, the
columns from both tables are kept. Multiple joining criteria can be added, but
need to be separated by commas, ie `closest(key >= key2), key3 == key3`
# Arguments
- `sql_query`: The primary SQL query to operate on.
Expand Down Expand Up @@ -799,9 +805,11 @@ const docstring_full_join =
@inner_join(sql_query, join_table, orignal_table_col == new_table_col)
Perform an full join between two SQL queries based on a specified condition.
This syntax here is slightly different than TidierData.jl, however, because
SQL does not drop the joining column, for the metadata storage, it is
preferrable for the names to be different
Joins can be equi joins or inequality joins. For equi joins, the joining table
key column is dropped. Inequality joins can be made into AsOf or rolling joins
by wrapping the inequality in closest(key >= key2). With inequality joins, the
columns from both tables are kept. Multiple joining criteria can be added, but
need to be separated by commas, ie `closest(key >= key2), key3 == key3`
# Arguments
- `sql_query`: The primary SQL query to operate on.
Expand Down Expand Up @@ -852,9 +860,11 @@ const docstring_semi_join =
@semi_join(sql_query, join_table, orignal_table_col == new_table_col)
Perform an semi join between two SQL queries based on a specified condition.
This syntax here is slightly different than TidierData.jl, however, because
SQL does not drop the joining column, for the metadata storage, it is
preferrable for the names to be different
Joins can be equi joins or inequality joins. For equi joins, the joining table
key column is dropped. Inequality joins can be made into AsOf or rolling joins
by wrapping the inequality in closest(key >= key2). With inequality joins, the
columns from both tables are kept. Multiple joining criteria can be added, but
need to be separated by commas, ie `closest(key >= key2), key3 == key3`
# Arguments
- `sql_query`: The primary SQL query to operate on.
Expand Down Expand Up @@ -899,9 +909,11 @@ const docstring_anti_join =
@anti_join(sql_query, join_table, orignal_table_col == new_table_col)
Perform an anti join between two SQL queries based on a specified condition.
This syntax here is slightly different than TidierData.jl, however, because
SQL does not drop the joining column, for the metadata storage, it is
preferrable for the names to be different
Joins can be equi joins or inequality joins. For equi joins, the joining table
key column is dropped. Inequality joins can be made into AsOf or rolling joins
by wrapping the inequality in closest(key >= key2). With inequality joins, the
columns from both tables are kept. Multiple joining criteria can be added, but
need to be separated by commas, ie `closest(key >= key2), key3 == key3`
# Arguments
- `sql_query`: The primary SQL query to operate on.
Expand Down

4 comments on commit 1a05bc0

@drizk1
Copy link
Member Author

@drizk1 drizk1 commented on 1a05bc0 Jan 7, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@JuliaRegistrator register

Release notes:

  • Adds support for joining on multiple columns
  • Adds support for inequality joins
  • Adds support for AsOf / rolling joins
  • Equi-joins no longer duplicate key columns
  • Fixes bug to allow array columns to be mutated in

@JuliaRegistrator
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Registration pull request created: JuliaRegistries/General/122542

Tagging

After the above pull request is merged, it is recommended that a tag is created on this repository for the registered package version.

This will be done automatically if the Julia TagBot GitHub Action is installed, or can be done manually through the github interface, or via:

git tag -a v0.6.0 -m "<description of version>" 1a05bc0d7ac7295d42085ff3255f9a11947e2674
git push origin v0.6.0

@drizk1
Copy link
Member Author

@drizk1 drizk1 commented on 1a05bc0 Jan 7, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@JuliaRegistrator register

Release notes:
** Breaking Changes **

  • Equi-joins no longer duplicate key columns
    ** Additions **
  • Adds support for joining on multiple columns
  • Adds support for inequality joins
  • Adds support for AsOf / rolling joins
    ** Bug fixes **
  • Fixes bug to allow array columns to be mutated in

@JuliaRegistrator
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Registration pull request updated: JuliaRegistries/General/122542

Tagging

After the above pull request is merged, it is recommended that a tag is created on this repository for the registered package version.

This will be done automatically if the Julia TagBot GitHub Action is installed, or can be done manually through the github interface, or via:

git tag -a v0.6.0 -m "<description of version>" 1a05bc0d7ac7295d42085ff3255f9a11947e2674
git push origin v0.6.0

Please sign in to comment.