% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/query.R
\name{cloudos.query_submit_async}
\alias{cloudos.query_submit_async}
\title{Submit Async SQL Query}
\usage{
cloudos.query_submit_async(
  profilename = "",
  cohort_id = "",
  sql = "",
  pagination = NULL
)
}
\arguments{
\item{profilename}{Character. Name of the configured profile to use. If empty or NULL, uses the default profile.}

\item{cohort_id}{Character. ID of the cohort to query.}

\item{sql}{Character. SQL query to execute.}

\item{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.
}
\description{
Starts async SQL execution for a cohort and returns a task ID for tracking.
}
\examples{
\dontrun{
  # 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)
}
}
