Problem
When attempting to use the stream_read_table
function from the Sparklyr package version 1.8.6 in Databricks Runtime 14.3 LTS ML, you receive an error message.
Error in stream_read_table(sc, 'table_name'): could not find function 'stream_read_table'.
Cause
Databricks Runtime 14.3 LTS ML includes Sparklyr version 1.8.1 by default, but the stream_read_table
function requires version 1.8.6.
Solution
- Install Sparklyr version 1.8.6. Navigate to the cluster's library settings and add the Sparklyr package. This action will replace the default version, 1.8.1.
- Restart the cluster to implement the updated changes.
- Re-execute the
stream_read_table
function to verify the error is resolved.
Alternatively, update Databricks Runtime to 16.0 or above, which uses Sparklyr 1.8.6 by default.
Important
Generally, changing package versions can potentially cause conflicts with other internal dependency changes. In this solution, Sparklyr 1.8.6 is a patch update, so no conflicts are anticipated. However as a precaution, you can test the version change in a development environment before deploying to production.