Skip to content

Commit

Permalink
Merge pull request #506 from bruin-data/revert-501-time-mat-duckdb
Browse files Browse the repository at this point in the history
Revert "time materialization duckdb"
  • Loading branch information
terzioglub authored Mar 10, 2025
2 parents 62a0138 + 750380b commit 8f24f0e
Show file tree
Hide file tree
Showing 13 changed files with 22 additions and 760 deletions.
5 changes: 0 additions & 5 deletions integration-tests/.bruin.yml
Original file line number Diff line number Diff line change
Expand Up @@ -151,10 +151,5 @@ environments:
duckdb:
- name: "duckdb-query-asset"
path: "duckdb-files/query-asset.db"
env-time-materialization:
connections:
duckdb:
- name: "duckdb-time-materialization"
path: "duckdb-files/time-materialization.db"


10 changes: 0 additions & 10 deletions integration-tests/expected_connections.json
Original file line number Diff line number Diff line change
Expand Up @@ -314,16 +314,6 @@
}
]
}
},
"env-time-materialization": {
"connections": {
"duckdb": [
{
"name": "duckdb-time-materialization",
"path": "integration-tests/duckdb-files/time-materialization.db"
}
]
}
}
}
}
87 changes: 0 additions & 87 deletions integration-tests/integration-test.go
Original file line number Diff line number Diff line change
Expand Up @@ -302,93 +302,6 @@ func getWorkflow(binary string, currentFolder string, tempdir string) []e2e.Work
},
},
},
{
Name: "Time materialization",
Steps: []e2e.Task{
{
Name: "restore asset to initial state",
Command: "cp",
Args: []string{filepath.Join(currentFolder, "resources/products.sql"), filepath.Join(currentFolder, "test-pipelines/time-materialization-pipeline/assets/products.sql")},
Env: []string{},

Expected: e2e.Output{
ExitCode: 0,
},
Asserts: []func(*e2e.Task) error{
e2e.AssertByExitCode,
},
},
{
Name: "create the table",
Command: binary,
Args: []string{"run", "--full-refresh", "--env", "env-time-materialization", filepath.Join(currentFolder, "test-pipelines/time-materialization-pipeline")},
Env: []string{},

Expected: e2e.Output{
ExitCode: 0,
},
Asserts: []func(*e2e.Task) error{
e2e.AssertByExitCode,
},
},
{
Name: "query the initial table",
Command: binary,
Args: []string{"query", "--env", "env-time-materialization", "--asset", filepath.Join(currentFolder, "test-pipelines/time-materialization-pipeline/assets/products.sql"), "--query", "SELECT * FROM PRODUCTS; ", "--output", "json"},
Env: []string{},

Expected: e2e.Output{
ExitCode: 0,
Output: helpers.ReadFile(filepath.Join(currentFolder, "test-pipelines/time-materialization-pipeline/expectations/initial_expected.json")),
},
Asserts: []func(*e2e.Task) error{
e2e.AssertByExitCode,
e2e.AssertByOutputJSON,
},
},
{
Name: "copy products_updated.sql to products.sql",
Command: "cp",
Args: []string{filepath.Join(currentFolder, "resources/products_updated.sql"), filepath.Join(currentFolder, "test-pipelines/time-materialization-pipeline/assets/products.sql")},
Env: []string{},

Expected: e2e.Output{
ExitCode: 0,
},
Asserts: []func(*e2e.Task) error{
e2e.AssertByExitCode,
},
},
{
Name: "update table with time materialization",
Command: binary,
Args: []string{"run", "--start-date", "2025-03-01", "--end-date", "2025-03-31", "--env", "env-time-materialization", filepath.Join(currentFolder, "test-pipelines/time-materialization-pipeline/assets/products.sql")},
Env: []string{},

Expected: e2e.Output{
ExitCode: 0,
},
Asserts: []func(*e2e.Task) error{
e2e.AssertByExitCode,
},
},
{
Name: "query the updated table with time materialization",
Command: binary,
Args: []string{"query", "--env", "env-time-materialization", "--asset", filepath.Join(currentFolder, "test-pipelines/time-materialization-pipeline/assets/products.sql"), "--query", "SELECT * FROM PRODUCTS;", "--output", "json"},
Env: []string{},

Expected: e2e.Output{
ExitCode: 0,
Output: helpers.ReadFile(filepath.Join(currentFolder, "test-pipelines/time-materialization-pipeline/expectations/final_expected.json")),
},
Asserts: []func(*e2e.Task) error{
e2e.AssertByExitCode,
e2e.AssertByOutputJSON,
},
},
},
},
}
}

Expand Down
107 changes: 0 additions & 107 deletions integration-tests/resources/products.sql

This file was deleted.

91 changes: 0 additions & 91 deletions integration-tests/resources/products_updated.sql

This file was deleted.

Loading

0 comments on commit 8f24f0e

Please sign in to comment.