I've been testing stuff out with Superset and I think I corrupted my superset db. When I try to acess any chart i get this error:
I found a workaround to this problem, by searching with ag - the silver searcher which individual migration dropped the dbs.perm table, and using the command
superset db downgrade <migration-id>
on the migration prior to that one.
It's still not very clear to me which steps I would take as to completely reset the db safely.
I have the manual, dev installation since I'm working on customizing the code. Let's say I didn't have anything too important in the db, so I'm not afraid to loose tables, users, perms, etc.
I've found I have a superset.db in ~/.superset, but I don't think deleting that will be enough, right?
How can I reset Superset's db so as to make a clean db and start over? Can I do this without losing my Superset installation, or do I need to start over completely? In any case, can you guide me through it?
You need not to reinstall everything. Just remove the ~/.superset/superset.db file and take the backup of this file before removing it just in case you want to restore it. and then run the below commands. These commands will create another database file.
Initialize the database
superset db upgrade
Create an admin user (you will be prompted to set a username, and first and last name before setting a password)
$ export FLASK_APP=superset
$ superset fab create-admin
Load some data to play with
superset load_examples
Create default roles and permissions
superset init
deleting superset.db in ~/.superset should be enough and it's the more clean way to start over. Yet note that SQLLite is not a recommended DB engine for metadata and it's support should be completely removed on the future.
I also recommend using the docker-compose provided for testing/developing on Apache Superset
Related
I've recently started to play with DVC, and I was a bit surprised to see the getting started docs are suggesting to store .dvc/config in git.
This seemed like a fine idea at first, but then I noticed that my Azure Blob Storage account (i.e. my Azure username) is also stored in .dvc/config, which means it would end up in git. Making it not ideal for team collaboration scenarios.
What's even less ideal (read: really scary) is that connection strings entered using dvc remote modify blah connection_string ... also end up in .dvc/config, making them end up in git and, in the case of open source projects, making them end up in very interesting places.
Am I doing something obviously wrong? I wouldn't expect the getting started docs to go very deep into security issues, but I wouldn't expect them to store connection strings in source control either.
My base assumption is that I'm misunderstanding/misconfiguring something, I'd be curious to know what.
DVC has few "levels" of config, that can be controlled with proper flag:
--local - repository level, ignored by git by default - designated for project-scope, sensitive data
project - same as above, not ignored - designated to specify non-sensitive data (it is the default)
--global / --system - for common config for more repositories.
More information can be found in the docs.
I'd like to know if such a method exits, so when the user installs an app actualization the database gets properly actualized.
I've found a way that although it can't always work, I think in practice it will never fail, which is the following:
Check if database version of installed app is higher than the version in a hidden file in the previous app, if so, actualize the database.
Write that file with the database version of installed app.
This way, only if the user were to manually remove the file and not the database would cause my solution to fail in its purpose.
Even then it would be better if there was something that works like onUpgrade() from SQLite in Realm.
Is what I'm mentioning possible?
I was restoring a database in MarkLogic and accidently I changed the security database also. Now I am not able to login into the admin interfaces using my previous admin username and password. I went through the documentation and came to know that if realm is changed in security database this can happen. But no solution was provided. I have tried uninstalling and reinstalling MarkLogic but as this does not change the security database, I still could not login. I am sure that there must be a way to reset my login credentials but I couldn't find it. Can someone suggest what should I do??
How about:
Stop MarkLogic
Move all data
Install a clean copy of MarkLogic
Start MarkLogic
If you have a backup of the Security database, then restore that first. If not, recreate all security settings manually. After that, continue with:
Recreate earlier databases with Forest names identical to how they were
Stop MarkLogic
Move back all Forest data except those of Security
Start MarkLogic
You could try fiddling a bit with the XML configs like assignments.xml, but that is not highly recommended, and do make copies before you do so..
HTH!
Having an argument with my team. We are developing an application using SQLite and some want to add it to the repo (GIT) and some don't. Previously with RDBMS system there has been no perceived benefit of using VCS on the DB. However SQLite is a self contained file with no external dependencies so i assume, even though it is binary, that a commit of the project code + the SQLite file will give an accurate snapshot of the state of play at that point.
I also assume that a branch and merge would work as well.
Has anyone actually done this and if so does it work?
You'd get more benefit from GIT's versioning facilities if you stored a dump of the SQLite database (i.e. commands required to create it) rather than the database file itself. That way you could look at the history of the dump file and see tables or data being added etc.
Generally speaking, it's preferable to include full set of dependencies in a VCS repository. This makes your life a whole lot simpler.
If you're after versioning DB schema, check out Wizardby.
Everything I have read so far, it seems as though you copy the DB from assets to a "working directory" before it is used. If I have an existing SQLite DB I put it in assets. Then I have to copy it before it is used.
Does anyone know why this is the case?
I can see a possible application to that, where one doesn't want to accidentally corrupt database during write. But in that case, one would have to move database back when it's done working on it, otherwise, next time program is run will start from "default" database state.
That might be another use case - you might always want to start program execution with known data state. Previous state might be set from external application.
Thanks everyone for your ideas.
I think what I might have figured out is that the install cannot put a DB directly to the /data directory.
In Eclipse there is no /data which is where most of the discussions I have read say to put it.
This is one of the several I found:
http://www.reigndesign.com/blog/using-your-own-sqlite-database-in-android-applications/comment-page-4/#comment-37008