Docs
  • LogicLoop Documentation
  • LogicLoop Quickstart
  • Data Sources
    • Connect your data source
      • Deployment options
    • Supported data sources
      • API data (JSON)
      • AWS CloudWatch
      • BigQuery
      • Databricks
      • Google Analytics
      • Google Sheets
      • MongoDB
      • Microsoft SQL Server
      • MySQL
      • Oracle
      • PostgreSQL
      • Snowflake
      • Combine Results
      • LogicLoop Data Source
  • Queries
    • Write a rule
      • More rule options
      • A/B testing rules
      • Version history
      • Query Snippets
    • Visualizations & dashboards
      • Visualizations
      • Dashboards
  • Actions
    • Set up an action
    • Action destinations
      • Email
      • Slack
      • Webhooks & APIs
      • Microsoft Teams
      • Salesforce
      • Zapier
      • PagerDuty
      • Write to Database
      • Chain Rules
      • Google Sheets
      • Bento
    • Templating
  • Case Management
    • Case Management
      • Ticket Generation
      • Case Triage
      • Custom Fields and Attachments
  • AI
    • AI Query Helper
    • Ask AI
  • Teams & Settings
    • Integrations
      • Slack
      • Google Sheets
    • Invite your teammate
    • Groups & Permissions
  • Changelog
  • FAQs
  • Troubleshooting
  • Templates
    • Templates Home
    • Risk & Fraud Rules
    • AML Transaction Monitoring Rules
    • Logistics & Marketplace Ops
    • Customer Success & Growth
    • Systems Observability
    • Data Quality Monitoring
    • Healthcare
    • HTML Email Templates
      • Annual Review
      • Weekly Performance Table
      • Invoice Recap
  • BETA
    • AI SQL API
    • Approving rules
    • Render Data as JSON
    • Case Analytics
    • Python
  • Security & Legal
    • Security
    • AI Security
    • Terms of use
    • Privacy policy
    • Services description
Powered by GitBook
On this page

Was this helpful?

  1. Data Sources
  2. Supported data sources

Combine Results

PreviousSnowflakeNextLogicLoop Data Source

Last updated 1 year ago

Was this helpful?

LogicLoop enables you to join results from different queries and data sources. You can join results from any query, including databases, API's, and spreadsheets. Sometimes you want to do analytics on top of your rule results, or to combine data stored in separate databases. In LogicLoop, you can create rules from the results of other rules. These are called meta rules.

LogicLoop stores the latest result from each rule’s queries in an in-memory database. You can see a video example of how to combine data from different rules , so you can combine your Google Sheets with a production database, or your warehouse with an API data source. Simply add Query Results as a new Data Source, and just give it a name that you’ll use from the dropdown in your rule.

Then, create a new rule and use this Query Results data source you added as the data source.

This will re-run the query defined in that rule. If you want to speed up performance and use the last result of the query instead, you can use the alias cached_query_xx. You can also combine data from different sources by joining query results.

LogicLoop cannot query rules that use parameters. You’ll see "Error running query: Failed loading results from query id xx". You can remove parameters to fix this issue.

You are now ready to write a rule that combines data from the output of other rules on LogicLoop. Write your rule using query syntax. You access the results of your other rules as "tables" aliased as query_ followed by the query id you can get from the rule’s URL.

SQLite
here
Showing a new rule that uses the Query Results data source
The rule shown here has a query ID of 12
This meta-rule allows you to combine the results of query_12 and query_10