SQL Type¶
SQLParam¶
Attributes:
key: strPositional parameter placeholder, such as$1.value: strValue bound to the placeholder.
SQLCreateInfo¶
Attributes:
name: strName of the query. Required on create and replace.query: strTagoSQL query text. Required on create and replace.description: Optional[str]Human-readable description of the query.params: Optional[List[SQLParam]]Default positional parameters.cache_enabled: Optional[bool]Whether execution results are cached.cache_ttl_seconds: Optional[int]Cache time-to-live in seconds.rate_limit_rpm: Optional[int]Execution rate limit in requests per minute.active: Optional[bool]Whether the query is active.tags: Optional[List[TagsObj]]List of tags associated with the query.
SQLInfo¶
Attributes:
id: GenericIDUnique identifier for the query.name: strName of the query.description: Optional[str]Human-readable description of the query.query: strTagoSQL query text.params: Optional[List[SQLParam]]Default positional parameters.cache_enabled: Optional[bool]Whether execution results are cached.cache_ttl_seconds: Optional[int]Cache time-to-live in seconds.rate_limit_rpm: Optional[int]Execution rate limit in requests per minute.active: Optional[bool]Whether the query is active.tags: Optional[List[TagsObj]]List of tags associated with the query.version: intCurrent stored version number.cache_version: intCache generation counter, bumped when cached results are invalidated.versions: Dict[str, Any]Mapping of version number to stored snapshot metadata.created_at: datetimeDate and time when the query was created.updated_at: datetimeDate and time when the query was last updated.session_context: boolRead-only. True when the query text uses session functions. Never accepted as input.
SQLFilter¶
Attributes:
name: strName to filter queries by.active: boolActive state to filter queries by.tags: Optional[List[TagsObj]]Tags to filter queries by.
SQLQuery(Query)¶
Attributes:
fields: Optional[List[Literal[“id”, “name”, “description”, “query”, “params”, “cache_enabled”, “cache_ttl_seconds”, “rate_limit_rpm”, “active”, “tags”, “version”, “created_at”, “updated_at”]]]List of fields to include in the query results.filter: Optional[SQLFilter]Filter criteria for the query.
SQLExecuteObj¶
SQLColumn¶
Attributes:
name: strColumn name.type: Literal[“string”, “number”, “timestamp”, “boolean”, “json”]Column data type.
SQLExecuteResult¶
Attributes:
columns: List[SQLColumn]Result columns with their types.rows: List[dict]Result rows keyed by column name.row_count: intNumber of rows returned.execution_ms: intServer-side execution time in milliseconds.served_from_cache: boolTrue when the result was served from the cache.
SQLVersionInfo¶
Attributes:
query: strQuery text stored in this version.params: List[SQLParam]Parameters stored in this version.created_at: Optional[datetime]Date and time when this version was stored.
SQLTableInfo¶
Attributes:
function: strVirtual table family function name.label: strHuman-readable label.tag_form: Optional[str]Tag form used to resolve the table.columns: List[SQLColumn]Typed columns exposed by the table.dynamic: Optional[bool]Whether the table columns are resolved dynamically.
SQLResourceItem¶
Attributes:
id: GenericIDResource identifier.name: strResource name.
SQLFunctionInfo¶
Attributes:
name: strFunction name.kind: Literal[“aggregate”, “session”]Function category.args: List[str]Argument names.description: strHuman-readable description.example: Optional[str]Present only on session functions; carries the COALESCE authoring idiom.
SQLTablesResources¶
Attributes:
devices: List[SQLResourceItem]Profile devices available to queries.entities: List[SQLResourceItem]Profile entities available to queries.
SQLTablesResult¶
Attributes:
tables: List[SQLTableInfo]Virtual table families with their typed columns.resources: SQLTablesResourcesProfile devices and entities.functions: List[SQLFunctionInfo]Aggregate and session functions available to queries.
SQLTablesQuery¶
Attributes:
filter: Optional[str]Substring filter applied to the catalog.amount: Optional[int]Number of items per page.page: Optional[int]Page number.entity_id: Optional[GenericID]Entity ID used to resolve one entity’s columns.