← Snowflake

New Query Results from Snowflake API

Pipedream makes it easy to connect APIs for Snowflake and 900+ other apps remarkably fast.

Trigger workflow on
New Query Results from the Snowflake API
Next, do this
Connect to 900+ APIs using code and no-code building blocks
No credit card required
Into to Pipedream
Watch us build a workflow
Watch us build a workflow
7 min
Watch now ➜
Trusted by 250,000+ developers from startups to Fortune 500 companies:
Trusted by 250,000+ developers from startups to Fortune 500 companies

Developers Pipedream

Getting Started

Trigger a workflow on New Query Results with Snowflake API. When you configure and deploy the workflow, it will run on Pipedream's servers 24x7 for free.

  1. Configure the New Query Results trigger
    1. Connect your Snowflake account
    2. Configure timer
    3. Configure Event Size
    4. Configure SQL Query
    5. Optional- Configure De-duplication Key
  2. Add steps to connect to 900+ APIs using code and no-code building blocks
  3. Deploy the workflow
  4. Send a test event to validate your setup
  5. Turn on the trigger

Integrations

Send Message with Discord Webhook API on Query Results from Snowflake API
Snowflake + Discord Webhook
 
Try it
Add Multiple Rows with Google Sheets API on Query Results from Snowflake API
Snowflake + Google Sheets
 
Try it
Get Film with SWAPI API on Query Results from Snowflake API
Snowflake + SWAPI - Star Wars
 
Try it
Create Multiple Records with Airtable API on Query Results from Snowflake API
Snowflake + Airtable
 
Try it
Custom Request with HTTP / Webhook API on Query Results from Snowflake API
Snowflake + HTTP / Webhook
 
Try it

Details

This is a pre-built, open source component from Pipedream's GitHub repo. The component is developed by Pipedream and the community, and verified and maintained by Pipedream.

To contribute an update to an existing component or create a new component, create a PR on GitHub. If you're new to Pipedream component development, you can start with quickstarts for trigger span and action development, and then review the component API reference.

New Query Results on Snowflake
Description:Emit new event with the results of an arbitrary query
Version:0.0.2
Key:snowflake-query-results

Code

import common from "../common.mjs";
import { v4 as uuidv4 } from "uuid";

export default {
  ...common,
  type: "source",
  key: "snowflake-query-results",
  name: "New Query Results",
  description: "Emit new event with the results of an arbitrary query",
  version: "0.0.2",
  props: {
    ...common.props,
    sqlQuery: {
      type: "string",
      label: "SQL Query",
      description: "Your SQL query",
    },
    dedupeKey: {
      type: "string",
      label: "De-duplication Key",
      description: "The name of a column in the table to use for de-duplication",
      optional: true,
    },
  },
  methods: {
    ...common.methods,
    generateMeta(data) {
      const {
        row: { [this.dedupeKey]: id = uuidv4() },
        timestamp: ts,
      } = data;
      const summary = `New event (ID: ${id})`;
      return {
        id,
        summary,
        ts,
      };
    },
    generateMetaForCollection(data) {
      const { timestamp: ts } = data;
      const id = uuidv4();
      const summary = `New event (ID: ${id})`;
      return {
        id,
        summary,
        ts,
      };
    },
    getStatement() {
      return {
        sqlText: this.sqlQuery,
      };
    },
  },
};

Configuration

This component may be configured based on the props defined in the component code. Pipedream automatically prompts for input values in the UI and CLI.
LabelPropTypeDescription
SnowflakesnowflakeappThis component uses the Snowflake app.
N/Adb$.service.dbThis component uses $.service.db to maintain state between component invocations.
timer$.interface.timer
Event SizeeventSizeinteger

The number of rows to include in a single event (by default, emits 1 event per row)

SQL QuerysqlQuerystring

Your SQL query

De-duplication KeydedupeKeystring

The name of a column in the table to use for de-duplication

Authentication

Snowflake uses API keys for authentication. When you connect your Snowflake account, Pipedream securely stores the keys so you can easily authenticate to Snowflake APIs in both code and no-code steps.

  1. Enter the username, password, and other details for your Snowflake database below. We recommend you create a read-only account if you only need to query Snowflake.

  2. Enter your Snowflake account identifier in the account field. You may need to include the full identifier and region as a part of this string, e.g. au12345.us-east-1. Please consult your instance and Snowflake docs for more detail.

About Snowflake

A data warehouse built for the cloud

More Ways to Use Snowflake

Triggers

New Row from the Snowflake API

Emit new event when a row is added to a table

 
Try it

Actions

Insert Row with the Snowflake API

Insert a row into a table

 
Try it