参考schemacrawler example和这个similar topic,我也试图用下面的命令从sqlite3文件中获取一个图表,但观察到No database connection URL template provided
错误。有人能帮忙提供一些建议吗?谢谢!
$ 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
我还尝试使用sqlite作为服务器名称,但返回了另一个错误。
$ ./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
1条答案
按热度按时间zte4gxcn1#
@Phoenix6126
在对数据库运行之前,请先通过How to Visualize Your SQLite Database with One Command (and Nothing to Install)。如果您按照这些步骤操作,并使一切正常工作,您将能够使用自己的SQLite数据库。不要更改Docker挂载目标。请严格按照说明操作。
SQLite使用
--server=sqlite
而不是--server=sqlite3
。您可以通过运行./schemacrawler.sh -h
从广泛的SchemaCrawler帮助中获得完整的列表。您的SQLite数据库位于您的主机上,但您已指示SchemaCrawler在Docker容器中查找它。请参阅Docker文档了解如何挂载目录。
苏阿莱·法特希
SchemaCrawler