Skip to content
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Data source update
Signed-off-by: Author <kzhang@tecton.ai>
Signed-off-by: Kevin Zhang <kzhang@tecton.ai>
  • Loading branch information
kevjumba committed Apr 5, 2022
commit b284d5fc8cd8ad83a9d97b668b987831d0c6dbe5
9 changes: 7 additions & 2 deletions sdk/python/feast/data_source.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
# See the License for the specific language governing permissions and
# limitations under the License.


import warnings
import enum
import warnings
from abc import ABC, abstractmethod
Expand Down Expand Up @@ -421,7 +421,6 @@ def source_datatype_to_feast_value_type() -> Callable[[str], ValueType]:
def get_table_query_string(self) -> str:
raise NotImplementedError


class RequestSource(DataSource):
Comment thread
kevjumba marked this conversation as resolved.
Outdated
"""
RequestSource that can be used to provide input features for on demand transforms
Expand Down Expand Up @@ -495,6 +494,12 @@ def get_table_query_string(self) -> str:
def source_datatype_to_feast_value_type() -> Callable[[str], ValueType]:
raise NotImplementedError

class RequestDataSource(RequestSource):
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can you also keep a test for RequestDataSource to make sure that it continues to work, and prints the deprecation warning? I think there's examples of this in the unit tests already.

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yup Added.

def __init__(self, *args, **kwargs):
warnings.warn("The 'RequestDataSource' class is deprecated and was renamed to RequestSource. Please use RequestSource instead.",
DeprecationWarning)
RequestSource.__init__(*args, **kwargs)


class KinesisSource(DataSource):
def validate(self, config: RepoConfig):
Expand Down