LoginSignup
0
0

tblsを使ってmysqlのDB定義書をエクセルで出力

Posted at

やりたいこと

mysqlのテーブル定義書をエクセルで出力したい。

方法

tblsを使ってみました

環境

centos7

tblsのインストール

 export TBLS_VERSION=1.73.2
 yum install https://github.com/k1LoW/tbls/releases/download/v$TBLS_VERSION/tbls_$TBLS_VERSION-1_amd64.rpm

出力

tbls out mysql://user:pass@hostname:3306/dbname -t xlsx -o schema.xlsx

まとめ

インストールから出力まで5分もかからずできました。

テーブル定義書の作成を自動化したい人は是非試してみてください。

参考

tbls github

tblsがデータソースとしてBigQuery / Amazon Redshiftに、出力フォーマットとしてxlsx / PlantUMLに対応した etc.

0
0
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
0
0