Skip to content

Commit

Permalink
add_metrics/devcontainer build .
Browse files Browse the repository at this point in the history
  • Loading branch information
neworderby authored and neworderby committed Oct 17, 2023
1 parent 383ad5c commit cace1a8
Show file tree
Hide file tree
Showing 6 changed files with 79 additions and 10 deletions.
25 changes: 15 additions & 10 deletions .devcontainer/devcontainer.json
Original file line number Diff line number Diff line change
@@ -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
],
Expand All @@ -23,7 +27,8 @@
"ms-python.python",
"eamodio.gitlens",
"GitHub.vscode-pull-request-github",
"nemesv.copy-file-name"
"nemesv.copy-file-name",
"hashicorp.terraform"
]
}
},
Expand All @@ -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",
Expand Down
5 changes: 5 additions & 0 deletions .vscode/settings.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
{
"githubPullRequests.ignoredPullRequestBranches": [
"main"
]
}
8 changes: 8 additions & 0 deletions docker-compose.yml
Original file line number Diff line number Diff line change
@@ -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:
Expand Down
Binary file modified metabase/metabase.db/metabase.db.mv.db
Binary file not shown.
39 changes: 39 additions & 0 deletions metabase/metabase.db/metabase.db.trace.db
Original file line number Diff line number Diff line change
Expand Up @@ -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)
12 changes: 12 additions & 0 deletions schema/f_tracker.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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'
Expand Down

0 comments on commit cace1a8

Please sign in to comment.