cancel
Showing results for 
Search instead for 
Did you mean: 
Machine Learning
Dive into the world of machine learning on the Databricks platform. Explore discussions on algorithms, model training, deployment, and more. Connect with ML enthusiasts and experts.
cancel
Showing results for 
Search instead for 
Did you mean: 

Internal error: com.databricks.rpc.RPCResponseTooLarge, when attempting to use mosaic's st_intersects

kll
New Contributor III

I get an exception when attempting to run the following line of code, which filters a spark DataFrame based on the geometry.

df_tx = df_zip.filter(st_intersects(st_aswkt("zip_code_geom"), tx_poly))
 
df_tx.show()

where, `tx_poly` is,

`tx_poly = shapely.wkt.dumps(tx_poly2)`

Exception:

Internal error. Attach your notebook to a different compute or restart the current compute.
 
com.databricks.rpc.RPCResponseTooLarge: rpc response (of 20982872 bytes) exceeds limit of 20971520 bytes
 
	at com.databricks.rpc.Jetty9Client$$anon$1.onContent(Jetty9Client.scala:657)
 
	at shaded.v9_4.org.eclipse.jetty.client.api.Response$Listener.onContent(Response.java:294)

1 REPLY 1

WernerS
New Contributor III

I am not familiar with st_intersects, but it seems that it runs solely on the driver (as python code, not spark).
Does mosaic work in pyspark?

If not: try to use a larger driver.

Join 100K+ Data Experts: Register Now & Grow with Us!

Excited to expand your horizons with us? Click here to Register and begin your journey to success!

Already a member? Login and join your local regional user group! If there isn’t one near you, fill out this form and we’ll create one for you to join!