Refactor bucket structure: baf-fraud/ prefix under lake bucket

All functions now default to bucket_name = "lake" with "baf-fraud/"
prepended to all layer prefixes, matching the contemporary lakehouse
naming convention (one bucket per environment, project as prefix).

Migration: copy baf-fraud/ data to lake/baf-fraud/ on analyticsvm,
update BAF_BUCKET env var from "baf-fraud" to "lake".

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
2026-02-22 05:36:25 -05:00
parent dac01da6cb
commit df978d042f
11 changed files with 63 additions and 63 deletions

View File

@@ -1,20 +1,20 @@
test_that("connect_baf() errors on missing BAF_ENDPOINT", {
withr::with_envvar(
c(BAF_ENDPOINT = "", BAF_KEY = "key", BAF_SECRET = "secret", BAF_BUCKET = "baf-fraud"),
c(BAF_ENDPOINT = "", BAF_KEY = "key", BAF_SECRET = "secret", BAF_BUCKET = "lake"),
expect_error(connect_baf("some/prefix"), "BAF_ENDPOINT")
)
})
test_that("connect_baf() errors on missing BAF_KEY", {
withr::with_envvar(
c(BAF_ENDPOINT = "minio:9000", BAF_KEY = "", BAF_SECRET = "secret", BAF_BUCKET = "baf-fraud"),
c(BAF_ENDPOINT = "minio:9000", BAF_KEY = "", BAF_SECRET = "secret", BAF_BUCKET = "lake"),
expect_error(connect_baf("some/prefix"), "BAF_KEY")
)
})
test_that("connect_baf() errors on missing BAF_SECRET", {
withr::with_envvar(
c(BAF_ENDPOINT = "minio:9000", BAF_KEY = "key", BAF_SECRET = "", BAF_BUCKET = "baf-fraud"),
c(BAF_ENDPOINT = "minio:9000", BAF_KEY = "key", BAF_SECRET = "", BAF_BUCKET = "lake"),
expect_error(connect_baf("some/prefix"), "BAF_SECRET")
)
})