Skip to main content
Continuous Query automatically transforms raw activity and biometric data from 300+ connected devices into structured, aggregated datasets that update as new data arrives. Instead of building complex data pipelines or repeatedly polling APIs, you define your query once and Junction handles the rest—from data ingestion and aggregation to intelligent scheduling and delivery.

How It Works

Continuous Query runs your Junction Sense Queries automatically across all users in your team. When new data arrives from connected devices—whether via cloud providers or mobile SDKs—Junction intelligently schedules query re-evaluation and pushes any changes to your configured destinations.

Key Capabilities

Automatic Evaluation

Queries run automatically on all existing and new users in your team, eliminating manual execution

Push Delivery

Result changes are pushed to your webhook or ETL pipeline destinations—no polling required

Intelligent Scheduling

Junction monitors data connections and schedules queries in response to new data points or updates

Pull Access

Query the latest result table through the API anytime

Common Use Cases

Track key health metrics over time to power patient dashboards, clinical insights, or wellness reports.Example: Daily Sleep Analysis
  • Analyze sleep efficiency, scores, and chronotype for primary sleep sessions
  • Filter for long sleep periods to focus on nighttime rest
  • Monitor quality trends across consecutive nights
  • View example →
Example: Weekly Activity Summaries
  • Calculate average resting heart rate and active duration
  • Track maximum daily calorie burn and minimum step counts
  • Group activity data by week for trend analysis
  • View example →
Support diabetes management and metabolic health tracking with automated CGM data aggregation.Example: First Glucose Reading of Each Day
  • Capture fasting glucose values (first measurement per day)
  • Group by data source and provider for device comparison
  • Track morning glucose patterns over time
  • View example →
Example: Daily Summaries of Metabolites
  • Calculate mean glucose levels throughout the day
  • Combine with heart rate, HRV, and temperature data
  • Analyze multi-metric patterns by device source
  • View example →
Power adaptive training programs with continuously updated workout and activity metrics.Example: Weekly Workout Statistics
  • Track calorie expenditure ranges (min/max) across workouts
  • Monitor heart rate zone distribution for training intensity
  • Aggregate distance and active duration metrics
  • View example →
Use case highlights:
  • Real-time metric tracking for goal progress
  • Device-specific analysis to handle data from multiple sources
  • Webhook integration for triggering adaptive training plans
  • Historical trend data for personalized coaching
Support research protocols requiring consistent, automated data collection across participants.Use case highlights:
  • Automatic data aggregation for all enrolled participants
  • Consistent time-window grouping (daily, weekly, monthly)
  • Event notifications when new data becomes available
  • Result tables compatible with research analysis tools
  • Source-level granularity for data quality assessment
Analyze health trends across user populations for public health initiatives or employer wellness programs.Use case highlights:
  • Scalable aggregation across thousands of users
  • Standardized metrics despite diverse device ecosystems
  • Automated daily/weekly rollups for reporting dashboards
  • ETL pipeline integration for data warehouses

Supported Data Sources

Continuous Query works with the following health data resources:
  • Activity - Steps, calories, distance, active duration, resting heart rate
  • Sleep - Duration, stages, efficiency, scores, heart rate during sleep, sleep type filtering
  • Workout - Exercise sessions, heart rate zones, distance, duration, calories
  • Body - Weight, BMI, body fat percentage, temperature
  • Meal - Nutritional intake, macros, timing
  • Time Series - Continuous measurements including heart rate, glucose, HRV, steps, body temperature
Each query focuses on a single data resource, ensuring clean schemas and optimal performance. For multi-resource analysis, create separate queries and join results in your application layer. View complete data resource documentation →

Query Capabilities

Time-Based Aggregation

Group data by day, week, month, or other time periods to create time-series datasets:
  • Daily summaries for dashboards and trend visualization
  • Weekly rollups for progress tracking
  • Monthly aggregations for longitudinal analysis

Flexible Metrics

Calculate meaningful insights using built-in aggregation functions:
  • Mean/Average - Average sleep efficiency, resting heart rate, glucose levels
  • Sum - Total steps, cumulative calories
  • Min/Max - Lowest/highest values in a period
  • Standard Deviation - Variability in metrics
  • Newest/Oldest - Most recent or first value (useful for fasting glucose, chronotype)

Multi-Dimensional Grouping

Organize data across multiple dimensions for richer analysis:
  • Time periods (day, week, month)
  • Data sources (provider, device type)
  • Custom fields (workout type, sleep type)
View complete grouping reference →

Source Prioritization

When users connect multiple devices, Junction’s source prioritization ensures data quality:
  • Configure team-level provider priorities
  • Override priorities at the query level for experiments
  • Optionally split results by data source for comparative analysis

Filtering & Refinement

Use WHERE clauses to focus on specific data subsets:
  • Filter for main sleep sessions (type = 'long_sleep')
  • Target specific workout types or activity levels
  • Isolate data from particular device sources

Getting Started

Step 1: Define Your Query Use the Query DSL to specify what data to aggregate, how to group it, and which metrics to calculate Step 2: Validate the Query Use the Junction Dashboard Query Editor to preview and validate the result table schema and catch any issues before creation Step 3: Deploy Query Deploy your query using the create endpoint or by saving your query in the Junction Dashboard Step 4: Configure Delivery Set up webhooks or ETL pipelines to receive result updates automatically Jump to Getting Started Guide →

Query API vs. Continuous Query

Both use the same Query DSL, making it easy to prototype with Query API and deploy to production with Continuous Query. Compare in detail →
FeatureQuery APIContinuous Query
ExecutionOn-demand, single requestAutomatic, continuous evaluation
ScopeSingle user, point-in-timeAll team users, ongoing
DeliverySynchronous API responseWebhooks, ETL pipelines, API pull
Best ForExperimentation, ad-hoc analysisProduction workflows, monitoring
Use WhenTesting queries, exploring dataBuilding features, generating reports

What’s Next?

Manage Queries Using Junction Dashboard View Example Queries Getting Started Guide
  • Step-by-step tutorial to create your first Junction Sense query
  • Get started →
Query DSL Reference API Endpoints