Microsoft Fabric Data Engineer Associate DP-700 Practice Question
During a nightly pipeline, a Fabric notebook that processes Parquet files fails with the error "ImportError: cannot import name 'fastparquet'". In interactive tests, the same notebook succeeds after you manually run a cell that executes %pip install fastparquet and then restart the Spark session. You need a long-term solution that ensures the package is available every time the notebook runs as part of the pipeline without requiring manual intervention. What should you do?
Add %pip install fastparquet to the first cell of the notebook so it runs before any import statements.
Change the notebook language from Python to Scala so the Spark runtime automatically loads fastparquet.
Create a Fabric environment that includes the fastparquet package and attach the environment to the notebook.
Restart the Spark session at the end of the notebook run to make the package available in the next execution.
Packages that are installed with %pip install exist only for the lifetime of the current Spark session and are lost when the session is restarted, as happens when a notebook is executed by a pipeline. Creating a Fabric environment that lists the required libraries (such as fastparquet) and attaching that environment to the notebook makes the package part of the notebook's runtime image, so every automated run starts with the library already available. Merely adding another %pip install command, restarting the session, or changing the notebook language does not make the dependency persist across separate executions.
Ask Bash
Bash is our AI bot, trained to help you pass your exam. AI Generated Content may display inaccurate information, always double-check anything important.
What is a Fabric environment in Microsoft Fabric?
Open an interactive chat with Bash
Why does `%pip install` only persist for the current Spark session?
Open an interactive chat with Bash
What is the role of the `fastparquet` package in processing Parquet files?
Open an interactive chat with Bash
Microsoft Fabric Data Engineer Associate DP-700
Monitor and optimize an analytics solution
Your Score:
Report Issue
Bash, the Crucial Exams Chat Bot
AI Bot
Loading...
Loading...
Loading...
Pass with Confidence.
IT & Cybersecurity Package
You have hit the limits of our free tier, become a Premium Member today for unlimited access.
Military, Healthcare worker, Gov. employee or Teacher? See if you qualify for a Community Discount.
Monthly
$19.99
$19.99/mo
Billed monthly, Cancel any time.
3 Month Pass
$44.99
$14.99/mo
One time purchase of $44.99, Does not auto-renew.
MOST POPULAR
Annual Pass
$119.99
$9.99/mo
One time purchase of $119.99, Does not auto-renew.
BEST DEAL
Lifetime Pass
$189.99
One time purchase, Good for life.
What You Get
All IT & Cybersecurity Package plans include the following perks and exams .