custom project context class
See original GitHub issueDescription
I would like to use centralized Spark configuration file under conf/base/spark.yml and would like to pass these to SparkSession.
Context
I followed the steps mentioned here in the documentation. https://kedro.readthedocs.io/en/stable/11_tools_integration/01_pyspark.html?highlight=SparkSession#initialise-a-sparksession-in-custom-project-context-class
First Issue: KedroContext Which is not imported in the given example.
Second Issue: If I import like this from kedro.framework.context import KedroContext I am getting the below error: TypeError: init() got an unexpected keyword argument ‘package_name’
File "/root/user_files/envs/xpvu4/lib/python3.7/site-packages/kedro/framework/session/session.py", line 226, in create
session._setup_logging()
File "/root/user_files/envs/xpvu4/lib/python3.7/site-packages/kedro/framework/session/session.py", line 244, in _setup_logging
conf_logging = self._get_logging_config()
File "/root/user_files/envs/xpvu4/lib/python3.7/site-packages/kedro/framework/session/session.py", line 230, in _get_logging_config
context = self.load_context()
File "/root/user_files/envs/xpvu4/lib/python3.7/site-packages/kedro/framework/session/session.py", line 306, in load_context
extra_params=extra_params,
TypeError: __init__() got an unexpected keyword argument 'package_name'
-- Separate them if you have more than one.
Your Environment
Include as many relevant details about the environment in which you experienced the bug:
- Kedro version used (
pip show kedroorkedro -V): kedro, version 0.17.0 - Python version used (
python -V): Python 3.7.9 - Operating system and version:
Issue Analytics
- State:
- Created 3 years ago
- Reactions:1
- Comments:5 (3 by maintainers)
Top Results From Across the Web
custom project context class · Issue #676 · kedro-org ...
Description I would like to use centralized Spark configuration file under conf/base/spark.yml and would like to pass these to SparkSession.
Read more >Project.CustomFields property
Gets the collection of project custom fields that have values set for the project. Namespace: Microsoft.ProjectServer.Client
Read more >Ability to define multiple global contexts for custom fields - Jira
If you made Project Categories a 1st class, usable object in JIRA, at the very least you could allow us to define a...
Read more >Working with enterprise custom fields in Project Online
context.ExecuteQuery();. Putting all of this together, I made a class ...
Read more >client object model - Get project custom fields (Project Server)
I am trying to access, in a project detail page, the project context via Javascript to retrieve the data of the custom fields....
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found

Hello! The example
CustomContextneeds a little tweak to includeproject_nameas an__init__argument:I’ll open a PR to update this - thanks for raising both 👍
@samhiscoxqb thanks a lot for your help, it worked! I had also to edit another line that you wrote correctly but in the doc is not (-> https://kedro.readthedocs.io/en/stable/11_tools_integration/01_pyspark.html ) In the doc the code is
While I had to edit the appName line as
since it was giving me AttributeError on the self.project_name call.
Thanks again!