-
Notifications
You must be signed in to change notification settings - Fork 2
Uc notebook asset #83
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
base: main
Are you sure you want to change the base?
Conversation
still TODO, we should link to docs from instructions that reference creating a foriegn catalog
Co-authored-by: Kelly-Ann Dolor <[email protected]>
Co-authored-by: Kelly-Ann Dolor <[email protected]>
Co-authored-by: Kelly-Ann Dolor <[email protected]>
Co-authored-by: Kelly-Ann Dolor <[email protected]>
Co-authored-by: Kelly-Ann Dolor <[email protected]>
Co-authored-by: Kelly-Ann Dolor <[email protected]>
Co-authored-by: Kelly-Ann Dolor <[email protected]>
Co-authored-by: Kelly-Ann Dolor <[email protected]>
Found 1 changed notebook. Review the changes at https://app.gitnotebooks.com/wherobots/wherobots-examples/pull/83 |
This is ready for review. |
"from pyspark.sql.functions import expr, col, when, lit\n", | ||
"from pyspark.sql.functions import lit" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
lit is duplicated
"\n", | ||
"# Define the point of interest (Tokyo) as a WKT string.\n", | ||
"\n", | ||
"tokyo_geom_wkt = \"POINT (139.6917 35.6895)\"\n", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
should we use wkls here? Should we use a geometry instead of a point?
"# Wherobots efficiently calculates the spherical distance in meters for every row.\n", | ||
"df_with_distance = df_w_geom.withColumn(\n", | ||
" \"distance_to_tokyo_meters\",\n", | ||
" expr(f\"ST_DistanceSphere(point, ST_SetSRID(ST_GeomFromWKT('{tokyo_geom_wkt}'), 4326))\")\n", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
setting the SRID probably doesnt accomplish anything
No description provided.