diff --git a/.devcontainer/devcontainer.json b/.devcontainer/devcontainer.json index b26d167..42a9708 100644 --- a/.devcontainer/devcontainer.json +++ b/.devcontainer/devcontainer.json @@ -1,18 +1,22 @@ // For format details, see https://aka.ms/devcontainer.json. For config options, see the // README at: https://github.com/devcontainers/templates/tree/main/src/docker-existing-dockerfile { - "name": "Existing Dockerfile", - "build": { + //"name": "Existing Dockerfile", + //"build": { // Sets the run context to one level up instead of the .devcontainer folder. // "context": "." // Update the 'dockerFile' property if you aren't using the standard 'Dockerfile' filename. - "dockerfile": "../Dockerfile" - }, + // "dockerfile": "../Dockerfile" + //}, - // Features to add to the dev container. More info: https://containers.dev/features. - // "features": {}, + "name": "Existing Docker Compose (Extend)", + "dockerComposeFile": [ + "../docker-compose.yml" + ], - // Use 'forwardPorts' to make a list of ports inside the container available locally. + "service": "devcontainer", + //"workspaceFolder": "/workspaces/${localWorkspaceFolderBasename}", + "workspaceFolder": "/workspaces/mybi_dbt_showcase/", "forwardPorts": [ 8080 ], @@ -23,7 +27,8 @@ "ms-python.python", "eamodio.gitlens", "GitHub.vscode-pull-request-github", - "nemesv.copy-file-name" + "nemesv.copy-file-name", + "hashicorp.terraform" ] } }, @@ -38,9 +43,9 @@ "userGid": "automatic" }, "ghcr.io/stuartleeks/dev-container-features/shell-history:0": {} - }, + } - "runArgs": ["--env-file",".env", "--network=mybi-dbt-showcase_default"] + // "runArgs": ["--env-file",".env", "--network=mybi-dbt-showcase_default"] // Uncomment the next line to run commands after the container is created. // "postCreateCommand": "cat /etc/os-release", diff --git a/.vscode/settings.json b/.vscode/settings.json new file mode 100644 index 0000000..b242572 --- /dev/null +++ b/.vscode/settings.json @@ -0,0 +1,5 @@ +{ + "githubPullRequests.ignoredPullRequestBranches": [ + "main" + ] +} \ No newline at end of file diff --git a/docker-compose.yml b/docker-compose.yml index 4cd4c48..482fc12 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -1,6 +1,14 @@ version: '2' services: + devcontainer: + build: . + entrypoint: ["tail", "-f", "/dev/null"] + # env_file: + # - .env + volumes: + - .:/workspaces/mybi_dbt_showcase/ + clickhouse: image: clickhouse/clickhouse-server:22.3 ports: diff --git a/metabase/metabase.db/metabase.db.mv.db b/metabase/metabase.db/metabase.db.mv.db index 1581262..967538a 100644 Binary files a/metabase/metabase.db/metabase.db.mv.db and b/metabase/metabase.db/metabase.db.mv.db differ diff --git a/metabase/metabase.db/metabase.db.trace.db b/metabase/metabase.db/metabase.db.trace.db index 2264061..62ff20b 100644 --- a/metabase/metabase.db/metabase.db.trace.db +++ b/metabase/metabase.db/metabase.db.trace.db @@ -486,3 +486,42 @@ org.h2.jdbc.JdbcSQLException: Database is already closed (to disable automatic c at metabase.core$destroy_BANG_.invoke(core.clj:72) at clojure.lang.AFn.run(AFn.java:22) at java.base/java.lang.Thread.run(Unknown Source) +2023-10-17 17:51:02 jdbc[4]: exception +org.h2.jdbc.JdbcSQLException: Database is already closed (to disable automatic closing at VM shutdown, add ";DB_CLOSE_ON_EXIT=FALSE" to the db URL) [90121-197] + at org.h2.message.DbException.getJdbcSQLException(DbException.java:357) + at org.h2.message.DbException.get(DbException.java:179) + at org.h2.message.DbException.get(DbException.java:155) + at org.h2.message.DbException.get(DbException.java:144) + at org.h2.jdbc.JdbcConnection.checkClosed(JdbcConnection.java:1526) + at org.h2.jdbc.JdbcConnection.checkClosed(JdbcConnection.java:1502) + at org.h2.jdbc.JdbcConnection.prepareStatement(JdbcConnection.java:302) + at com.mchange.v2.c3p0.impl.NewProxyConnection.prepareStatement(NewProxyConnection.java:567) + at clojure.java.jdbc$prepare_statement.invokeStatic(jdbc.clj:679) + at clojure.java.jdbc$prepare_statement.invoke(jdbc.clj:626) + at clojure.java.jdbc$db_query_with_resultset_STAR_.invokeStatic(jdbc.clj:1112) + at clojure.java.jdbc$db_query_with_resultset_STAR_.invoke(jdbc.clj:1093) + at clojure.java.jdbc$query.invokeStatic(jdbc.clj:1182) + at clojure.java.jdbc$query.invoke(jdbc.clj:1144) + at toucan.db$query.invokeStatic(db.clj:308) + at toucan.db$query.doInvoke(db.clj:304) + at clojure.lang.RestFn.invoke(RestFn.java:410) + at toucan.db$simple_select.invokeStatic(db.clj:414) + at toucan.db$simple_select.invoke(db.clj:403) + at toucan.db$simple_select_one.invokeStatic(db.clj:440) + at toucan.db$simple_select_one.invoke(db.clj:429) + at toucan.db$select_one.invokeStatic(db.clj:670) + at toucan.db$select_one.doInvoke(db.clj:664) + at clojure.lang.RestFn.applyTo(RestFn.java:139) + at clojure.core$apply.invokeStatic(core.clj:669) + at clojure.core$apply.invoke(core.clj:662) + at toucan.db$select_one_field.invokeStatic(db.clj:682) + at toucan.db$select_one_field.doInvoke(db.clj:675) + at clojure.lang.RestFn.invoke(RestFn.java:442) + at metabase.models.setting.cache$cache_out_of_date_QMARK_.invokeStatic(cache.clj:111) + at metabase.models.setting.cache$cache_out_of_date_QMARK_.invoke(cache.clj:92) + at metabase.models.setting.cache$restore_cache_if_needed_BANG_.invokeStatic(cache.clj:161) + at metabase.models.setting.cache$restore_cache_if_needed_BANG_.invoke(cache.clj:141) + at metabase.models.setting$db_or_cache_value.invokeStatic(setting.clj:417) + at metabase.models.setting$db_or_cache_value.invoke(setting.clj:404) + at metabase.models.setting$get_raw_value.invokeStatic(setting.clj:458) + at metabase.models.setting$get_raw_value.invoke(setting.clj:432) diff --git a/schema/f_tracker.yml b/schema/f_tracker.yml index fda17d1..835171c 100644 --- a/schema/f_tracker.yml +++ b/schema/f_tracker.yml @@ -11,6 +11,18 @@ cubes: - name: CPC sql: '{CUBE.costs} / nullif(coalesce({CUBE.clicks}, 1), 0)' type: number + - name: bounces + description: '# Bounces' + sql: bounces + type: sum + - name: sessions + description: '# Sessions' + sql: sessions + type: sum + - name: bounce_rate + description: '% Bounce Rate' + sql: '{CUBE.bounces} / nullif(coalesce({CUBE.sessions}, 1), 0)' + type: number dimensions: - name: date sql: 'dt'