mirror of
https://github.com/simstudioai/sim.git
synced 2026-09-24 15:45:35 +08:00
feat(integrations): add ClickHouse block and expand Dagster + Tinybird tools (#4883)
* feat(integrations): add ClickHouse block and expand Dagster + Tinybird tools
* fix(tinybird): fail loudly on invalid query_pipe parameters JSON
parsePipeParameters previously returned {} on any JSON parse error, so a
mistyped 'parameters' input produced a successful pipe call with the dynamic
filters silently dropped. Throw a clear error for non-empty, non-object input
instead; an omitted/empty value still means 'no parameters'.
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
* fix(dagster): guard NaN numeric coercions and bound list_assets pagination
Address PR review:
- Route all block numeric coercions (list_runs limit/createdAfter/createdBefore,
get_run_logs logsLimit, list_assets assetsLimit) through a toFiniteNumber()
guard so invalid/wand-generated text becomes undefined instead of NaN.
- list_assets now applies a default page size (100) when no limit is given, so
paging stays bounded and hasMore is meaningful even when limit is omitted.
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
* fix(dagster): make list_assets hasMore exact via fetch N+1
Address PR review (hasMore true on exact page): request one extra row
(pageSize + 1), use its presence as the authoritative hasMore, slice it off,
and derive the returned cursor from the last RETURNED asset's key path
(JSON-serialized; Dagster normalizes JS/Python whitespace on the way in).
This removes the false-positive hasMore when the final page is exactly full.
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
* fix(clickhouse): enforce read-only query operation and harden WHERE-clause guard
* fix(dagster): make list_runs hasMore exact via fetch N+1
Address PR review (list runs false hasMore): request one extra row
(pageSize + 1), use its presence as the authoritative hasMore, and slice it
off before mapping. Removes the false-positive hasMore (and misleading cursor)
when the final page is exactly `limit` runs long. Mirrors the list_assets fix.
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
* fix(clickhouse): restrict DROP PARTITION to literal values to prevent SQL injection
* fix(clickhouse): reject chained statements in read-only query operation
* fix(clickhouse): force JSON output on query path and ignore comments when detecting chained statements
* fix(tinybird): encode datasource/pipe names in URL paths to prevent traversal
A user-or-llm datasource/pipe name interpolated raw into the URL path (e.g.
'real_ds/../../other') is normalized by the WHATWG URL parser and can target a
different endpoint. Wrap the path segment with encodeURIComponent in the
truncate, delete, and query_pipe URLs. Events/append pass the name via
URLSearchParams, which already encodes, so they were unaffected.
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
* fix(clickhouse): block WITH-led writes/DDL in read-only query operation
* fix(clickhouse): validate column types structurally and normalize FORMAT around SETTINGS
* fix(clickhouse): balance-check ORDER BY/PARTITION BY and skip leading comments in read-only guard
---------
Co-authored-by: Claude Opus 4.8 <noreply@anthropic.com>
This commit is contained in:
co-authored by
Claude Opus 4.8
parent
2ccd9a3ac5
commit
16954e46fe
@@ -2743,6 +2743,18 @@ export function ClerkIcon(props: SVGProps<SVGSVGElement>) {
|
||||
)
|
||||
}
|
||||
|
||||
export function ClickHouseIcon(props: SVGProps<SVGSVGElement>) {
|
||||
return (
|
||||
<svg {...props} viewBox='0 0 150 150' xmlns='http://www.w3.org/2000/svg'>
|
||||
<path d='m0 0h150v150h-150z' fill='#f9ff69' />
|
||||
<path
|
||||
d='m30 28.3c0-.6.5-1.1 1.1-1.1h8.4c.6 0 1.1.5 1.1 1.1v93.3c0 .6-.5 1.1-1.1 1.1h-8.4c-.6 0-1.1-.5-1.1-1.1zm21.2 0c0-.6.5-1.1 1.1-1.1h8.4c.6 0 1.1.5 1.1 1.1v93.3c0 .6-.5 1.1-1.1 1.1h-8.4c-.6 0-1.1-.5-1.1-1.1zm21.2 0c0-.6.5-1.1 1.1-1.1h8.4c.6 0 1.1.5 1.1 1.1v93.3c0 .6-.5 1.1-1.1 1.1h-8.4c-.6 0-1.1-.5-1.1-1.1zm21.3 0c0-.6.5-1.1 1.1-1.1h8.4c.6 0 1.1.5 1.1 1.1v93.3c0 .6-.5 1.1-1.1 1.1h-8.4c-.6 0-1.1-.5-1.1-1.1zm21.2 37.2c0-.6.5-1.1 1.1-1.1h8.4c.6 0 1.1.5 1.1 1.1v19c0 .6-.5 1.1-1.1 1.1h-8.4c-.6 0-1.1-.5-1.1-1.1z'
|
||||
fill='#161616'
|
||||
/>
|
||||
</svg>
|
||||
)
|
||||
}
|
||||
|
||||
export function MicrosoftIcon(props: SVGProps<SVGSVGElement>) {
|
||||
return (
|
||||
<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 23 23' {...props}>
|
||||
@@ -3365,7 +3377,18 @@ export const OllamaIcon = (props: SVGProps<SVGSVGElement>) => (
|
||||
xmlns='http://www.w3.org/2000/svg'
|
||||
>
|
||||
<title>Ollama</title>
|
||||
<path d='M7.91 1.09c.216.09.411.23.588.41.3.306.54.744.73 1.26.191.52.315 1.1.36 1.68a5.05 5.05 0 12.05-.636l.051-.004c.87-.07 1.73.09 2.48.47.101.05.2.11.3.17.05-.569.17-1.13.36-1.64.19-.52.44-.957.73-1.26a1.67 1.67 0 1.59-.41c.257-.1.53-.118.8-.42.4.114.75.368 1.02.737.25.337.43.769.56 1.29.23.93.27 2.16.115 3.65l.053.4.03.019c.757.58 1.28 1.4 1.56 2.35.44 1.49.216 3.16-.534 4.09l-.18.02.2c.417.76.67 1.57.724 2.4l.002.03c.064 1.07-.2 2.14-.814 3.19l-.007.01.1.02c.472 1.16.62 2.32.438 3.49l-.6.04a.651.65 0 01-.747.54.648.65 0 01-.54-.742c.167-1.03.01-2.07-.48-3.12a.643.64 0 01.04-.617l.004-.006c.604-.924.85-1.83.8-2.72-.046-.779-.325-1.54-.8-2.27a.644.64 0 01.18-.886l.009-.006c.243-.159.47-.565.58-1.12a4.23 4.23 0 00-.095-1.97c-.205-.7-.58-1.28-1.1-1.68-.595-.454-1.38-.673-2.38-.61a.653.65 0 01-.632-.371c-.314-.665-.772-1.14-1.34-1.44a3.29 3.29 0 00-1.77-.332c-1.25.099-2.34.801-2.67 1.69a.652.65 0 01-.61.43c-1.07.002-1.89.252-2.5.703-.522.39-.878.94-1.07 1.59a4.07 4.07 0 00-.068 1.89c.112.56.331 1.2.58 1.27l.8.01c.212.21.257.53.11.785-.36.62-.629 1.55-.673 2.44-.05 1.02.186 1.9.719 2.54l.16.02a.643.64 0 1.1.69c-.576 1.24-.753 2.25-.562 3.05a.652.65 0 01-1.27.298c-.243-1.02-.078-2.18.473-3.5l.014-.035-.008-.012a4.34 4.34 0 01-.598-1.31l-.005-.019a5.76 5.76 0 01-.177-1.78c.044-.91.28-1.84.622-2.59l.012-.026-.002-.002c-.293-.418-.51-.953-.63-1.54l-.005-.024a5.35 5.35 0 1.09-2.49c.262-.915.78-1.7 1.54-2.27.06-.45.12-.9.19-.132-.159-1.49-.119-2.73.11-3.67.13-.518.31-.95.56-1.29.27-.368.61-.622 1.01-.737.27-.076.54-.59.8.042zm4.12 9.09c.936 0 1.8.31 2.45.855.63.53 1 1.24 1 1.94 0 .888-.406 1.58-1.13 2.02-.62.38-1.45.557-2.4.557-1.01 0-1.87-.259-2.49-.734-.617-.47-.963-1.13-.963-1.84 0-.707.4-1.42 1.06-1.95.668-.537 1.55-.849 2.49-.849zm0 .896a3.07 3.07 0 00-1.92.65c-.461.37-.722.84-.722 1.25 0 .428.21.83.61 1.13.455.35 1.12.548 1.94.548.8 0 1.47-.147 1.93-.426.46-.28.7-.686.7-1.26 0-.423-.246-.89-.683-1.26-.484-.405-1.14-.643-1.86-.643zm.662 1.21l.4c.12.15.095.37-.056.49l-.292.23v.446a.375.38 0 01-.376.37.375.38 0 01-.376-.373v-.46l-.271-.218a.347.35 0 01-.052-.49.35.353 0 1.49-.051l.215.17.22-.174a.353.35 0 01.49.05zm-5.04-1.92c.478 0 .867.39.87.871a.87.87 0 01-.868.87.87.87 0 01-.867-.87.87.87 0 1.87-.872zm8.71 0c.48 0 .868.39.87.871a.87.87 0 01-.868.87.87.87 0 01-.867-.87.87.87 0 1.87-.872zM7.44 2.3l-.3a.659.66 0 00-.285.24l-.5.01c-.138.19-.258.47-.348.83-.17.69-.216 1.63-.124 2.78.43-.128.9-.208 1.4-.237l.01-.1.02-.034c.046-.82.1-.161.15-.239.12-.771.02-1.69-.253-2.44-.134-.364-.297-.65-.453-.813a.628.63 0 00-.107-.09L7.44 2.3zm9.17.04l-.2a.628.63 0 00-.107.09c-.156.16-.32.45-.453.81-.29.79-.387 1.78-.23 2.57l.58.1.8.01h.03a5.18 5.18 0 11.47.212c.086-1.12.038-2.04-.128-2.72-.09-.365-.21-.643-.349-.832l-.004-.006a.659.66 0 00-.285-.239h-.004z' />
|
||||
<path d='M7.905 1.09c.216.085.411.225.588.41.295.306.544.744.734 1.263.191.522.315 1.1.362 1.68a5.054 5.054 0 012.049-.636l.051-.004c.87-.07 1.73.087 2.48.474.101.053.2.11.297.17.05-.569.172-1.134.36-1.644.19-.52.439-.957.733-1.264a1.67 1.67 0 01.589-.41c.257-.1.53-.118.796-.042.401.114.745.368 1.016.737.248.337.434.769.561 1.287.23.934.27 2.163.115 3.645l.053.04.026.019c.757.576 1.284 1.397 1.563 2.35.435 1.487.216 3.155-.534 4.088l-.018.021.002.003c.417.762.67 1.567.724 2.4l.002.03c.064 1.065-.2 2.137-.814 3.19l-.007.01.01.024c.472 1.157.62 2.322.438 3.486l-.006.039a.651.651 0 01-.747.536.648.648 0 01-.54-.742c.167-1.033.01-2.069-.48-3.123a.643.643 0 01.04-.617l.004-.006c.604-.924.854-1.83.8-2.72-.046-.779-.325-1.544-.8-2.273a.644.644 0 01.18-.886l.009-.006c.243-.159.467-.565.58-1.12a4.229 4.229 0 00-.095-1.974c-.205-.7-.58-1.284-1.105-1.683-.595-.454-1.383-.673-2.38-.61a.653.653 0 01-.632-.371c-.314-.665-.772-1.141-1.343-1.436a3.288 3.288 0 00-1.772-.332c-1.245.099-2.343.801-2.67 1.686a.652.652 0 01-.61.425c-1.067.002-1.893.252-2.497.703-.522.39-.878.935-1.066 1.588a4.07 4.07 0 00-.068 1.886c.112.558.331 1.02.582 1.269l.008.007c.212.207.257.53.109.785-.36.622-.629 1.549-.673 2.44-.05 1.018.186 1.902.719 2.536l.016.019a.643.643 0 01.095.69c-.576 1.236-.753 2.252-.562 3.052a.652.652 0 01-1.269.298c-.243-1.018-.078-2.184.473-3.498l.014-.035-.008-.012a4.339 4.339 0 01-.598-1.309l-.005-.019a5.764 5.764 0 01-.177-1.785c.044-.91.278-1.842.622-2.59l.012-.026-.002-.002c-.293-.418-.51-.953-.63-1.545l-.005-.024a5.352 5.352 0 01.093-2.49c.262-.915.777-1.701 1.536-2.269.06-.045.123-.09.186-.132-.159-1.493-.119-2.73.112-3.67.127-.518.314-.95.562-1.287.27-.368.614-.622 1.015-.737.266-.076.54-.059.797.042zm4.116 9.09c.936 0 1.8.313 2.446.855.63.527 1.005 1.235 1.005 1.94 0 .888-.406 1.58-1.133 2.022-.62.375-1.451.557-2.403.557-1.009 0-1.871-.259-2.493-.734-.617-.47-.963-1.13-.963-1.845 0-.707.398-1.417 1.056-1.946.668-.537 1.55-.849 2.485-.849zm0 .896a3.07 3.07 0 00-1.916.65c-.461.37-.722.835-.722 1.25 0 .428.21.829.61 1.134.455.347 1.124.548 1.943.548.799 0 1.473-.147 1.932-.426.463-.28.7-.686.7-1.257 0-.423-.246-.89-.683-1.256-.484-.405-1.14-.643-1.864-.643zm.662 1.21l.004.004c.12.151.095.37-.056.49l-.292.23v.446a.375.375 0 01-.376.373.375.375 0 01-.376-.373v-.46l-.271-.218a.347.347 0 01-.052-.49.353.353 0 01.494-.051l.215.172.22-.174a.353.353 0 01.49.051zm-5.04-1.919c.478 0 .867.39.867.871a.87.87 0 01-.868.871.87.87 0 01-.867-.87.87.87 0 01.867-.872zm8.706 0c.48 0 .868.39.868.871a.87.87 0 01-.868.871.87.87 0 01-.867-.87.87.87 0 01.867-.872zM7.44 2.3l-.003.002a.659.659 0 00-.285.238l-.005.006c-.138.189-.258.467-.348.832-.17.692-.216 1.631-.124 2.782.43-.128.899-.208 1.404-.237l.01-.001.019-.034c.046-.082.095-.161.148-.239.123-.771.022-1.692-.253-2.444-.134-.364-.297-.65-.453-.813a.628.628 0 00-.107-.09L7.44 2.3zm9.174.04l-.002.001a.628.628 0 00-.107.09c-.156.163-.32.45-.453.814-.29.794-.387 1.776-.23 2.572l.058.097.008.014h.03a5.184 5.184 0 011.466.212c.086-1.124.038-2.043-.128-2.722-.09-.365-.21-.643-.349-.832l-.004-.006a.659.659 0 00-.285-.239h-.004z' />
|
||||
</svg>
|
||||
)
|
||||
export const FalIcon = (props: SVGProps<SVGSVGElement>) => (
|
||||
<svg {...props} height='1em' viewBox='0 0 24 24' width='1em' xmlns='http://www.w3.org/2000/svg'>
|
||||
<title>Fal</title>
|
||||
<path
|
||||
clipRule='evenodd'
|
||||
d='M15.477 0c.415 0 .749.338.788.752a7.775 7.775 0 006.985 6.984c.413.04.752.373.752.788v6.952c0 .415-.338.748-.752.788a7.775 7.775 0 00-6.985 6.984c-.04.414-.373.752-.788.752H8.525c-.416 0-.749-.338-.789-.752a7.775 7.775 0 00-6.984-6.984c-.414-.04-.752-.373-.752-.788V8.524c0-.415.338-.748.752-.788A7.775 7.775 0 007.736.752C7.776.338 8.11 0 8.526 0h6.95zM4.819 11.98a7.226 7.226 0 007.223 7.23 7.226 7.226 0 007.223-7.23c0-3.994-3.234-7.23-7.223-7.23a7.227 7.227 0 00-7.223 7.23z'
|
||||
fill='#EC0648'
|
||||
fillRule='evenodd'
|
||||
/>
|
||||
</svg>
|
||||
)
|
||||
export function ShieldCheckIcon(props: SVGProps<SVGSVGElement>) {
|
||||
@@ -3982,16 +4005,16 @@ export function FireworksIcon(props: SVGProps<SVGSVGElement>) {
|
||||
return (
|
||||
<svg
|
||||
{...props}
|
||||
viewBox='0 0 512 512'
|
||||
height='1em'
|
||||
width='1em'
|
||||
viewBox='0 0 24 24'
|
||||
xmlns='http://www.w3.org/2000/svg'
|
||||
fillRule='evenodd'
|
||||
clipRule='evenodd'
|
||||
strokeLinejoin='round'
|
||||
strokeMiterlimit={2}
|
||||
>
|
||||
<path
|
||||
d='M314.33 110.17L255.98 251.73l-58.42-141.56h-37.46l64 154.75c5.23 12.85 17.77 21.31 31.65 21.31s26.42-8.44 31.65-21.27l64.4-154.79h-37.46zm24.92 215.67L446 216.58l-14.56-34.77-116.58 119.56c-9.71 9.96-12.54 24.83-7.15 37.65 5.29 12.73 17.79 21.08 31.58 21.08l.42.06L506 359.75l-14.56-34.77-152.15.853h-.042zM66 216.5l14.56-34.77 116.58 119.56a34.59 34.59 0 17.15 37.65C199 351.67 186.5 360.02 172.71 360.02l-166.67-.375-.42.04 14.56-34.77 152.15.875L66 216.5z'
|
||||
fill='#5019c5'
|
||||
d='M14.8 5l-2.801 6.795L9.195 5H7.397l3.072 7.428a1.64 1.64 0 003.038.002L16.598 5H14.8zm1.196 10.352l5.124-5.244-.699-1.669-5.596 5.739a1.664 1.664 0 00-.343 1.807 1.642 1.642 0 001.516 1.012L16 17l8-.02-.699-1.669-7.303.041h-.002zM2.88 10.104l.699-1.669 5.596 5.739c.468.479.603 1.189.343 1.807a1.643 1.643 0 01-1.516 1.012l-8-.018-.002.002.699-1.669 7.303.042-5.122-5.246z'
|
||||
fill='#5019C5'
|
||||
/>
|
||||
</svg>
|
||||
)
|
||||
|
||||
@@ -31,6 +31,7 @@ import {
|
||||
CirclebackIcon,
|
||||
ClayIcon,
|
||||
ClerkIcon,
|
||||
ClickHouseIcon,
|
||||
CloudFormationIcon,
|
||||
CloudflareIcon,
|
||||
CloudWatchIcon,
|
||||
@@ -243,6 +244,7 @@ export const blockTypeToIconMap: Record<string, IconComponent> = {
|
||||
circleback: CirclebackIcon,
|
||||
clay: ClayIcon,
|
||||
clerk: ClerkIcon,
|
||||
clickhouse: ClickHouseIcon,
|
||||
cloudflare: CloudflareIcon,
|
||||
cloudformation: CloudFormationIcon,
|
||||
cloudwatch: CloudWatchIcon,
|
||||
|
||||
@@ -0,0 +1,559 @@
|
||||
---
|
||||
title: ClickHouse
|
||||
description: Connect to a ClickHouse database
|
||||
---
|
||||
|
||||
import { BlockInfoCard } from "@/components/ui/block-info-card"
|
||||
|
||||
<BlockInfoCard
|
||||
type="clickhouse"
|
||||
color="#f9ff69"
|
||||
/>
|
||||
|
||||
{/* MANUAL-CONTENT-START:intro */}
|
||||
[ClickHouse](https://clickhouse.com) is an open-source, column-oriented database management system for online analytical processing (OLAP). It is built for speed at scale — running aggregations and analytical queries over billions of rows in real time.
|
||||
|
||||
The ClickHouse block connects to any ClickHouse deployment (ClickHouse Cloud or self-hosted) over the [HTTP interface](https://clickhouse.com/docs/interfaces/http). Use it to run analytical queries, stream rows into tables, manage schemas, inspect system state, and execute arbitrary SQL — all from within a workflow.
|
||||
|
||||
**Connection details**
|
||||
|
||||
- **Host** — your ClickHouse hostname (e.g. `your-instance.clickhouse.cloud` or your server address).
|
||||
- **Port** — the HTTP interface port. Use `8443` for HTTPS (ClickHouse Cloud) or `8123` for plain HTTP (self-hosted).
|
||||
- **Database** / **Username** — default to `default` if not specified.
|
||||
- **Password** — optional for unauthenticated local instances.
|
||||
- **Use HTTPS** — keep enabled for any remote or Cloud instance.
|
||||
|
||||
**Things to know**
|
||||
|
||||
- `UPDATE` and `DELETE` are implemented as ClickHouse [mutations](https://clickhouse.com/docs/sql-reference/statements/alter/update) (`ALTER TABLE ... UPDATE/DELETE`). Mutations run **asynchronously** in the background, so the affected row count is not returned immediately.
|
||||
- ClickHouse is optimized for bulk inserts. Prefer batching many rows per insert over many single-row inserts.
|
||||
- The connection host is validated to block private/internal addresses, so the block cannot reach `localhost` or internal-only hosts.
|
||||
{/* MANUAL-CONTENT-END */}
|
||||
|
||||
|
||||
## Usage Instructions
|
||||
|
||||
Integrate ClickHouse into the workflow. Query and insert data, manage databases and tables, inspect schemas, monitor mutations and running queries, manage partitions, and execute raw SQL over the ClickHouse HTTP interface.
|
||||
|
||||
|
||||
|
||||
## Tools
|
||||
|
||||
### `clickhouse_query`
|
||||
|
||||
Execute a SELECT query on a ClickHouse database
|
||||
|
||||
#### Input
|
||||
|
||||
| Parameter | Type | Required | Description |
|
||||
| --------- | ---- | -------- | ----------- |
|
||||
| `host` | string | Yes | ClickHouse server hostname \(e.g., your-instance.clickhouse.cloud\) |
|
||||
| `port` | number | Yes | ClickHouse HTTP interface port \(8443 for HTTPS, 8123 for HTTP\) |
|
||||
| `database` | string | Yes | Database name to connect to |
|
||||
| `username` | string | Yes | ClickHouse username |
|
||||
| `password` | string | No | ClickHouse password |
|
||||
| `secure` | boolean | No | Use a secure HTTPS connection \(default: true\) |
|
||||
| `query` | string | Yes | SQL SELECT query to execute |
|
||||
|
||||
#### Output
|
||||
|
||||
| Parameter | Type | Description |
|
||||
| --------- | ---- | ----------- |
|
||||
| `message` | string | Operation status message |
|
||||
| `rows` | array | Array of rows returned from the query |
|
||||
| `rowCount` | number | Number of rows returned |
|
||||
|
||||
### `clickhouse_execute`
|
||||
|
||||
Execute raw SQL (DDL, mutations, or queries) on a ClickHouse database
|
||||
|
||||
#### Input
|
||||
|
||||
| Parameter | Type | Required | Description |
|
||||
| --------- | ---- | -------- | ----------- |
|
||||
| `host` | string | Yes | ClickHouse server hostname \(e.g., your-instance.clickhouse.cloud\) |
|
||||
| `port` | number | Yes | ClickHouse HTTP interface port \(8443 for HTTPS, 8123 for HTTP\) |
|
||||
| `database` | string | Yes | Database name to connect to |
|
||||
| `username` | string | Yes | ClickHouse username |
|
||||
| `password` | string | No | ClickHouse password |
|
||||
| `secure` | boolean | No | Use a secure HTTPS connection \(default: true\) |
|
||||
| `query` | string | Yes | Raw SQL statement to execute |
|
||||
|
||||
#### Output
|
||||
|
||||
| Parameter | Type | Description |
|
||||
| --------- | ---- | ----------- |
|
||||
| `message` | string | Operation status message |
|
||||
| `rows` | array | Array of rows returned from the statement |
|
||||
| `rowCount` | number | Number of rows returned or affected |
|
||||
|
||||
### `clickhouse_insert`
|
||||
|
||||
Insert a row into a ClickHouse table
|
||||
|
||||
#### Input
|
||||
|
||||
| Parameter | Type | Required | Description |
|
||||
| --------- | ---- | -------- | ----------- |
|
||||
| `host` | string | Yes | ClickHouse server hostname \(e.g., your-instance.clickhouse.cloud\) |
|
||||
| `port` | number | Yes | ClickHouse HTTP interface port \(8443 for HTTPS, 8123 for HTTP\) |
|
||||
| `database` | string | Yes | Database name to connect to |
|
||||
| `username` | string | Yes | ClickHouse username |
|
||||
| `password` | string | No | ClickHouse password |
|
||||
| `secure` | boolean | No | Use a secure HTTPS connection \(default: true\) |
|
||||
| `table` | string | Yes | Table name to insert data into |
|
||||
| `data` | object | Yes | Data object to insert \(key-value pairs mapping column names to values\) |
|
||||
|
||||
#### Output
|
||||
|
||||
| Parameter | Type | Description |
|
||||
| --------- | ---- | ----------- |
|
||||
| `message` | string | Operation status message |
|
||||
| `rows` | array | Inserted rows \(empty for ClickHouse inserts\) |
|
||||
| `rowCount` | number | Number of rows inserted |
|
||||
|
||||
### `clickhouse_insert_rows`
|
||||
|
||||
#### Input
|
||||
|
||||
| Parameter | Type | Required | Description |
|
||||
| --------- | ---- | -------- | ----------- |
|
||||
|
||||
#### Output
|
||||
|
||||
| Parameter | Type | Description |
|
||||
| --------- | ---- | ----------- |
|
||||
| `message` | string | Success or error message describing the operation outcome |
|
||||
| `rows` | array | Array of rows returned from the operation |
|
||||
| `rowCount` | number | Number of rows returned or affected by the operation |
|
||||
| `count` | number | Row count \(count rows operation\) |
|
||||
| `ddl` | string | CREATE TABLE statement \(show create table operation\) |
|
||||
| `tables` | array | Array of table schemas with columns and engines \(introspect operation\) |
|
||||
|
||||
### `clickhouse_update`
|
||||
|
||||
Update rows in a ClickHouse table via an ALTER TABLE ... UPDATE mutation
|
||||
|
||||
#### Input
|
||||
|
||||
| Parameter | Type | Required | Description |
|
||||
| --------- | ---- | -------- | ----------- |
|
||||
| `host` | string | Yes | ClickHouse server hostname \(e.g., your-instance.clickhouse.cloud\) |
|
||||
| `port` | number | Yes | ClickHouse HTTP interface port \(8443 for HTTPS, 8123 for HTTP\) |
|
||||
| `database` | string | Yes | Database name to connect to |
|
||||
| `username` | string | Yes | ClickHouse username |
|
||||
| `password` | string | No | ClickHouse password |
|
||||
| `secure` | boolean | No | Use a secure HTTPS connection \(default: true\) |
|
||||
| `table` | string | Yes | Table name to update data in |
|
||||
| `data` | object | Yes | Data object with fields to update \(key-value pairs\) |
|
||||
| `where` | string | Yes | WHERE clause condition \(without the WHERE keyword\) |
|
||||
|
||||
#### Output
|
||||
|
||||
| Parameter | Type | Description |
|
||||
| --------- | ---- | ----------- |
|
||||
| `message` | string | Operation status message |
|
||||
| `rows` | array | Updated rows \(empty for ClickHouse mutations\) |
|
||||
| `rowCount` | number | Number of rows written by the mutation |
|
||||
|
||||
### `clickhouse_delete`
|
||||
|
||||
Delete rows from a ClickHouse table via an ALTER TABLE ... DELETE mutation
|
||||
|
||||
#### Input
|
||||
|
||||
| Parameter | Type | Required | Description |
|
||||
| --------- | ---- | -------- | ----------- |
|
||||
| `host` | string | Yes | ClickHouse server hostname \(e.g., your-instance.clickhouse.cloud\) |
|
||||
| `port` | number | Yes | ClickHouse HTTP interface port \(8443 for HTTPS, 8123 for HTTP\) |
|
||||
| `database` | string | Yes | Database name to connect to |
|
||||
| `username` | string | Yes | ClickHouse username |
|
||||
| `password` | string | No | ClickHouse password |
|
||||
| `secure` | boolean | No | Use a secure HTTPS connection \(default: true\) |
|
||||
| `table` | string | Yes | Table name to delete data from |
|
||||
| `where` | string | Yes | WHERE clause condition \(without the WHERE keyword\) |
|
||||
|
||||
#### Output
|
||||
|
||||
| Parameter | Type | Description |
|
||||
| --------- | ---- | ----------- |
|
||||
| `message` | string | Operation status message |
|
||||
| `rows` | array | Deleted rows \(empty for ClickHouse mutations\) |
|
||||
| `rowCount` | number | Number of rows affected by the mutation |
|
||||
|
||||
### `clickhouse_list_databases`
|
||||
|
||||
#### Input
|
||||
|
||||
| Parameter | Type | Required | Description |
|
||||
| --------- | ---- | -------- | ----------- |
|
||||
|
||||
#### Output
|
||||
|
||||
| Parameter | Type | Description |
|
||||
| --------- | ---- | ----------- |
|
||||
| `message` | string | Success or error message describing the operation outcome |
|
||||
| `rows` | array | Array of rows returned from the operation |
|
||||
| `rowCount` | number | Number of rows returned or affected by the operation |
|
||||
| `count` | number | Row count \(count rows operation\) |
|
||||
| `ddl` | string | CREATE TABLE statement \(show create table operation\) |
|
||||
| `tables` | array | Array of table schemas with columns and engines \(introspect operation\) |
|
||||
|
||||
### `clickhouse_list_tables`
|
||||
|
||||
#### Input
|
||||
|
||||
| Parameter | Type | Required | Description |
|
||||
| --------- | ---- | -------- | ----------- |
|
||||
|
||||
#### Output
|
||||
|
||||
| Parameter | Type | Description |
|
||||
| --------- | ---- | ----------- |
|
||||
| `message` | string | Success or error message describing the operation outcome |
|
||||
| `rows` | array | Array of rows returned from the operation |
|
||||
| `rowCount` | number | Number of rows returned or affected by the operation |
|
||||
| `count` | number | Row count \(count rows operation\) |
|
||||
| `ddl` | string | CREATE TABLE statement \(show create table operation\) |
|
||||
| `tables` | array | Array of table schemas with columns and engines \(introspect operation\) |
|
||||
|
||||
### `clickhouse_describe_table`
|
||||
|
||||
#### Input
|
||||
|
||||
| Parameter | Type | Required | Description |
|
||||
| --------- | ---- | -------- | ----------- |
|
||||
|
||||
#### Output
|
||||
|
||||
| Parameter | Type | Description |
|
||||
| --------- | ---- | ----------- |
|
||||
| `message` | string | Success or error message describing the operation outcome |
|
||||
| `rows` | array | Array of rows returned from the operation |
|
||||
| `rowCount` | number | Number of rows returned or affected by the operation |
|
||||
| `count` | number | Row count \(count rows operation\) |
|
||||
| `ddl` | string | CREATE TABLE statement \(show create table operation\) |
|
||||
| `tables` | array | Array of table schemas with columns and engines \(introspect operation\) |
|
||||
|
||||
### `clickhouse_show_create_table`
|
||||
|
||||
#### Input
|
||||
|
||||
| Parameter | Type | Required | Description |
|
||||
| --------- | ---- | -------- | ----------- |
|
||||
|
||||
#### Output
|
||||
|
||||
| Parameter | Type | Description |
|
||||
| --------- | ---- | ----------- |
|
||||
| `message` | string | Success or error message describing the operation outcome |
|
||||
| `rows` | array | Array of rows returned from the operation |
|
||||
| `rowCount` | number | Number of rows returned or affected by the operation |
|
||||
| `count` | number | Row count \(count rows operation\) |
|
||||
| `ddl` | string | CREATE TABLE statement \(show create table operation\) |
|
||||
| `tables` | array | Array of table schemas with columns and engines \(introspect operation\) |
|
||||
|
||||
### `clickhouse_count_rows`
|
||||
|
||||
#### Input
|
||||
|
||||
| Parameter | Type | Required | Description |
|
||||
| --------- | ---- | -------- | ----------- |
|
||||
|
||||
#### Output
|
||||
|
||||
| Parameter | Type | Description |
|
||||
| --------- | ---- | ----------- |
|
||||
| `message` | string | Success or error message describing the operation outcome |
|
||||
| `rows` | array | Array of rows returned from the operation |
|
||||
| `rowCount` | number | Number of rows returned or affected by the operation |
|
||||
| `count` | number | Row count \(count rows operation\) |
|
||||
| `ddl` | string | CREATE TABLE statement \(show create table operation\) |
|
||||
| `tables` | array | Array of table schemas with columns and engines \(introspect operation\) |
|
||||
|
||||
### `clickhouse_introspect`
|
||||
|
||||
Introspect a ClickHouse database to retrieve table structures, columns, and engines
|
||||
|
||||
#### Input
|
||||
|
||||
| Parameter | Type | Required | Description |
|
||||
| --------- | ---- | -------- | ----------- |
|
||||
| `host` | string | Yes | ClickHouse server hostname \(e.g., your-instance.clickhouse.cloud\) |
|
||||
| `port` | number | Yes | ClickHouse HTTP interface port \(8443 for HTTPS, 8123 for HTTP\) |
|
||||
| `database` | string | Yes | Database name to introspect |
|
||||
| `username` | string | Yes | ClickHouse username |
|
||||
| `password` | string | No | ClickHouse password |
|
||||
| `secure` | boolean | No | Use a secure HTTPS connection \(default: true\) |
|
||||
|
||||
#### Output
|
||||
|
||||
| Parameter | Type | Description |
|
||||
| --------- | ---- | ----------- |
|
||||
| `message` | string | Operation status message |
|
||||
| `tables` | array | Array of table schemas with columns and engines |
|
||||
| ↳ `name` | string | Table name |
|
||||
| ↳ `database` | string | Database the table belongs to |
|
||||
| ↳ `engine` | string | Table engine \(e.g., MergeTree, Log\) |
|
||||
| ↳ `totalRows` | number | Approximate total number of rows in the table |
|
||||
| ↳ `columns` | array | Table columns |
|
||||
| ↳ `name` | string | Column name |
|
||||
| ↳ `type` | string | ClickHouse data type \(e.g., UInt32, String, DateTime\) |
|
||||
| ↳ `defaultKind` | string | Kind of default expression \(DEFAULT, MATERIALIZED, ALIAS\) |
|
||||
| ↳ `defaultExpression` | string | Default value expression for the column |
|
||||
| ↳ `isInPrimaryKey` | boolean | Whether the column is part of the primary key |
|
||||
| ↳ `isInSortingKey` | boolean | Whether the column is part of the sorting key |
|
||||
|
||||
### `clickhouse_create_database`
|
||||
|
||||
#### Input
|
||||
|
||||
| Parameter | Type | Required | Description |
|
||||
| --------- | ---- | -------- | ----------- |
|
||||
|
||||
#### Output
|
||||
|
||||
| Parameter | Type | Description |
|
||||
| --------- | ---- | ----------- |
|
||||
| `message` | string | Success or error message describing the operation outcome |
|
||||
| `rows` | array | Array of rows returned from the operation |
|
||||
| `rowCount` | number | Number of rows returned or affected by the operation |
|
||||
| `count` | number | Row count \(count rows operation\) |
|
||||
| `ddl` | string | CREATE TABLE statement \(show create table operation\) |
|
||||
| `tables` | array | Array of table schemas with columns and engines \(introspect operation\) |
|
||||
|
||||
### `clickhouse_drop_database`
|
||||
|
||||
#### Input
|
||||
|
||||
| Parameter | Type | Required | Description |
|
||||
| --------- | ---- | -------- | ----------- |
|
||||
|
||||
#### Output
|
||||
|
||||
| Parameter | Type | Description |
|
||||
| --------- | ---- | ----------- |
|
||||
| `message` | string | Success or error message describing the operation outcome |
|
||||
| `rows` | array | Array of rows returned from the operation |
|
||||
| `rowCount` | number | Number of rows returned or affected by the operation |
|
||||
| `count` | number | Row count \(count rows operation\) |
|
||||
| `ddl` | string | CREATE TABLE statement \(show create table operation\) |
|
||||
| `tables` | array | Array of table schemas with columns and engines \(introspect operation\) |
|
||||
|
||||
### `clickhouse_create_table`
|
||||
|
||||
#### Input
|
||||
|
||||
| Parameter | Type | Required | Description |
|
||||
| --------- | ---- | -------- | ----------- |
|
||||
|
||||
#### Output
|
||||
|
||||
| Parameter | Type | Description |
|
||||
| --------- | ---- | ----------- |
|
||||
| `message` | string | Success or error message describing the operation outcome |
|
||||
| `rows` | array | Array of rows returned from the operation |
|
||||
| `rowCount` | number | Number of rows returned or affected by the operation |
|
||||
| `count` | number | Row count \(count rows operation\) |
|
||||
| `ddl` | string | CREATE TABLE statement \(show create table operation\) |
|
||||
| `tables` | array | Array of table schemas with columns and engines \(introspect operation\) |
|
||||
|
||||
### `clickhouse_drop_table`
|
||||
|
||||
#### Input
|
||||
|
||||
| Parameter | Type | Required | Description |
|
||||
| --------- | ---- | -------- | ----------- |
|
||||
|
||||
#### Output
|
||||
|
||||
| Parameter | Type | Description |
|
||||
| --------- | ---- | ----------- |
|
||||
| `message` | string | Success or error message describing the operation outcome |
|
||||
| `rows` | array | Array of rows returned from the operation |
|
||||
| `rowCount` | number | Number of rows returned or affected by the operation |
|
||||
| `count` | number | Row count \(count rows operation\) |
|
||||
| `ddl` | string | CREATE TABLE statement \(show create table operation\) |
|
||||
| `tables` | array | Array of table schemas with columns and engines \(introspect operation\) |
|
||||
|
||||
### `clickhouse_truncate_table`
|
||||
|
||||
#### Input
|
||||
|
||||
| Parameter | Type | Required | Description |
|
||||
| --------- | ---- | -------- | ----------- |
|
||||
|
||||
#### Output
|
||||
|
||||
| Parameter | Type | Description |
|
||||
| --------- | ---- | ----------- |
|
||||
| `message` | string | Success or error message describing the operation outcome |
|
||||
| `rows` | array | Array of rows returned from the operation |
|
||||
| `rowCount` | number | Number of rows returned or affected by the operation |
|
||||
| `count` | number | Row count \(count rows operation\) |
|
||||
| `ddl` | string | CREATE TABLE statement \(show create table operation\) |
|
||||
| `tables` | array | Array of table schemas with columns and engines \(introspect operation\) |
|
||||
|
||||
### `clickhouse_rename_table`
|
||||
|
||||
#### Input
|
||||
|
||||
| Parameter | Type | Required | Description |
|
||||
| --------- | ---- | -------- | ----------- |
|
||||
|
||||
#### Output
|
||||
|
||||
| Parameter | Type | Description |
|
||||
| --------- | ---- | ----------- |
|
||||
| `message` | string | Success or error message describing the operation outcome |
|
||||
| `rows` | array | Array of rows returned from the operation |
|
||||
| `rowCount` | number | Number of rows returned or affected by the operation |
|
||||
| `count` | number | Row count \(count rows operation\) |
|
||||
| `ddl` | string | CREATE TABLE statement \(show create table operation\) |
|
||||
| `tables` | array | Array of table schemas with columns and engines \(introspect operation\) |
|
||||
|
||||
### `clickhouse_optimize_table`
|
||||
|
||||
#### Input
|
||||
|
||||
| Parameter | Type | Required | Description |
|
||||
| --------- | ---- | -------- | ----------- |
|
||||
|
||||
#### Output
|
||||
|
||||
| Parameter | Type | Description |
|
||||
| --------- | ---- | ----------- |
|
||||
| `message` | string | Success or error message describing the operation outcome |
|
||||
| `rows` | array | Array of rows returned from the operation |
|
||||
| `rowCount` | number | Number of rows returned or affected by the operation |
|
||||
| `count` | number | Row count \(count rows operation\) |
|
||||
| `ddl` | string | CREATE TABLE statement \(show create table operation\) |
|
||||
| `tables` | array | Array of table schemas with columns and engines \(introspect operation\) |
|
||||
|
||||
### `clickhouse_list_partitions`
|
||||
|
||||
#### Input
|
||||
|
||||
| Parameter | Type | Required | Description |
|
||||
| --------- | ---- | -------- | ----------- |
|
||||
|
||||
#### Output
|
||||
|
||||
| Parameter | Type | Description |
|
||||
| --------- | ---- | ----------- |
|
||||
| `message` | string | Success or error message describing the operation outcome |
|
||||
| `rows` | array | Array of rows returned from the operation |
|
||||
| `rowCount` | number | Number of rows returned or affected by the operation |
|
||||
| `count` | number | Row count \(count rows operation\) |
|
||||
| `ddl` | string | CREATE TABLE statement \(show create table operation\) |
|
||||
| `tables` | array | Array of table schemas with columns and engines \(introspect operation\) |
|
||||
|
||||
### `clickhouse_drop_partition`
|
||||
|
||||
#### Input
|
||||
|
||||
| Parameter | Type | Required | Description |
|
||||
| --------- | ---- | -------- | ----------- |
|
||||
|
||||
#### Output
|
||||
|
||||
| Parameter | Type | Description |
|
||||
| --------- | ---- | ----------- |
|
||||
| `message` | string | Success or error message describing the operation outcome |
|
||||
| `rows` | array | Array of rows returned from the operation |
|
||||
| `rowCount` | number | Number of rows returned or affected by the operation |
|
||||
| `count` | number | Row count \(count rows operation\) |
|
||||
| `ddl` | string | CREATE TABLE statement \(show create table operation\) |
|
||||
| `tables` | array | Array of table schemas with columns and engines \(introspect operation\) |
|
||||
|
||||
### `clickhouse_list_mutations`
|
||||
|
||||
#### Input
|
||||
|
||||
| Parameter | Type | Required | Description |
|
||||
| --------- | ---- | -------- | ----------- |
|
||||
|
||||
#### Output
|
||||
|
||||
| Parameter | Type | Description |
|
||||
| --------- | ---- | ----------- |
|
||||
| `message` | string | Success or error message describing the operation outcome |
|
||||
| `rows` | array | Array of rows returned from the operation |
|
||||
| `rowCount` | number | Number of rows returned or affected by the operation |
|
||||
| `count` | number | Row count \(count rows operation\) |
|
||||
| `ddl` | string | CREATE TABLE statement \(show create table operation\) |
|
||||
| `tables` | array | Array of table schemas with columns and engines \(introspect operation\) |
|
||||
|
||||
### `clickhouse_list_running_queries`
|
||||
|
||||
#### Input
|
||||
|
||||
| Parameter | Type | Required | Description |
|
||||
| --------- | ---- | -------- | ----------- |
|
||||
|
||||
#### Output
|
||||
|
||||
| Parameter | Type | Description |
|
||||
| --------- | ---- | ----------- |
|
||||
| `message` | string | Success or error message describing the operation outcome |
|
||||
| `rows` | array | Array of rows returned from the operation |
|
||||
| `rowCount` | number | Number of rows returned or affected by the operation |
|
||||
| `count` | number | Row count \(count rows operation\) |
|
||||
| `ddl` | string | CREATE TABLE statement \(show create table operation\) |
|
||||
| `tables` | array | Array of table schemas with columns and engines \(introspect operation\) |
|
||||
|
||||
### `clickhouse_kill_query`
|
||||
|
||||
#### Input
|
||||
|
||||
| Parameter | Type | Required | Description |
|
||||
| --------- | ---- | -------- | ----------- |
|
||||
|
||||
#### Output
|
||||
|
||||
| Parameter | Type | Description |
|
||||
| --------- | ---- | ----------- |
|
||||
| `message` | string | Success or error message describing the operation outcome |
|
||||
| `rows` | array | Array of rows returned from the operation |
|
||||
| `rowCount` | number | Number of rows returned or affected by the operation |
|
||||
| `count` | number | Row count \(count rows operation\) |
|
||||
| `ddl` | string | CREATE TABLE statement \(show create table operation\) |
|
||||
| `tables` | array | Array of table schemas with columns and engines \(introspect operation\) |
|
||||
|
||||
### `clickhouse_table_stats`
|
||||
|
||||
#### Input
|
||||
|
||||
| Parameter | Type | Required | Description |
|
||||
| --------- | ---- | -------- | ----------- |
|
||||
|
||||
#### Output
|
||||
|
||||
| Parameter | Type | Description |
|
||||
| --------- | ---- | ----------- |
|
||||
| `message` | string | Success or error message describing the operation outcome |
|
||||
| `rows` | array | Array of rows returned from the operation |
|
||||
| `rowCount` | number | Number of rows returned or affected by the operation |
|
||||
| `count` | number | Row count \(count rows operation\) |
|
||||
| `ddl` | string | CREATE TABLE statement \(show create table operation\) |
|
||||
| `tables` | array | Array of table schemas with columns and engines \(introspect operation\) |
|
||||
|
||||
### `clickhouse_list_clusters`
|
||||
|
||||
#### Input
|
||||
|
||||
| Parameter | Type | Required | Description |
|
||||
| --------- | ---- | -------- | ----------- |
|
||||
|
||||
#### Output
|
||||
|
||||
| Parameter | Type | Description |
|
||||
| --------- | ---- | ----------- |
|
||||
| `message` | string | Success or error message describing the operation outcome |
|
||||
| `rows` | array | Array of rows returned from the operation |
|
||||
| `rowCount` | number | Number of rows returned or affected by the operation |
|
||||
| `count` | number | Row count \(count rows operation\) |
|
||||
| `ddl` | string | CREATE TABLE statement \(show create table operation\) |
|
||||
| `tables` | array | Array of table schemas with columns and engines \(introspect operation\) |
|
||||
|
||||
|
||||
@@ -73,8 +73,15 @@ Get the status and details of a Dagster run by its ID.
|
||||
| `runId` | string | Run ID |
|
||||
| `jobName` | string | Name of the job this run belongs to |
|
||||
| `status` | string | Run status \(QUEUED, NOT_STARTED, STARTING, MANAGED, STARTED, SUCCESS, FAILURE, CANCELING, CANCELED\) |
|
||||
| `mode` | string | Execution mode of the run |
|
||||
| `startTime` | number | Run start time as Unix timestamp |
|
||||
| `endTime` | number | Run end time as Unix timestamp |
|
||||
| `creationTime` | number | Time the run was created as Unix timestamp |
|
||||
| `updateTime` | number | Time the run was last updated as Unix timestamp |
|
||||
| `parentRunId` | string | ID of the immediate parent run \(for re-executions\) |
|
||||
| `rootRunId` | string | ID of the root run in the re-execution group |
|
||||
| `canTerminate` | boolean | Whether the run can currently be terminated |
|
||||
| `assetSelection` | json | Asset keys targeted by the run, as slash-joined strings |
|
||||
| `runConfigYaml` | string | Run configuration as YAML |
|
||||
| `tags` | json | Run tags as array of \{key, value\} objects |
|
||||
|
||||
@@ -108,7 +115,7 @@ Fetch execution event logs for a Dagster run.
|
||||
|
||||
### `dagster_list_runs`
|
||||
|
||||
List recent Dagster runs, optionally filtered by job name.
|
||||
List Dagster runs with optional filters by job name, status, and creation-time range, plus cursor pagination.
|
||||
|
||||
#### Input
|
||||
|
||||
@@ -118,6 +125,9 @@ List recent Dagster runs, optionally filtered by job name.
|
||||
| `apiKey` | string | No | Dagster+ API token \(leave blank for OSS / self-hosted\) |
|
||||
| `jobName` | string | No | Filter runs by job name \(optional\) |
|
||||
| `statuses` | string | No | Comma-separated run statuses to filter by, e.g. "SUCCESS,FAILURE" \(optional\) |
|
||||
| `createdAfter` | number | No | Only return runs created at or after this Unix timestamp in seconds \(optional\) |
|
||||
| `createdBefore` | number | No | Only return runs created at or before this Unix timestamp in seconds \(optional\) |
|
||||
| `cursor` | string | No | Run ID to page after, from a previous response cursor \(optional\) |
|
||||
| `limit` | number | No | Maximum number of runs to return \(default 20\) |
|
||||
|
||||
#### Output
|
||||
@@ -131,6 +141,8 @@ List recent Dagster runs, optionally filtered by job name.
|
||||
| ↳ `tags` | json | Run tags as array of \{key, value\} objects |
|
||||
| ↳ `startTime` | number | Start time as Unix timestamp |
|
||||
| ↳ `endTime` | number | End time as Unix timestamp |
|
||||
| `cursor` | string | Run ID of the last returned run — pass as cursor to fetch the next page |
|
||||
| `hasMore` | boolean | Whether more runs are likely available beyond this page |
|
||||
|
||||
### `dagster_list_jobs`
|
||||
|
||||
@@ -295,7 +307,7 @@ List all sensors in a Dagster repository, optionally filtered by status.
|
||||
| --------- | ---- | ----------- |
|
||||
| `sensors` | json | Array of sensors \(name, sensorType, status, id, description\) |
|
||||
| ↳ `name` | string | Sensor name |
|
||||
| ↳ `sensorType` | string | Sensor type \(ASSET, AUTO_MATERIALIZE, FRESHNESS_POLICY, MULTI_ASSET, RUN_STATUS, STANDARD\) |
|
||||
| ↳ `sensorType` | string | Sensor type \(ASSET, AUTO_MATERIALIZE, FRESHNESS_POLICY, MULTI_ASSET, RUN_STATUS, STANDARD, UNKNOWN\) |
|
||||
| ↳ `status` | string | Sensor status: RUNNING or STOPPED |
|
||||
| ↳ `id` | string | Instigator state ID — use this to start or stop the sensor |
|
||||
| ↳ `description` | string | Human-readable sensor description |
|
||||
@@ -340,4 +352,120 @@ Disable (stop) a running sensor in Dagster.
|
||||
| `id` | string | Instigator state ID of the sensor |
|
||||
| `status` | string | Updated sensor status \(RUNNING or STOPPED\) |
|
||||
|
||||
### `dagster_list_assets`
|
||||
|
||||
List assets tracked by a Dagster instance, optionally filtered by key prefix.
|
||||
|
||||
#### Input
|
||||
|
||||
| Parameter | Type | Required | Description |
|
||||
| --------- | ---- | -------- | ----------- |
|
||||
| `host` | string | Yes | Dagster host URL \(e.g., https://myorg.dagster.cloud/prod or http://localhost:3001\) |
|
||||
| `apiKey` | string | No | Dagster+ API token \(leave blank for OSS / self-hosted\) |
|
||||
| `prefix` | string | No | Slash-delimited asset key prefix to filter by, e.g. "raw" or "raw/events" \(optional\) |
|
||||
| `cursor` | string | No | Asset key cursor from a previous response, for pagination \(optional\) |
|
||||
| `limit` | number | No | Maximum number of assets to return \(optional\) |
|
||||
|
||||
#### Output
|
||||
|
||||
| Parameter | Type | Description |
|
||||
| --------- | ---- | ----------- |
|
||||
| `assets` | json | Array of assets \(assetKey, path\) |
|
||||
| ↳ `assetKey` | string | Slash-joined asset key |
|
||||
| ↳ `path` | json | Asset key path segments |
|
||||
| `cursor` | string | Cursor to pass on the next call to fetch more assets |
|
||||
| `hasMore` | boolean | Whether more assets are likely available beyond this page |
|
||||
|
||||
### `dagster_get_asset`
|
||||
|
||||
Get an asset definition and its latest materialization by asset key.
|
||||
|
||||
#### Input
|
||||
|
||||
| Parameter | Type | Required | Description |
|
||||
| --------- | ---- | -------- | ----------- |
|
||||
| `host` | string | Yes | Dagster host URL \(e.g., https://myorg.dagster.cloud/prod or http://localhost:3001\) |
|
||||
| `apiKey` | string | No | Dagster+ API token \(leave blank for OSS / self-hosted\) |
|
||||
| `assetKey` | string | Yes | Slash-delimited asset key, e.g. "my_asset" or "raw/events" |
|
||||
|
||||
#### Output
|
||||
|
||||
| Parameter | Type | Description |
|
||||
| --------- | ---- | ----------- |
|
||||
| `assetKey` | string | Slash-joined asset key |
|
||||
| `path` | json | Asset key path segments |
|
||||
| `groupName` | string | Asset group the definition belongs to |
|
||||
| `description` | string | Asset description |
|
||||
| `jobNames` | json | Names of jobs that can materialize this asset |
|
||||
| `computeKind` | string | Compute kind tag \(e.g., python, dbt, spark\) |
|
||||
| `isPartitioned` | boolean | Whether the asset is partitioned |
|
||||
| `latestMaterialization` | json | Most recent materialization \(runId, timestamp, partition, stepKey\) |
|
||||
| ↳ `runId` | string | Run that produced the materialization |
|
||||
| ↳ `timestamp` | string | Materialization timestamp \(epoch ms string\) |
|
||||
| ↳ `partition` | string | Partition key, if partitioned |
|
||||
| ↳ `stepKey` | string | Step key that emitted it |
|
||||
|
||||
### `dagster_materialize_assets`
|
||||
|
||||
Materialize selected assets by launching their asset job with an asset selection.
|
||||
|
||||
#### Input
|
||||
|
||||
| Parameter | Type | Required | Description |
|
||||
| --------- | ---- | -------- | ----------- |
|
||||
| `host` | string | Yes | Dagster host URL \(e.g., https://myorg.dagster.cloud/prod or http://localhost:3001\) |
|
||||
| `apiKey` | string | No | Dagster+ API token \(leave blank for OSS / self-hosted\) |
|
||||
| `repositoryLocationName` | string | Yes | Repository location \(code location\) name |
|
||||
| `repositoryName` | string | Yes | Repository name within the code location |
|
||||
| `jobName` | string | Yes | Asset job that contains the assets, e.g. "__ASSET_JOB" or a named asset job |
|
||||
| `assetSelection` | string | Yes | Comma- or newline-separated asset keys to materialize, each slash-delimited \(e.g. "raw/events, summary"\) |
|
||||
| `tags` | string | No | Tags as a JSON array of \{key, value\} objects \(optional\) |
|
||||
|
||||
#### Output
|
||||
|
||||
| Parameter | Type | Description |
|
||||
| --------- | ---- | ----------- |
|
||||
| `runId` | string | The globally unique ID of the launched materialization run |
|
||||
|
||||
### `dagster_report_asset_materialization`
|
||||
|
||||
Report an external (runless) materialization or observation for an asset.
|
||||
|
||||
#### Input
|
||||
|
||||
| Parameter | Type | Required | Description |
|
||||
| --------- | ---- | -------- | ----------- |
|
||||
| `host` | string | Yes | Dagster host URL \(e.g., https://myorg.dagster.cloud/prod or http://localhost:3001\) |
|
||||
| `apiKey` | string | No | Dagster+ API token \(leave blank for OSS / self-hosted\) |
|
||||
| `assetKey` | string | Yes | Slash-delimited asset key to report against, e.g. "my_asset" or "raw/events" |
|
||||
| `eventType` | string | No | Event type to report: ASSET_MATERIALIZATION \(default\) or ASSET_OBSERVATION |
|
||||
| `partitionKeys` | string | No | Comma-separated partition keys to report against \(optional\) |
|
||||
| `description` | string | No | Human-readable description for the reported event \(optional\) |
|
||||
|
||||
#### Output
|
||||
|
||||
| Parameter | Type | Description |
|
||||
| --------- | ---- | ----------- |
|
||||
| `success` | boolean | Whether the event was reported successfully |
|
||||
| `assetKey` | string | Slash-joined asset key the event was reported against |
|
||||
|
||||
### `dagster_wipe_asset`
|
||||
|
||||
DESTRUCTIVE: permanently wipes ALL materialization history (every partition) for an asset. This cannot be undone.
|
||||
|
||||
#### Input
|
||||
|
||||
| Parameter | Type | Required | Description |
|
||||
| --------- | ---- | -------- | ----------- |
|
||||
| `host` | string | Yes | Dagster host URL \(e.g., https://myorg.dagster.cloud/prod or http://localhost:3001\) |
|
||||
| `apiKey` | string | No | Dagster+ API token \(leave blank for OSS / self-hosted\) |
|
||||
| `assetKey` | string | Yes | Slash-delimited asset key to wipe, e.g. "my_asset" or "raw/events" |
|
||||
|
||||
#### Output
|
||||
|
||||
| Parameter | Type | Description |
|
||||
| --------- | ---- | ----------- |
|
||||
| `success` | boolean | Whether the asset was wiped successfully |
|
||||
| `assetKey` | string | Slash-joined asset key that was wiped |
|
||||
|
||||
|
||||
|
||||
@@ -27,6 +27,7 @@
|
||||
"circleback",
|
||||
"clay",
|
||||
"clerk",
|
||||
"clickhouse",
|
||||
"cloudflare",
|
||||
"cloudformation",
|
||||
"cloudwatch",
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
---
|
||||
title: Tinybird
|
||||
description: Send events and query data with Tinybird
|
||||
description: Send events, query data, and manage Data Sources with Tinybird
|
||||
---
|
||||
|
||||
import { BlockInfoCard } from "@/components/ui/block-info-card"
|
||||
@@ -30,7 +30,7 @@ Connect Tinybird to your workflows today to accelerate data-driven features, aut
|
||||
|
||||
## Usage Instructions
|
||||
|
||||
Interact with Tinybird using the Events API to stream JSON or NDJSON events, or use the Query API to execute SQL queries against Pipes and Data Sources.
|
||||
Interact with Tinybird: stream JSON or NDJSON events with the Events API, run SQL with the Query API, call published Pipe API Endpoints by name with dynamic parameters, and manage Data Sources by appending from a URL, truncating, or deleting rows by condition.
|
||||
|
||||
|
||||
|
||||
@@ -77,7 +77,110 @@ Execute SQL queries against Tinybird Pipes and Data Sources using the Query API.
|
||||
| Parameter | Type | Description |
|
||||
| --------- | ---- | ----------- |
|
||||
| `data` | json | Query result data. For FORMAT JSON: array of objects. For other formats \(CSV, TSV, etc.\): raw text string. |
|
||||
| `meta` | array | Column metadata for the result set \(only available with FORMAT JSON\) |
|
||||
| ↳ `name` | string | Column name |
|
||||
| ↳ `type` | string | Column data type |
|
||||
| `rows` | number | Number of rows returned \(only available with FORMAT JSON\) |
|
||||
| `rows_before_limit_at_least` | number | Minimum number of rows there would be without a LIMIT clause \(only available with FORMAT JSON\) |
|
||||
| `statistics` | json | Query execution statistics - elapsed time, rows read, bytes read \(only available with FORMAT JSON\) |
|
||||
|
||||
### `tinybird_query_pipe`
|
||||
|
||||
Call a published Tinybird Pipe API Endpoint by name, passing dynamic parameters and receiving structured JSON results.
|
||||
|
||||
#### Input
|
||||
|
||||
| Parameter | Type | Required | Description |
|
||||
| --------- | ---- | -------- | ----------- |
|
||||
| `base_url` | string | Yes | Tinybird API base URL \(e.g., https://api.tinybird.co\) |
|
||||
| `pipe` | string | Yes | Name of the published Pipe API Endpoint to call. Example: "top_pages" |
|
||||
| `parameters` | json | No | Dynamic Pipe parameters as a JSON object, sent as query-string arguments. Example: \{"start_date": "2024-01-01", "limit": 10\} |
|
||||
| `q` | string | No | Optional SQL to run on top of the Pipe result. Use "_" to reference the Pipe. Example: "SELECT count\(\) FROM _" |
|
||||
| `token` | string | Yes | Tinybird API Token with PIPE:READ scope |
|
||||
|
||||
#### Output
|
||||
|
||||
| Parameter | Type | Description |
|
||||
| --------- | ---- | ----------- |
|
||||
| `data` | json | Pipe result data as an array of row objects |
|
||||
| `meta` | array | Column metadata for the result set |
|
||||
| ↳ `name` | string | Column name |
|
||||
| ↳ `type` | string | Column data type |
|
||||
| `rows` | number | Number of rows returned |
|
||||
| `rows_before_limit_at_least` | number | Minimum number of rows there would be without a LIMIT clause |
|
||||
| `statistics` | json | Query execution statistics - elapsed time, rows read, bytes read |
|
||||
| ↳ `elapsed` | number | Query execution time in seconds |
|
||||
| ↳ `rows_read` | number | Number of rows processed |
|
||||
| ↳ `bytes_read` | number | Number of bytes processed |
|
||||
|
||||
### `tinybird_append_datasource`
|
||||
|
||||
Append data to a Tinybird Data Source from a remote file URL (CSV, NDJSON, Parquet).
|
||||
|
||||
#### Input
|
||||
|
||||
| Parameter | Type | Required | Description |
|
||||
| --------- | ---- | -------- | ----------- |
|
||||
| `base_url` | string | Yes | Tinybird API base URL \(e.g., https://api.tinybird.co\) |
|
||||
| `datasource` | string | Yes | Name of the existing Data Source to append to. Example: "events_raw" |
|
||||
| `url` | string | Yes | Publicly accessible URL of the file to append. Example: "https://example.com/data.csv" |
|
||||
| `format` | string | No | Format of the source file: "csv" \(default\), "ndjson", or "parquet" |
|
||||
| `token` | string | Yes | Tinybird API Token with DATASOURCES:CREATE scope |
|
||||
|
||||
#### Output
|
||||
|
||||
| Parameter | Type | Description |
|
||||
| --------- | ---- | ----------- |
|
||||
| `id` | string | Identifier of the append operation |
|
||||
| `import_id` | string | Import identifier for the append job |
|
||||
| `job_id` | string | Job identifier used to poll import status |
|
||||
| `job_url` | string | URL to query the import job status |
|
||||
| `status` | string | Initial job status \(e.g., "waiting"\) |
|
||||
| `job` | json | Full import job details \(kind, id, status, created_at, datasource, ...\) |
|
||||
| `datasource` | json | Target Data Source metadata \(id, name, ...\) |
|
||||
|
||||
### `tinybird_truncate_datasource`
|
||||
|
||||
Delete all rows from a Tinybird Data Source.
|
||||
|
||||
#### Input
|
||||
|
||||
| Parameter | Type | Required | Description |
|
||||
| --------- | ---- | -------- | ----------- |
|
||||
| `base_url` | string | Yes | Tinybird API base URL \(e.g., https://api.tinybird.co\) |
|
||||
| `datasource` | string | Yes | Name of the Data Source to truncate. Example: "events_raw" |
|
||||
| `token` | string | Yes | Tinybird API Token with DATASOURCES:CREATE scope |
|
||||
|
||||
#### Output
|
||||
|
||||
| Parameter | Type | Description |
|
||||
| --------- | ---- | ----------- |
|
||||
| `truncated` | boolean | Whether the Data Source was truncated successfully |
|
||||
| `result` | json | Raw response body from the truncate endpoint, if any |
|
||||
|
||||
### `tinybird_delete_datasource_rows`
|
||||
|
||||
Delete rows from a Tinybird Data Source matching a SQL condition.
|
||||
|
||||
#### Input
|
||||
|
||||
| Parameter | Type | Required | Description |
|
||||
| --------- | ---- | -------- | ----------- |
|
||||
| `base_url` | string | Yes | Tinybird API base URL \(e.g., https://api.tinybird.co\) |
|
||||
| `datasource` | string | Yes | Name of the Data Source to delete rows from. Example: "events_raw" |
|
||||
| `delete_condition` | string | Yes | SQL WHERE-clause condition selecting the rows to delete. Example: "country = \'ES\'" or "event_date < \'2024-01-01\'" |
|
||||
| `dry_run` | boolean | No | When true, returns how many rows would be deleted without deleting them. Defaults to false. |
|
||||
| `token` | string | Yes | Tinybird API Token with DATASOURCES:CREATE scope |
|
||||
|
||||
#### Output
|
||||
|
||||
| Parameter | Type | Description |
|
||||
| --------- | ---- | ----------- |
|
||||
| `id` | string | Identifier of the delete operation |
|
||||
| `job_id` | string | Job identifier used to poll delete status |
|
||||
| `delete_id` | string | Deletion identifier |
|
||||
| `job_url` | string | URL to query the delete job status |
|
||||
| `status` | string | Current job status \(e.g., "waiting", "done"\) |
|
||||
| `job` | json | Full delete job details \(kind, id, status, delete_condition, rows_affected, ...\) |
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user