@aiqadam/qadam-snowflake 0.3.4
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/LICENSE +22 -0
- package/NOTICE +6 -0
- package/README.md +5 -0
- package/package.json +23 -0
- package/src/i18n/de.json +120 -0
- package/src/i18n/es.json +120 -0
- package/src/i18n/fr.json +120 -0
- package/src/i18n/ja.json +120 -0
- package/src/i18n/nl.json +120 -0
- package/src/i18n/pt.json +120 -0
- package/src/i18n/ru.json +16 -0
- package/src/i18n/translation.json +120 -0
- package/src/i18n/vi.json +14 -0
- package/src/i18n/zh.json +120 -0
- package/src/index.d.ts +11 -0
- package/src/index.d.ts.map +1 -0
- package/src/index.js +63 -0
- package/src/index.js.map +1 -0
- package/src/lib/actions/create-dynamic-table.d.ts +45 -0
- package/src/lib/actions/create-dynamic-table.d.ts.map +1 -0
- package/src/lib/actions/create-dynamic-table.js +82 -0
- package/src/lib/actions/create-dynamic-table.js.map +1 -0
- package/src/lib/actions/delete-row.d.ts +43 -0
- package/src/lib/actions/delete-row.d.ts.map +1 -0
- package/src/lib/actions/delete-row.js +50 -0
- package/src/lib/actions/delete-row.js.map +1 -0
- package/src/lib/actions/execute-stored-procedure.d.ts +43 -0
- package/src/lib/actions/execute-stored-procedure.d.ts.map +1 -0
- package/src/lib/actions/execute-stored-procedure.js +97 -0
- package/src/lib/actions/execute-stored-procedure.js.map +1 -0
- package/src/lib/actions/get-row-by-id.d.ts +53 -0
- package/src/lib/actions/get-row-by-id.d.ts.map +1 -0
- package/src/lib/actions/get-row-by-id.js +72 -0
- package/src/lib/actions/get-row-by-id.js.map +1 -0
- package/src/lib/actions/get-table-schema.d.ts +42 -0
- package/src/lib/actions/get-table-schema.d.ts.map +1 -0
- package/src/lib/actions/get-table-schema.js +54 -0
- package/src/lib/actions/get-table-schema.js.map +1 -0
- package/src/lib/actions/insert-multiple-rows.d.ts +43 -0
- package/src/lib/actions/insert-multiple-rows.d.ts.map +1 -0
- package/src/lib/actions/insert-multiple-rows.js +86 -0
- package/src/lib/actions/insert-multiple-rows.js.map +1 -0
- package/src/lib/actions/insert-row.d.ts +52 -0
- package/src/lib/actions/insert-row.d.ts.map +1 -0
- package/src/lib/actions/insert-row.js +41 -0
- package/src/lib/actions/insert-row.js.map +1 -0
- package/src/lib/actions/list-tables.d.ts +32 -0
- package/src/lib/actions/list-tables.d.ts.map +1 -0
- package/src/lib/actions/list-tables.js +52 -0
- package/src/lib/actions/list-tables.js.map +1 -0
- package/src/lib/actions/load-data-from-stage.d.ts +48 -0
- package/src/lib/actions/load-data-from-stage.d.ts.map +1 -0
- package/src/lib/actions/load-data-from-stage.js +124 -0
- package/src/lib/actions/load-data-from-stage.js.map +1 -0
- package/src/lib/actions/run-multiple-queries.d.ts +17 -0
- package/src/lib/actions/run-multiple-queries.d.ts.map +1 -0
- package/src/lib/actions/run-multiple-queries.js +147 -0
- package/src/lib/actions/run-multiple-queries.js.map +1 -0
- package/src/lib/actions/run-query.d.ts +16 -0
- package/src/lib/actions/run-query.d.ts.map +1 -0
- package/src/lib/actions/run-query.js +58 -0
- package/src/lib/actions/run-query.js.map +1 -0
- package/src/lib/actions/search-rows.d.ts +45 -0
- package/src/lib/actions/search-rows.d.ts.map +1 -0
- package/src/lib/actions/search-rows.js +63 -0
- package/src/lib/actions/search-rows.js.map +1 -0
- package/src/lib/actions/update-row.d.ts +53 -0
- package/src/lib/actions/update-row.d.ts.map +1 -0
- package/src/lib/actions/update-row.js +59 -0
- package/src/lib/actions/update-row.js.map +1 -0
- package/src/lib/actions/upsert-row.d.ts +62 -0
- package/src/lib/actions/upsert-row.d.ts.map +1 -0
- package/src/lib/actions/upsert-row.js +98 -0
- package/src/lib/actions/upsert-row.js.map +1 -0
- package/src/lib/auth.d.ts +22 -0
- package/src/lib/auth.d.ts.map +1 -0
- package/src/lib/auth.js +246 -0
- package/src/lib/auth.js.map +1 -0
- package/src/lib/common/index.d.ts +93 -0
- package/src/lib/common/index.d.ts.map +1 -0
- package/src/lib/common/index.js +319 -0
- package/src/lib/common/index.js.map +1 -0
- package/src/lib/triggers/new-column.d.ts +163 -0
- package/src/lib/triggers/new-column.d.ts.map +1 -0
- package/src/lib/triggers/new-column.js +94 -0
- package/src/lib/triggers/new-column.js.map +1 -0
- package/src/lib/triggers/new-or-updated-row.d.ts +203 -0
- package/src/lib/triggers/new-or-updated-row.d.ts.map +1 -0
- package/src/lib/triggers/new-or-updated-row.js +108 -0
- package/src/lib/triggers/new-or-updated-row.js.map +1 -0
- package/src/lib/triggers/new-row.d.ts +203 -0
- package/src/lib/triggers/new-row.d.ts.map +1 -0
- package/src/lib/triggers/new-row.js +107 -0
- package/src/lib/triggers/new-row.js.map +1 -0
- package/src/lib/triggers/new-table.d.ts +123 -0
- package/src/lib/triggers/new-table.d.ts.map +1 -0
- package/src/lib/triggers/new-table.js +94 -0
- package/src/lib/triggers/new-table.js.map +1 -0
- package/src/lib/triggers/new-view.d.ts +123 -0
- package/src/lib/triggers/new-view.d.ts.map +1 -0
- package/src/lib/triggers/new-view.js +94 -0
- package/src/lib/triggers/new-view.js.map +1 -0
|
@@ -0,0 +1,94 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.newColumnTrigger = void 0;
|
|
4
|
+
const tslib_1 = require("tslib");
|
|
5
|
+
const qadams_framework_1 = require("@aiqadam/qadams-framework");
|
|
6
|
+
const qadams_common_1 = require("@aiqadam/qadams-common");
|
|
7
|
+
const auth_1 = require("../auth");
|
|
8
|
+
const common_1 = require("../common");
|
|
9
|
+
const props = {
|
|
10
|
+
database: common_1.snowflakeCommonProps.database,
|
|
11
|
+
schema: common_1.snowflakeCommonProps.schema,
|
|
12
|
+
table: common_1.snowflakeCommonProps.table,
|
|
13
|
+
};
|
|
14
|
+
const polling = {
|
|
15
|
+
strategy: qadams_common_1.DedupeStrategy.LAST_ITEM,
|
|
16
|
+
items: (_a) => tslib_1.__awaiter(void 0, [_a], void 0, function* ({ auth, propsValue }) {
|
|
17
|
+
const { table } = propsValue;
|
|
18
|
+
if (!table)
|
|
19
|
+
return [];
|
|
20
|
+
const connection = (0, common_1.configureConnection)(auth);
|
|
21
|
+
yield (0, common_1.connect)(connection);
|
|
22
|
+
try {
|
|
23
|
+
const result = yield (0, common_1.execute)(connection, `DESCRIBE TABLE ${table}`, []);
|
|
24
|
+
if (!result)
|
|
25
|
+
return [];
|
|
26
|
+
// Columns are returned in ordinal-position order (lowest first).
|
|
27
|
+
// New columns are always appended at the end → highest index = newest.
|
|
28
|
+
// Reverse so that LAST_ITEM deduplication stores the newest column's id
|
|
29
|
+
// and emits only columns added after that position on subsequent polls.
|
|
30
|
+
return result
|
|
31
|
+
.map((col, index) => ({
|
|
32
|
+
id: index + 1,
|
|
33
|
+
data: {
|
|
34
|
+
column_name: col['name'],
|
|
35
|
+
data_type: col['type'],
|
|
36
|
+
nullable: col['null?'],
|
|
37
|
+
default_value: col['default'],
|
|
38
|
+
primary_key: col['primary key'],
|
|
39
|
+
unique_key: col['unique key'],
|
|
40
|
+
comment: col['comment'],
|
|
41
|
+
position: index + 1,
|
|
42
|
+
table,
|
|
43
|
+
},
|
|
44
|
+
}))
|
|
45
|
+
.reverse();
|
|
46
|
+
}
|
|
47
|
+
finally {
|
|
48
|
+
yield (0, common_1.destroy)(connection);
|
|
49
|
+
}
|
|
50
|
+
}),
|
|
51
|
+
};
|
|
52
|
+
exports.newColumnTrigger = (0, qadams_framework_1.createTrigger)({
|
|
53
|
+
auth: auth_1.snowflakeAuth,
|
|
54
|
+
name: 'new_column',
|
|
55
|
+
displayName: 'New Column',
|
|
56
|
+
description: 'Triggers when a new column is added to the selected table. Checked by polling every few minutes.',
|
|
57
|
+
aiMetadata: {
|
|
58
|
+
description: "Fires when a new column is added to the selected Snowflake table, detected by polling the table's column list and emitting columns appended since the last check. Each newly added column produces one event with its name, data type, and constraints.",
|
|
59
|
+
},
|
|
60
|
+
props,
|
|
61
|
+
sampleData: {
|
|
62
|
+
column_name: 'EMAIL',
|
|
63
|
+
data_type: 'VARCHAR(256)',
|
|
64
|
+
nullable: 'Y',
|
|
65
|
+
default_value: null,
|
|
66
|
+
primary_key: 'N',
|
|
67
|
+
unique_key: 'N',
|
|
68
|
+
comment: '',
|
|
69
|
+
position: 5,
|
|
70
|
+
table: 'MY_DATABASE.PUBLIC.CUSTOMERS',
|
|
71
|
+
},
|
|
72
|
+
type: qadams_framework_1.TriggerStrategy.POLLING,
|
|
73
|
+
test(context) {
|
|
74
|
+
return tslib_1.__awaiter(this, void 0, void 0, function* () {
|
|
75
|
+
return yield qadams_common_1.pollingHelper.test(polling, context);
|
|
76
|
+
});
|
|
77
|
+
},
|
|
78
|
+
onEnable(context) {
|
|
79
|
+
return tslib_1.__awaiter(this, void 0, void 0, function* () {
|
|
80
|
+
yield qadams_common_1.pollingHelper.onEnable(polling, context);
|
|
81
|
+
});
|
|
82
|
+
},
|
|
83
|
+
onDisable(context) {
|
|
84
|
+
return tslib_1.__awaiter(this, void 0, void 0, function* () {
|
|
85
|
+
yield qadams_common_1.pollingHelper.onDisable(polling, context);
|
|
86
|
+
});
|
|
87
|
+
},
|
|
88
|
+
run(context) {
|
|
89
|
+
return tslib_1.__awaiter(this, void 0, void 0, function* () {
|
|
90
|
+
return yield qadams_common_1.pollingHelper.poll(polling, context);
|
|
91
|
+
});
|
|
92
|
+
},
|
|
93
|
+
});
|
|
94
|
+
//# sourceMappingURL=new-column.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"new-column.js","sourceRoot":"","sources":["../../../../src/lib/triggers/new-column.ts"],"names":[],"mappings":";;;;AAAA,gEAImC;AACnC,0DAAgF;AAChF,kCAAwC;AACxC,sCAOmB;AAQnB,MAAM,KAAK,GAAG;IACZ,QAAQ,EAAE,6BAAoB,CAAC,QAAQ;IACvC,MAAM,EAAE,6BAAoB,CAAC,MAAM;IACnC,KAAK,EAAE,6BAAoB,CAAC,KAAK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C,CAAA;CACF,CAAC;AAEW,QAAA,gBAAgB,GAAG,IAAA,gCAAa,EAAC;IAC5C,IAAI,EAAE,oBAAa;IACnB,IAAI,EAAE,YAAY;IAClB,WAAW,EAAE,YAAY;IACzB,WAAW,EACT,kGAAkG;IACpG,UAAU,EAAE;QACV,WAAW,EACT,yPAAyP;KAC5P;IACD,KAAK;IACL,UAAU,EAAE;QACV,WAAW,EAAE,OAAO;QACpB,SAAS,EAAE,cAAc;QACzB,QAAQ,EAAE,GAAG;QACb,aAAa,EAAE,IAAI;QACnB,WAAW,EAAE,GAAG;QAChB,UAAU,EAAE,GAAG;QACf,OAAO,EAAE,EAAE;QACX,QAAQ,EAAE,CAAC;QACX,KAAK,EAAE,8BAA8B;KACtC;IACD,IAAI,EAAE,kCAAe,CAAC,OAAO;IACvB,IAAI,CAAC,OAAO;;YAChB,OAAO,MAAM,6BAAa,CAAC,IAAI,CAAC,OAAO,EAAE,OAAO,CAAC,CAAC;QACpD,CAAC;KAAA;IACK,QAAQ,CAAC,OAAO;;YACpB,MAAM,6BAAa,CAAC,QAAQ,CAAC,OAAO,EAAE,OAAO,CAAC,CAAC;QACjD,CAAC;KAAA;IACK,SAAS,CAAC,OAAO;;YACrB,MAAM,6BAAa,CAAC,SAAS,CAAC,OAAO,EAAE,OAAO,CAAC,CAAC;QAClD,CAAC;KAAA;IACK,GAAG,CAAC,OAAO;;YACf,OAAO,MAAM,6BAAa,CAAC,IAAI,CAAC,OAAO,EAAE,OAAO,CAAC,CAAC;QACpD,CAAC;KAAA;CACF,CAAC,CAAC"}
|
|
@@ -0,0 +1,203 @@
|
|
|
1
|
+
import { TriggerStrategy } from '@aiqadam/qadams-framework';
|
|
2
|
+
export declare const newOrUpdatedRowTrigger: import("@aiqadam/qadams-framework").ITrigger<TriggerStrategy.WEBHOOK, (import("@aiqadam/qadams-framework").OAuth2Property<import("@aiqadam/qadams-framework").OAuth2Props> | import("@aiqadam/qadams-framework").CustomAuthProperty<{
|
|
3
|
+
account: import("@aiqadam/qadams-framework").ShortTextProperty<true>;
|
|
4
|
+
username: import("@aiqadam/qadams-framework").ShortTextProperty<true>;
|
|
5
|
+
password: import("@aiqadam/qadams-framework").SecretTextProperty<false>;
|
|
6
|
+
privateKey: import("@aiqadam/qadams-framework").SecretTextProperty<false>;
|
|
7
|
+
privateKeyPassphrase: import("@aiqadam/qadams-framework").SecretTextProperty<false>;
|
|
8
|
+
database: import("@aiqadam/qadams-framework").ShortTextProperty<false>;
|
|
9
|
+
role: import("@aiqadam/qadams-framework").ShortTextProperty<false>;
|
|
10
|
+
warehouse: import("@aiqadam/qadams-framework").ShortTextProperty<false>;
|
|
11
|
+
}>)[], {
|
|
12
|
+
database: import("@aiqadam/qadams-framework").DropdownProperty<string, true, (import("@aiqadam/qadams-framework").OAuth2Property<import("@aiqadam/qadams-framework").OAuth2Props> | import("@aiqadam/qadams-framework").CustomAuthProperty<{
|
|
13
|
+
account: import("@aiqadam/qadams-framework").ShortTextProperty<true>;
|
|
14
|
+
username: import("@aiqadam/qadams-framework").ShortTextProperty<true>;
|
|
15
|
+
password: import("@aiqadam/qadams-framework").SecretTextProperty<false>;
|
|
16
|
+
privateKey: import("@aiqadam/qadams-framework").SecretTextProperty<false>;
|
|
17
|
+
privateKeyPassphrase: import("@aiqadam/qadams-framework").SecretTextProperty<false>;
|
|
18
|
+
database: import("@aiqadam/qadams-framework").ShortTextProperty<false>;
|
|
19
|
+
role: import("@aiqadam/qadams-framework").ShortTextProperty<false>;
|
|
20
|
+
warehouse: import("@aiqadam/qadams-framework").ShortTextProperty<false>;
|
|
21
|
+
}>)[]>;
|
|
22
|
+
schema: import("@aiqadam/qadams-framework").DropdownProperty<string, true, (import("@aiqadam/qadams-framework").OAuth2Property<import("@aiqadam/qadams-framework").OAuth2Props> | import("@aiqadam/qadams-framework").CustomAuthProperty<{
|
|
23
|
+
account: import("@aiqadam/qadams-framework").ShortTextProperty<true>;
|
|
24
|
+
username: import("@aiqadam/qadams-framework").ShortTextProperty<true>;
|
|
25
|
+
password: import("@aiqadam/qadams-framework").SecretTextProperty<false>;
|
|
26
|
+
privateKey: import("@aiqadam/qadams-framework").SecretTextProperty<false>;
|
|
27
|
+
privateKeyPassphrase: import("@aiqadam/qadams-framework").SecretTextProperty<false>;
|
|
28
|
+
database: import("@aiqadam/qadams-framework").ShortTextProperty<false>;
|
|
29
|
+
role: import("@aiqadam/qadams-framework").ShortTextProperty<false>;
|
|
30
|
+
warehouse: import("@aiqadam/qadams-framework").ShortTextProperty<false>;
|
|
31
|
+
}>)[]>;
|
|
32
|
+
table: import("@aiqadam/qadams-framework").DropdownProperty<string, true, (import("@aiqadam/qadams-framework").OAuth2Property<import("@aiqadam/qadams-framework").OAuth2Props> | import("@aiqadam/qadams-framework").CustomAuthProperty<{
|
|
33
|
+
account: import("@aiqadam/qadams-framework").ShortTextProperty<true>;
|
|
34
|
+
username: import("@aiqadam/qadams-framework").ShortTextProperty<true>;
|
|
35
|
+
password: import("@aiqadam/qadams-framework").SecretTextProperty<false>;
|
|
36
|
+
privateKey: import("@aiqadam/qadams-framework").SecretTextProperty<false>;
|
|
37
|
+
privateKeyPassphrase: import("@aiqadam/qadams-framework").SecretTextProperty<false>;
|
|
38
|
+
database: import("@aiqadam/qadams-framework").ShortTextProperty<false>;
|
|
39
|
+
role: import("@aiqadam/qadams-framework").ShortTextProperty<false>;
|
|
40
|
+
warehouse: import("@aiqadam/qadams-framework").ShortTextProperty<false>;
|
|
41
|
+
}>)[]>;
|
|
42
|
+
updated_at_column: import("@aiqadam/qadams-framework").DropdownProperty<string, true, (import("@aiqadam/qadams-framework").OAuth2Property<import("@aiqadam/qadams-framework").OAuth2Props> | import("@aiqadam/qadams-framework").CustomAuthProperty<{
|
|
43
|
+
account: import("@aiqadam/qadams-framework").ShortTextProperty<true>;
|
|
44
|
+
username: import("@aiqadam/qadams-framework").ShortTextProperty<true>;
|
|
45
|
+
password: import("@aiqadam/qadams-framework").SecretTextProperty<false>;
|
|
46
|
+
privateKey: import("@aiqadam/qadams-framework").SecretTextProperty<false>;
|
|
47
|
+
privateKeyPassphrase: import("@aiqadam/qadams-framework").SecretTextProperty<false>;
|
|
48
|
+
database: import("@aiqadam/qadams-framework").ShortTextProperty<false>;
|
|
49
|
+
role: import("@aiqadam/qadams-framework").ShortTextProperty<false>;
|
|
50
|
+
warehouse: import("@aiqadam/qadams-framework").ShortTextProperty<false>;
|
|
51
|
+
}>)[]>;
|
|
52
|
+
}> | import("@aiqadam/qadams-framework").ITrigger<TriggerStrategy.POLLING, (import("@aiqadam/qadams-framework").OAuth2Property<import("@aiqadam/qadams-framework").OAuth2Props> | import("@aiqadam/qadams-framework").CustomAuthProperty<{
|
|
53
|
+
account: import("@aiqadam/qadams-framework").ShortTextProperty<true>;
|
|
54
|
+
username: import("@aiqadam/qadams-framework").ShortTextProperty<true>;
|
|
55
|
+
password: import("@aiqadam/qadams-framework").SecretTextProperty<false>;
|
|
56
|
+
privateKey: import("@aiqadam/qadams-framework").SecretTextProperty<false>;
|
|
57
|
+
privateKeyPassphrase: import("@aiqadam/qadams-framework").SecretTextProperty<false>;
|
|
58
|
+
database: import("@aiqadam/qadams-framework").ShortTextProperty<false>;
|
|
59
|
+
role: import("@aiqadam/qadams-framework").ShortTextProperty<false>;
|
|
60
|
+
warehouse: import("@aiqadam/qadams-framework").ShortTextProperty<false>;
|
|
61
|
+
}>)[], {
|
|
62
|
+
database: import("@aiqadam/qadams-framework").DropdownProperty<string, true, (import("@aiqadam/qadams-framework").OAuth2Property<import("@aiqadam/qadams-framework").OAuth2Props> | import("@aiqadam/qadams-framework").CustomAuthProperty<{
|
|
63
|
+
account: import("@aiqadam/qadams-framework").ShortTextProperty<true>;
|
|
64
|
+
username: import("@aiqadam/qadams-framework").ShortTextProperty<true>;
|
|
65
|
+
password: import("@aiqadam/qadams-framework").SecretTextProperty<false>;
|
|
66
|
+
privateKey: import("@aiqadam/qadams-framework").SecretTextProperty<false>;
|
|
67
|
+
privateKeyPassphrase: import("@aiqadam/qadams-framework").SecretTextProperty<false>;
|
|
68
|
+
database: import("@aiqadam/qadams-framework").ShortTextProperty<false>;
|
|
69
|
+
role: import("@aiqadam/qadams-framework").ShortTextProperty<false>;
|
|
70
|
+
warehouse: import("@aiqadam/qadams-framework").ShortTextProperty<false>;
|
|
71
|
+
}>)[]>;
|
|
72
|
+
schema: import("@aiqadam/qadams-framework").DropdownProperty<string, true, (import("@aiqadam/qadams-framework").OAuth2Property<import("@aiqadam/qadams-framework").OAuth2Props> | import("@aiqadam/qadams-framework").CustomAuthProperty<{
|
|
73
|
+
account: import("@aiqadam/qadams-framework").ShortTextProperty<true>;
|
|
74
|
+
username: import("@aiqadam/qadams-framework").ShortTextProperty<true>;
|
|
75
|
+
password: import("@aiqadam/qadams-framework").SecretTextProperty<false>;
|
|
76
|
+
privateKey: import("@aiqadam/qadams-framework").SecretTextProperty<false>;
|
|
77
|
+
privateKeyPassphrase: import("@aiqadam/qadams-framework").SecretTextProperty<false>;
|
|
78
|
+
database: import("@aiqadam/qadams-framework").ShortTextProperty<false>;
|
|
79
|
+
role: import("@aiqadam/qadams-framework").ShortTextProperty<false>;
|
|
80
|
+
warehouse: import("@aiqadam/qadams-framework").ShortTextProperty<false>;
|
|
81
|
+
}>)[]>;
|
|
82
|
+
table: import("@aiqadam/qadams-framework").DropdownProperty<string, true, (import("@aiqadam/qadams-framework").OAuth2Property<import("@aiqadam/qadams-framework").OAuth2Props> | import("@aiqadam/qadams-framework").CustomAuthProperty<{
|
|
83
|
+
account: import("@aiqadam/qadams-framework").ShortTextProperty<true>;
|
|
84
|
+
username: import("@aiqadam/qadams-framework").ShortTextProperty<true>;
|
|
85
|
+
password: import("@aiqadam/qadams-framework").SecretTextProperty<false>;
|
|
86
|
+
privateKey: import("@aiqadam/qadams-framework").SecretTextProperty<false>;
|
|
87
|
+
privateKeyPassphrase: import("@aiqadam/qadams-framework").SecretTextProperty<false>;
|
|
88
|
+
database: import("@aiqadam/qadams-framework").ShortTextProperty<false>;
|
|
89
|
+
role: import("@aiqadam/qadams-framework").ShortTextProperty<false>;
|
|
90
|
+
warehouse: import("@aiqadam/qadams-framework").ShortTextProperty<false>;
|
|
91
|
+
}>)[]>;
|
|
92
|
+
updated_at_column: import("@aiqadam/qadams-framework").DropdownProperty<string, true, (import("@aiqadam/qadams-framework").OAuth2Property<import("@aiqadam/qadams-framework").OAuth2Props> | import("@aiqadam/qadams-framework").CustomAuthProperty<{
|
|
93
|
+
account: import("@aiqadam/qadams-framework").ShortTextProperty<true>;
|
|
94
|
+
username: import("@aiqadam/qadams-framework").ShortTextProperty<true>;
|
|
95
|
+
password: import("@aiqadam/qadams-framework").SecretTextProperty<false>;
|
|
96
|
+
privateKey: import("@aiqadam/qadams-framework").SecretTextProperty<false>;
|
|
97
|
+
privateKeyPassphrase: import("@aiqadam/qadams-framework").SecretTextProperty<false>;
|
|
98
|
+
database: import("@aiqadam/qadams-framework").ShortTextProperty<false>;
|
|
99
|
+
role: import("@aiqadam/qadams-framework").ShortTextProperty<false>;
|
|
100
|
+
warehouse: import("@aiqadam/qadams-framework").ShortTextProperty<false>;
|
|
101
|
+
}>)[]>;
|
|
102
|
+
}> | import("@aiqadam/qadams-framework").ITrigger<TriggerStrategy.MANUAL, (import("@aiqadam/qadams-framework").OAuth2Property<import("@aiqadam/qadams-framework").OAuth2Props> | import("@aiqadam/qadams-framework").CustomAuthProperty<{
|
|
103
|
+
account: import("@aiqadam/qadams-framework").ShortTextProperty<true>;
|
|
104
|
+
username: import("@aiqadam/qadams-framework").ShortTextProperty<true>;
|
|
105
|
+
password: import("@aiqadam/qadams-framework").SecretTextProperty<false>;
|
|
106
|
+
privateKey: import("@aiqadam/qadams-framework").SecretTextProperty<false>;
|
|
107
|
+
privateKeyPassphrase: import("@aiqadam/qadams-framework").SecretTextProperty<false>;
|
|
108
|
+
database: import("@aiqadam/qadams-framework").ShortTextProperty<false>;
|
|
109
|
+
role: import("@aiqadam/qadams-framework").ShortTextProperty<false>;
|
|
110
|
+
warehouse: import("@aiqadam/qadams-framework").ShortTextProperty<false>;
|
|
111
|
+
}>)[], {
|
|
112
|
+
database: import("@aiqadam/qadams-framework").DropdownProperty<string, true, (import("@aiqadam/qadams-framework").OAuth2Property<import("@aiqadam/qadams-framework").OAuth2Props> | import("@aiqadam/qadams-framework").CustomAuthProperty<{
|
|
113
|
+
account: import("@aiqadam/qadams-framework").ShortTextProperty<true>;
|
|
114
|
+
username: import("@aiqadam/qadams-framework").ShortTextProperty<true>;
|
|
115
|
+
password: import("@aiqadam/qadams-framework").SecretTextProperty<false>;
|
|
116
|
+
privateKey: import("@aiqadam/qadams-framework").SecretTextProperty<false>;
|
|
117
|
+
privateKeyPassphrase: import("@aiqadam/qadams-framework").SecretTextProperty<false>;
|
|
118
|
+
database: import("@aiqadam/qadams-framework").ShortTextProperty<false>;
|
|
119
|
+
role: import("@aiqadam/qadams-framework").ShortTextProperty<false>;
|
|
120
|
+
warehouse: import("@aiqadam/qadams-framework").ShortTextProperty<false>;
|
|
121
|
+
}>)[]>;
|
|
122
|
+
schema: import("@aiqadam/qadams-framework").DropdownProperty<string, true, (import("@aiqadam/qadams-framework").OAuth2Property<import("@aiqadam/qadams-framework").OAuth2Props> | import("@aiqadam/qadams-framework").CustomAuthProperty<{
|
|
123
|
+
account: import("@aiqadam/qadams-framework").ShortTextProperty<true>;
|
|
124
|
+
username: import("@aiqadam/qadams-framework").ShortTextProperty<true>;
|
|
125
|
+
password: import("@aiqadam/qadams-framework").SecretTextProperty<false>;
|
|
126
|
+
privateKey: import("@aiqadam/qadams-framework").SecretTextProperty<false>;
|
|
127
|
+
privateKeyPassphrase: import("@aiqadam/qadams-framework").SecretTextProperty<false>;
|
|
128
|
+
database: import("@aiqadam/qadams-framework").ShortTextProperty<false>;
|
|
129
|
+
role: import("@aiqadam/qadams-framework").ShortTextProperty<false>;
|
|
130
|
+
warehouse: import("@aiqadam/qadams-framework").ShortTextProperty<false>;
|
|
131
|
+
}>)[]>;
|
|
132
|
+
table: import("@aiqadam/qadams-framework").DropdownProperty<string, true, (import("@aiqadam/qadams-framework").OAuth2Property<import("@aiqadam/qadams-framework").OAuth2Props> | import("@aiqadam/qadams-framework").CustomAuthProperty<{
|
|
133
|
+
account: import("@aiqadam/qadams-framework").ShortTextProperty<true>;
|
|
134
|
+
username: import("@aiqadam/qadams-framework").ShortTextProperty<true>;
|
|
135
|
+
password: import("@aiqadam/qadams-framework").SecretTextProperty<false>;
|
|
136
|
+
privateKey: import("@aiqadam/qadams-framework").SecretTextProperty<false>;
|
|
137
|
+
privateKeyPassphrase: import("@aiqadam/qadams-framework").SecretTextProperty<false>;
|
|
138
|
+
database: import("@aiqadam/qadams-framework").ShortTextProperty<false>;
|
|
139
|
+
role: import("@aiqadam/qadams-framework").ShortTextProperty<false>;
|
|
140
|
+
warehouse: import("@aiqadam/qadams-framework").ShortTextProperty<false>;
|
|
141
|
+
}>)[]>;
|
|
142
|
+
updated_at_column: import("@aiqadam/qadams-framework").DropdownProperty<string, true, (import("@aiqadam/qadams-framework").OAuth2Property<import("@aiqadam/qadams-framework").OAuth2Props> | import("@aiqadam/qadams-framework").CustomAuthProperty<{
|
|
143
|
+
account: import("@aiqadam/qadams-framework").ShortTextProperty<true>;
|
|
144
|
+
username: import("@aiqadam/qadams-framework").ShortTextProperty<true>;
|
|
145
|
+
password: import("@aiqadam/qadams-framework").SecretTextProperty<false>;
|
|
146
|
+
privateKey: import("@aiqadam/qadams-framework").SecretTextProperty<false>;
|
|
147
|
+
privateKeyPassphrase: import("@aiqadam/qadams-framework").SecretTextProperty<false>;
|
|
148
|
+
database: import("@aiqadam/qadams-framework").ShortTextProperty<false>;
|
|
149
|
+
role: import("@aiqadam/qadams-framework").ShortTextProperty<false>;
|
|
150
|
+
warehouse: import("@aiqadam/qadams-framework").ShortTextProperty<false>;
|
|
151
|
+
}>)[]>;
|
|
152
|
+
}> | import("@aiqadam/qadams-framework").ITrigger<TriggerStrategy.APP_WEBHOOK, (import("@aiqadam/qadams-framework").OAuth2Property<import("@aiqadam/qadams-framework").OAuth2Props> | import("@aiqadam/qadams-framework").CustomAuthProperty<{
|
|
153
|
+
account: import("@aiqadam/qadams-framework").ShortTextProperty<true>;
|
|
154
|
+
username: import("@aiqadam/qadams-framework").ShortTextProperty<true>;
|
|
155
|
+
password: import("@aiqadam/qadams-framework").SecretTextProperty<false>;
|
|
156
|
+
privateKey: import("@aiqadam/qadams-framework").SecretTextProperty<false>;
|
|
157
|
+
privateKeyPassphrase: import("@aiqadam/qadams-framework").SecretTextProperty<false>;
|
|
158
|
+
database: import("@aiqadam/qadams-framework").ShortTextProperty<false>;
|
|
159
|
+
role: import("@aiqadam/qadams-framework").ShortTextProperty<false>;
|
|
160
|
+
warehouse: import("@aiqadam/qadams-framework").ShortTextProperty<false>;
|
|
161
|
+
}>)[], {
|
|
162
|
+
database: import("@aiqadam/qadams-framework").DropdownProperty<string, true, (import("@aiqadam/qadams-framework").OAuth2Property<import("@aiqadam/qadams-framework").OAuth2Props> | import("@aiqadam/qadams-framework").CustomAuthProperty<{
|
|
163
|
+
account: import("@aiqadam/qadams-framework").ShortTextProperty<true>;
|
|
164
|
+
username: import("@aiqadam/qadams-framework").ShortTextProperty<true>;
|
|
165
|
+
password: import("@aiqadam/qadams-framework").SecretTextProperty<false>;
|
|
166
|
+
privateKey: import("@aiqadam/qadams-framework").SecretTextProperty<false>;
|
|
167
|
+
privateKeyPassphrase: import("@aiqadam/qadams-framework").SecretTextProperty<false>;
|
|
168
|
+
database: import("@aiqadam/qadams-framework").ShortTextProperty<false>;
|
|
169
|
+
role: import("@aiqadam/qadams-framework").ShortTextProperty<false>;
|
|
170
|
+
warehouse: import("@aiqadam/qadams-framework").ShortTextProperty<false>;
|
|
171
|
+
}>)[]>;
|
|
172
|
+
schema: import("@aiqadam/qadams-framework").DropdownProperty<string, true, (import("@aiqadam/qadams-framework").OAuth2Property<import("@aiqadam/qadams-framework").OAuth2Props> | import("@aiqadam/qadams-framework").CustomAuthProperty<{
|
|
173
|
+
account: import("@aiqadam/qadams-framework").ShortTextProperty<true>;
|
|
174
|
+
username: import("@aiqadam/qadams-framework").ShortTextProperty<true>;
|
|
175
|
+
password: import("@aiqadam/qadams-framework").SecretTextProperty<false>;
|
|
176
|
+
privateKey: import("@aiqadam/qadams-framework").SecretTextProperty<false>;
|
|
177
|
+
privateKeyPassphrase: import("@aiqadam/qadams-framework").SecretTextProperty<false>;
|
|
178
|
+
database: import("@aiqadam/qadams-framework").ShortTextProperty<false>;
|
|
179
|
+
role: import("@aiqadam/qadams-framework").ShortTextProperty<false>;
|
|
180
|
+
warehouse: import("@aiqadam/qadams-framework").ShortTextProperty<false>;
|
|
181
|
+
}>)[]>;
|
|
182
|
+
table: import("@aiqadam/qadams-framework").DropdownProperty<string, true, (import("@aiqadam/qadams-framework").OAuth2Property<import("@aiqadam/qadams-framework").OAuth2Props> | import("@aiqadam/qadams-framework").CustomAuthProperty<{
|
|
183
|
+
account: import("@aiqadam/qadams-framework").ShortTextProperty<true>;
|
|
184
|
+
username: import("@aiqadam/qadams-framework").ShortTextProperty<true>;
|
|
185
|
+
password: import("@aiqadam/qadams-framework").SecretTextProperty<false>;
|
|
186
|
+
privateKey: import("@aiqadam/qadams-framework").SecretTextProperty<false>;
|
|
187
|
+
privateKeyPassphrase: import("@aiqadam/qadams-framework").SecretTextProperty<false>;
|
|
188
|
+
database: import("@aiqadam/qadams-framework").ShortTextProperty<false>;
|
|
189
|
+
role: import("@aiqadam/qadams-framework").ShortTextProperty<false>;
|
|
190
|
+
warehouse: import("@aiqadam/qadams-framework").ShortTextProperty<false>;
|
|
191
|
+
}>)[]>;
|
|
192
|
+
updated_at_column: import("@aiqadam/qadams-framework").DropdownProperty<string, true, (import("@aiqadam/qadams-framework").OAuth2Property<import("@aiqadam/qadams-framework").OAuth2Props> | import("@aiqadam/qadams-framework").CustomAuthProperty<{
|
|
193
|
+
account: import("@aiqadam/qadams-framework").ShortTextProperty<true>;
|
|
194
|
+
username: import("@aiqadam/qadams-framework").ShortTextProperty<true>;
|
|
195
|
+
password: import("@aiqadam/qadams-framework").SecretTextProperty<false>;
|
|
196
|
+
privateKey: import("@aiqadam/qadams-framework").SecretTextProperty<false>;
|
|
197
|
+
privateKeyPassphrase: import("@aiqadam/qadams-framework").SecretTextProperty<false>;
|
|
198
|
+
database: import("@aiqadam/qadams-framework").ShortTextProperty<false>;
|
|
199
|
+
role: import("@aiqadam/qadams-framework").ShortTextProperty<false>;
|
|
200
|
+
warehouse: import("@aiqadam/qadams-framework").ShortTextProperty<false>;
|
|
201
|
+
}>)[]>;
|
|
202
|
+
}>;
|
|
203
|
+
//# sourceMappingURL=new-or-updated-row.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"new-or-updated-row.d.ts","sourceRoot":"","sources":["../../../../src/lib/triggers/new-or-updated-row.ts"],"names":[],"mappings":"AAAA,OAAO,EAEL,eAAe,EAGhB,MAAM,2BAA2B,CAAC;AA2FnC,eAAO,MAAM,sBAAsB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EA8BjC,CAAC"}
|
|
@@ -0,0 +1,108 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.newOrUpdatedRowTrigger = void 0;
|
|
4
|
+
const tslib_1 = require("tslib");
|
|
5
|
+
const qadams_framework_1 = require("@aiqadam/qadams-framework");
|
|
6
|
+
const qadams_common_1 = require("@aiqadam/qadams-common");
|
|
7
|
+
const auth_1 = require("../auth");
|
|
8
|
+
const common_1 = require("../common");
|
|
9
|
+
const props = {
|
|
10
|
+
database: common_1.snowflakeCommonProps.database,
|
|
11
|
+
schema: common_1.snowflakeCommonProps.schema,
|
|
12
|
+
table: common_1.snowflakeCommonProps.table,
|
|
13
|
+
updated_at_column: qadams_framework_1.Property.Dropdown({
|
|
14
|
+
auth: auth_1.snowflakeAuth,
|
|
15
|
+
displayName: 'Updated At Column',
|
|
16
|
+
description: 'Select the column that stores when each row was last modified (e.g. `UPDATED_AT`, `LAST_MODIFIED_TIME`). ' +
|
|
17
|
+
'Both new rows and rows updated after the last check will fire the trigger. ' +
|
|
18
|
+
'The column must be updated by your application or a DEFAULT clause every time a row changes.',
|
|
19
|
+
refreshers: ['table'],
|
|
20
|
+
required: true,
|
|
21
|
+
options: (_a) => tslib_1.__awaiter(void 0, [_a], void 0, function* ({ auth, table }) {
|
|
22
|
+
if (!auth) {
|
|
23
|
+
return {
|
|
24
|
+
disabled: true,
|
|
25
|
+
options: [],
|
|
26
|
+
placeholder: 'Please connect your account first',
|
|
27
|
+
};
|
|
28
|
+
}
|
|
29
|
+
if (!table) {
|
|
30
|
+
return {
|
|
31
|
+
disabled: true,
|
|
32
|
+
options: [],
|
|
33
|
+
placeholder: 'Please select a table first',
|
|
34
|
+
};
|
|
35
|
+
}
|
|
36
|
+
return (0, common_1.getTableColumnOptions)(auth, table);
|
|
37
|
+
}),
|
|
38
|
+
}),
|
|
39
|
+
};
|
|
40
|
+
function toEpochMs(value) {
|
|
41
|
+
if (value instanceof Date)
|
|
42
|
+
return value.getTime();
|
|
43
|
+
if (typeof value === 'string')
|
|
44
|
+
return new Date(value).getTime();
|
|
45
|
+
return 0;
|
|
46
|
+
}
|
|
47
|
+
const polling = {
|
|
48
|
+
strategy: qadams_common_1.DedupeStrategy.TIMEBASED,
|
|
49
|
+
items: (_a) => tslib_1.__awaiter(void 0, [_a], void 0, function* ({ auth, propsValue }) {
|
|
50
|
+
const { table, updated_at_column } = propsValue;
|
|
51
|
+
if (!table || !updated_at_column)
|
|
52
|
+
return [];
|
|
53
|
+
const connection = (0, common_1.configureConnection)(auth);
|
|
54
|
+
yield (0, common_1.connect)(connection);
|
|
55
|
+
try {
|
|
56
|
+
// Fetch the 100 most-recently modified rows. pollingHelper keeps only
|
|
57
|
+
// rows whose timestamp exceeds the last stored watermark.
|
|
58
|
+
const result = yield (0, common_1.execute)(connection, `SELECT * FROM ${table} ORDER BY ${updated_at_column} DESC LIMIT 100`, []);
|
|
59
|
+
if (!result)
|
|
60
|
+
return [];
|
|
61
|
+
return result.map((row) => ({
|
|
62
|
+
epochMilliSeconds: toEpochMs(row[updated_at_column]),
|
|
63
|
+
data: row,
|
|
64
|
+
}));
|
|
65
|
+
}
|
|
66
|
+
finally {
|
|
67
|
+
yield (0, common_1.destroy)(connection);
|
|
68
|
+
}
|
|
69
|
+
}),
|
|
70
|
+
};
|
|
71
|
+
exports.newOrUpdatedRowTrigger = (0, qadams_framework_1.createTrigger)({
|
|
72
|
+
auth: auth_1.snowflakeAuth,
|
|
73
|
+
name: 'new_or_updated_row',
|
|
74
|
+
displayName: 'New or Updated Row',
|
|
75
|
+
description: 'Triggers when a row is inserted or updated in the selected table. Uses an "updated at" timestamp column you choose — any row whose timestamp is newer than the last check will fire the trigger.',
|
|
76
|
+
aiMetadata: {
|
|
77
|
+
description: 'Fires for each row that is inserted or modified in the selected Snowflake table, detected by polling a chosen "updated at" timestamp column against the last-seen watermark. Relies on that column being refreshed on every change (by the application or a DEFAULT clause); a row whose timestamp does not advance on update will not fire.',
|
|
78
|
+
},
|
|
79
|
+
props,
|
|
80
|
+
sampleData: {
|
|
81
|
+
ID: 1001,
|
|
82
|
+
NAME: 'Jane Doe',
|
|
83
|
+
EMAIL: 'jane.doe@example.com',
|
|
84
|
+
UPDATED_AT: '2024-01-15T10:30:00.000Z',
|
|
85
|
+
},
|
|
86
|
+
type: qadams_framework_1.TriggerStrategy.POLLING,
|
|
87
|
+
test(context) {
|
|
88
|
+
return tslib_1.__awaiter(this, void 0, void 0, function* () {
|
|
89
|
+
return yield qadams_common_1.pollingHelper.test(polling, context);
|
|
90
|
+
});
|
|
91
|
+
},
|
|
92
|
+
onEnable(context) {
|
|
93
|
+
return tslib_1.__awaiter(this, void 0, void 0, function* () {
|
|
94
|
+
yield qadams_common_1.pollingHelper.onEnable(polling, context);
|
|
95
|
+
});
|
|
96
|
+
},
|
|
97
|
+
onDisable(context) {
|
|
98
|
+
return tslib_1.__awaiter(this, void 0, void 0, function* () {
|
|
99
|
+
yield qadams_common_1.pollingHelper.onDisable(polling, context);
|
|
100
|
+
});
|
|
101
|
+
},
|
|
102
|
+
run(context) {
|
|
103
|
+
return tslib_1.__awaiter(this, void 0, void 0, function* () {
|
|
104
|
+
return yield qadams_common_1.pollingHelper.poll(polling, context);
|
|
105
|
+
});
|
|
106
|
+
},
|
|
107
|
+
});
|
|
108
|
+
//# sourceMappingURL=new-or-updated-row.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"new-or-updated-row.js","sourceRoot":"","sources":["../../../../src/lib/triggers/new-or-updated-row.ts"],"names":[],"mappings":";;;;AAAA,gEAKmC;AACnC,0DAAgF;AAChF,kCAAwC;AACxC,sCAQmB;AASnB,MAAM,KAAK,GAAG;IACZ,QAAQ,EAAE,6BAAoB,CAAC,QAAQ;IACvC,MAAM,EAAE,6BAAoB,CAAC,MAAM;IACnC,KAAK,EAAE,6BAAoB,CAAC,KAAK;IACjC,iBAAiB,EAAE,2BAAQ,CAAC,QAAQ,CAAC;QACnC,IAAI,EAAE,oBAAa;QACnB,WAAW,EAAE,mBAAmB;QAChC,WAAW,EACT,2GAA2G;YAC3G,6EAA6E;YAC7E,8FAA8F;QAChG,UAAU,EAAE,CAAC,OAAO,CAAC;QACrB,QAAQ,EAAE,IAAI;QACd,OAAO,EAAE,KAAwB,EAAE,oDAAnB,EAAE,IAAI,EAAE,KAAK,EAAE;YAC7B,IAAI,CAAC,IAAI,EAAE,CAAC;gBACV,OAAO;oBACL,QAAQ,EAAE,IAAI;oBACd,OAAO,EAAE,EAAE;oBACX,WAAW,EAAE,mCAAmC;iB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