@log_exceptions
def __init__(self, *args, name: Optional[str]=None, features: Optional[List[Feature]]=None, sources: Optional[Dict[(str, Union[(FeatureView, FeatureViewProjection, RequestSource)])]]=None, udf: Optional[MethodType]=None, inputs: Optional[Dict[(str, Union[(FeatureView, FeatureViewProjection, RequestSource)])]]=None, schema: Optional[List[Field]]=None, description: str='', tags: Optional[Dict[(str, str)]]=None, owner: str=''):
    '\n        Creates an OnDemandFeatureView object.\n\n        Args:\n            name: The unique name of the on demand feature view.\n            features (deprecated): The list of features in the output of the on demand\n                feature view, after the transformation has been applied.\n            sources (optional): A map from input source names to the actual input sources,\n                which may be feature views, feature view projections, or request data sources.\n                These sources serve as inputs to the udf, which will refer to them by name.\n            udf (optional): The user defined transformation function, which must take pandas\n                dataframes as inputs.\n            inputs (optional): A map from input source names to the actual input sources,\n                which may be feature views, feature view projections, or request data sources.\n                These sources serve as inputs to the udf, which will refer to them by name.\n            schema (optional): The list of features in the output of the on demand feature\n                view, after the transformation has been applied.\n            description (optional): A human-readable description.\n            tags (optional): A dictionary of key-value pairs to store arbitrary metadata.\n            owner (optional): The owner of the on demand feature view, typically the email\n                of the primary maintainer.\n        '
    positional_attributes = ['name', 'features', 'inputs', 'udf']
    _name = name
    _schema = (schema or [])
    if ((len(_schema) == 0) and (features is not None)):
        _schema = [Field.from_feature(feature) for feature in features]
    if (features is not None):
        warnings.warn('The `features` parameter is being deprecated in favor of the `schema` parameter. Please switch from using `features` to `schema`. This will also requiring switching feature definitions from using `Feature` to `Field`. Feast 0.21 and onwards will not support the `features` parameter.', DeprecationWarning)
    _sources = (sources or inputs)
    if (inputs and sources):
        raise ValueError('At most one of `sources` or `inputs` can be specified.')
    elif inputs:
        warnings.warn('The `inputs` parameter is being deprecated. Please use `sources` instead. Feast 0.21 and onwards will not support the `inputs` parameter.', DeprecationWarning)
    _udf = udf
    if args:
        warnings.warn('On demand feature view parameters should be specified as keyword arguments instead of positional arguments. Feast 0.23 and onwards will not support positional arguments in on demand feature view definitions.', DeprecationWarning)
        if (len(args) > len(positional_attributes)):
            raise ValueError(f"Only {', '.join(positional_attributes)} are allowed as positional args when defining feature views, for backwards compatibility.")
        if (len(args) >= 1):
            _name = args[0]
        if (len(args) >= 2):
            _schema = args[1]
            if ((len(_schema) > 0) and isinstance(_schema[0], Feature)):
                _schema = [Field.from_feature(feature) for feature in _schema]
            warnings.warn('The `features` parameter is being deprecated in favor of the `schema` parameter. Please switch from using `features` to `schema`. This will also requiring switching feature definitions from using `Feature` to `Field`. Feast 0.21 and onwards will not support the `features` parameter.', DeprecationWarning)
        if (len(args) >= 3):
            _sources = args[2]
            warnings.warn('The `inputs` parameter is being deprecated. Please use `sources` instead. Feast 0.21 and onwards will not support the `inputs` parameter.', DeprecationWarning)
        if (len(args) >= 4):
            _udf = args[3]
    if (not _name):
        raise ValueError('The name of the on demand feature view must be specified.')
    if (not _sources):
        raise ValueError('The `sources` parameter must be specified.')
    super().__init__(name=_name, features=_schema, description=description, tags=tags, owner=owner)
    assert (_sources is not None)
    self.source_feature_view_projections: Dict[(str, FeatureViewProjection)] = {}
    self.source_request_sources: Dict[(str, RequestSource)] = {}
    for (source_name, odfv_source) in _sources.items():
        if isinstance(odfv_source, RequestSource):
            self.source_request_sources[source_name] = odfv_source
        elif isinstance(odfv_source, FeatureViewProjection):
            self.source_feature_view_projections[source_name] = odfv_source
        else:
            self.source_feature_view_projections[source_name] = odfv_source.projection
    if (_udf is None):
        raise ValueError('The `udf` parameter must be specified.')
    assert _udf
    self.udf = _udf
Creates an OnDemandFeatureView object.

