Skip to content

Commit

Permalink
fix: fix parsing fields
Browse files Browse the repository at this point in the history
  • Loading branch information
drobnikj committed May 22, 2023
1 parent 07f3309 commit b85b2b2
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 3 deletions.
2 changes: 1 addition & 1 deletion src/actions/get_dataset_items.js
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ module.exports = async function getDatasetItems(apifyClient, datasetIdOrName, da

const sampleItems = await apifyClient.dataset(datasetId).downloadItems(DownloadItemsFormat.CSV, { ...getItemsOpts, limit: 10 });
// HOTFIX: Enlarge max_record_size to be able handle large fields
const parsedCsv = parse(sampleItems.items, { max_record_size: 128000 * 5 });
const parsedCsv = parse(sampleItems.toString().trim(), { max_record_size: 128000 * 5 });
const headerRowColumns = parsedCsv[0];

console.log(`Start saving ${dataset.itemCount} results from datasetId ${datasetId}`);
Expand Down
2 changes: 0 additions & 2 deletions test/actions/config.js
Original file line number Diff line number Diff line change
Expand Up @@ -41,8 +41,6 @@ const getManifest = () => {
};

const checkRows = (localCsvRows, apiRows) => {
console.log(localCsvRows);
console.log(apiRows);
expect(localCsvRows.length).to.eql(apiRows.length);
localCsvRows.forEach((localRow, i) => {
expect(localRow.trim()).to.eql(apiRows[i].trim());
Expand Down

0 comments on commit b85b2b2

Please sign in to comment.