@platforma-open/milaboratories.software-ptabler.schema 1.5.0 → 1.7.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/basic_steps.d.ts +25 -0
- package/dist/expressions.d.ts +6 -6
- package/dist/index.d.ts +2 -2
- package/package.json +1 -1
- package/src/basic_steps.ts +29 -0
- package/src/expressions.ts +6 -6
- package/src/index.ts +5 -2
package/dist/basic_steps.d.ts
CHANGED
|
@@ -133,3 +133,28 @@ export interface WithColumnsStep {
|
|
|
133
133
|
expression: Expression;
|
|
134
134
|
}[];
|
|
135
135
|
}
|
|
136
|
+
/**
|
|
137
|
+
* Defines a step that excludes a specific set of columns from an input table
|
|
138
|
+
* and outputs the result to a new table in the tablespace. This operation is
|
|
139
|
+
* similar to Polars' `exclude` method.
|
|
140
|
+
*/
|
|
141
|
+
export interface WithoutColumnsStep {
|
|
142
|
+
/**
|
|
143
|
+
* The type identifier for this step.
|
|
144
|
+
* Must be 'without_columns'.
|
|
145
|
+
*/
|
|
146
|
+
type: 'without_columns';
|
|
147
|
+
/**
|
|
148
|
+
* The name of the input table in the tablespace from which columns will be excluded.
|
|
149
|
+
*/
|
|
150
|
+
inputTable: string;
|
|
151
|
+
/**
|
|
152
|
+
* The name for the resulting table that will be added to the tablespace.
|
|
153
|
+
* This new table will contain all columns from the inputTable except those specified.
|
|
154
|
+
*/
|
|
155
|
+
outputTable: string;
|
|
156
|
+
/**
|
|
157
|
+
* An array of column names to be excluded from the input table.
|
|
158
|
+
*/
|
|
159
|
+
columns: string[];
|
|
160
|
+
}
|
package/dist/expressions.d.ts
CHANGED
|
@@ -242,12 +242,12 @@ export interface SubstringExpression {
|
|
|
242
242
|
type: 'substring';
|
|
243
243
|
/** The expression whose string value will be used. */
|
|
244
244
|
value: Expression;
|
|
245
|
-
/** The starting position (0-indexed). */
|
|
246
|
-
start:
|
|
247
|
-
/** The length of the substring. Mutually exclusive with 'end'. */
|
|
248
|
-
length?:
|
|
249
|
-
/** The end position of the substring (exclusive). Mutually exclusive with 'length'. */
|
|
250
|
-
end?:
|
|
245
|
+
/** The starting position (0-indexed). Should evaluate to a number. */
|
|
246
|
+
start: Expression;
|
|
247
|
+
/** The length of the substring. Mutually exclusive with 'end'. Should evaluate to a number. */
|
|
248
|
+
length?: Expression;
|
|
249
|
+
/** The end position of the substring (exclusive). Mutually exclusive with 'length'. Should evaluate to a number. */
|
|
250
|
+
end?: Expression;
|
|
251
251
|
}
|
|
252
252
|
/**
|
|
253
253
|
* Represents a string replacement operation.
|
package/dist/index.d.ts
CHANGED
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import { ReadCsvStep, WriteCsvStep } from './io';
|
|
2
|
-
import { AddColumnsStep, FilterStep } from './basic_steps';
|
|
2
|
+
import { AddColumnsStep, FilterStep, SelectStep, WithColumnsStep, WithoutColumnsStep } from './basic_steps';
|
|
3
3
|
import { AggregateStep } from './aggregate';
|
|
4
4
|
import { AnyJoinStep } from './join';
|
|
5
5
|
import { ConcatenateStep } from './concatenate';
|
|
6
6
|
import { SortStep } from './sort';
|
|
7
|
-
export type PTablerStep = ReadCsvStep | WriteCsvStep | AddColumnsStep | FilterStep | AggregateStep | AnyJoinStep | ConcatenateStep | SortStep;
|
|
7
|
+
export type PTablerStep = ReadCsvStep | WriteCsvStep | AddColumnsStep | FilterStep | AggregateStep | AnyJoinStep | ConcatenateStep | SortStep | SelectStep | WithColumnsStep | WithoutColumnsStep;
|
|
8
8
|
export type PTablerWorkflow = {
|
|
9
9
|
workflow: PTablerStep[];
|
|
10
10
|
};
|
package/package.json
CHANGED
package/src/basic_steps.ts
CHANGED
|
@@ -151,3 +151,32 @@ export interface WithColumnsStep {
|
|
|
151
151
|
expression: Expression;
|
|
152
152
|
}[];
|
|
153
153
|
}
|
|
154
|
+
|
|
155
|
+
/**
|
|
156
|
+
* Defines a step that excludes a specific set of columns from an input table
|
|
157
|
+
* and outputs the result to a new table in the tablespace. This operation is
|
|
158
|
+
* similar to Polars' `exclude` method.
|
|
159
|
+
*/
|
|
160
|
+
export interface WithoutColumnsStep {
|
|
161
|
+
/**
|
|
162
|
+
* The type identifier for this step.
|
|
163
|
+
* Must be 'without_columns'.
|
|
164
|
+
*/
|
|
165
|
+
type: 'without_columns';
|
|
166
|
+
|
|
167
|
+
/**
|
|
168
|
+
* The name of the input table in the tablespace from which columns will be excluded.
|
|
169
|
+
*/
|
|
170
|
+
inputTable: string;
|
|
171
|
+
|
|
172
|
+
/**
|
|
173
|
+
* The name for the resulting table that will be added to the tablespace.
|
|
174
|
+
* This new table will contain all columns from the inputTable except those specified.
|
|
175
|
+
*/
|
|
176
|
+
outputTable: string;
|
|
177
|
+
|
|
178
|
+
/**
|
|
179
|
+
* An array of column names to be excluded from the input table.
|
|
180
|
+
*/
|
|
181
|
+
columns: string[];
|
|
182
|
+
}
|
package/src/expressions.ts
CHANGED
|
@@ -321,12 +321,12 @@ export interface SubstringExpression {
|
|
|
321
321
|
type: 'substring';
|
|
322
322
|
/** The expression whose string value will be used. */
|
|
323
323
|
value: Expression;
|
|
324
|
-
/** The starting position (0-indexed). */
|
|
325
|
-
start:
|
|
326
|
-
/** The length of the substring. Mutually exclusive with 'end'. */
|
|
327
|
-
length?:
|
|
328
|
-
/** The end position of the substring (exclusive). Mutually exclusive with 'length'. */
|
|
329
|
-
end?:
|
|
324
|
+
/** The starting position (0-indexed). Should evaluate to a number. */
|
|
325
|
+
start: Expression;
|
|
326
|
+
/** The length of the substring. Mutually exclusive with 'end'. Should evaluate to a number. */
|
|
327
|
+
length?: Expression;
|
|
328
|
+
/** The end position of the substring (exclusive). Mutually exclusive with 'length'. Should evaluate to a number. */
|
|
329
|
+
end?: Expression;
|
|
330
330
|
}
|
|
331
331
|
|
|
332
332
|
/**
|
package/src/index.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import type { ReadCsvStep, WriteCsvStep } from './io';
|
|
2
|
-
import type { AddColumnsStep, FilterStep } from './basic_steps';
|
|
2
|
+
import type { AddColumnsStep, FilterStep, SelectStep, WithColumnsStep, WithoutColumnsStep } from './basic_steps';
|
|
3
3
|
import type { AggregateStep } from './aggregate';
|
|
4
4
|
import type { AnyJoinStep } from './join';
|
|
5
5
|
import type { ConcatenateStep } from './concatenate';
|
|
@@ -13,7 +13,10 @@ export type PTablerStep =
|
|
|
13
13
|
| AggregateStep
|
|
14
14
|
| AnyJoinStep
|
|
15
15
|
| ConcatenateStep
|
|
16
|
-
| SortStep
|
|
16
|
+
| SortStep
|
|
17
|
+
| SelectStep
|
|
18
|
+
| WithColumnsStep
|
|
19
|
+
| WithoutColumnsStep;
|
|
17
20
|
|
|
18
21
|
export type PTablerWorkflow = {
|
|
19
22
|
workflow: PTablerStep[];
|