MCPcopy Create free account
hub / github.com/feast-dev/feast / sample_model

Function sample_model

sdk/python/tests/unit/dbt/test_mapper.py:135–163  ·  view source on GitHub ↗

Create a sample DbtModel for testing.

()

Source from the content-addressed store, hash-verified

133
134@pytest.fixture
135def sample_model():
136 """Create a sample DbtModel for testing."""
137 return DbtModel(
138 name="driver_stats",
139 unique_id="model.test_project.driver_stats",
140 database="my_database",
141 schema="analytics",
142 alias="driver_stats",
143 description="Driver statistics",
144 columns=[
145 DbtColumn(name="driver_id", data_type="INT64", description="Driver ID"),
146 DbtColumn(
147 name="event_timestamp",
148 data_type="TIMESTAMP",
149 description="Event time",
150 ),
151 DbtColumn(
152 name="trip_count", data_type="INT64", description="Number of trips"
153 ),
154 DbtColumn(
155 name="avg_rating", data_type="FLOAT64", description="Average rating"
156 ),
157 DbtColumn(
158 name="is_active", data_type="BOOLEAN", description="Is driver active"
159 ),
160 ],
161 tags=["feast", "ml"],
162 meta={"owner": "ml-team"},
163 )
164
165
166class TestDbtToFeastMapper:

Callers

nothing calls this directly

Calls 2

DbtModelClass · 0.90
DbtColumnClass · 0.90

Tested by

no test coverage detected