superset icon indicating copy to clipboard operation
superset copied to clipboard

Why the dashboard always shows `Please define at least one metric for your table`?

Open seanDot7 opened this issue 10 years ago • 11 comments

I use sample data(World Bank). But it fails to show the slices in dashboard.

seanDot7 avatar Aug 11 '16 02:08 seanDot7

Have you followed the tutorial? http://airbnb.io/caravel/tutorial.html

xrmx avatar Aug 11 '16 07:08 xrmx

Yes.

seanDot7 avatar Aug 11 '16 08:08 seanDot7

Also the same issue with a completely different dataset that was working yesterday. Today it suddenly isn't recognized with any tables.

I've followed the tutorial about 5 times on different VMs and static machines, nothing. I've changed permissions and the user too but it doesn't change anything.

I can link to my dataset if someone would like to try and tell me what they did differently.

https://www.sendspace.com/file/c0rx4l - db file https://www.sendspace.com/file/c0rx4l - csv version so you can innately see the tables and what should be working.

The weird part is that this is what it looks like on the SQL query page: http://i.imgur.com/no3b47y.png

mxchinegod avatar Aug 12 '16 17:08 mxchinegod

@DylanAlloy I got the same problem.

This is what I got. The only thing different is I set the database uri to my posgres database. image

And I can't edit tables. And when I click edit button of a table I got this: image

The most weird thing is when I click SQL editor. It works: image

It is really weird that I can't edit the table.

seanDot7 avatar Aug 14 '16 16:08 seanDot7

Guys, please calm down. No need to post random screenshots or saying "nothing works". What would be helpful was to state your caravel version and post any eventual backtrace you've found in the logs.

xrmx avatar Aug 14 '16 17:08 xrmx

Yeah I don't understand that. I can't contribute much more, I spent 48 hours for a work project trying to figure it out and I'm useless. Eventually I just tried a different dataset.

The thing that's weird is that it obviously reads from the tables and it works sometimes. Other times it just doesn't suddenly.

Guys, please calm down.

random screenshots

Lol, okay I'm going to dip out of this repo now but good luck. I was using the most recent version as of this comment and regretfully I don't have access to the logs, I was using Vagrant and the VMs have since been destroyed.

mxchinegod avatar Aug 14 '16 17:08 mxchinegod

@DylanAlloy , @seanDot7 - unfortunately with no logs it is really hard to debug the issue. We cannot reproduce bug on our side. It would be great if the next time you hit the issue you could attach the stacktrace.

bkyryliuk avatar Aug 15 '16 22:08 bkyryliuk

I'm seeing a similar issue. I was able to view the example dashboards previously when I had only one user (the admin set up through fabmanager). Now I'm doing enough things off the beaten path that I'm not sure where I've gone wrong.

I'm running caravel 0.10.0 with MySQL 5.6.27 (an AWS RDS) as my metadata store. I created a custom security manager that is based on the REMOTE_USER strategy. I'm running this in AWS ECS and one consequence of this is that I run fabmanager create-admin, caravel db upgrade, caravel init, and caravel load_examples on each deploy. (This is likely a really bad idea and I need to figure out a way if initialization has already been done.)

The command caravel db upgrade results in an error message

_mysql_exceptions.OperationalError: (1060, "Duplicate column name 'python_date_format'")

I'm working on figuring out the ssh tunnels required to query the MySQL database.

I don't see any error in the log files when I go to one of the example dashboards. The error message "Please define at least one metric for your table" is in each of the charts on the dashboard, but nothing interesting is in the docker logs.

Besides the repeated initialization, I'm likely skipping some necessary steps in my custom security manager. I followed some of the examples from Flask-AppBuilder source, but this is my first experience working with FAB so I might be missing some basics.

Let me know any additional information that would be helpful debugging this.

cheers, Dennis

dennisobrien avatar Aug 31 '16 03:08 dennisobrien

@dennisobrien if you need to restart from scratch at each deploy i'd revisit your strategy :) Said that please find out what's the migration that gives you the error so we can figure out if there's something wrong. Finally please don't hijack other issues, if you have more information and can reproduce on master please open a new bug report.

xrmx avatar Aug 31 '16 06:08 xrmx

@dennisobrien , you need to get to the bottom of why your db migration script are failing, the real error is probably only in the stack trace of the first attempt, then you get a different error message on subsequent db upgrades (column already exist).

caravel db --help and reading a bit about alembic should provide the tools you need to debug this. We currently do continuous integration against Postgres / MySql / Sqlite and the db migration work on the versions we use on Travis.

Everyone else here, is there metric defined for your table? The flow for adding a table is not great at the moment, but if you follow the tutorial you should end up with a table with at least one metric defined.

mistercrunch avatar Aug 31 '16 15:08 mistercrunch

@xrmx - Thanks for the advice. I thought since this issue was still open and my issue had the exact error message and I had a bit more details that the OP, it would be fine to append to this issue. And I'm well aware that my deployment strategy is a work in progress.

@mistercrunch - Thanks for the tips. I'll see if I can find a minimal complete verifiable example and create a new issue if so.

dennisobrien avatar Aug 31 '16 17:08 dennisobrien