We introduced some information about metadata in Managing Data in Massive-Scale Vector Search Engine. This article mainly shows how to view the metadata of Milvus.
Milvus supports metadata storage in SQLite or MySQL. There’s a parameter
backend_url (in the configuration file
server_config.yaml) by which you can specify if to use SQLite or MySQL to manage your metadata.
If SQLite is used, a
meta.sqlite file will be generated in the data directory (defined in the
primary_path of the configuration file
server_config.yaml) after Milvus is started. To view the file, you only need to install a SQLite client.
Install SQLite3 from the command line:
sudo apt-get install sqlite3
Then enter the Milvus data directory, and open the meta file using SQLite3:
Now, you’ve already entered the SQLite client command line. Just use a few commands to see what is in the metadata.
To make the printed results typeset easier for humans to read:
. mode column . header on
To query Tables and TableFiles using SQL statements (case-insensitive):
SELECT * FROM Tables SELECT * FROM TableFiles
If you are using MySQL, you need to specify the address of the MySQL service in the
backend_url of the configuration file
For example, the following settings indicate that the MySQL service is deployed locally, with port ‘3306’, user name ‘root’, password ‘123456’, and database name ‘milvus’:
db_config: backend_url: mysql://root:email@example.com:3306/milvus
First of all, install MySQL client:
sudo apt-get install default-mysql-client
After Milvus is started, two tables (Tables and TableFiles) will be created in the MySQL service specified by
Use the following command to connect to MySQL service:
mysql -h127.0.0.1 -uroot -p123456 -Dmilvus
Now, you can use SQL statements to query metadata information:
Next articles will introduce in details the schema of metadata tables. Stay tuned!
Any questions, welcome to join our Slack channel or file an issue in the repo.
GitHub repo: https://github.com/milvus-io/milvus
If you like this article or find it useful, don’t forget to clap!
Like the article? Spread the word
Learn how to adjust log level in Milvus without restarting the service.
An anatomy of the mechanism behind tunable consistency levels in the Milvus vector database.
Learn about user authentication and encryption in transit in Milvus.