Search documentation
karat

+

K

User Documentation ↗

transforms.api.FoundryInputParam

class transforms.api.FoundryInputParam(aliases, branch=None, type='foundry', description=None, properties=None, failure_strategy=None, stop_propagating=None, stop_requiring=None)

A base class for transforms input parameters. Not intended for direct use. See transforms.api.Input for an example of concrete usage.

All aliases are resolved and added in the input specs section of JobSpec. Will not pass a defaultPath to the graph dependency if the alias is a valid resource identifier (RID). Input parameters have a unique identifier, which is set if there is a reference to input from the JobSpec.

  • Parameters:
    • aliases (list of str) – A list of absolute Compass paths or dataset RIDs.
    • branch (str , optional) – Optional branch against which to resolve input transactions.
    • properties (dict , optional) – Optional properties that get written to the build graph input reference.
    • description (str , optional) – Parameter description.
    • type (str , optional) – The input dataset type.
    • failure_strategy (str , optional) – The failure strategy to be used in case the input update fails.

input_results(_instance, **_kwargs)

Generates a map from input RIDs to TransformsInputResult. Results are merged into a TransformJobResult.

  • Parameters: instance – An object of the type generated by instance().

History

  • Added in version 1.53.0.

static instance(context, json_value)

Creates a parameter instance using the raw JSON value from JobSpec parameters and specific context.

The return value is injected in the transform compute function.

  • Parameters:
    • context (ParamContext) – A context object with properties that might be required for creating an instance.
    • json_value (any) – Any raw value deserialized from JobSpec parameters.

property json_value

Returns the JSON value for this parameter to put in JobSpec.

If the return value is None, the parameter is considered unbound. If any transform’s parameter is unbound, the transform is considered to be unbound. For unbound transforms, the JobSpec is not published.

property schema

Returns JSON schema for parameters of this type. Must return a valid JSON schema.