What could be a cause of the following error of my code in a Databricks notebook, and how can we fix the error?
ImportError: cannot import name 'pipelines' from 'pyspark' (/databricks/python/lib/python3.12/site-packages/pyspark/__init__.py)
This is the top line of the Databricks notebook that throws the error:
from pyspark import pipelines as dp
According to the following quote from Basics of Python for pipeline development from Databricks' team, we need to import the above module for creating Lakeflow Declarative pipelines using Python:
All Lakeflow Declarative Pipelines Python APIs are implemented in the
pyspark.pipelinesmodule.
Also, as we know PySpark is an integral and primary programming interface used within the Databricks platform. So, what I may be missing here that causes the error?
psyspark version 4.0.0andDatabricks runtime version 17.2