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

1.6.0 documentation needs update? #1513

Closed
JimShady opened this issue Jul 8, 2024 · 6 comments
Closed

1.6.0 documentation needs update? #1513

JimShady opened this issue Jul 8, 2024 · 6 comments

Comments

@JimShady
Copy link
Contributor

JimShady commented Jul 8, 2024

Running the commands here:

https://sedona.apache.org/1.6.0/setup/databricks/#initialize

from sedona.register.geo_registrator import SedonaRegistrator
SedonaRegistrator.registerAll(spark)

Gives the message:

/root/.ipykernel/1693/command-801172697299958-79051556:2: DeprecationWarning: Call to deprecated function registerAll (Deprecated since 1.4.1, use SedonaContext.create() instead.).
  SedonaRegistrator.registerAll(spark)

I guess that the documentation needs updating?

@jiayuasu
Copy link
Member

jiayuasu commented Jul 8, 2024

You are right. The latest usage is here: https://sedona.apache.org/1.6.0/tutorial/sql/#initiate-sedonacontext

@JimShady
Copy link
Contributor Author

JimShady commented Jul 8, 2024

Thanks.

@JimShady
Copy link
Contributor Author

JimShady commented Jul 8, 2024

Though running on Databricks, I now get this error:

NameError: name 'config' is not defined

I guess I need to do something to create config before.

@JimShady
Copy link
Contributor Author

JimShady commented Jul 8, 2024

Ah it looks like I can just replace 'config' with 'spark' like this.

from sedona.spark import *
sedona = SedonaContext.create(spark)

@jiayuasu
Copy link
Member

jiayuasu commented Jul 8, 2024

Yes, all you need is

from sedona.spark import *
sedona = SedonaContext.create(spark)

@JimShady
Copy link
Contributor Author

JimShady commented Jul 8, 2024

Thanks

@JimShady JimShady closed this as completed Jul 8, 2024
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

2 participants