Back to Crawlee

Add data to dataset

website/versioned_docs/version-3.11/examples/add_data_to_dataset.mdx

3.16.0668 B
Original Source

import RunnableCodeBlock from '@site/src/components/RunnableCodeBlock'; import ApiLink from '@site/src/components/ApiLink'; import AddDataToDatasetSource from '!!raw-loader!roa-loader!./add_data_to_dataset.ts';

This example saves data to the default dataset. If the dataset doesn't exist, it will be created. You can save data to custom datasets by using <ApiLink to="core/class/Dataset#open">Dataset.open()</ApiLink>

<RunnableCodeBlock className="language-js" type="cheerio"> {AddDataToDatasetSource} </RunnableCodeBlock>

Each item in this dataset will be saved to its own file in the following directory:

bash
{PROJECT_FOLDER}/storage/datasets/default/