ZBrain Documentation
  • ZBrain Documentation
    • Components of ZBrain
    • Getting started with ZBrain
    • 📚Knowledge base
      • How to create a knowledge base?
      • Knowledge source
      • Information schema
      • File summary
      • Automated reasoning
      • Retrieval testing
      • Knowledge base settings
    • 📱APP
      • How to create a new app?
      • How to set up and customize your app?
      • How to access the app reporting dashboard?
    • 🤖ZBrain AI agents
      • Get started with agents on ZBrain
      • Deploying pre-built agents
      • Creating custom AI agents
        • Agent setup
        • Define input sources
        • Define Flow
          • Key elements of a Flow
          • Flow Components
            • Activepieces Platform
            • AITable
            • Airtable
            • Amazon S3
            • Amazon SNS
            • Amazon SQS
            • Amazon Textract
            • Apify
            • Apollo
            • Approval
            • Asana
            • Azure Communication Services
            • Azure Cosmos DB
            • Azure Document Intelligence
            • Azure OpenAI
            • Azure Translation
            • Bannerbear
            • Baserow
            • Beamer
            • Bedrock Claude
            • Bettermode
            • Binance
            • Bing Search
            • Blackbaud
            • Bonjoro
            • Box
            • Brevo
            • Brilliant Directories
            • Bubble
            • CSV
            • Calendly
            • Certopus
            • Clearout
            • Clockodo
            • Code
            • Confluence
            • Connections
            • Constant Contact
            • Contiguity
            • Contentful
            • Customer.io
            • Crypto
            • Databricks
            • Data Mapper
            • Date Helper
            • DeepL
            • Delay
            • Discord
            • Discourse
            • Drip
            • Dropbox
            • Dust
            • Facebook Pages
            • Figma
            • Files Helper
            • Flowise
            • Flowlu
            • Formbricks
            • Frame
            • Freshdesk
            • Freshsales
            • GCloud Pub/Sub
            • GenerateBanners
            • GhostCMS
            • GitHub
            • GitLab
            • Gmail
            • Google Calendar
            • Google Contacts
            • Google Docs
            • Google Drive
            • Google Forms
            • Google Gemini
            • Google My Business
            • Google Search
            • Google Search Console
            • Google Sheets
            • Google Tasks
            • Groq
            • Hacker News
            • Heartbeat
            • HubSpot
            • HTTP
            • Image Helper
            • Inputs
            • Instagram for Business
            • Intercom
            • Invoice Ninja
            • Jira Cloud
            • Jotform
            • Kimai
            • Kizeo Forms
            • LeadConnector
            • Line Bot
            • Linear
            • LinkedIn
            • LinkedIn Actions
            • LLMRails
            • Lusha
            • MailerLite
            • Mailchimp
            • Mautic
            • Microsoft Dynamics 365 Business Central
            • Microsoft Dynamics CRM
            • Microsoft Excel 365
            • Microsoft OneDrive
            • Microsoft Outlook Calendar
            • Microsoft Teams
            • Mixpanel
            • MongoDB
            • Notion
            • Odoo
            • OpenAI
            • OpenRouter
            • Pastebin
            • PDF
            • Postgres
            • PostHog
            • Pushover
            • Qdrant
            • Queue
            • Razorpay
            • Router
            • Salesforce
            • SendGrid
            • ServiceNow
            • SFTP
            • SharePoint
            • Slack
            • SMTP
            • Snowflake
            • SOAP
            • Spotify
            • Stability AI
            • Stable Diffusion Web UI
            • Storage
            • Stripe
            • SurrealDB
            • SurveyMonkey
            • Taskade
            • Telegram Bot
            • Text Helper
            • Trello
            • Twilio
            • Twitter
            • Utilities
            • WhatsApp Business
            • WordPress
            • XML
            • YouTube
            • ZBrain
            • Zendesk
            • ZeroBounce
            • Zoho Books
            • Zoho CRM
            • Zoho Invoice
            • Zoom
          • How to Define a Flow?
          • How to Test Each Step in the Flow?
        • Configure Additional Settings
        • Test and Deploy Agents
        • How to access, monitor, and manage agent performance and tasks?
    • Settings
    • 📖API Tutorials
      • 📚Knowledge base
        • Automated Reasoning
      • 📱APP
      • 🤖Agents
