ノーコードでクラウド上のデータとの連携を実現。
詳細はこちら →30日間の無償トライアル
無償トライアルはこちら製品の詳細
Certinia データに連携するJava アプリケーションを素早く、簡単に開発できる便利なドライバー。
加藤龍彦
ウェブデベロッパー
こんにちは!ウェブ担当の加藤です。マーケ関連のデータ分析や整備もやっています。
Elasticsearch は、人気の分散型全文検索エンジンです。データを一元的に格納することで、超高速検索や、関連性の細かな調整、パワフルな分析が大規模に、手軽に実行可能になります。Elasticsearch にはデータのローディングを行うパイプラインツール「Logstash」があります。CData Drivers を利用することができるので、30日の無償評価版をダウンロードしてあらゆるデータソースを簡単にElasticsearch に取り込んで検索・分析を行うことができます。
この記事では、CData Driver for Certinia を使って、Certinia のデータをLogstash 経由でElasticsearch にロードする手順を説明します。
それでは、Logstash でElasticsearch にCertinia データの転送を行うための設定ファイルを作成していきます。
There are several authentication methods available for connecting to Certinia: login credentials, SSO, and OAuth.
Set the User and Password to your login credentials. Additionally, set the SecurityToken. By default, the SecurityToken is required, but you can make it optional by allowing a range of trusted IP addresses.
To disable the security token:
To obtain the security token:
If you do not have access to the user name and password or do not want to require them, use the OAuth user consent flow. See the OAuth section in the Help for an authentication guide.
Set UseSandbox to true (false by default) to use a Certinia sandbox account. Ensure that you specify a sandbox user name in User.
input { jdbc { jdbc_driver_library => "../logstash-core/lib/jars/cdata.jdbc.certinia.jar" jdbc_driver_class => "Java::cdata.jdbc.certinia.CertiniaDriver" jdbc_connection_string => "jdbc:certinia:User=myUser;Password=myPassword;Security Token=myToken;InitiateOAuth=REFRESH" jdbc_user => "" jdbc_password => "" schedule => "*/30 * * * * *" statement => "SELECT BillingState, Name FROM Account WHERE Industry = 'Floppy Disks'" } } output { Elasticsearch { index => "certinia_Account" document_id => "xxxx" } }
それでは作成した「logstash.conf」ファイルを元にLogstash を実行してみます。
> logstash-7.8.0\bin\logstash -f logstash.conf
成功した旨のログが出ます。これでCertinia データがElasticsearch にロードされました。
例えばKibana で実際にElasticsearch に転送されたデータを見てみます。
GET certinia_Account/_search { "query": { "match_all": {} } }
データがElasticsearch に格納されていることが確認できました。
CData JDBC Driver for Certinia をLogstash で使うことで、Certinia コネクタとして機能し、簡単にデータをElasticsearch にロードすることができました。ぜひ、30日の無償評価版をお試しください。