jupyter-notebook
Jupyter Notebook Expert Skill - Guide for notebook execution and Databricks kernel integration
安装与使用
请根据来源仓库和你的 AI 工具说明安装此技能。先阅读技能文件和依赖要求,再添加到工作流。
查看来源 ↗使用指南技能说明
Jupyter Notebook Expert Skill
This skill provides a guide for Jupyter Notebook execution.
1. Databricks Jupyter Kernel
https://github.com/i9wa4/jupyter-databricks-kernel
uv pip install jupyter-databricks-kernel
uv run python -m jupyter_databricks_kernel.install
2. Default Execution Method
When instructed to execute an entire notebook, use this command:
uv run jupyter execute <notebook_path> --inplace --timeout=300
3. Execute with Databricks Kernel
When running notebook on Databricks cluster:
uv run jupyter execute <notebook_path> --inplace --kernel_name=databricks --timeout=300
Required environment variables:
-
DATABRICKS_HOST: Databricks workspace URL -
DATABRICKS_TOKEN: Personal Access Token -
DATABRICKS_CLUSTER_ID: Cluster ID
4. Usage Examples
# Execute with local Python kernel
uv run jupyter execute /workspace/notebooks/sample.ipynb --inplace --timeout=300
# Execute with Databricks kernel
uv run jupyter execute /workspace/notebooks/databricks-sample.ipynb --inplace --kernel_name=databricks --timeout=300
5. Option Descriptions
-
--inplace: Overwrite original file with execution results -
--kernel_name=<name>: Specify kernel to use (databricks, python3, etc.) -
--timeout=<seconds>: Set timeout in seconds (-1 for unlimited) -
--startup_timeout=<seconds>: Kernel startup timeout (default 60 seconds) -
--allow-errors: Continue execution to end even with errors
6. Notes
- Verify required environment variables are properly set before execution
- Adjust
--timeoutvalue for long-running cells - If open in VS Code, verify file updates after execution
- For Databricks kernel, cluster startup takes 5-6 minutes if stopped
7. Reference Links
- jupyter-databricks-kernel: https://github.com/i9wa4/jupyter-databricks-kernel
- Jupyter nbclient: https://nbclient.readthedocs.io/
使用示例
查看来源仓库中的使用示例与配置说明。
查看来源 ↗来源历史
- 收录时间
- 2026-01-20
- 索引更新时间
- 2026-01-26
- Branch
- main
收录与同步日期属于本站记录。源码修改历史请查看来源仓库。
GitHub ↗chat Comments (0)
Sign in to join the discussion and leave a comment.
No comments yet. Be the first to share your thoughts!