Hi everyone, When I create a new kedro project, I ...
# questions
s
Hi everyone, When I create a new kedro project, I have selected many options, like PySpark, Kedro-Viz. After I create the project, I want to deactivate some of the options. How can I do? For example, I don't want to use PySpark in this project.
h
Someone will reply to you shortly. In the meantime, this might help:
d
So we don’t really have an undo button. For spark you just need to delete the bits in settings.py, hooks and catalog. That being said creating a new project may be easiest
s
Do you mean to delete these in settings.py?
Copy code
# Instantiated project hooks.
from project_name.hooks import SparkHooks  # noqa: E402

# Hooks are executed in a Last-In-First-Out (LIFO) order.
HOOKS = (SparkHooks(),)
And delete spark.yml file? How about "hooks"?
d
Yeah you need to just make Hooks like this
Hooks = ()
, delete the import and you can also delete the file it's importing from
that's really it
it's only needed to register the singleton session
n
1. comment out the import for SparkHooks and
HOOKS = (SparkHooks(),)
(or keep it as an empty tuple) 2. Remove the
spark.yml
s
How is hooks.py file? Can I keep it?
d
If you're not importing it, it's not necessary, but it also doesn't hurt you if it's there and unused