Skip to content

Commit

Permalink
Merge pull request #103 from terascope/misc-improvements
Browse files Browse the repository at this point in the history
added extra csv parsing options
  • Loading branch information
macgyver603 authored Aug 5, 2019
2 parents ceea577 + 4c70bba commit 812ce05
Show file tree
Hide file tree
Showing 6 changed files with 49 additions and 4 deletions.
2 changes: 1 addition & 1 deletion asset/asset.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"name": "file-assets",
"version": "0.7.2",
"version": "0.7.3",
"description": "A set of processors for exporting data to files"
}
15 changes: 15 additions & 0 deletions asset/compressed_file_reader/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -247,6 +247,21 @@ function schema() {
doc: 'Determines slice size in bytes',
default: 100000,
format: Number,
},
ignore_empty: {
doc: 'Only used with CSV parsing. Ignores any columns not specified in field list. '
+ 'Since the field list is applied to columns sequentially, this will ignore '
+ 'any additional columns past the number specified.\n'
+ 'i.e. If 5 fields are specified, but there are 7 columns in the file, columns'
+ ' 6 and 7 will be dropped if this is true. Otherwise, the parser will give '
+ 'the fields generic names.',
default: true,
format: Boolean
},
extra_args: {
doc: 'An object used to pass in any extra csv parsing arguments',
default: {},
format: Object
}
};
}
Expand Down
15 changes: 15 additions & 0 deletions asset/file_reader/schema.js
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,21 @@ class Schema extends ConvictSchema {
doc: 'Checks for the header row and removes it',
default: true,
format: 'Boolean'
},
ignore_empty: {
doc: 'Only used with CSV parsing. Ignores any columns not specified in field list. '
+ 'Since the field list is applied to columns sequentially, this will ignore '
+ 'any additional columns past the number specified.\n'
+ 'i.e. If 5 fields are specified, but there are 7 columns in the file, columns'
+ ' 6 and 7 will be dropped if this is true. Otherwise, the parser will give '
+ 'the fields generic names.',
default: true,
format: Boolean
},
extra_args: {
doc: 'An object used to pass in any extra csv parsing arguments',
default: {},
format: Object
}
};
}
Expand Down
4 changes: 2 additions & 2 deletions asset/package.json
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
{
"name": "file-assets",
"version": "0.7.2",
"version": "0.7.3",
"description": "A set of processors for working with files",
"dependencies": {
"@terascope/chunked-file-reader": "^2.1.1",
"@terascope/chunked-file-reader": "^2.1.2",
"@terascope/job-components": "^0.20.7",
"@terascope/queue": "^1.1.6",
"@terascope/utils": "^0.14.1",
Expand Down
15 changes: 15 additions & 0 deletions asset/s3_exporter/schema.js
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,21 @@ class Schema extends ConvictSchema {
+ 'capability will be included in a future improvement',
default: 'false',
format: [false]
},
ignore_empty: {
doc: 'Only used with CSV parsing. Ignores any columns not specified in field list. '
+ 'Since the field list is applied to columns sequentially, this will ignore '
+ 'any additional columns past the number specified.\n'
+ 'i.e. If 5 fields are specified, but there are 7 columns in the file, columns'
+ ' 6 and 7 will be dropped if this is true. Otherwise, the parser will give '
+ 'the fields generic names.',
default: true,
format: Boolean
},
extra_args: {
doc: 'An object used to pass in any extra csv parsing arguments',
default: {},
format: Object
}
};
}
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "file-assets-bundle",
"version": "0.7.2",
"version": "0.7.3",
"description": "Teraslice processors for working with data stored in files on disk",
"repository": "https://github.com/terascope/file-assets.git",
"author": "Terascope, LLC <[email protected]>",
Expand Down

0 comments on commit 812ce05

Please sign in to comment.