Ah — you mean you want to directly publish your Kaggle notebook’s output as a dataset using the notebook’s own link, without manually downloading/uploading files.
On Kaggle, this is possible, but there’s no “magic” one-line link-to-dataset feature in a code cell — you still have to run a Kaggle API command inside the notebook.
Here’s how it works:
If you want to turn the current notebook’s /kaggle/working folder into a dataset
Every Kaggle notebook has:
/kaggle/input → read-only datasets you added
/kaggle/working → where your outputs are stored
If your notebook has already generated the files you want, you can run this in a cell:
bashCopyEdit!kaggle datasets create -p /kaggle/working --dir-mode zip
But you must have:
dataset-metadata.json in /kaggle/working
Your desired output files in /kaggle/working
Example metadata (in a cell before running kaggle datasets create):
pythonCopyEditimport json
metadata = {
"title": "My Notebook Output Dataset",
"id": "your-username/my-notebook-output", # must be unique & lowercase
"licenses": [{"name": "CC0-1.0"}]
}
with open('/kaggle/working/dataset-metadata.json', 'w') as f:
json.dump(metadata, f)
If you want to link it to the original notebook
You can’t just paste a notebook link and have Kaggle auto-upload — but you can reference the notebook in your dataset’s description so people know it came from that notebook.
Example in your metadata:
pythonCopyEditmetadata = {
"title": "My Notebook Output Dataset",
"id": "your-username/my-notebook-output",
"licenses": [{"name": "CC0-1.0"}],
"description": "Generated from this notebook: https://www.kaggle.com/username/notebook-name"
}
Pro tip
If you want this fully automated so that whenever the notebook finishes, the output is uploaded as a dataset, you can:
Put the metadata creation + kaggle datasets create at the last cell of your notebook
Run the notebook
Dataset will be ready without leaving the notebook
If you want, I can give you a one-cell script that
✅ detects the current notebook’s owner + link,
✅ creates the metadata automatically,
✅ uploads /kaggle/working as a dataset,
so you don’t have to touch anything manually.
Do you want me to prepare that automation?