0
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

Babelfish for Aurora PostgreSQLを触ってみた

0
Posted at

イベント

https://awsbasics.connpass.com/event/261116/

Babel Fish

https://en.wikipedia.org/wiki/Babel_fish

The Hitchhiker's Guide to the Galaxy(邦題:銀河ヒッチハイク・ガイド)に、

言語を一瞬で翻訳する架空の動物としてバベルフィッシュが出てくるとのことです。

それから PostgreSQLのクエリをSQL Serverのクエリとして変換しつつ、SQL Serverに投げるサービスに命名されたようです。

https://babelfishpg.org/

T-SQL

https://learn.microsoft.com/ja-jp/sql/t-sql/language-reference?view=sql-server-ver16

SQL Server

https://learn.microsoft.com/ja-jp/openspecs/windows_protocols/ms-tds/893fcc7e-8a39-4b3c-815a-773b7b982c50

Bable fish Compass

https://github.com/babelfish-for-postgresql/babelfish_compass

Hands-on

資料

https://github.com/harunobukameda/Babelfish-for-Aurora-PostgreSQL

実施されるかたはこちらから自身のリポジトリにForkして実施するとよいです。

Fork数で一つの評価指数として利用されているとのことです。

Tips

macOSの方はRDPがあるとよい

https://apps.apple.com/jp/app/microsoft-remote-desktop/id1295203466?l=en&mt=12

SSMのFleet ManagerでRDP接続してもよいですが、時と場合によってはコピーアンドペーストが出来たり出来なかったりする事象が発生していたようなので、念頭に置いておくとよいかと思います。

https://aws.amazon.com/jp/about-aws/whats-new/2021/11/aws-systems-manager-console-windows-instances-security/

Amazon RDS が RDS データベースと EC2 コンピューティングインスタンス間のワンクリック接続セットアップをサポート

https://aws.amazon.com/jp/about-aws/whats-new/2022/08/amazon-rds-setting-up-connectivity-rds-database-ec2-compute-instance-1-click/

image

image

上記設定がめちゃくちゃ便利で、EC2⇔RDSで相互にセキュリティグループを作成してアサインするので、必要な通信を許可する場合にはそれぞれをメンテナンスしていく形になります。

Babelfishの設定

RDS起動時にチェックボックスを入れ忘れると、再度作り直しになります。

image

SQL Server Management StudioからRDSにクエリ

SQL Serverとして機能していることを確認

image

AWS Cloud9** 上から PostgreSQLをインストールして実行**

image

感想

SQL Serverを初めて触ったのですが、やはりクエリの癖がすごいです。

ただ見慣れたPostgreSQLのクエリで実行できることでハードルは下がるなと感じました。


Twitter(個人)

ちょうど前日にこちらのウェビナーでも後半にBabelfishが取り扱われていたので参加していました。

https://pages.awscloud.com/JAPAN-event-OE-EIB22-WWSO-Database-RDS-20221104-reg-event.html

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

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?