protos/ingestion/v1/transformations.proto.
Transformations explains the
definition itself and every function.
RPCs
ValidateTransform runs under the same 30-second timeout as
GetResourceColumns because it reads the resource’s columns from the source.
ListTransformFunctions
Returns every function in catalog order. Passlogical_type to get only the
functions that accept a column of that type in some argument. That is the same
acceptance the compiler applies, so a builder that offers those never proposes
a call the compiler rejects.
Each TransformFunction carries:
name, what a definition calls, withdisplay_nameanddescriptionfor a builder to showargs, each withname,display_name, the acceptedlogical_types(empty accepts any), and theis_column,is_literal,is_optional, andis_variadicflags. A variadic last argument may repeat any number of timesreturns, the logical type of the result, orreturns_inputwhen the result takes the shared type of the value argumentssame_type, set when every value argument must share one type and a literal widens to the column’s type- presentation hints.
operator_symbolmarks a binary function that can render infix,condition_operatormarks one that fits a row condition picker,condition_joinisandoror, andvariadic_add_labelnames the action that appends another argument
grammar_version, which a definition must declare,
and grammar_schema, the JSON schema a client can use to check a document’s
shape before sending it.
ValidateTransform
Takes asource_connection_id, a resource, and the transform as a JSON
object, the same object an edge carries. The server reads the resource’s
columns from the source connection and compiles the definition against them.
A definition that names other resources is accepted, and only the named
resource is compiled.
The response carries valid, issues, output_columns, and
expression_types. The last two come back on failure too.
issueslists every problem at once. Eachfieldis a path into the definition, such asresources["users"].steps[1].compute["email"].lower[0], andmessagesays what is wrong.output_columnsare the resource’s columns after the steps, in order, with name, logical type, nullability, and primary key flag. Steps that failed are skipped and the rest still apply, so a builder can offer the right columns after a broken step. When the document fails the grammar, these are the source columns.expression_typesgive the logical type of every sub-expression that compiled, keyed by the same paths. A literal that widened to a column’s type reports the widened type.
invalid_argument for
a missing resource or transform, not_found for the connection,
failed_precondition when its secrets cannot be resolved, and unimplemented
when the connector does not provide resource schemas.