Powered by GitBook
On this page
  1. ZBrain Documentation
  2. ZBrain AI agents
  3. Creating custom AI agents
  4. Define Flow
  5. Flow Components

Snowflake

The Snowflake piece in ZBrain Flow provides integration with Snowflake's cloud data platform, allowing you to interact with your data warehouse directly from your workflows. This powerful connector enables you to execute SQL queries and manipulate data without manual intervention. With Snowflake integration, you can build automations that retrieve analytics data, perform database operations, load information into data warehouses, and synchronize data between Snowflake and other business systems. This piece is ideal for data teams looking to automate reporting, streamline ETL processes, and incorporate data warehouse operations into their broader business workflows.

How to Use Snowflake in ZBrain Flow

Select Snowflake as Your Connection

  • Click on the '+' button in the Flow and search for Snowflake.

  • Select Snowflake.

  • Decide on the action you need, then select it. ZBrain Flow provides several options:

    • Run Query – Execute a single SQL query on your Snowflake instance.

    • Run Multiple Queries – Execute multiple SQL statements in sequence.

    • Insert Row – Add new data records to Snowflake tables.

How to Connect to Your Snowflake Data Warehouse

Before using any Snowflake actions in ZBrain Flow, you'll need to set up a connection to your Snowflake instance. This is a one-time setup that will allow you to access your data warehouse securely.

To create your Snowflake connection:

  • From any Snowflake action, click on the connection dropdown and select 'Create connection'.

  • In the popup window that appears, you'll need to:

    • Enter a descriptive 'Connection Name' to identify this Snowflake connection

    • In the 'Account' field, enter your Snowflake account identifier (e.g., xy12345.us-east-1)

    • In the 'Username' field, enter your Snowflake user login name

    • In the 'Password' field, enter your Snowflake password

    • In the 'Database' field, optionally specify the default database to use

    • In the 'Role' field, optionally specify the security role to use

    • In the 'Warehouse' field, optionally specify the virtual warehouse to use for the session after connecting.

    • Click 'Save' to store this connection

How to Run a Query in Snowflake

Configuration Steps:

  • Connect to your Snowflake instance following the steps in the "How to Connect to Your Snowflake Data Warehouse" section.

  • In the 'SQL query' field, enter the SQL statement you want to execute.

    • For example:

      sqlSELECT * FROM customers WHERE region = 'Northeast' LIMIT 100;

    • You can use placeholders (:1, :2, etc. or ?) in your query for parameterized values.

  • If using parameters, click 'Add Item' in the 'Parameters' section for each value you need to pass. This prevents SQL injection by properly sanitizing inputs.

  • If your query may take longer to execute, you can optionally modify the 'Query timeout (ms)' value (default 30000). This integer indicates the maximum number of milliseconds a query must wait to complete before timing out.

  • The 'Application name' field identifies your connection in Snowflake logs.

How to Run Multiple Queries in Snowflake

Configuration Steps:

  • Connect to your Snowflake instance following the steps in the "How to Connect to Your Snowflake Data Warehouse" section.

  • Click 'Add Item' in the 'SQL queries' section for each SQL statement you want to execute.

    • Enter your statements in the order you want them executed.

    • For example:

      sqlCREATE TABLE IF NOT EXISTS temp_data AS SELECT * FROM source_table WHERE date = :1;sqlUPDATE customers SET status = 'active' WHERE customer_id IN (SELECT customer_id FROM temp_data);

    • Use numbered placeholders (:1, :2, etc.) for parameterized values.

  • If using parameters, click 'Add Item' in the 'Parameters' section for each value you need to pass. These parameters are shared across all queries.

  • Toggle 'Use Transaction' on if you want all queries to be treated as a single operation. When enabled, if any query fails, all changes will be rolled back. This ensures database consistency for multi-step operations.

  • Optionally modify the 'Query timeout (ms)' value if your queries may take longer to execute.

  • The 'Application name' field identifies your connection in Snowflake logs.

How to Insert Rows into Snowflake Tables

Configuration Steps:

  • Connect to your Snowflake instance following the steps in the "How to Connect to Your Snowflake Data Warehouse" section.

  • In the 'Database' field, select the name of the database containing your target table.

  • In the 'Schema' field, enter the schema name where your table is located (e.g., 'PUBLIC').

  • In the 'Table' field, enter the name of the table where you want to insert data.

PreviousSMTPNextSOAP

Last updated 24 days ago

🤖