@dartfx/n8n-nodes-qsv 0.28.0 → 0.29.0-staging.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/nodes/Qsv/Qsv.node.js +2 -2
- package/dist/nodes/Qsv/actions/executeValidate.js +6 -0
- package/dist/nodes/Qsv/descriptions/JoinpDescription.js +1 -1
- package/dist/nodes/Qsv/descriptions/ProfileDescription.js +4 -4
- package/dist/nodes/Qsv/descriptions/SqlpDescription.js +2 -2
- package/dist/nodes/Qsv/descriptions/ValidateDescription.js +14 -0
- package/package.json +2 -2
|
@@ -156,7 +156,7 @@ class Qsv {
|
|
|
156
156
|
group: ['transform'],
|
|
157
157
|
version: 1,
|
|
158
158
|
subtitle: '={{$parameter["operation"]}}',
|
|
159
|
-
description: 'Ultra-fast tabular data wrangling, stats, and transformations via QSV (generated for QSV
|
|
159
|
+
description: 'Ultra-fast tabular data wrangling, stats, and transformations via QSV (generated for QSV 29.0.0; requires qsv CLI on host)',
|
|
160
160
|
defaults: {
|
|
161
161
|
name: 'QSV',
|
|
162
162
|
},
|
|
@@ -394,7 +394,7 @@ class Qsv {
|
|
|
394
394
|
{
|
|
395
395
|
name: 'Luau (luau) [Feature: luau]',
|
|
396
396
|
value: 'luau',
|
|
397
|
-
description: 'Create multiple new computed columns, filter rows, compute aggregations and build complex data pipelines by executing a Luau 0.
|
|
397
|
+
description: 'Create multiple new computed columns, filter rows, compute aggregations and build complex data pipelines by executing a Luau 0.745 expression/script for every row of a CSV file (sequential mode), or using random access with an index (random access mode). Can process a single Luau expression or full-fledged data-wrangling scripts using lookup tables with discrete BEGIN, MAIN and END sections. It is not just another qsv command, it is qsv\'s Domain-specific Language (DSL) with numerous qsv-specific helper functions to build production data pipelines. (Category: utility | Docs: https://github.com/dathere/qsv/blob/master/docs/help/luau.md)',
|
|
398
398
|
action: 'Luau',
|
|
399
399
|
},
|
|
400
400
|
{
|
|
@@ -73,6 +73,12 @@ async function executeValidate(itemIndex) {
|
|
|
73
73
|
if (options.prettyJson === true) {
|
|
74
74
|
args.push('--pretty-json');
|
|
75
75
|
}
|
|
76
|
+
if (options.sarif !== undefined && options.sarif !== '') {
|
|
77
|
+
args.push('--sarif', String(options.sarif));
|
|
78
|
+
}
|
|
79
|
+
if (options.sarifMaxResults !== undefined && options.sarifMaxResults !== '') {
|
|
80
|
+
args.push('--sarif-max-results', String(options.sarifMaxResults));
|
|
81
|
+
}
|
|
76
82
|
if (options.sizeLimit !== undefined && options.sizeLimit !== '') {
|
|
77
83
|
args.push('--size-limit', String(options.sizeLimit));
|
|
78
84
|
}
|
|
@@ -109,7 +109,7 @@ exports.JoinpDescription = [
|
|
|
109
109
|
name: 'cacheSchema',
|
|
110
110
|
type: 'number',
|
|
111
111
|
default: 0,
|
|
112
|
-
description: 'Create and cache Polars schema JSON files. Ignored when --infer-len is 0. -2: treat all columns as String. A Polars schema file is created & cached. -1: treat all columns as String. No Polars schema file is created. 0: do not cache Polars schema. Uses --infer-len to infer schema. 1: cache Polars schema with the following behavior: * If schema file exists and is newer than input: use cached schema * If schema file missing/outdated and stats cache exists: derive schema from stats and cache it * If no schema or stats cache: infer schema using --infer-len and cache the result Schema files use the same name as input with .pschema.json extension (e.g., data.csv -> data.pschema.json). NOTE: If the input files have pschema.json files that are newer or created at the same time as the input files, they will be used to inform the join operation regardless of the value of --cache-schema unless --infer-len is 0.',
|
|
112
|
+
description: 'Create and cache Polars schema JSON files. Ignored when --infer-len is 0. -2: treat all columns as String. A Polars schema file is created & cached. -1: treat all columns as String. No Polars schema file is created. 0: do not cache Polars schema. Uses --infer-len to infer schema. 1: cache Polars schema with the following behavior: * If schema file exists and is newer than input: use cached schema * If schema file missing/outdated and stats cache exists: derive schema from stats and cache it * If no schema or stats cache: infer schema using --infer-len and cache the result Schema files use the same name as input with .pschema.json extension (e.g., data.csv -> data.csv.pschema.json). NOTE: If the input files have pschema.json files that are newer or created at the same time as the input files, they will be used to inform the join operation regardless of the value of --cache-schema unless --infer-len is 0.',
|
|
113
113
|
},
|
|
114
114
|
{
|
|
115
115
|
displayName: 'Coalesce',
|
|
@@ -119,14 +119,14 @@ exports.ProfileDescription = [
|
|
|
119
119
|
name: 'initialContext',
|
|
120
120
|
type: 'string',
|
|
121
121
|
default: '',
|
|
122
|
-
description: 'JSON file providing seed values for the package / resource dicts plus optional JSON-Pointer overrides for the final projection block. Replaces the older --package-meta / --resource-meta flags. Top-level keys: `package`, `resource`, `dataset_info`. Each leaf value may be wrapped as {"value": ..., "force": true} to mark it as overriding any value discovered from URL DCAT markup AND any value qsv inferred. Force is honored across all three subtrees: dataset_info entries override their target path verbatim; package / resource entries route through the active profile\'s `field_mappings:` table (e.g. `package.title force=true` lands at `/projection/title`, beating inference and discovery). Forced values for slots the profile does not surface are silently dropped (no-op). See tests/resources/profile/dcat-init-context.README.md for a fully-populated example.',
|
|
122
|
+
description: 'JSON file providing seed values for the package / resource dicts plus optional JSON-Pointer overrides for the final projection block. Replaces the older --package-meta / --resource-meta flags. Top-level keys: `package`, `resource`, `dataset_info`. Each leaf value may be wrapped as {"value": ..., "force": true} to mark it as overriding any value discovered from URL DCAT markup AND any value qsv inferred. Force is honored across all three subtrees: dataset_info entries override their target path verbatim; package / resource entries route through the active profile\'s `field_mappings:` table (e.g. `package.title force=true` lands at `/projection/title`, beating inference and discovery). Forced values for slots the profile does not surface are silently dropped (no-op). `dataset_info` keys are JSON Pointers into the output (e.g. `/projection/title`): the value replaces what is there, and missing objects are created. Inside an array, use an existing index, or a final `-` to append (e.g. `/projection/hasQualityMeasurement/-` adds a measurement after the computed ones). An override that cannot be applied (not a pointer, an index out of range, `-` with no array to append to) is reported in projection_warnings (or, with --no-projection, on stderr) and fails --strict. See tests/resources/profile/dcat-init-context.README.md for a fully-populated example.',
|
|
123
123
|
},
|
|
124
124
|
{
|
|
125
125
|
displayName: 'Locate',
|
|
126
126
|
name: 'locate',
|
|
127
127
|
type: 'string',
|
|
128
128
|
default: '',
|
|
129
|
-
description: 'Name the places the data covers, as DCAT-US v3 `spatial` Locations, by looking up the densest coordinate cells (up to 40, row-weighted) with `qsv geocode`. <mode> is one of: geonames - label the bounding box with the place, admin1 or country that 80% of the sampled rows share (offline Geonames index). census - add each US state and county holding at least 5% of the sampled rows (the heaviest state always; up to 10 counties), keyed by Census GEOID (US Census Geocoder: online, keyless, cached). State and county columns, when they resolve, supply these instead, with or without coordinates, as they name every row exactly: states as USPS, FIPS or names; counties as names or GEOIDs, matched exactly within each row\'s state (TIGERweb county names). A name several counties share is noted, not guessed. both - geonames and census. Also adds the coordinates\' centroid. A lookup that cannot run is noted in projection_warnings; the bounding box is kept. Default: off.',
|
|
129
|
+
description: 'Name the places the data covers, as DCAT-US v3 `spatial` Locations, by looking up the densest coordinate cells (up to 40, row-weighted) with `qsv geocode`. <mode> is one of: geonames - label the bounding box with the place, admin1 or country that 80% of the sampled rows share (offline Geonames index). census - add each US state and county holding at least 5% of the sampled rows (the heaviest state always; up to 10 counties), keyed by Census GEOID (US Census Geocoder: online, keyless, cached). State and county columns, when they resolve, supply these instead, with or without coordinates, as they name every row exactly: states as USPS, FIPS or names; counties as names or GEOIDs, matched exactly within each row\'s state (TIGERweb county names). A name several counties share is noted, not guessed. A state column lists states only when at least 90% of its values are US states. both - geonames and census. Also adds the coordinates\' centroid. A lookup that cannot run is noted in projection_warnings; the bounding box is kept. Default: off.',
|
|
130
130
|
},
|
|
131
131
|
{
|
|
132
132
|
displayName: 'Memcheck',
|
|
@@ -182,7 +182,7 @@ exports.ProfileDescription = [
|
|
|
182
182
|
name: 'strict',
|
|
183
183
|
type: 'boolean',
|
|
184
184
|
default: false,
|
|
185
|
-
description: '
|
|
185
|
+
description: 'Fail the command, instead of just warning, when an --initial-context override cannot be applied, and, with --validate, when the input fails `qsv validate`, on Required-severity schema violations or on non-Info external-validator findings. Severity comes from the DCAT-US v3 schema\'s own requirementLevel annotations, so a missing mandatory property aborts while a recommended-field advisory does not. Note: RFC4180 structural failures from `qsv validate` (emitted when a spec declares `validators`) are always appended as warnings, regardless of this flag.',
|
|
186
186
|
},
|
|
187
187
|
{
|
|
188
188
|
displayName: 'Tag Vocab',
|
|
@@ -196,7 +196,7 @@ exports.ProfileDescription = [
|
|
|
196
196
|
name: 'validate',
|
|
197
197
|
type: 'boolean',
|
|
198
198
|
default: false,
|
|
199
|
-
description: 'Validate the emitted projection block against the active profile\'s declared validators. For dcat-us-v3 that\'s the vendored GSA JSON Schema bundle (see resources/dcat-us-v3/); for dcat-ap-v3 / geoconnex it\'s pyshacl over the bundled SHACL shapes; for croissant it\'s mlcroissant. Catches missing mandatory fields, cardinality issues, and shape violations. Violations append to projection_warnings by default. Also runs `qsv validate` over the input (CSV structure + UTF-8), so a passing file is declared UTF-8 encoded and its syntactic validity is recorded as a quality measurement.',
|
|
199
|
+
description: 'Validate the emitted projection block against the active profile\'s declared validators. For dcat-us-v3 that\'s the vendored GSA JSON Schema bundle (see resources/dcat-us-v3/); for dcat-ap-v3 / geoconnex it\'s pyshacl over the bundled SHACL shapes; for croissant it\'s mlcroissant. Catches missing mandatory fields, cardinality issues, and shape violations. Violations append to projection_warnings by default. Also runs `qsv validate` over the input (CSV structure + UTF-8), so a passing file is declared UTF-8 encoded and its syntactic validity is recorded as a quality measurement. A file that fails it (or a pass that cannot run) also gets a Required `syntacticValidity` warning. Ignored, with a warning on stderr, when combined with --no-projection.',
|
|
200
200
|
},
|
|
201
201
|
],
|
|
202
202
|
},
|
|
@@ -69,7 +69,7 @@ exports.SqlpDescription = [
|
|
|
69
69
|
name: 'cacheSchema',
|
|
70
70
|
type: 'boolean',
|
|
71
71
|
default: false,
|
|
72
|
-
description: 'Create and cache Polars schema JSON files. If the schema file/s exists, it will load the schema instead of inferring it (ignoring --infer-len) and attempt to use it for each corresponding Polars "table" with the same file stem. If specified and the schema file/s do not exist, it will check if a stats cache is available. If so, it will use it to derive a Polars schema and save it. If there\'s no stats cache, it will infer the schema using --infer-len and save the inferred schemas. Date columns in formats Polars can\'t parse are saved as String, as are day-first dates unless QSV_PREFER_DMY is set. Each schema file
|
|
72
|
+
description: 'Create and cache Polars schema JSON files. If the schema file/s exists, it will load the schema instead of inferring it (ignoring --infer-len) and attempt to use it for each corresponding Polars "table" with the same file stem. If specified and the schema file/s do not exist, it will check if a stats cache is available. If so, it will use it to derive a Polars schema and save it. If there\'s no stats cache, it will infer the schema using --infer-len and save the inferred schemas. Date columns in formats Polars can\'t parse are saved as String, as are day-first dates unless QSV_PREFER_DMY is set. Each schema file is named after the full input file name, with ".pschema.json" appended (data.csv\'s Polars schema file will be data.csv.pschema.json) NOTE: You can edit the generated schema files to change the Polars schema and cast columns to the desired data type. Float columns are saved as Float64. For example, to save memory you can narrow a Float64 column to Float32 by changing its "Float64" type to "Float32" in the schema file, at the cost of precision (Float32 holds only about 7 significant digits). You can also cast a Float to a Decimal with a desired precision and scale. (e.g. instead of "Float64", use {"Decimal": [10, 3]}) The valid types are: `Boolean`, `UInt8`, `UInt16`, `UInt32`, `UInt64`, `Int8`, `Int16`, `Int32`, `Int64`, `Float32`, `Float64`, `String`, `Date`, `Datetime`, `Duration`, `Time`, `Null`, `Categorical`, `Decimal` and `Enum`.',
|
|
73
73
|
},
|
|
74
74
|
{
|
|
75
75
|
displayName: 'Compress Level',
|
|
@@ -125,7 +125,7 @@ exports.SqlpDescription = [
|
|
|
125
125
|
name: 'format',
|
|
126
126
|
type: 'string',
|
|
127
127
|
default: 'csv',
|
|
128
|
-
description: 'The output format to use. Valid values are: csv, json, jsonl, parquet, arrow, avro',
|
|
128
|
+
description: 'The output format to use. Valid values are: csv, json, jsonl, parquet, arrow, avro. Avro has fewer types than Polars, so avro output converts the rest: small and unsigned integers become int or long (a value above 2^63-1 is an error), zoned timestamps become UTC timestamps, nanosecond timestamps become microseconds, and TIME and durations become strings (durations in ISO 8601, e.g. P1DT2H3M4.5S).',
|
|
129
129
|
},
|
|
130
130
|
{
|
|
131
131
|
displayName: 'Ignore Errors',
|
|
@@ -194,6 +194,20 @@ exports.ValidateDescription = [
|
|
|
194
194
|
default: false,
|
|
195
195
|
description: 'Same as --json, but pretty printed.',
|
|
196
196
|
},
|
|
197
|
+
{
|
|
198
|
+
displayName: 'Sarif',
|
|
199
|
+
name: 'sarif',
|
|
200
|
+
type: 'string',
|
|
201
|
+
default: '',
|
|
202
|
+
description: 'Also write the validation errors to <file> as a SARIF 2.1.0 log, the standard format for static analysis results. Code scanning tools (e.g. GitHub code scanning) and other SARIF viewers can read it, so it also works as a general data validation report. Each invalid field is a result, pointing at the line where its row starts. Unlike the other output files, it is written even when all rows are valid (with no results), so a CI run clears earlier findings. Only for JSON Schema validation mode with a file input (not stdin). See https://www.oasis-open.org/standard/sarif-v2-1-0/',
|
|
203
|
+
},
|
|
204
|
+
{
|
|
205
|
+
displayName: 'Sarif Max Results',
|
|
206
|
+
name: 'sarifMaxResults',
|
|
207
|
+
type: 'number',
|
|
208
|
+
default: 25000,
|
|
209
|
+
description: 'The most results that --sarif writes; past it, the log notes that results were cut. The default is GitHub code scanning\'s limit per run, which rejects a log with more. Other tools may accept more. Set to 0 for no limit.',
|
|
210
|
+
},
|
|
197
211
|
{
|
|
198
212
|
displayName: 'Size Limit',
|
|
199
213
|
name: 'sizeLimit',
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@dartfx/n8n-nodes-qsv",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.29.0-staging.0",
|
|
4
4
|
"description": "n8n community node for datHere QSV ultra-fast tabular data wrangling, stats, and transformations (requires 'qsv' CLI on host)",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"n8n-community-node-package",
|
|
@@ -55,7 +55,7 @@
|
|
|
55
55
|
"tsx": "^4.19.3",
|
|
56
56
|
"typescript": "^5.7.3"
|
|
57
57
|
},
|
|
58
|
-
"qsvVersion": "
|
|
58
|
+
"qsvVersion": "29.0.0",
|
|
59
59
|
"scripts": {
|
|
60
60
|
"build": "tsc && gulp build:icons",
|
|
61
61
|
"dev": "tsc --watch",
|