製品をチェック

無償トライアル:

無償トライアルへ

製品の情報と無償トライアルへ:

Bullhorn CRM Python Connector

Bullhorn CRM データ連携用Python コネクタライブラリ。Bullhorn CRM データをpandas、SQLAlchemy、Dash、petl などの人気のPython ツールにシームレスに統合。

データ連携でお困りですか?

お問い合わせ

Python pandas を使ってBullhorn CRM データをビジュアライズ


CData Python Connector for BullhornCRM を使えば、Python でBullhorn CRM をpandas やその他の標準モジュールでで呼び出し、データ分析やビジュアライズが可能になります。


bullhorncrm ロゴ画像
python ロゴ画像

Python

pandas ロゴ画像

Python エコシステムには多くのモジュールがあり、システム構築を素早く効率的に行うのに役立ちます。CData Python Connector for BullhornCRM は、pandas、Matplotlib モジュール、SQLAlchemy ツールキットから使用することで Bullhorn CRM にデータ連携するPython アプリケーションを構築し、Bullhorn CRM をビジュアライズできます。本記事では、pandas、SQLAlchemy、およびMatplotlib のビルトイン機能でBullhorn CRM にリアルタイムアクセスし、クエリを実行し、結果をビジュアライズする方法を説明します。

CData Python Connector は、ビルトインされた効率的なデータプロセスにより、リアルタイムBullhorn CRM データにPython からアクセスし、高いパフォーマンスと接続性を発揮します。Bullhorn CRM に複雑なクエリを投げる際に、ドライバーはフィルタリング、集計などがサポートされている場合、SQL 処理を直接Bullhorn CRM 側に行わせ、サポートされていないSQL 処理については、組み込まれたSQL エンジンによりクライアント側で処理を行います(特にJOIN やSQL 関数など)。

Bullhorn CRM データへの接続

Bullhorn CRM への連携は、RDB ソースへのアクセスと同感覚で行うことができます。必要な接続プロパティを使って接続文字列を作成します。本記事では、接続文字列をcreate_engine 関数のパラメータとして送ります。

Begin by providing your Bullhorn CRM account credentials in the following:

If you are uncertain about your data center code, codes like CLS2, CLS21, etc. are cluster IDs that are contained in a user's browser URL (address bar) once they are logged in.

Example: https://cls21.bullhornstaffing.com/BullhornSTAFFING/MainFrame.jsp?#no-ba... indicates that the logged in user is on CLS21.

Authenticating with OAuth

Bullhorn CRM uses the OAuth 2.0 authentication standard. To authenticate using OAuth, create and configure a custom OAuth app. See the Help documentation for more information.

以下の手順に従い、必要なモジュールをインストールし、Python オブジェクト経由でBullhorn CRM にアクセスします。

必要なモジュールのインストール

pip で、pandas & Matplotlib モジュールおよび、SQLAlchemy ツールキットをインストールします:

pip install pandas
pip install matplotlib
pip install sqlalchemy

以下のようにモジュールをインポートします:

import pandas
import matplotlib.pyplot as plt
from sqlalchemy import create_engine

Python でBullhorn CRM データをビジュアライズ

次は、接続文字列で接続を確立します。create_engine 関数を使って、Bullhorn CRM に連携するEngne を作成します。.

engine = create_engine("bullhorncrm:///?DataCenterCode=CLS33&OAuthClientId=myoauthclientid&OAuthClientSecret=myoauthclientsecret&InitiateOAuth=GETANDREFRESH&OAuthSettingsLocation=/PATH/TO/OAuthSettings.txt")

Bullhorn CRM にアクセスするSQL を実行

pandas のread_sql 関数を使って好きなSQL を発行して、DataFrame にデータを格納します。

df = pandas.read_sql("""SELECT Id, CandidateName FROM Candidate WHERE CandidateName = 'Jane Doe'""", engine)

Bullhorn CRM データをビジュアライズ

DataFrame に格納されたクエリ結果に対して、plot 関数をつかって、Bullhorn CRM data をグラフで表現してみます。show メソッドはグラフを新しいウィンドウに表示します。

df.plot(kind="bar", x="Id", y="CandidateName")
plt.show()
Bullhorn CRM data in a Python plot (Salesforce is shown).

製品の無償トライアル情報

Bullhorn CRM Python Connector の30日の無償トライアル をぜひダウンロードして、Bullhorn CRM への接続をPython アプリやスクリプトから簡単に作成しましょう。



ソースコードe

import pandas
import matplotlib.pyplot as plt
from sqlalchemy import create_engin

engine = create_engine("bullhorncrm:///?DataCenterCode=CLS33&OAuthClientId=myoauthclientid&OAuthClientSecret=myoauthclientsecret&InitiateOAuth=GETANDREFRESH&OAuthSettingsLocation=/PATH/TO/OAuthSettings.txt")
df = pandas.read_sql("""SELECT Id, CandidateName FROM Candidate WHERE CandidateName = 'Jane Doe'""", engine)

df.plot(kind="bar", x="Id", y="CandidateName")
plt.show()