Questions tagged [metabase]
Metabase is an open source browser based analytics/data visualization tool.
305
questions
0
votes
0
answers
13
views
Groupby on custom column and time with SQL
I have a following dataset:
collection_time
col_a
col_b
2022-06-27 14:15
20
15
2022-06-27 14:13
-1
-1
2022-06-26 20:15
21
47
I would like to have the following output:
collection_time
...
-1
votes
0
answers
21
views
Unable to Query Metabase by a specific date
I took the following SQL query and instead of having grouped by month I'm trying to select a date and return the amount on that date
SELECT x.month,
count(DISTINCT x.user_id) FILTER (WHERE (x....
0
votes
1
answer
35
views
(Editied): Error executing query in metabase: (ERROR: syntax error at or near "and" Position: 33)
I am running a very simple query in Metabase, however, I am getting an error.
Following is the code I am running:
SELECT user_id
FROM order_order
[[where date_placed between {{from}} and {{to}}]]
and {...
0
votes
2
answers
26
views
SQL aggregate similar records
I have a dataset that I need to query from and aggregate the selected records based on a string similarity.
For example a simple SELECT, COUNT query can return a set of records like:
NAME
COUNT
CAR
...
0
votes
0
answers
27
views
Edit a Docker-Compose.yml with LDAP TENANT Information
Currently im triying to run a docker image of METABASE.
The main point is that i would like to implement the LDAP security. Im trying to work on the YML file via docker compose
The original one is ...
0
votes
0
answers
10
views
Metabase evaluate AI runs
I am trying to evaluate user-corrected AI runs using Metabase. In particular, I have a classification problem with around 100 labels, and would like to create a dashboard showing how often the ...
0
votes
1
answer
35
views
grouping row with sum conditions SQL
I try to transform this table:
NB Travel
NB User
1
15
2
20
3
25
4
12
5
16
6
25
7
5
8
16
9
25
10
3
to this table:
NB Travel
NB User
1
15
2-5
20+25+12+16
5-10
16+25+5+16+25+3
This is ...
0
votes
0
answers
11
views
How to use default time function in metabase
SELECT a_offer.name as Engagement Name, count(*) count
FROM u_user_offer_detail_record
left join a_offer on a_offer.id = u_user_offer_detail_record.offer_id
WHERE 1
and update_time_ms>= ...
0
votes
1
answer
33
views
How to filtering metabase widget via external button
Hy everyone,
i'm trying to setup a dashboard in metabase which will be embedded into an external portal of our client.
One of the requirements is that all the widget that will be exporting must be ...
0
votes
1
answer
37
views
How to change default value of date filter in metabase?
I am trying to write dynamic sql query in metabase-
I added date filter like that (using snowflake for query):
select * from my_table where date > {{date_filter}}
after that I needed to set ...
0
votes
0
answers
10
views
Move metabase container to another host
I have a metabase installed in a web host, but i have to move this metabase container to a new host keeping the data in the actual host.
For example:
this is the actual container: 132.12.78.35:3000
...
0
votes
0
answers
34
views
Receiving 502 error setting up Metabase Slack integration
within the Metabase application I'm trying to add Slack as an integration for alerts/notifications. Through the Metabase Admin settings, I've created a new Slack app and pasted the OAuth Bot Token. ...
1
vote
1
answer
77
views
Connecting Tranco Google BigQuery with Metabase
I am trying to connect third party ranking management system (https://tranco-list.eu/) with metabase. Tranco is giving us an option to see the record on Google BigQuery but when I am trying to connect ...
0
votes
1
answer
36
views
Custom count on derived table
I have an events table. The above screenshot show a derived result from events table. It basically shows total number of 'x' event fired by a user in a week.
My business logic says, if a user fires ...
0
votes
1
answer
68
views
Metabase Variable Filters for Postgres
I am running Metabase and PostgresSQL in Docker.
SQL query works fine. But its just Variable Filter in Metabase won't activate for my database.
select * from
test_schema."Project" as pj
...
0
votes
2
answers
51
views
SQL Divide Function not working in Metabase
In my Metabase, I wrote a query SELECT 10/5 It showing a result 2.000000000 which is correct.
But When I wrote SELECT 5/10 It showing a result 0.000000000. The result should show 0.500000000.
Can you ...
0
votes
1
answer
47
views
How to SUM the result of two different SQL query?
I want to SUM these two different queries. I joined both with USING function. but it shows the two results in two different cells.
I need a single result to SUM these two queries where the answer ...
0
votes
0
answers
28
views
Grouby_concat Metabase MySQL
I am trying to merge the same ID's together, and create a column with all the values in Client Custom Field__value. I cant seem to be able to use groupby_concat correctly.
Here is the original SQL:
...
0
votes
0
answers
16
views
Problems displaying zero results
I am making MySQL queries in Metabase, and when any of the fields that I am retrieving contain results with zero values, I get <<No Results! This may be the answer you’re looking for. If not, ...
0
votes
1
answer
45
views
How can I generate a SQlite file?
I want to connect Sqlite to Metabase, however, Metabase asks for a .sqlite file to make the connection.
I created a database using the command line and with Sqlite Browser. It creates the regular ...
0
votes
0
answers
45
views
Converting a string, containing a number with scientific notation, to number
I'm asking this to see if there is an easier way to do this.. I have an API that gives me 8.419379055475514E7 as an answer, but I need the number with no scientific notation, so instead of looking for ...
0
votes
0
answers
22
views
How can i make it easier for the user? IBM SQL / Metabase
select Servername, Appname, Sessions, Javausedheap, Javamaxheap, Javaversion, Wasversion from sysmonitor.wasapps
WHERE Host Like '%.%'
[[AND Servername Like {{Sn_search}}]]
[[AND Appname Like {{...
0
votes
0
answers
50
views
Creating a column in metabase query tool depending on if another column contains unique value
I am trying to use the matabase query tool to create a new column of 1s and 0s.
example data
id value
1 10
2 0
2 15
2 10
I want to create a new column that contains a 1 if the id ...
0
votes
0
answers
16
views
Metabase Table Relationships Floor() Function
I have the following three tables. "Incidents", "Reflective Debrief" and "Users".
Incident_UID = Users_UID
Through Metabase Admin panel (Data Model -> Table ("...
0
votes
0
answers
38
views
these(mongodb+metabase on mariadb volume) yml setting are unstable
mongodb+metabase on mariadb volume, these ymls setting are unstable, please make stable one.
the structure:
mongodb(directory)-docker-compose.yml
metabase(directory)-docker-compose.yml
mariadb(...
0
votes
1
answer
98
views
Metabase caching works for normal question but not for pivot question
My Metabase is connected to Snowflake. I have caching enabled at Metabase but it is not working for pivot queries. And after some debugging of the network response, I found that ignore-cached-results? ...
0
votes
1
answer
165
views
How to query with Dates in Aggregate functions in mongodb
I'm using Metabase v0.41 and writing query to Cosmos DB as a mongoDb.
Metabase only allows execution of db.collection.aggregate, and I first want a match stage that does a basic string match and date ...
0
votes
1
answer
356
views
Metabase on K8s (GKE) get Readiness probe failed
I try to deploy Matabase on my GKE cluster but I got Readiness probe failed.
I build on my local and get localhost:3000/api/health i got status 200 but on k8s it's not works.
Dockerfile. I create my ...
0
votes
1
answer
83
views
PostgreSQL: Without using a function, how can nested arrays be compared?
I am using PostgreSQL in Metabase (I have read-only rights so functions won't work)
I have the following nested data in two columns:
Categories_A Categories_B
{"A"} {"B&...
0
votes
0
answers
53
views
How to read Metabase file metabase.db.mv.db with H2 Database
I have the "metabase.db.mv.db" i would like to read this file with help of H2 database web console.
-1
votes
1
answer
28
views
Remap SQL Using Case
I currently have a SQL query like this:
SELECT `source`.`video_id` AS `video_id`, count(*) AS `count`
FROM (SELECT
*,
(SELECT param.value.string_value
FROM UNNEST(event_params) AS param
WHERE ...
0
votes
1
answer
29
views
How to group on column and sum up multiple individual value of column?
So below is MongoDB collection/table structure:
id - unique id
stage - {id:unique id,name:TRIGGER OTP}
customer - customer_mobile_no
date - date
stage column also contains below entries
{"id"...
0
votes
0
answers
55
views
Metabase month filter will not go back more than 2 months (redshift)
I am trying to filter the following query by month. It will only work for November 2021 and December 2021 - the dataset goes back to January 2019 (and has plenty of data from then). Could someone ...
0
votes
0
answers
18
views
PostgreSQL: return day instead of timestamp when subtracting timestamps [duplicate]
I want to calculate the duration between two timestamps in days. For that I attempted:
max(created_at) - min(created_at) as "phase duration"
where created_at is in the format: December 20, ...
0
votes
0
answers
22
views
Date syntax_SQL_Metabase
I want to use date(hard written like 2021-12-10) in a query with a logical operator. But I am not able to figure out correct syntax.
Sample Query
select Branch,
count(CASE WHEN date_format(...
0
votes
1
answer
110
views
How to change metabase's access port on linux?
I have a problem to change the metabase's port on linux
the ways described in https://www.metabase.com/docs/latest/operations-guide/running-the-metabase-jar-file.html , but i'm not clearly understand ...
0
votes
0
answers
170
views
PostgreSQL: with clause returning syntax error at end of input
I'm trying to create a temporary table with the following code:
with cte_counts as
(select entity_id, entity_name, count(distinct segment_id) as countries
from cte_geography
where cte_geography....
0
votes
1
answer
95
views
Split date_start and date_end by hours on Metabase
I have table with a column "Begin At" and another column "End At" that represent when a task begin and when a task end i would want to have a Bar display which display the cuantity ...
0
votes
0
answers
27
views
Queries between the timestamp_start to the previous timestamp_finish sql
I'm work with Metabase queries and i facing this issues .
database : Session_Histories
Makes sure that the distance between the timestamp_start to the previous timestamp_finish of the same user, OS, ...
1
vote
0
answers
96
views
Metabase behind Traefik Getting 404
Issue: I have set up Metabase behind Traefik, running as a Docker container. But it's getting 404 error. I want to access through - dashboard.{{hostname}}. What can be the issue & how can I solve ...
1
vote
2
answers
94
views
How to select cumulative counts by group over time across in postgres
I have cumulative counts for two groups over time in this format:
Date
Group
Cumulative Count
1/1/2020
A
1
1/2/2020
A
3
1/2/2020
B
1
1/3/2020
B
2
And I'd like to reshape this data into this ...
0
votes
0
answers
15
views
Every derived table must have its own alias (error 1248) [duplicate]
This query is done through a web page that queries a database, when playing this query directly in MySQL it returns the error
"ERROR 1248 (42000): Every derived table must have its own alias&...
0
votes
0
answers
45
views
How do I know my metabase domain for certbot htpps configuration?
I ran this command on the shell: sudo certbot --nginx
It produced this output:Saving debug log to /var/log/letsencrypt/letsencrypt.log
Please enter the domain name(s) you would like on your ...
0
votes
0
answers
9
views
Find out Metabase dependency Name
I am able to download dependency while running the Metabase(0.41.0) but I am not able to find out dependency name in any *.edn files. Could you help with this? or how to exclude both dependency.
...
0
votes
1
answer
127
views
Split a string column to new columns postgresql
I have a column which can contain over 20 different values and they are seprated by semicolon.
for example : A;B;C;D;E;F;G;H;...., I need to split all the values in new columns.
I tried to split it ...
0
votes
0
answers
208
views
Stuck when migrating Metabase from H2 DB to mysql
I am using metabase version v0.41.2 with H2 DB and running it on Windows server.
Now I want to migrate from H2 db to mysql. Following is the command used
java -jar metabase.jar load-from-h2 /path/to/...
0
votes
1
answer
39
views
Metabase - create filter from json field
Is there a way to add a filter based on extracted data from a json field? currently I can do something like
json_extract(meta, '$.mp_origin_meta') AS booking_type)
or
meta->'$.mp_origin_meta'
to ...
1
vote
1
answer
2k
views
Extract JSON content in Metabase SQL query
Using: Django==2.2.24, Python=3.6, PostgreSQL is underlying DB
Working with Django ORM, I can easily make all sort of queries, but I started using Metabase, and my SQL might be a bit rusty.
The ...
0
votes
1
answer
15
views
Compound summation: I would like to create a compound query which gets the individual sum of two columns from two different tables and then sum them
select sum(saved_amount - withdrawal_amount) from goal_withdrawal as sum1;
union
select suM(amount) from phone_verification as sum2;
select sum1 + sum2;
1
vote
0
answers
70
views
Facing issue on metabase with mongodb query
I have run the query which is generated by metabase itself:
[
{
"$group": {
"_id": {
"openedAt~~~month": {
"$let": {
&...