Args:
    name: The unique name of the on demand feature view.
    features (deprecated): The list of features in the output of the on demand
        feature view, after the transformation has been applied.
    sources (optional): A map from input source names to the actual input sources,
        which may be feature views, feature view projections, or request data sources.
        These sources serve as inputs to the udf, which will refer to them by name.
    udf (optional): The user defined transformation function, which must take pandas
        dataframes as inputs.
    inputs (optional): A map from input source names to the actual input sources,
        which may be feature views, feature view projections, or request data sources.
        These sources serve as inputs to the udf, which will refer to them by name.
    schema (optional): The list of features in the output of the on demand feature
        view, after the transformation has been applied.
    description (optional): A human-readable description.
    tags (optional): A dictionary of key-value pairs to store arbitrary metadata.
    owner (optional): The owner of the on demand feature view, typically the email
        of the primary maintainer.
@log_exceptions
def __init__(self, *args, name: Optional[str]=None, features: Optional[List[Feature]]=None, sources: Optional[Dict[(str, Union[(FeatureView, FeatureViewProjection, RequestSource)])]]=None, udf: Optional[MethodType]=None, inputs: Optional[Dict[(str, Union[(FeatureView, FeatureViewProjection, RequestSource)])]]=None, schema: Optional[List[Field]]=None, description: str=, tags: Optional[Dict[(str, str)]]=None, owner: str=):
    '\n        Creates an OnDemandFeatureView object.\n\n        Args:\n            name: The unique name of the on demand feature view.\n            features (deprecated): The list of features in the output of the on demand\n                feature view, after the transformation has been applied.\n            sources (optional): A map from input source names to the actual input sources,\n                which may be feature views, feature view projections, or request data sources.\n                These sources serve as inputs to the udf, which will refer to them by name.\n            udf (optional): The user defined transformation function, which must take pandas\n                dataframes as inputs.\n            inputs (optional): A map from input source names to the actual input sources,\n                which may be feature views, feature view projections, or request data sources.\n                These sources serve as inputs to the udf, which will refer to them by name.\n            schema (optional): The list of features in the output of the on demand feature\n                view, after the transformation has been applied.\n            description (optional): A human-readable description.\n            tags (optional): A dictionary of key-value pairs to store arbitrary metadata.\n            owner (optional): The owner of the on demand feature view, typically the email\n                of the primary maintainer.\n        '
    positional_attributes = ['name', 'features', 'inputs', 'udf']
    _name = name
    _schema = (schema or [])
    if ((len(_schema) == 0) and (features is not None)):
        _schema = [Field.from_feature(feature) for feature in features]
    if (features is not None):
        warnings.warn('The `features` parameter is being deprecated in favor of the `schema` parameter. Please switch from using `features` to `schema`. This will also requiring switching feature definitions from using `Feature` to `Field`. Feast 0.21 and onwards will not support the `features` parameter.', DeprecationWarning)
    _sources = (sources or inputs)
    if (inputs and sources):
        raise ValueError('At most one of `sources` or `inputs` can be specified.')
    elif inputs:
        warnings.warn('The `inputs` parameter is being deprecated. Please use `sources` instead. Feast 0.21 and onwards will not support the `inputs` parameter.', DeprecationWarning)
    _udf = udf
    if args:
        warnings.warn('On demand feature view parameters should be specified as keyword arguments instead of positional arguments. Feast 0.23 and onwards will not support positional arguments in on demand feature view definitions.', DeprecationWarning)
        if (len(args) > len(positional_attributes)):
            raise ValueError(f"Only {', '.join(positional_attributes)} are allowed as positional args when defining feature views, for backwards compatibility.")
        if (len(args) >= 1):
            _name = args[0]
        if (len(args) >= 2):
            _schema = args[1]
            if ((len(_schema) > 0) and isinstance(_schema[0], Feature)):
                _schema = [Field.from_feature(feature) for feature in _schema]
            warnings.warn('The `features` parameter is being deprecated in favor of the `schema` parameter. Please switch from using `features` to `schema`. This will also requiring switching feature definitions from using `Feature` to `Field`. Feast 0.21 and onwards will not support the `features` parameter.', DeprecationWarning)
        if (len(args) >= 3):
            _sources = args[2]
            warnings.warn('The `inputs` parameter is being deprecated. Please use `sources` instead. Feast 0.21 and onwards will not support the `inputs` parameter.', DeprecationWarning)
        if (len(args) >= 4):
            _udf = args[3]
    if (not _name):
        raise ValueError('The name of the on demand feature view must be specified.')
    if (not _sources):
        raise ValueError('The `sources` parameter must be specified.')
    super().__init__(name=_name, features=_schema, description=description, tags=tags, owner=owner)
    assert (_sources is not None)
    self.source_feature_view_projections: Dict[(str, FeatureViewProjection)] = {}
    self.source_request_sources: Dict[(str, RequestSource)] = {}
    for (source_name, odfv_source) in _sources.items():
        if isinstance(odfv_source, RequestSource):
            self.source_request_sources[source_name] = odfv_source
        elif isinstance(odfv_source, FeatureViewProjection):
            self.source_feature_view_projections[source_name] = odfv_source
        else:
            self.source_feature_view_projections[source_name] = odfv_source.projection
    if (_udf is None):
        raise ValueError('The `udf` parameter must be specified.')
    assert _udf
    self.udf = _udf