-
Notifications
You must be signed in to change notification settings - Fork 1.3k
feat: Add integration tests for dbt import with local dbt project #5877
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: master
Are you sure you want to change the base?
Changes from 1 commit
c3f2e0f
9bee2c7
8ba2205
3432eb5
621cefb
e25d08f
ba38da0
586f825
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
Co-authored-by: franciscojavierarceo <4163062+franciscojavierarceo@users.noreply.github.com>
- Loading branch information
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -34,6 +34,47 @@ jobs: | |
| - name: Install dependencies | ||
| run: make install-python-dependencies-ci | ||
|
|
||
| - name: Install dbt and dbt-duckdb | ||
| run: | | ||
| uv pip install --system dbt-core dbt-duckdb | ||
|
|
||
| - name: Run dbt commands | ||
| run: | | ||
| cd sdk/python/tests/integration/dbt/test_dbt_project | ||
| dbt deps | ||
| dbt build | ||
| dbt test | ||
|
|
||
| - name: Setup Feast project for dbt import test | ||
| run: | | ||
| cd sdk/python/tests/integration/dbt | ||
| mkdir -p feast_repo | ||
| cd feast_repo | ||
| cat > feature_store.yaml << EOF | ||
| project: feast_dbt_test | ||
| registry: data/registry.db | ||
| provider: local | ||
| online_store: | ||
| type: sqlite | ||
| path: data/online_store.db | ||
| EOF | ||
| mkdir -p data | ||
|
|
||
| - name: Test feast dbt import | ||
| run: | | ||
| cd sdk/python/tests/integration/dbt/feast_repo | ||
| feast -c feature_store.yaml dbt import \ | ||
| -m ../test_dbt_project/target/manifest.json \ | ||
| -e driver_id \ | ||
| -d file \ | ||
| --tag feast | ||
|
|
||
| - name: Verify feast objects were created | ||
| run: | | ||
| cd sdk/python/tests/integration/dbt/feast_repo | ||
| feast -c feature_store.yaml feature-views list | ||
| feast -c feature_store.yaml entities list | ||
|
|
||
| - name: Run dbt integration tests | ||
|
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. @copillot we should also run the standard dbt commands; i.e,. dbt run
dbt build
dbt testafter that we should then test the new feast cli and test that feast materialization works from a dbt model into a sqlite online store.
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Added dbt commands (deps, build, test) and Feast CLI testing with SQLite online store in commit ba38da0. The workflow now:
|
||
| run: | | ||
| cd sdk/python | ||
|
|
||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,4 @@ | ||
| customer_id,event_timestamp,total_orders,total_spent,avg_order_value | ||
| cust_001,2024-01-01 00:00:00,5,250.50,50.10 | ||
| cust_002,2024-01-01 00:00:00,3,180.75,60.25 | ||
| cust_003,2024-01-01 00:00:00,7,420.00,60.00 |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,4 @@ | ||
| driver_id,event_timestamp,conv_rate,acc_rate,avg_daily_trips | ||
| 1001,2024-01-01 00:00:00,0.85,0.92,12 | ||
| 1002,2024-01-01 00:00:00,0.78,0.88,15 | ||
| 1003,2024-01-01 00:00:00,0.91,0.95,10 |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,4 @@ | ||
| product_id,event_timestamp,view_count,purchase_count,rating_avg | ||
| prod_001,2024-01-01 00:00:00,150,25,4.5 | ||
| prod_002,2024-01-01 00:00:00,200,30,4.2 | ||
| prod_003,2024-01-01 00:00:00,100,15,4.8 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@copilot we should use the Makefile to install dependencies here
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Updated to use
make install-python-dependencies-ciin commit 621cefb.