Documentation
¶
Overview ¶
Package sources provides concrete enrichment Source adapters for the platform's built-in toolkits (Trino, DataHub). Each adapter is a thin shim that satisfies the enrichment.Source interface and delegates to a caller-supplied client function so the underlying SDK version stays a detail of platform startup, not of this package.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type DataHubGetEntityFunc ¶
DataHubGetEntityFunc resolves a DataHub entity by URN.
type DataHubGetGlossaryTermFunc ¶
DataHubGetGlossaryTermFunc resolves a DataHub glossary term by URN.
type DataHubSource ¶
type DataHubSource struct {
// contains filtered or unexported fields
}
DataHubSource exposes read-only DataHub lookups for enrichment rules. The underlying calls are passed in as functions so this package doesn't depend on a specific DataHub SDK version.
func NewDataHubSource ¶
func NewDataHubSource(getEntity DataHubGetEntityFunc, getGlossaryTerm DataHubGetGlossaryTermFunc) *DataHubSource
NewDataHubSource builds a DataHub-backed source. Either function may be nil — the corresponding operation will report unsupported at execute time. This lets a deployment opt-in to a subset of operations without having to provide a stub for the rest.
func (*DataHubSource) Execute ¶
Execute dispatches the requested operation. Recognized parameters:
get_entity { urn string }
get_glossary_term { urn string }
func (*DataHubSource) Name ¶
func (*DataHubSource) Name() string
Name returns the canonical source name "datahub".
func (*DataHubSource) Operations ¶
func (*DataHubSource) Operations() []string
Operations returns the read-only operation allowlist.
type TrinoQueryFunc ¶
TrinoQueryFunc executes a SQL query against a named Trino connection and returns the row set. Implementations are platform-side.
type TrinoSource ¶
type TrinoSource struct {
// contains filtered or unexported fields
}
TrinoSource exposes a single read-only "query" operation that runs a SQL template against a named Trino connection. The :name placeholders in the template are substituted with **escaped ANSI-SQL literals** derived from the binding values — single quotes are doubled, NULL is emitted for nil, ints/floats/bools are rendered as literals. This is not server-side parameter binding (the Trino Go client does not expose a parameterized exec path on our existing query interface); the escaping is sound for the supported value types but identifiers are not substitutable.
func NewTrinoSource ¶
func NewTrinoSource(exec TrinoQueryFunc) *TrinoSource
NewTrinoSource builds a Source backed by the given query function.
func (*TrinoSource) Execute ¶
Execute runs the requested operation. Recognized parameters for "query":
connection string required — name of a configured Trino connection sql_template string required — SQL with optional :name placeholders
Any additional parameters are treated as bindings and substituted into :<name> placeholders. Strings are single-quoted with embedded quotes doubled per ANSI SQL; numbers and bools are rendered as literals; nil becomes NULL. Other types are rejected.
func (*TrinoSource) Name ¶
func (*TrinoSource) Name() string
Name returns the canonical source name "trino".
func (*TrinoSource) Operations ¶
func (*TrinoSource) Operations() []string
Operations returns the read-only operation allowlist.