Skip to main content
GET
A query run is one execution of lake SQL. Cloud creates a run when you create a new query with sql or saved_query_id, or when a scheduled saved query fires. This endpoint returns one run by run_id. You get the SQL and date range that actually ran, the status of that execution, and a preview of the result rows (at most 1000 rows, or less if the preview exceeds 2 MB). The SQL and dates are a snapshot from the time of the run.

Authorization

Blnk Cloud APIs support any one of the following authentication methods. All of them work with your CLOUD_API_KEY or OAUTH_ACCESS_TOKEN.
Pass Authorization: Bearer CLOUD_API_KEY or Authorization: Bearer OAUTH_ACCESS_TOKEN.
string
required
Cloud API key or OAuth access token. Create credentials in API keys or OAuth.

Path

string
required
Unique id of the query run (lake_query_run_...). Get it from Create new query (run_id) or List query runs.

Response

string
Unique id of this run (lake_query_run_...).
string
Unique id of the instance (instance_...).
string
Saved query this run came from (lake_query_...). Omitted when you ran ad-hoc SQL without a saved query.
string
How the run started: manual (Create new query) or scheduled (a saved-query schedule).
string
Display name of the saved query at the time of the run. Empty for ad-hoc SQL.
string
Exact SQL Cloud executed. This is a snapshot. Later edits to a saved query do not change it.
timestamp
First day of lake history this run opened. For a rolling saved query, this is the start Cloud resolved at run time.
timestamp
Last day of lake history this run opened. For a rolling saved query, this is the end Cloud resolved at run time.
string
running while Cloud is still executing, succeeded when it finished, or failed when the SQL did not complete.
integer
Number of rows the query produced. Can be larger than rows when the preview is truncated.
boolean
true when rows is a truncated preview (more than 1000 rows, or the preview exceeded 2 MB). Use row_count for the full total.
integer
How long the query took to execute, in milliseconds.
string
Machine-readable failure code, such as INVALID_SQL or QUERY_TOO_EXPENSIVE. Present only when status is failed.
string
Human-readable reason the run failed. Present only when status is failed.
array
Preview of result rows. Column names match the SQL aliases. At most 1000 rows. Not the full result when preview_limited is true.
timestamp
When Cloud started executing this run.
timestamp
When the run reached succeeded or failed. Omitted while status is running.
timestamp
When Cloud first recorded this run (usually the same moment as started_at).
timestamp
When Cloud last wrote to this run, such as when it moved from running to succeeded or failed.

Need help?

We are very happy to help you make the most of Blnk, regardless of whether it is your first time or you are switching from another tool. To ask questions or discuss issues, please contact us or join our Discord community.