Skip to content

temporian.input_node_from_schema #

input_node_from_schema(
    schema: Schema,
    same_sampling_as: Optional[EventSetNode] = None,
    name: Optional[str] = None,
) -> EventSetNode

Creates an input EventSetNode from a schema.

Usage example:

```python
>>> # Create two nodes with the same schema.
>>> a = tp.input_node(features=[("f1", tp.float64), ("f2", tp.str_)])
>>> b = tp.input_node_from_schema(a.schema)

```

Parameters:

Name Type Description Default
schema Schema

Schema of the node.

required
same_sampling_as Optional[EventSetNode]

If set, the created EventSetNode is guaranteed to have the same sampling as same_sampling_as. In this case,indexesandis_unix_timestamp` should not be provided. Some operators require for input EventSetNodes to have the same sampling.

None
name Optional[str]

Name for the EventSetNode.

None

Returns:

Type Description
EventSetNode

EventSetNode with the given specifications.