Repository: Teradata/feast-teradata (language: python)

Issue:
TD_Type_to_Feast_Value_time (Fixed)

TD_Type_to_Feast_Value_time (Fixed)

TD_Type_to_Feast_Value_time (Fixed)



Discussion / hints:

Fix patch:
diff --git a/.DS_Store b/.DS_Store
deleted file mode 100644
index 91d4bdc..0000000
Binary files a/.DS_Store and /dev/null differ
diff --git a/.gitignore b/.gitignore
index bc60e4b..0516880 100644
--- a/.gitignore
+++ b/.gitignore
@@ -9,3 +9,4 @@ dist/
 feature_repo/online_store.db
 feature_repo/registry.db
 output
+.DS_Store
\ No newline at end of file
diff --git a/.gitmodules b/.gitmodules
index 51a557a..e825111 100644
--- a/.gitmodules
+++ b/.gitmodules
@@ -1,4 +1,4 @@
 [submodule "feast"]
 	path = feast
-	url = https://github.com/feast-dev/feast.git
+	url = https://github.com/feast-dev/feast
 	branch = v0.26-branch
diff --git a/custom_offline_store.py b/custom_offline_store.py
deleted file mode 100644
index 416e356..0000000
--- a/custom_offline_store.py
+++ /dev/null
@@ -1,76 +0,0 @@
-from feast import FeatureStore
-from feature_repo.repo import flower, df_feature_view
-from datetime import datetime
-from teradataml import create_context, get_context
-
-import getpass
-import pandas as pd
-
-
-def test_offline_sql_as_entity_df():
-    rs = fs.get_historical_features(
-        entity_df="SELECT event_timestamp, flower_id FROM iris_data",
-        features=[
-            "df_feature_view:sepal length (cm)",
-            "df_feature_view:sepal width (cm)",
-            "df_feature_view:petal length (cm)",
-            "df_feature_view:petal width (cm)"
-        ]
-    )
-    rs = rs.to_df()
-    print(rs)
-
-
-def test_offline_pandas_df_as_entity_df():
-    username = input("Username: ")
-    password = getpass.getpass("Password: ")
-    create_context(host="tdprd.td.teradata.com", username=username, password=password, logmech="LDAP")
-
-    target_df = pd.read_sql("SELECT event_timestamp, flower_id FROM iris_data", get_context())
-
-    rs = fs.get_historical_features(
-        entity_df=target_df,
-        features=[
-            "df_feature_view:sepal length (cm)",
-            "df_feature_view:sepal width (cm)",
-            "df_feature_view:petal length (cm)",
-            "df_feature_view:petal width (cm)"
-        ]
-    )
-    rs = rs.to_df()
-    print(rs)
-
-
-def test_online():
-    fs.materialize_incremental(end_date=datetime.now())
-
-    feature_vector = fs.get_online_features(
-        features=[
-            "df_feature_view:sepal length (cm)",
-            "df_feature_view:sepal width (cm)",
-            "df_feature_view:petal length (cm)",
-            "df_feature_view:petal width (cm)"
-        ], entity_rows=[{"flower_id": 5}]
-    ).to_dict()
-
-    print(feature_vector)
-
-
-fs = FeatureStore("feature_repo/")
-try:
-    fs.apply([flower, df_feature_view])
-
-    print("Test offline store as pandas entity df")
-
-    test_offline_pandas_df_as_entity_df()
-
-    print("Test offline store as sql string entity df")
-
-    test_offline_sql_as_entity_df()
-
-    print("Test online store")
-
-    test_online()
-
-finally:
-    fs.teardown()
diff --git a/feast b/feast
new file mode 160000
index 0000000..5ca1dd8
--- /dev/null
+++ b/feast
@@ -0,0 +1,1 @@
+Subproject commit 5ca1dd88e6c8fc7404313521370f155a7739154e
diff --git a/feature_repo/feature_store.yaml b/feature_repo/feature_store.yaml
deleted file mode 100644
index 328c381..0000000
--- a/feature_repo/feature_store.yaml
+++ /dev/null
@@ -1,18 +0,0 @@
-project: repo
-registry: registry.db
-provider: local
-online_store:
-    type: feast_teradata.online.teradata.TeradataOnlineStore
-    host: tdprd.td.teradata.com
-    database: mw255040
-    user: mw255040
-    password: Type your password
-    log_mech: LDAP
-offline_store:
-    type: feast_teradata.offline.teradata.TeradataOfflineStore
-    host: tdprd.td.teradata.com
-    database: mw255040
-    user: mw255040
-    password: Type your password
-    log_mech: LDAP
-entity_key_serialization_version: 2
\ No newline at end of file
diff --git a/feature_repo/repo.py b/feature_repo/repo.py
deleted file mode 100644
index c0e6179..0000000
--- a/feature_repo/repo.py
+++ /dev/null
@@ -1,27 +0,0 @@
-from datetime import timedelta
-from feast import Entity, Field, FeatureView
-from feast.types import Float64, Int64
-from feast_teradata.offline.teradata_source import TeradataSource
-
-flower_stats = TeradataSource(
-    name="iris_ds",
-    query="SELECT * FROM iris_data",
-    timestamp_field="event_timestamp"
-)
-
-flower = Entity(name="flower", join_keys=["flower_id"])
-
-df_feature_view = FeatureView(
-    name="df_feature_view",
-    ttl=timedelta(days=365),
-    entities=[flower],
-    schema=[
-        Field(name="flower_id", dtype=Int64),
-        Field(name="sepal length (cm)", dtype=Float64),
-        Field(name="sepal width (cm)", dtype=Float64),
-        Field(name="petal length (cm)", dtype=Float64),
-        Field(name="petal width (cm)", dtype=Float64),
-        ],
-    online=True,
-    source=flower_stats
-)


Test patch:
diff --git a/.github/workflows/test_custom_offline_store.yml b/.github/workflows/test_custom_offline_store.yml
deleted file mode 100644
index 295e506..0000000
--- a/.github/workflows/test_custom_offline_store.yml
+++ /dev/null
@@ -1,25 +0,0 @@
-name: test-custom-offline-store
-
-on: [push, pull_request]
-jobs:
-  test-provider:
-    runs-on: ${{ matrix.os }}
-    strategy:
-      fail-fast: false
-      matrix:
-        python-version: [ 3.7, 3.8, 3.9 ]
-        os: [ ubuntu-latest, macOS-latest]
-    env:
-      OS: ${{ matrix.os }}
-      PYTHON: ${{ matrix.python-version }}
-    steps:
-      - uses: actions/checkout@v2
-      - name: Setup Python
-        uses: actions/setup-python@v2
-        with:
-          python-version: ${{ matrix.python-version }}
-          architecture: x64
-      - name: Install dependencies
-        run: pip install -r requirements.txt
-      - name: Run tests
-        run: pytest custom_offline_store.py