Refer to the schemacrawler example and this similar topic, I also tried to get a diagram from a sqlite3 file with below commands, but observe No database connection URL template provided
errors. Could anyone help to provide some advises? Thanks!
$ docker run --mount type=bind,source="$(pwd)",target=/home/lch --rm -it schemacrawler/schemacrawler /opt/schemacrawler/bin/schemacrawler.sh --server=sqlite3 --database=my.db --info-level=standard --command=schema --output-file=output.png
SchemaCrawler 16.19.9
Error: No database connection URL template provided
Run SchemaCrawler again with just the
-h
option for help
$ ./schemacrawler.sh --server=sqlite3 --database=~/Downloads/schemacrawler/schemacrawler-16.19.9-bin/bin/my.db --outputformat=png --outputfile=out.png --command=schema --info-level=standard
SchemaCrawler 16.19.9
Error: No database connection URL template provided
Run SchemaCrawler again with just the
-h
option for help
I also tried to use the sqlite as the server name, but return with another error.
$ ./schemacrawler.sh --server=sqlite --database=~/Downloads/schemacrawler/schemacrawler-16.19.9-bin/bin/my.db --outputformat=png --outputfile=out.png --command=schema --info-level=standard
SchemaCrawler 16.19.9
Error: Could not connect to <jdbc:sqlite:~/Downloads/schemacrawler/schemacrawler-16.19.9-bin/bin/nvtelemetry.db>, for <unspecified user>, with properties <{}>
Run SchemaCrawler again with just the
-h
option for help
@Phoenix6126,
Please go through How to Visualize Your SQLite Database with One Command (and Nothing to Install) before running against your database. If you follow these steps, and get everything working, you will be able to work with your own SQLite database. Do not change the Docker mount target. Please follow the instructions exactly.
Use --server=sqlite
not --server=sqlite3
for SQLite. You can get a complete list from the extensive SchemaCrawler help, by running ./schemacrawler.sh -h
.
Your SQLite database is on your host machine, but you have instructed SchemaCrawler to find it within the Docker container. Please refer to the Docker documentation about how to mount directories.
Sualeh Fatehi
SchemaCrawler