Documentation
¶
Index ¶
- func RenderTemplate(path string, overrides map[string]string) ([]byte, error)
- func SQLResultsCacheDir() string
- type ClickhouseSink
- type Conf
- type ConsoleSink
- type Error
- type ErrorPolicy
- type Handler
- type IcebergSink
- type KafkaSASL
- type KafkaSSL
- type KafkaSink
- type KafkaSource
- type OnError
- type Pipeline
- type SQLCommand
- type SQLCommandSink
- type SQLCommandSubstitution
- type Sink
- type SinkFormat
- type Source
- type TableManager
- type TableSQL
- type Tables
- type TumblingWindow
- type UDF
- type WebhookHMAC
- type WebhookSource
- type WebsocketSource
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func RenderTemplate ¶
RenderTemplate renders a config through Jinja2, the templating the config spec is written in: every SQLFLOW_-prefixed environment variable is in scope, plus the settings vars, plus explicit overrides.
func SQLResultsCacheDir ¶
func SQLResultsCacheDir() string
SQLResultsCacheDir mirrors sqlflow.settings.SQL_RESULTS_CACHE_DIR: where disk-backed handlers stage their batch and result files. It is the fallback for a handler that does not declare sql_results_cache_dir.
Types ¶
type ClickhouseSink ¶
type Conf ¶
type Conf struct {
Pipeline Pipeline `yaml:"pipeline"`
Tables *Tables `yaml:"tables,omitempty"`
UDFs []UDF `yaml:"udfs,omitempty"`
Commands []SQLCommand `yaml:"commands,omitempty"`
}
Conf
type ConsoleSink ¶
type ConsoleSink struct{}
type ErrorPolicy ¶
type ErrorPolicy string
const ( PolicyRaise ErrorPolicy = "RAISE" PolicyIgnore ErrorPolicy = "IGNORE" )
type Handler ¶
type Handler struct {
Type string `yaml:"type"`
SQL string `yaml:"sql"`
SQLResultsCacheDir string `yaml:"sql_results_cache_dir,omitempty"`
Table string `yaml:"table,omitempty"`
}
Handler
type IcebergSink ¶
type IcebergSink struct {
CatalogName string `yaml:"catalog_name"`
TableName string `yaml:"table_name"`
}
Various Sink Configs
type KafkaSASL ¶
type KafkaSASL struct {
Mechanism string `yaml:"mechanism"`
Username string `yaml:"username"`
Password string `yaml:"password"`
}
KafkaSASL configures SASL authentication for a Kafka connection.
type KafkaSSL ¶
type KafkaSSL struct {
CALocation string `yaml:"ca_location,omitempty"`
CertificateLocation string `yaml:"certificate_location,omitempty"`
KeyLocation string `yaml:"key_location,omitempty"`
KeyPassword string `yaml:"key_password,omitempty"`
EndpointIdentificationAlgorithm string `yaml:"endpoint_identification_algorithm,omitempty"`
}
KafkaSSL configures TLS material for a Kafka connection.
type KafkaSource ¶
type KafkaSource struct {
Brokers []string `yaml:"brokers"`
GroupID string `yaml:"group_id"`
AutoOffsetReset string `yaml:"auto_offset_reset"`
Topics []string `yaml:"topics"`
SecurityProtocol string `yaml:"security_protocol,omitempty"`
SSL *KafkaSSL `yaml:"ssl,omitempty"`
SASL *KafkaSASL `yaml:"sasl,omitempty"`
}
Source Types
type OnError ¶
OnError configures what happens to a message or batch that fails. The dlq block is a full sink definition, used when policy is DLQ.
type Pipeline ¶
type Pipeline struct {
Name string `yaml:"name,omitempty"`
Description string `yaml:"description,omitempty"`
Source Source `yaml:"source"`
Handler Handler `yaml:"handler"`
Sink Sink `yaml:"sink"`
BatchSize int `yaml:"batch_size,omitempty"`
FlushIntervalSeconds int `yaml:"flush_interval_seconds,omitempty"`
OnError *OnError `yaml:"on_error,omitempty"`
}
Pipeline
type SQLCommand ¶
SQL Command
type SQLCommandSink ¶
type SQLCommandSink struct {
SQL string `yaml:"sql"`
Substitutions []SQLCommandSubstitution `yaml:"substitutions,omitempty"`
}
type SQLCommandSubstitution ¶
type Sink ¶
type Sink struct {
Type string `yaml:"type"`
Format *SinkFormat `yaml:"format,omitempty"`
Kafka *KafkaSink `yaml:"kafka,omitempty"`
Console *ConsoleSink `yaml:"console,omitempty"`
SQLCommand *SQLCommandSink `yaml:"sqlcommand,omitempty"`
Iceberg *IcebergSink `yaml:"iceberg,omitempty"`
Clickhouse *ClickhouseSink `yaml:"clickhouse,omitempty"`
}
Unified Sink
type Source ¶
type Source struct {
Type string `yaml:"type"`
Kafka *KafkaSource `yaml:"kafka,omitempty"`
Websocket *WebsocketSource `yaml:"websocket,omitempty"`
Webhook *WebhookSource `yaml:"webhook,omitempty"`
Error *Error `yaml:"error,omitempty"`
}
Source
type TableManager ¶
type TableManager struct {
TumblingWindow *TumblingWindow `yaml:"tumbling_window"`
Sink Sink `yaml:"sink"`
}
Table Manager
type TableSQL ¶
type TableSQL struct {
Name string `yaml:"name"`
SQL string `yaml:"sql"`
Manager *TableManager `yaml:"manager,omitempty"`
}
SQL Tables
type TumblingWindow ¶
type TumblingWindow struct {
CollectSQL string `yaml:"collect_closed_windows_sql"`
DeleteSQL string `yaml:"delete_closed_windows_sql"`
PollIntervalSecs int `yaml:"poll_interval_seconds"`
}
Tumbling Window Manager
type UDF ¶
type UDF struct {
FunctionName string `yaml:"function_name"`
ImportPath string `yaml:"import_path"`
}
UDFs
type WebhookHMAC ¶
type WebhookHMAC struct {
Header string `yaml:"header"`
SigKey string `yaml:"sig_key"`
Secret string `yaml:"secret"`
}
WebhookHMAC configures signature validation of incoming webhook bodies. SigKey names the digest the signature header is prefixed with, e.g. "sha256" for GitHub's "X-Hub-Signature-256: sha256=<hex>".
type WebhookSource ¶
type WebhookSource struct {
SignatureType string `yaml:"signature_type,omitempty"`
HMAC *WebhookHMAC `yaml:"hmac,omitempty"`
}
type WebsocketSource ¶
type WebsocketSource struct {
URI string `yaml:"uri"`
}