robust-apricot
robust-apricot13mo ago

Is there a way to select the name of the dataset files?

I am scraping product information from Amazon, where every product has an ID (ASIN). Does pushData method (or something else) allow me to select the name of the generated file in the dataset? I prefer using the ASIN code instead of the adding index because it does not make any sense in my case.
1 Reply
Marco
Marco13mo ago
The name of the files into a dataset are auto-generated: there is no way to set a custom name. If that's crucial for your use-case, you could create a named Key-Value Store and store the data there:
const kvs = await Actor.openKeyValueStore('my-output');
await kvs.setValue('ASIN...', { ...data })
const kvs = await Actor.openKeyValueStore('my-output');
await kvs.setValue('ASIN...', { ...data })

Did you find this page helpful?