Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[BUG] Snowflake Query Results trigger does not emit on prop configuration #11828

Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion components/snowflake/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@pipedream/snowflake",
"version": "0.9.6",
"version": "0.9.7",
"description": "Pipedream Snowflake Components",
"main": "snowflake.app.mjs",
"keywords": [
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ export default {
// eslint-disable-next-line
name: "New, Updated, or Deleted Warehouse",
description: "Emit new events when a warehouse is created, altered, or dropped",
version: "0.0.10",
version: "0.0.11",
async run() {
await this.watchObjectsAndEmitChanges("WAREHOUSE", this.warehouses, this.queryTypes);
},
Expand Down
13 changes: 10 additions & 3 deletions components/snowflake/sources/common.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -21,12 +21,19 @@ export default {
_setLastMaxTimestamp(lastMaxTimestamp) {
this.db.set("lastMaxTimestamp", lastMaxTimestamp);
},
async streamToArray(stream) {
const result = [];
for await (const item of stream) {
result.push(item);
}
return result;
},
async processCollection(statement, timestamp) {
const rowStream = await this.snowflake.getRows(statement);
this.$emit({
rows: rowStream,
const rows = await this.streamToArray(rowStream);
this.$emit(rows, this.generateMetaForCollection({
timestamp,
});
}));
},
async processSingle(statement, timestamp) {
let lastResultId;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ export default {
// eslint-disable-next-line
name: "Failed Task in Schema",
description: "Emit new events when a task fails in a database schema",
version: "0.0.11",
version: "0.0.12",
async run() {
await this.emitFailedTasks({
database: this.database,
Expand Down
2 changes: 1 addition & 1 deletion components/snowflake/sources/new-database/new-database.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ export default {
key: "snowflake-new-database",
name: "New Database",
description: "Emit new event when a database is created",
version: "0.0.9",
version: "0.0.10",
methods: {
...common.methods,
alwaysRunInSingleProcessMode() {
Expand Down
2 changes: 1 addition & 1 deletion components/snowflake/sources/new-role/new-role.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ export default {
key: "snowflake-new-role",
name: "New Role",
description: "Emit new event when a role is created",
version: "0.0.8",
version: "0.0.9",
methods: {
...common.methods,
alwaysRunInSingleProcessMode() {
Expand Down
2 changes: 1 addition & 1 deletion components/snowflake/sources/new-row/new-row.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ export default {
key: "snowflake-new-row",
name: "New Row",
description: "Emit new event when a row is added to a table",
version: "0.1.10",
version: "0.1.11",
methods: {
...common.methods,
async getStatement(lastResultId) {
Expand Down
2 changes: 1 addition & 1 deletion components/snowflake/sources/new-schema/new-schema.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ export default {
key: "snowflake-new-schema",
name: "New Schema",
description: "Emit new event when a schema is created",
version: "0.0.9",
version: "0.0.10",
methods: {
...common.methods,
alwaysRunInSingleProcessMode() {
Expand Down
2 changes: 1 addition & 1 deletion components/snowflake/sources/new-table/new-table.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ export default {
key: "snowflake-new-table",
name: "New Table",
description: "Emit new event when a table is created",
version: "0.0.9",
version: "0.0.10",
methods: {
...common.methods,
alwaysRunInSingleProcessMode() {
Expand Down
2 changes: 1 addition & 1 deletion components/snowflake/sources/new-user/new-user.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ export default {
key: "snowflake-new-user",
name: "New User",
description: "Emit new event when a user is created",
version: "0.0.8",
version: "0.0.9",
methods: {
...common.methods,
alwaysRunInSingleProcessMode() {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ export default {
name: "New Query Results",
// eslint-disable-next-line
description: "Run a SQL query on a schedule, triggering a workflow for each row of results",
version: "0.1.10",
version: "0.1.11",
props: {
...common.props,
sqlQuery: {
Expand Down
Loading