Skip to main content

Raven Run a Query Brick

PurposeLearn about the various configurations and parameters required for the If{{expression}} else Brick to function correctly.
Last updatedAugust 05, 2024

What is the Raven Run a Query Brick?

The [raven] run a query Brick is used to run a specific query inside a playbook.

Raven Run a Query Brick Parameters

  1. Label: This is where the user can provide a name for the brick.

  2. Credentials: Begin by adding the required credentials or OAuth 2.0 authentication. This step ensures secure access to the relevant data sources for your query execution.

  3. Team: Specify the Team ID to define the context for the query execution. Tailor your query to retrieve data specific to the designated team, enhancing precision and relevance.

  4. Query: Craft your query using Postgres SQL or PRQL languages. Define the parameters of your query to extract the precise data needed for your Playbook workflow.

    • Query example:
    SELECT * FROM exampletable
    • Explanation:

      SELECT: Retrieve data from one or more tables.

      *: Retrieves everything contained in the table.

      exampletable: Name of the table from where the information is being pulled.

For more information on PostgresSQL language follow links bellow:

Learn more about Postgres SQL

Raven Run a Query Brick output format

In this section of the documentation the user will learn where are the outputs of the brick stored and its format.

The output variables may vary depending on the input brick providing the data, here are some examples:

  1. Name of variable: query

    • Format:
      • query_id (String): A unique identifier for the query
      • total_count (Integer): The number of rows returned by the query
      • rows (List): The query results
  2. Name of variable: python

    • Format:
      • downloads (List): A list of downloaded records.