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

Select before joining #14

Open
raphaelgl opened this issue Jul 25, 2023 · 0 comments
Open

Select before joining #14

raphaelgl opened this issue Jul 25, 2023 · 0 comments

Comments

@raphaelgl
Copy link

To be consistent with the concept of selecting first the input needed for a transform, should we also recommend doing that before a join .
This would mean the good join option being :

# good
flights = flights.select(
    F.col('start_time').alias('flight_start_time'),
    F.col('end_time').alias('flight_end_time'), 
    'flight_code')

parking = parking.select(
    F.col('total_time').alias('client_parking_total_time'),
    'flight_code')

flights = flights.join(parking, on='flight_code', how='left')

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