cloudos.query_submit_async: Submit Async SQL Query

View source: R/query.R

cloudos.query_submit_asyncR Documentation

Submit Async SQL Query

Description

Starts async SQL execution for a cohort and returns a task ID for tracking.

Usage

cloudos.query_submit_async(
  profilename = "",
  cohort_id = "",
  sql = "",
  pagination = NULL
)

Arguments

profilename

Character. Name of the configured profile to use. If empty or NULL, uses the default profile.

cohort_id

Character. ID of the cohort to query.

sql

Character. SQL query to execute.

pagination

List (optional). Pagination settings with pageNumber and pageSize. Example: list(pageNumber = 0, pageSize = 100). If NULL, API returns default page.

Value

List with task metadata including task_id, status, and full response.

Examples

## Not run: 
  # Submit query without pagination
  task <- cloudos.query_submit_async(
    profilename = "production",
    cohort_id = "699edb4380a6867895f0c9e1",
    sql = "SELECT person_id FROM person LIMIT 100"
  )
  
  # Submit query with pagination for page 2 with 50 rows per page
  task <- cloudos.query_submit_async(
    profilename = "production",
    cohort_id = "699edb4380a6867895f0c9e1",
    sql = "SELECT person_id FROM person",
    pagination = list(pageNumber = 2, pageSize = 50)
  )
  print(task$task_id)

## End(Not run)

cloudosR documentation built on June 1, 2026, 5:07 p.m.