-
Notifications
You must be signed in to change notification settings - Fork 13.7k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Transfer caravel db into MySQL #585
Comments
You mean your Caravel was working well on sqlite3 and you succeeded migrating the data to mysql, right? Are you sure there was no error during the migration? What is the value of version_num in the table "alembic_version" in your sqlite and MySQL respectively? |
@x4base Oh I think I didn't migrate the database right, because I found that there are 26 tables in sqlite3 db, but only 12 tables in MySQL. I check the warnings when I was migrating, it's says that |
It'd be nice to have an export/import feature that could work across databases, though across versions may be more tricky. |
@mistercrunch @x4base does any of you guys have ever installed caravel on a db different than sqlite? |
Yes, I am using MySQL. I remember @mistercrunch said he uses MySQL as well. |
I want to make sqlite3 db files stable stored, and got another wierd problem. I reinstall the caravel to make sure everything got clean, after that I create an admin user by And then I run I found some tables does not exist in the new caravel.db, such as I also tried exactly as this issue, but still not work, I can't init caravel successfully. |
@x4base Now I'm trying to change my database_uri from sqlite to mysql, I've updated the config and followed the manual to start the service. Sorry, it seems I didn't have the access to the tables. Now I changed the owner of tables and it works. |
I am having the same problem. Would you mind elaborating how you fixed the issue? |
@mahedi0244 You could navigate to the database view and choose your objective database, then input your mysql root password correctly. Don't forget to click the "test connection" until it replies "seems ok!". |
@birdspring Thanks for the help. I was able to load the example dashboard properly. Now I loaded a new database and it is giving me the same error like before: "Please define at least one metric for your table". I tested the connection and it says "seems ok" but when I load a new table, it gives me that error. |
@mahedi0244 There may be two mistakes you've made. First, you have to load the table whose name is the same as one of the tables' name in your database. If you forget your tables, you could go to the database view then click the icon "edit record" of your database and test the connection again. Or your could just click the SQL link to see all of your tables. |
@birdspring I made sure the table name is exactly what it is in the database. However, when I click "save" this error message occurs: "Table [users] doesn't seem to exist, couldn't fetch metadata". |
@mahedi0244 When you click the "SQL link", are there any tables showed? |
@birdspring yes, when i click the sql link, all the tables are shown. i tried "caravel db upgrade" but that didnot help. |
Make sure you dont use cache, like Redis. I saw it still not works well. |
@birdspring @mahedi0244 . I have the same problem. I got the error : "Please define at least one metric for your table". I have tried posgres and mysql, both have the same error. However when I used sqlite3 as caravel database it works well. I don't know which step I made mistake at. Would you please elaborate your steps in configuring mysql as the backend database? |
After checking this further, I switched back to sqlite backend and enabled successfully Redis cache. For now I don't see real need to use MySQL as backend. Here is my caravel config file: ROW_LIMIT = 50000 |
Thank you very much. |
Hi folks, just read through this long thread. Could anybody give me some guidance how to point the Caravel metastore to a external DB instance so if the Caravel instance is down the metadata will preserve? Just like hive external metastore? Thanks! |
need help for mysql migration.
|
try to add |
I try to load caravel.db into mysql database for a stable control, and I finally success with this guide ,
And then I changed the caravel/config.py with
SQLALCHEMY_DATABASE_URI = 'mysql://XXXX:XXXX@localhost/caravel
, I can create admin user byfabmanager create-admin --app caravel
and MySQLdatabase successfully updated.But when I try to upgrade database config with
caravel db upgrade
, it's failed with this error :And then I tried
caravel init
, it's still failed:Am I handle this right ? Or caravel doesn't support MySQL to save the meta data yet ?
The text was updated successfully, but these errors were encountered: