JDBC Driver for Marketo

Build 24.0.9049

CData JDBC Driver for Marketo

概要

CData JDBC Driver for Marketo を使用すると、Java ベースのアプリケーションおよび開発テクノロジーから簡単にMarketo データに接続することができます。本製品 により、統合が容易な100% Java JDBC ドライバーでMarketo データに複雑な操作なしにアクセスができます。 アプリケーションはMarketo にトラディショナルなデータベースとしてアクセスできます。 本製品 はデータへのアクセスの問題を解決し、パワフルなセキュリティ機能、スマートキャッシング、バッチ処理、ソケットマネジメントなどを実現します。

主要機能

  • SQL でMarketo データを取得および更新。
  • 比類なきパフォーマンスとスケーラビリティ。
  • 一般的なBI、帳票、ETL ツールとのコーディングなしの統合。

はじめに

Marketo データへの認証および接続に関する詳しい説明は、はじめに を参照してください。 他のアプリケーションからの接続については、Marketo データ連携ガイドおよびチュートリアルのリスト を参照してください。

NOTE: ライセンスファイルcdata.jdbc.marketo.lic は、JAR filecdata.jdbc.marketo.jar と同じ場所に配置する必要があります。詳しくは、readme ファイルを参照してください。

JDBC Driver の使用 / ツールからの使用

Marketo データを処理するためのDataSource、Connection、Statement、ResultSet、その他の標準JDBC クラスの使用例については、JDBC の使用 を参照してください。

ツールからの使用 では、JDBC ツールとの統合の手順を一般的なデータベースツールを例に挙げて説明します。

スキーマ検出

標準のJDBC インターフェースを介してスキーマ情報にアクセスするには、スキーマ検出 を参照してください。データソース機能などの追加のメタデータにアクセスするには、システムテーブル をクエリします。

高度な機能

高度な機能 では本製品 でサポートされている、ユーザー定義ビューの定義、SSL 設定、リモーティング、キャッシング、ファイアウォールとプロキシ設定、高度なログの記録など、高度な機能の詳細を説明します。

JDBC リモーティング

JDBC データソースへのリモートアクセスを設定する方法については、JDBC リモーティング を参照してください。JDBC リモーティング機能を使用すると、サーバー上にJDBC 接続をホストでき、事実上どこからでも接続が可能になります-- 異なるプラットフォーム(Java、.NET、C++、PHP、Python など)で標準ベースのテクノロジー(ODBC、JDBC など)を使用しているさまざまなクライアントからの接続が可能です。JDBC リモーティングは、一般的なMySQL ワイヤプロトコルサーバーを使用して有効になります。

SQL 準拠

構文のリファレンスとサポートされているSQL の概要を示すコード例については、SQL 準拠 を参照してください。

データモデル

利用可能なエンティティと、それらをクエリする方法については、データモデル を参照してください。

接続文字列オプション

最後に、Connection プロパティを参照してください。接続の確立に使用できるさまざまなオプションの説明があります。

CData JDBC Driver for Marketo

はじめに

Marketo への接続

接続の確立 は、Marketo への認証方法とJDBC URL に必要な接続プロパティの設定方法について示します。また、利用可能なConnection プロパティを使用して、データモデリングからファイヤーウォールトラバーサルまで、本製品 機能を設定することもできます。高度な設定セクションでは、より高度な設定を行う方法と、接続エラーのトラブルシューティングについて示します。

JDBC データソースへの接続

CData JDBC Driver for Marketo は、Eclipse、NetBeans、IntelliJ IDEA、その他多くの統合開発環境、Java サーバ上で動作するTomcat のようなJ2EE アプリケーションなど、Java アプリケーションへの統合をフルサポートしています。JSP、コンソール、およびswing デモがインストールフォルダにあります。

Java バージョンサポート

ドライバーJAR ファイルのデプロイには、Java Development Kit (JDK) 1.8 以上がシステムにインストールされている必要があります。

Marketo バージョンサポート

本製品 は、REST API バージョン1経由で利用可能なエンティティへのSQL92 アクセスを可能にします。

関連項目

  • Connection オブジェクトの作成

    JDBC 接続オブジェクトを作成するには、Code からの接続 を参照してください。
  • コードからのデータのクエリ

    Marketo テーブルにSQL ステートメントを実行するには、ステートメントの実行プリペアドステートメントの使用 を参照してください。
  • Java ベースツールからの接続

    ツールからの使用 では、Marketo への接続の仕方、およびいくつかの一般的なデータベースツールからデータをクエリする方法について説明します。

CData JDBC Driver for Marketo

ライセンス

自動インストール

Windows の場合、インストーラーは自動的にライセンスをインストールします。インストールに失敗した場合、またはオフラインのコンピュータにライセンスをインストールする必要がある場合は、代わりに手動でインストールできます。

手動インストール

Mac / Unix の場合、ライセンスをコマンドラインからcdata.jdbc.marketo.jar を通じてインストールする必要があります。手動インストールを行う場合は、以下のコマンドを実行します。

java -jar cdata.jdbc.marketo.jar --license
cdata.jdbc.marketo.lic が作成されます。これは.jar ファイルの隣、もしくはユーザーのホームディレクトリ下のcdata ディレクトリに配置する必要があります。

必要に応じて、Windows で手動インストールが必要になる場合があります。その場合の手順は同じです。

CData JDBC Driver for Marketo

接続の確立

JDBC データソースの作成

Java アプリケーションから接続するJDBC データソースを作成できます。CData JDBC Driver for Marketo に基づくJDBC データソースの作成は、3つの基本ステップで構成されます。

  • ドライバーのJAR ファイルをクラスパスに追加します。JAR ファイルはインストールディレクトリの[lib]サブフォルダ内にあります。.lic ファイルはJAR ファイルと同じフォルダ内に配置される必要があることに注意してください。
  • ドライバークラスを入力します。次に例を示します。
    cdata.jdbc.marketo.MarketoDriver
  • JDBC URL を入力します。次に例を示します。
    jdbc:marketo:URL=https://MyMarketoURL.mktorest.com/;OAuthClientId=MyOAuthClientId;OAuthClientSecret=MyOAuthClientSecret;
    
    or
    
    jdbc:cdata:marketo:URL=https://MyMarketoURL.mktorest.com/;OAuthClientId=MyOAuthClientId;OAuthClientSecret=MyOAuthClientSecret;

    上記の2つ目の形式は、同じURL 形式を使用しているドライバー間でアプリケーションに競合がある場合は、CData ドライバーを使用していることを確認するために常に使用できます。URL は "jdbc:marketo:" または"jdbc:cdata:marketo:" のいずれかから始まり、任意の接続プロパティの名前と値のペアをセミコロン区切りで入力します。

Marketo への接続

Marketo に接続するには、次の接続オプションが必要です。

  • URL:REST API サービスのURL。これは管理 -> 統合 -> ウェブサービス -> REST API で確認できます。値の例:https://123-abc-456.mktorest.com/ or https://123-abc-456.mktorest.com/rest
  • OAuthClientId:カスタムサービスに紐付けられたOAuth クライアントID。
  • OAuthClientSecret:カスタムサービスに紐付けられたOAuth クライアントシークレット。
その他の接続オプションについては、接続文字列オプション を参照してください。

OAuth 資格情報の取得

OAuth 資格情報を取得する前に、まだカスタムサービスを持っていない場合は、作成する必要があります。そのためには、カスタムサービスの作成 の手順に従います。

カスタムサービスのOAuth資格情報を取得するには:

  1. 管理タブに移動します。
  2. LaunchPoint オプションをクリックします。
  3. サービスを選択して詳細の表示をクリックします。
  4. Marketo は、認証資格情報を表示するウィンドウを開きます。"Client Id" をOAuthClientId の値として、Client Secret" をOAuthClientSecret の値として使用します。

CData JDBC Driver for Marketo

JDBC URL の構築

JDBC URL の構築

接続文字列は、データソースに関する情報とそのデータソースへの接続方法を提供します。ドライバーには、接続文字列のコンテンツの作成と管理を容易にする接続文字列ビルダが付属しています。

ドライバーをダウンロードおよびインストールしたら、lib フォルダ内の.jar ファイルをダブルクリックしてください。 また、次の例に示すように手動で.jar ファイルを実行することも可能です。

Windows から:

java -jar 'C:\Program Files\CData\CData JDBC Driver for Marketo 2024\lib\cdata.jdbc.marketo.jar'

macOS から:

java -jar cdata.jdbc.marketo.jar

.Jar ファイルを実行すると、[接続プロパティ] ダイアログボックスが開きます。このダイアログボックスを使用して、接続文字列を作成およびテストできます。[接続のテスト]をクリックして、入力した接続プロパティをテストおよび検証します。[コピー]をクリックして接続文字列をコピーすると、JDBC ドライバーが使用されているアプリケーション内で使用できます。

CData JDBC Driver for Marketo

カスタムサービスの作成

カスタムサービスの作成

OAuth 資格情報を取得するには、カスタムサービスが必要です。

この手順では、REST API 権限を持つ新しいロールを作成し、そのロールを既存または新規のユーザーに割り当て、新しいサービスを作成します。カスタムサービスを作成できるのは管理者権限を持つユーザーのみであり、「サービス」という用語はAPI アクセス用のOAuth 資格情報を提供するために作成されたエンティティを指すことに注意してください。

ステップ1:API アクセス用の新しいロールの作成

  1. Marketo アプリケーションの[管理]エリアに移動します。
  2. [セキュリティ]セクションに移動します。
  3. ユーザ& ロールをクリックします。
  4. ロールタブを選択します。
  5. 新規ロールをクリックします。
  6. [ロール名]を指定し、ロールの権限を選択します。REST API に固有の[API へのアクセス]権限を指定します。

ステップ2:API アクセス用の新しいユーザーの割り当てまたは作成

  1. ユーザタブを選択します。
  2. ロールをユーザーに割り当てるには、新規ユーザの招待をクリックします。
  3. 新しいユーザーの情報を入力し、先ほど作成した、REST API に接続可能なロールを割り当てます。
  4. API 専用ユーザーとして指定するには、API のみオプションを選択します。

ステップ3:新しいサービスの作成

  1. 管理 -> 統合に移動して、LaunchPoint オプションをクリックします。
  2. 新規サービスをクリックします。
  3. サービスタイプをカスタムに指定します。
  4. サービスの[表示名]および[詳細]を入力します。
  5. 作成したユーザーをサービスに割り当てます。

Marketo は、Marketo への接続および認証ために設計された新しいREST API サービスを作成します。また、REST API へのユーザーのアクセスを検証するために必要なOAuth ベースの認証情報も生成します。 カスタムサービスの作成後、OAuth 資格情報の取得 セクションに戻り、認証に必要なOAuth Client ID とClient Secret を取得します。

CData JDBC Driver for Marketo

変更履歴

General Changes

DateBuild
Number
Change
Type
Description
05/09/20248895GeneralChanged
  • 以前はROUND 関数は負の値を受け取りませんでした。その機能は復元されました。
03/15/20248840GeneralAdded
  • Java のString.compare() 機能をSQL クエリに提供するSTRING_COMPARE という新しいSQL 関数が作成されました。2つの文字列の比較値を表す数値を返します。
11/29/20238733GeneralChanged
  • The ROUND function doesn't accept the negative precision values anymore.

Changed
  • The returning types of the FDMonth, FDQuarter, FDWeek, LDMonth, LDQuarter, LDWeek functions are changed from Timestamp to Date.
  • The return type of the ABS function will be consistent with the parameter value type.
11/28/20238732GeneralAdded
  • Added the HMACSHA256 formatter to allow for secrets to be decoded if it is in base64 format
10/27/20238700JDBCChanged
  • Added support for Connection.abort() method.
06/20/20238571GeneralAdded
  • Added the new sys_lastresultinfo system table.
04/25/20238515GeneralRemoved
  • Removed support for the SELECT INTO CSV statement. The core code doesn't support it anymore.
12/14/20228383GeneralChanged
  • Added the Default column to the sys_procedureparameters table.
09/30/20228308GeneralChanged
  • Added the IsPath column to the sys_procedureparameters table.
06/11/20228197JDBCChanged
  • The method GetJDBCMinorVersion() and GetJDBCMajorVersion() return 4.2 as the supported JDBC major / minor version.
04/28/20228153JDBCChanged
  • Removed support for JRE 1.6. JRE 1.8 and above is now required.
02/25/20228091JDBCChanged
  • The method DatabaseMetaData.getTypeInfo() now returns all of the data types that the driver supports. Previously, it was returning only a portion of the data types. The types include: tinyint, smallint, int, bigint, float, double, numeric, decimal, bit, date, datetime, time, varchar, binary, uuid.
02/24/20228090JDBCChanged
  • Corrected the return value of method DatabaseMetaData.supportsOuterJoins(), which used to return an incorrect value.
10/27/20217970JDBCChanged
  • Added support for JDK 17
09/12/20217925JDBCRemoved
  • Removed the IS_READONLY, IS_KEY, NUMERIC_PRECISION, and DECIMAL_DIGITS columns from DatabaseMetadata.GetColumns(), as they are not part of the JDBC Specification. This information is still available via other metadata calls.
09/02/20217915GeneralAdded
  • Added support for the STRING_SPLIT table-valued function in the CROSS APPLY clause.
08/07/20217889GeneralChanged
  • Added the KeySeq column to the sys_foreignkeys table.
08/06/20217888GeneralChanged
  • Added the new sys_primarykeys system table.
07/23/20217874GeneralChanged
  • Updated the Literal Function Names for relative date/datetime functions. Previously, relative date/datetime functions resolved to a different value when used in the projection as opposed to the predicate. For example: SELECT LAST_MONTH() AS lm, Col FROM Table WHERE Col > LAST_MONTH(). Formerly, the two LAST_MONTH() methods would resolve to different datetimes. Now, they will match.
  • As a replacement for the previous behavior, the relative date/datetime functions in the criteria may have an 'L' appended to them. For example: WHERE col > L_LAST_MONTH(). This will continue to resolve to the same values that were previously calculated in the criteria. Note that the "L_" prefix will only work in the predicate - it not available for the projection.
04/25/20217785GeneralAdded
  • Added support for handling client side formulas during insert / update. For example: UPDATE Table SET Col1 = CONCAT(Col1, " - ", Col2) WHERE Col2 LIKE 'A%'
04/23/20217783GeneralChanged
  • Updated how display sizes are determined for varchar primary key and foreign key columns so they will match the reported length of the column.
04/16/20217776GeneralAdded
  • Non-conditional updates between two columns is now available to all drivers. For example: UPDATE Table SET Col1=Col2
04/16/20217776GeneralChanged
  • Reduced the length to 255 for varchar primary key and foreign key columns.

Changed
  • Updated index naming convention to avoid duplicates.
04/16/20217776GeneralChanged
  • Updated implicit and metadata caching to improve performance and support for multiple connections. Old metadata caches are not compatible - you need to generate new metadata caches if you are currently using CacheMetadata.

CData JDBC Driver for Marketo

JDBC の使用

このセクションでは、JDBC でMarketo にデータアクセスコードを書き込む手順を説明します。

利用可能なAPI オブジェクトと、それらをSQL でクエリする方法の詳細については、データモデル を参照してください。 SQL 構文についてはSQL 準拠 を参照してください。

コードからの接続

本製品 をデプロイしてMarketo への接続を設定するために必要な前提情報については、接続の確立 を参照してください。Code からの接続 では、DriverManager クラスまたはMarketoDataSource クラスとの接続方法を示します。

SQL の実行

Statement クラスとPreparedStatement クラスを使用してMarketo にSQL を実行します。

  • ステートメントを実行し、返されたResultSet を反復処理するには、ステートメントの実行 を参照してください。
  • パラメータ化されたステートメントを実行するには、プリペアドステートメントの使用 を参照してください。PreparedStatement クラスは、クエリを複数回効率よく実行し、SQL インジェクション攻撃を軽減する手段を提供します。
  • Marketo のバルク処理機能を活用するには、バッチ処理 を参照してください。 本製品 は、JDBC バッチコマンドをMarketo への単一の要求に変換します。

ストアドプロシージャの実行

ストアドプロシージャを、パラメータ化されたステートメント(CallableStatement クラスを使用)、またはSQL ステートメント(EXECUTE 構文を使用)として実行できます。ストアドプロシージャの呼び出し を参照してください。

コネクションプーリング

MarketoDataSource オブジェクトで、プールされた接続をインスタンス化します。プールの作成および設定については、接続プール を参照してください。

CData JDBC Driver for Marketo

インストールされるファイル

CData JDBC Driver for Marketo には以下のファイルが付属しています。これらは、インストールディレクトリの[lib]サブフォルダにあります。

  • cdata.jdbc.marketo.jar:JDK 1.8でコンパイルされたPure Java Type 4/5 JDBC ドライバー。
  • cdata.jdbc.marketo.lic:これはライセンスファイルです。JAR と同じフォルダに配置される必要があります。
  • cdata.jdbc.marketo.remoting.ini:これは、JDBC リモーティング のコンフィギュレーションファイルです。

CData JDBC Driver for Marketo

Code からの接続

このセクションでは、JDBC DriverManager またはMarketoDataSource インターフェースに接続する方法について説明します。

DriverManager で接続

DriverManager クラスを使用して接続する場合、CData JDBC Driver for Marketo はJDBC 規則に従います。最初にMarketo ドライバークラスをロードします。次に、接続を作成します。

ドライバーのロード

JDBC 4.0仕様では、次の手順はオプションです。
Class.forName("cdata.jdbc.marketo.MarketoDriver");

接続の確立

静的なDriverManager クラスのgetConnection メソッドで接続文字列を指定します。接続文字列を"jdbc:marketo:" で始めます。一般的な接続文字列は以下のとおりです。

Connection conn = DriverManager.getConnection("jdbc:activedirectory:User=MyUserName;Password=MyPassword;Server=MyServer;Port=MyPort;BaseDN=yourDN;");
または、Properties オブジェクトを使用して接続オプションを準備できます。Properties オブジェクトをDriverManager に渡します。
Properties prop = new Properties();
prop.setProperty("URL","https://MyMarketoURL.mktorest.com/");
prop.setProperty("OAuthClientId","MyOAuthClientId");
prop.setProperty("OAuthClientSecret","MyOAuthClientSecret");

Connection conn = DriverManager.getConnection("jdbc:marketo:",prop);

MarketoDataSource クラスで接続

以下の例に示すように、MarketoDataSource クラスを使用してプールされた接続を作成できます。詳しくは、接続プール を参照してください。

次の例は、プールされたConnection オブジェクトをインスタンス化します。

MarketoDataSource ds = new MarketoDataSource("jdbc:marketo:UseConnectionPooling=true;URL=https://MyMarketoURL.mktorest.com/;OAuthClientId=MyOAuthClientId;OAuthClientSecret=MyOAuthClientSecret;"); 
Connection conn = ds.getConnection();

CData JDBC Driver for Marketo

ステートメントの実行

Code からの接続 後、Statement クラスを使用してSQL ステートメントを実行できます。パラメータ化されたステートメントを実行するには、プリペアドステートメントの使用 を参照してください。

Select

データを返すSQL ステートメントを実行するには、Statement クラスの汎用の実行メソッドを使用するかexecuteQuery メソッドを使用します。クエリの結果を返すには、Statement クラスのgetResultSet メソッドを呼び出します。

次の例では、実行メソッドを呼び出して、返された結果を反復処理します。

Statement stat = conn.createStatement();
boolean ret = stat.execute("SELECT Id, Email FROM Leads");
if (ret) {
  ResultSet rs=stat.getResultSet();
  while(rs.next()) {
    for(int i=1;i<=rs.getMetaData().getColumnCount();i++) {
      System.out.println(rs.getMetaData().getColumnLabel(i) +"="+rs.getString(i));
    }
  }
}

Insert

INSERT を実行するには、汎用の実行メソッド、またはStatement クラスのexecuteUpdate メソッドを使用します。次に例を示します。

Statement stat = conn.createStatement();
int count = stat.executeUpdate("INSERT INTO Leads (Id, Email) VALUES ('Id','Email')");

Upsert

アップサートの実行は、INSERT と同じです。一般的な実行メソッドかexecuteUpdate を使用できます。次に例を示します。

Statement stat = conn.createStatement();
int count = stat.executeUpdate("UPSERT INTO Leads (Id, Email) VALUES ('Id','Email')");

Update

更新を実行するには、汎用の実行メソッド、またはStatement クラスのexecuteUpdate メソッドを使用します。getUpdateCount メソッドを呼び出して、影響を受けた行数を取得できます。または、executeUpdate メソッドを呼び出します。このメソッドは行数を返します。次に例を示します。

Statement stat = conn.createStatement();
stat.execute("UPDATE Leads SET Id = 'XXX' , Email = 'YYY' WHERE Id = 'c2ef66a5-a545-413b-9312-79a53caadbc4'");
int count = stat.getUpdateCount();

Delete

削除を実行するには、汎用の実行メソッド、またはStatement クラスのexecuteUpdate メソッドを使用します。getUpdateCount メソッドを呼び出して、影響を受けた行数を取得できます。または、executeUpdate メソッドを呼び出します。このメソッドは行数を返します。次に例を示します。

Statement stat = conn.createStatement();
stat.execute("DELETE FROM Leads WHERE Id = 'c2ef66a5-a545-413b-9312-79a53caadbc4'");
int count = stat.getUpdateCount();

CData JDBC Driver for Marketo

プリペアドステートメントの使用

PreparedStatement オブジェクトは、プリコンパイルされたSQL ステートメントを表します。PreparedStatement は複数回使用でき、SQL インジェクション攻撃を軽減します。PreparedStatement には、SELECT、INSERT、UPDATE、またはDELETE ステートメントを使用できます。

プリペアドステートメントを実行するには、Statement クラスの一般的な実行メソッドを使用できます。このセクションでは、プリペアドステートメントの実行方法について説明します。

  1. Connection クラスのprepareStatement メソッドを使用して、PreparedStatement オブジェクトをインスタンス化します。

    接続を作成するにはCode からの接続 を参照してください。

  2. PreparedStatement の対応するセッターメソッドを呼び出すことによってパラメータを宣言します。パラメータインデックスは1から始まることに注意してください。
  3. PreparedStatement の実行メソッドを呼び出して、ステートメントを実行します。
  4. PreparedStatement のgetResultSet メソッドを呼び出して、ResultSet オブジェクトに結果をプルします。
  5. ResultSet.next を呼び出して、結果セットを反復処理します。ResultSetMetaData クラスを使用して、結果セットに関するカラム情報を取得します。ResultSetMetaData オブジェクトをインスタンス化するには、ResultSet のgetMetaData メソッドを呼び出します。

Select

次の例は、SELECT プリペアドステートメントを実行する方法を示しています。

String query = "SELECT * FROM Leads WHERE Id=? AND Email=?";
PreparedStatement pstmt = conn.prepareStatement(query);
pstmt.setString(1, "XXX");
pstmt.setString(2, "YYY");
boolean ret = pstmt.execute();
if (ret) {
  ResultSet rs=pstmt.getResultSet();
  while(rs.next()) {
    for(int i=1;i<=rs.getMetaData().getColumnCount();i++) {
      System.out.println(rs.getMetaData().getColumnLabel(i) +"="+rs.getString(i));
    }
  }
} 

INSERT

INSERT を実行するには、一般的な実行メソッド、または次の例に示すようにexecuteUpdate メソッドを使用できます。

String query = "INSERT INTO Leads (Id, Email) VALUES (?,?)";
PreparedStatement pstmt = conn.prepareStatement(query);
pstmt.setString(1, "XXX");
pstmt.setString(2, "YYY");
int count = pstmt.executeUpdate();

Upsert

アップサートの実行は、INSERT と同じです。一般的な実行メソッドかexecuteUpdate を使用します。
String query = "UPSERT INTO Leads (Id, Email) VALUES (?,?)";
PreparedStatement pstmt = conn.prepareStatement(query);
pstmt.setString(1, "XXX");
pstmt.setString(2, "YYY");
int count = pstmt.executeUpdate();

Update

更新を実行するには、一般的な実行メソッド、または次の例に示すようにexecuteUpdate メソッドを使用できます。executeUpdate メソッドは影響を受けた行を返します。もしくは、getUpdateCount を呼び出します。

String query = "UPDATE Leads SET Email = ? WHERE Id=?";
PreparedStatement pstmt = conn.prepareStatement(query);
pstmt.setString(1, "XXX");
pstmt.setString(2, "YYY");
int count = pstmt.executeUpdate();
System.out.println("Affected rows: "+count);

Delete

削除を実行するには、一般的な実行メソッド、または次の例に示すようにexecuteUpdate メソッドを使用できます。executeUpdate メソッドは影響を受けた行を返します。もしくは、getUpdateCount を呼び出します。

String query = "DELETE FROM Leads WHERE Id = ?";
PreparedStatement pstmt = conn.prepareStatement(query);
pstmt.setString(1, "XXX");
int count = pstmt.executeUpdate();
System.out.println("Affected rows: "+count);

CData JDBC Driver for Marketo

バッチ処理

CData JDBC Driver for Marketo では、JDBC batch API を通じて、Marketo の一括ロードサポートを活用することができます。batch API を使用して、関連するSQL データ操作ステートメントを同時に実行できます。

JDBC Batch API の使用

次の例は、PreparedStatement を使用して一括操作を実行する方法を示しています。

一括挿入

PreparedStatement を使用して一括挿入を実行するには、一括挿入の一部として実行するパラメータのセットごとにaddBatch を呼び出します。すべてのパラメータのセットをバッチに追加したら、executeBatch を呼び出して一括挿入を実行できます。

executeBatch メソッドは、各ステートメントの更新数を含む配列を返します。次に例を示します。

String query = "INSERT INTO Leads (Email) VALUES (?)"; 
PreparedStatement pstmt = conn.prepareStatement(query);

pstmt.setString(1, "Jon Doe"); 
pstmt.addBatch();

pstmt.setString(1, "John"); 
pstmt.addBatch();

int[] r = pstmt.executeBatch();
for(int i: r)
  System.out.println(i);

一括更新

PreparedStatement を使用して一括更新を実行するには、一括更新の一部として実行するパラメータのセットごとにaddBatch を呼び出します。すべてのパラメータのセットをバッチに追加したら、executeBatch を呼び出します。

executeBatch メソッドは、配列内の各ステートメントの更新数を返します。次に例を示します。

String query = "UPDATE Leads SET Email = ? WHERE Id = ?"; 
PreparedStatement pstmt = conn.prepareStatement(query);

pstmt.setString(1,"Jon Doe");
pstmt.setString(2,"MyId"); 
pstmt.addBatch();		

pstmt.setString(1,"John");
pstmt.setString(2,"MyId2"); 
pstmt.addBatch();		

int[] r = pstmt.executeBatch();
for(int i: r)
  System.out.println(i);

一括削除

PreparedStatement を使用して一括削除を実行するには、一括削除の一部として実行するパラメータのセットごとにaddBatch を呼び出します。すべてのパラメータのセットをバッチに追加したら、executeBatch を呼び出します。

executeBatch メソッドは、配列内の各ステートメントの更新数を返します。次に例を示します。

String query = "DELETE FROM Leads WHERE Id = ?";
PreparedStatement pstmt = conn.prepareStatement(query);

pstmt.setString(1,"MyId1"); 
pstmt.addBatch();		

pstmt.setString(1,"MyId2");
pstmt.addBatch();		

int[] r = pstmt.executeBatch();
for(int i: r)
  System.out.println(i);

バッチサイズの設定

サーバーに送信されるリクエストのサイズに制限がある場合は、バッチサイズの最大値を設定する必要があります。BatchSize プロパティを設定して、バッチ全体を指定された値のバッチに分割します。各バッチは、個別にサーバーに送信されます。

または、BatchSize を0 に設定して、バッチ全体を送信します。

CData JDBC Driver for Marketo

接続プール

本製品 は標準JDBCコネクションプーリングを実装しています 。プーリングの有効化にはUseConnectionPooling を設定します。次のセクションでは、それらの設定および使用方法について説明します。

プールされた接続の操作

プールされていない接続との通信と同じように、標準JDBC オブジェクトを使って接続を開いたり、閉じたりすることができます。この場合、取得された Connection オブジェクトは、コネクションプールにより所有される物理的接続のハンドルです。接続が閉じられると、接続が廃棄されずにハンドルがプールに戻され、次の接続リクエストに使われます。

プールに戻されるには、明示的に接続を閉じなければなりません。

コネクションプールの設定

UseConnectionPooling に加え、次の接続プロパティを設定し、コネクションプールをコントロールします。

  • PoolMaxSize:同時に開ける接続の最大数を定義します。
  • PoolIdleTimeout:どのくらいの時間接続プールで接続がアイドル状態を維持できるかを設定します。この制限を超えた場合、接続はプールから削除されます。
  • PoolWaitTime:どのくらいの時間新しい接続リクエストが、接続が有効になるまで待機すべきかの制限を設定します。この制限を超えた場合、リクエストはエラーを返します。デフォルトで接続リクエストは接続が有効になるまで無制限で待ち続けます。

marketoDataSource でのコネクションプーリング

接続をプールするためのデフォルトのメソッドを使用するには、UseConnectionPooling を使用してMarketoDataSource をインスタンス化します。

MarketoDataSource marketoDataSource = new MarketoDataSource();
marketoDataSource.setURL("jdbc:marketo:UseConnectionPooling=true;URL=https://MyMarketoURL.mktorest.com/;OAuthClientId=MyOAuthClientId;OAuthClientSecret=MyOAuthClientSecret;");

JDBC コネクションプーリング

JDBC ConnectionPoolDataSource インターフェースを使用してプールされた接続を確立する場合は、UseConnectionPooling でMarketoConnectionPoolDataSource をインスタンス化します。

MarketoConnectionPoolDataSource marketoPoolDataSource = new MarketoConnectionPoolDataSource();
marketoPoolDataSource.setURL("jdbc:marketo:UseConnectionPooling=true;URL=https://MyMarketoURL.mktorest.com/;OAuthClientId=MyOAuthClientId;OAuthClientSecret=MyOAuthClientSecret;");

コネクションプールを閉じる

JRE 1.3 もしくはそれ以上では、アプリケーションが止まると自動的にコネクションプールは閉じられます。DataSource オブジェクトのclose メソッドを呼び出して手動でコネクションプールを閉じることが可能です。

CData JDBC Driver for Marketo

JNDI

JNDI でのコネクションプーリング

Java Naming and Directory Service(JNDI)は、分散アプリケーションがサービスを検索できるようにするAPI です。JNDI を使用すると、コネクションプールを簡単に設定できます。

JNDI を使用してコネクションプールを設定するには、以下のサンプルコードに示すように、JNDI ファイルシステムサービスプロバイダーを初期化する必要があります。このサンプルを実行するには、クラスパスにfscontext.jar ファイルとproviderutil.jar ファイルを追加する必要があります。これらのファイルは、Oracle Java Archive からダウンロードできます。Java SE セクションで、[Java Platform Technologies]->[Java Naming and Directory Interface]を選択します。

 
Hashtable env = new Hashtable();
env.put(Context.INITIAL_CONTEXT_FACTORY,
    "com.sun.jndi.fscontext.RefFSContextFactory");
env.put(Context.PROVIDER_URL, "file:///tmp");

Context ctx = new InitialContext(env); 
DataSource ds = null;
Connection conn = null;
次のコードは、MarketoDataSource をJNDI ネーミングサービスに登録し、サービスからDataSource のインスタンスを取得し、インスタンスからプールされた接続を作成します。
try {
  MarketoConnectionPoolDataSource marketoDataSource = new MarketoConnectionPoolDataSource();
  marketoDataSource.setURL("jdbc:marketo:UseConnectionPooling=true;URL=https://MyMarketoURL.mktorest.com/;OAuthClientId=MyOAuthClientId;OAuthClientSecret=MyOAuthClientSecret;");
  ctx.bind("jdbc/marketo", marketoDataSource);
  ds = (DataSource) ctx.lookup("jdbc/marketo");

  conn = ds.getConnection();
  Statement stat = conn.createStatement();
  boolean ret = stat.execute("SELECT 1");
  ResultSet rs=stat.getResultSet(); 
} catch(Exception ex) { } finally {
  if(conn != null) conn.close();
}

CData JDBC Driver for Marketo

ストアドプロシージャの呼び出し

ストアドプロシージャの呼び出し

Marketo は、2つのクラスのストアドプロシージャをサポートしています。

  • パラメータ化されたストアドプロシージャ呼び出しを実行するには、CallableStatement オブジェクトを使用します。
  • EXEC 構文を使用してSQL ステートメントとしてストアドプロシージャを実行するには、Statement オブジェクトを使用します。

CallableStatement オブジェクトの使用

CallableStatement クラスの一般的な実行メソッドを使用して、ストアドプロシージャをパラメータ化されたクエリとして実行できます。

ストアドプロシージャの結果を返すには、getResultSet を呼び出します。更新された行の数を返すには、getUpdateCount を呼び出します。

次の例は、GetEmailFullContent ストアドプロシージャを実行する方法を示しています。

CallableStatement cstmt = conn.prepareCall("GetEmailFullContent");
cstmt.setString("Id", "23685");
boolean ret = cstmt.execute();   
if (!ret) {
  int count=cstmt.getUpdateCount();
  if (count!=-1) {
    System.out.println("Affected rows: "+count);
  }
}
else {
  ResultSet rs=cstmt.getResultSet();
  while(rs.next()){
    for(int i=1;i<=rs.getMetaData().getColumnCount();i++) {
      System.out.println(rs.getMetaData().getColumnLabel(i) +"="+rs.getString(i));
    }
  }
}

Statement オブジェクトの使用

Statement クラスの実行メソッドを使用して、ストアドプロシージャをSQL ステートメントとして実行できます。

ストアドプロシージャの結果を返すには、getResultSet を呼び出します。更新された行の数を返すには、getUpdateCount を呼び出します。

次の例は、GetEmailFullContent ストアドプロシージャを実行する方法を示しています。(構文について、詳しくはEXECUTE ステートメント を参照してください。)

Statement stmt = conn.createStatement();
boolean ret = stmt.execute("EXEC GetEmailFullContent Id = '23685'");

if (!ret) {
  int count=stmt.getUpdateCount();
  if (count!=-1) {
    System.out.println("Affected rows: "+count);
  }
}
else {
  ResultSet rs=stmt.getResultSet();
  while(rs.next()) {
    for(int i=1;i<=rs.getMetaData().getColumnCount();i++) {
      System.out.println(rs.getMetaData().getColumnLabel(i) +"="+rs.getString(i));
    }
  }
}

CData JDBC Driver for Marketo

ツールからの使用

CData JDBC Driver for Marketo は、アナリティクスツールおよびその他のアプリケーションに、標準JDBC 接続プロセスを提供します。

JDBC 統合のクイックスタート

CData JDBC Driver for Marketo は、BI ツールからIDE までのアプリケーションに、標準JDBC 接続プロセスを提供します。以下のセクションでは、Marketo JDBC データソースの作成およびクエリの開始方法について、いくつかの一般的なデータベースツールからJDBC でデータにアクセスしながら説明します。

Marketo 連携クイックスタートの完全なリスト

他のアプリケーションからの接続については、Marketo データ連携ガイドおよびチュートリアルのリストを参照してください。

CData JDBC Driver for Marketo

DbVisualizer

このセクションでは、DbVisualizer でデータに接続を確立する方法、テーブルエディタを使用してデータを編集および保存する方法、およびSQL を実行する方法について示します。

JDBC Driver for Marketo の追加

ドライバー定義にdriver .jar ファイルを追加するには、次の手順を実行してください。

  1. DbVisualizer ツールバーで、Tools -> Driver Manager を選択します。
  2. Driver Manager ウィンドウの左上にある"+" ボタンをクリックし、Custom を選択します。
  3. ドライバーの名前を入力します。
  4. URL Format ボックスに以下を入力します:
    jdbc:marketo:
  5. Driver artifacts and jar files セクションで、右側の"+" ボタンをクリックし、Add Files... を選択して、ドライバーの.jar ファイルであるcdata.jdbc.marketo.jar を確認します。デフォルトでは、これはインストールディレクトリのlib サブフォルダにあります。このフォルダ内の.lic ファイルは、.jar ファイルと同じフォルダに配置される必要があることに注意してください。
  6. Driver Class メニューでMarketoDriver クラス、cdata.jdbc.marketo.MarketoDriver を選択します。

Marketo データベース接続の作成

Marketo ドライバーを選択し、JDBC URL をビルドしてJDBC データソースを作成するには、次の手順を実行してください。

  1. DbVisualizer ツールバーで、Database -> Create Database Connection を選択します。Driver Name セレクタが表示されます。

    Note: このオプションがグレーアウトしている場合、先に左側ペインのDatabases タブにあるツリービューのConnections ルート要素を選択する必要があります。

  2. 上記のセクションで定義したJDBC ドライバーの名前をダブルクリックします。
  3. Settings FormatDatabase URL に設定していない場合は、これを設定します。
  4. Driver Type がJDBC ドライバーに定義した名前にデフォルトで設定されなければ、これを設定します。
  5. Database URL を完全なJDBC URL に設定します。JDBC URL 構文はjdbc:marketo: に続けてセミコロン区切りでname-value ペアの接続プロパティを入力します。

    一般的な接続文字列は次のとおりです。

    jdbc:marketo:URL=https://MyMarketoURL.mktorest.com/;OAuthClientId=MyOAuthClientId;OAuthClientSecret=MyOAuthClientSecret;

  6. Connect をクリックします。
  7. 接続に成功したら、Database TypeGeneric に設定します。

スキーマの検出とMarketo データのクエリ

これで、次のようにデータをブラウズしてSQL を実行できます。

  • 使用可能なテーブルにアクセスするには、Databases タブで、接続、データベース、スキーマ、テーブルまたはビューのノードを展開します。
  • テーブルのデータとメタデータをブラウズするには、テーブルを右クリックしOpen in Tab またはOpen in New Tab をクリックします。
  • SQL クエリを実行するには、SQL Commander -> New SQL Commander を選択します。利用可能なメニューからDatabase Connection、Database、Schema を選択します。

特定のテーブルのクエリについては、データモデル を参照してください。SQL 構文について、詳しくはSQL 準拠 を参照してください。

CData JDBC Driver for Marketo

DBeaver

このセクションでは、DBeaver の標準JDBC 接続プロセスに従ってMarketo に接続する方法について説明します。ドライバーJAR を追加して、ドライバークラス名を指定し、JDBC URL にMarketo 固有のパラメータを指定します。

JDBC Driver for Marketo の追加

driver .jar ファイルを追加するには、次の手順を実行してください。

  1. DBeaver アプリケーションを開き、[Database]メニューの[Driver Manager]オプションを選択します。[New]をクリックして[Create New Driver]フォームを開きます。
  2. [Driver Name]ボックスに、ユーザーフレンドリーなドライバー名を入力します。
  3. .jar ファイルを追加するには、[Libraries]タブの[Add File]をクリックします。インストールディレクトリの[lib]サブフォルダにあるcdata.jdbc.marketo.jar ファイルを選択します。

    .lic ファイルは.jar ファイルと同じフォルダ内に配置される必要があることに注意してください。

  4. [Find Class]をクリックして、リストから"cdata.jdbc.marketo.MarketoDriver" を選択します。
  5. [URL Template]フィールドに、jdbc:marketo:を入力します。

JDBC データソースの作成

Marketo ドライバーを選択し、 JDBC URL をビルドしてJDBC データソースを作成するには、次の手順を実行してください。

  1. DBeaver メインウィンドウで、[Database]->[New Connection]をクリックします。
  2. 表示されたダイアログで、作成したドライバー定義を選択します。
  3. ウィザードの次のページで、[Driver Properties]タブをクリックします。
  4. Marketo への接続に必要な接続プロパティを入力します。

    一般的な接続文字列は次のとおりです。

    jdbc:marketo:URL=https://MyMarketoURL.mktorest.com/;OAuthClientId=MyOAuthClientId;OAuthClientSecret=MyOAuthClientSecret;
    接続および認証方法については、接続の確立 を参照してください。

  5. デフォルト設定で接続を作成するか、高度なネットワーク設定(プロキシ、ファイヤーウォール、およびSSH)を構成します。

スキーマの検出とMarketo データのクエリ

接続によって公開されたテーブルから情報をクエリするには、次の手順を実行してください。

  1. 接続用のノードを展開して、データベースのメタデータにアクセスします。
  2. [Table]を右クリックしてから[Edit Table]をクリックして、テーブルメタデータをブラウズしてテーブルデータを編集します。

SQL クエリを実行するには、[SQL Editor]->[New SQL Editor]を選択して、作成したMarketo 接続を選択します。これで、コード補完を使用してクエリを入力することができます。

CData JDBC Driver for Marketo

SQuirreL SQL

このセクションでは、Marketo データのJDBC データソースを作成しクエリを実行する方法について説明します。

JDBC Driver for Marketo の追加

driver .jar ファイルを追加するには、次の手順を実行してください。

  1. [Drivers]ペインで、+アイコンをクリックして[Add Driver]ウィザードを開きます。
  2. [Name]ボックスに、ユーザーフレンドリーなドライバー名を入力します。例:CData JDBC Driver for Marketo
  3. [Example URL]ボックスに、次を入力します。 jdbc:marketo:
  4. [Extra Class Path]タブで、[Add]をクリックします。
  5. 表示されたファイルエクスプローラーで、インストールディレクトリの[lib]サブフォルダにあるドライバーの.jar ファイルを選択します。
  6. [List Drivers]をクリックして、[Class Name]メニューにドライバーのクラス名 cdata.jdbc.marketo.MarketoDriver を入力します。

JDBC データソースの作成

作成したMarketo ドライバーを選択し、JDBC URL をビルドしてJDBC データソースを作成するには、次の手順を実行してください。

  1. [Aliases]ペインで、+アイコンをクリックします。
  2. 表示された[Add Alias]ウィザードで、以下のフィールドの値を入力します。

    • Name:エイリアスの名前を入力します。例:CData Marketo Source
    • Driver:作成したドライバー定義を選択します。
    • URL:次を入力します。 jdbc:marketo:
    • User Name:必要に応じて、認証用のユーザー名を入力します。これはJDBC URL に追加されます。
    • Password:必要に応じて、認証用のパスワードを入力します。これはJDBC URL に追加されます。

  3. 追加のプロパティを定義する場合は、それらをセミコロン区切りのリストでJDBC URL に追加します。

    一般的な接続文字列は次のとおりです。

    jdbc:marketo:URL=https://MyMarketoURL.mktorest.com/;OAuthClientId=MyOAuthClientId;OAuthClientSecret=MyOAuthClientSecret;
    接続および認証方法については、接続の確立 を参照してください。

あるいは、これらの手順に従って、[Driver Properties]ダイアログにプロパティを追加します。
  1. [Use Driver Properties]チェックボックスを選択します。
  2. [Specify]カラムで、必要な接続プロパティのチェックボックスを選択し、対応する値を指定します。
  3. [OK]をクリックした後に表示されるダイアログで、[Connect]をクリックして接続をテストします。

スキーマの検出とMarketo データのクエリ

データソースに接続するには、[Aliases]ペインのエイリアスを右クリックして[Connect]をクリックします。メタデータがロードされると、Marketo データソースの新しいタブが表示されます。[Objects]サブタブで、使用可能なテーブルおよびビューなどのスキーマ情報を見ることができます。

テーブルデータおよびメタデータを表示するには、[Objects]タブでテーブルを選択します。[Content]タブでテーブルデータにアクセスします。

SQL クエリを実行するには、[SQL]タブでクエリを入力し、[Run SQL](実行アイコン)をクリックします。

CData JDBC Driver for Marketo

Tableau

このセクションでは、Tableau に接続してデータのクエリを開始する方法について説明します。

CData JDBC Driver for Marketo を追加

Note: Windows でTableau を起動する前に、.jar file がC:\Program Files\Tableau\Drivers フォルダに配置されていることを確認してください。macOS でTableau を起動する前に、.jar file が~/Library/Tableau/Drivers フォルダに配置されていることを確認してください。

ドライバー.jar ファイルを追加するには:

  1. Tableau を起動します。
  2. [サーバーへ]で、[その他...]を選択します。
  3. [その他のデータベース(JDBC)]を選択します。
  4. [URL]フィールドにJDBC 接続文字列を入力します。詳しくは、下記のMarketo JDBC URL の構築 を参照してください。
  5. [サインイン]を選択します。

Marketo JDBC URL の構築

接続文字列は、データソースに関する情報とそのデータソースへの接続方法を提供します。ドライバーには、接続文字列のコンテンツの作成と管理を容易にする接続文字列ビルダが付属しています。

ドライバーをダウンロードおよびインストールしたら、lib フォルダ内の.jar ファイルをダブルクリックしてください。 また、次の例に示すように手動で.jar ファイルを実行することも可能です。

Windows から:

java -jar 'C:\Program Files\CData\CData JDBC Driver for Marketo 2024\lib\cdata.jdbc.marketo.jar'

macOS から:

java -jar cdata.jdbc.marketo.jar

.Jar ファイルを実行すると、[接続プロパティ] ダイアログボックスが開きます。このダイアログボックスを使用して、接続文字列を作成およびテストできます。[接続のテスト]をクリックして、入力した接続プロパティをテストおよび検証します。[コピー]をクリックして接続文字列をコピーすると、JDBC ドライバーが使用されているアプリケーション内で使用できます。接続文字列オプションについての詳細は、ヘルプドキュメントを参照してください。

スキーマの検出とデータのクエリ

データをクエリするには:

  1. [データベース]プルダウンメニューから[CData]を選択します。
  2. [スキーマ]プルダウンメニューから[Odata]を選択します。
  3. テーブルを結合エリアにドラッグします。複数のテーブルを含めることができます。
  4. [今すぐ更新]または[自動更新]を選択します。[今すぐ更新]では、データソースの最初の10,000 行をプレビューできます(または[Rows]テキストボックスに表示したい行数を入力します)。[自動更新]では、プレビューエリアの変更を自動的に反映します。
  5. [接続]メニューで[ライブ]オプションを選択します。これにより、データのコピーをTableau にロードするのをスキップして、代わりにリアルタイムデータを操作できます。
  6. ワークシートのタブをクリックします。カラムはデータの種類に応じてDimensions およびMeasures としてリストされます。

CData JDBC Driver for Marketo

スキーマ検出

本製品 は、JDBC クラスを使って、または利用可能なシステムテーブルへのSQL クエリを使ってスキーマ検出をサポートしています。JDBC クラスを使用すると、スキーマ情報、接続プロパティ情報、および返されたカラムの情報にアクセスできます。

使用可能なシステムテーブル へのSQL クエリを使用して、スキーマ情報や接続プロパティ情報と同様に、データソース機能に関する情報や更新操作に関する統計情報にもアクセスできます。

JDBC インターフェースの使用

JDBC インターフェースを使用して、スキーマ情報、接続プロパティメタデータ、および結果セットメタデータにアクセスできます。本製品 は、JDBC 4.0仕様で定義されている標準インターフェースを実装しています。

スキーマ情報の取得

DatabaseMetaData クラスは、以下に関する情報を提供します。

接続プロパティ情報の取得

DriverManager によって返されたDriver クラスは、接続プロパティ に関する情報を提供します。

結果セットカラム情報の取得

ResultSetMetaData クラスは、結果セット に返されたカラムに関する情報を提供します。

SQL の使用

システムテーブル をクエリして、本製品 が提供するメタデータにアクセスできます。

CData JDBC Driver for Marketo

テーブル

DatabaseMetaData インターフェースのgetTables() メソッドを使用して、テーブルのリストを取得できます。

String connectionString = "jdbc:marketo:URL=https://MyMarketoURL.mktorest.com/;OAuthClientId=MyOAuthClientId;OAuthClientSecret=MyOAuthClientSecret;";

Connection conn = DriverManager.getConnection(connectionString);
DatabaseMetaData table_meta = conn.getMetaData();
ResultSet rs=table_meta.getTables(null, null, "%", null);  
while(rs.next()){
  System.out.println(rs.getString("TABLE_NAME"));
}

getTables() メソッドは次のカラムを返します。

カラム名データ型説明
TABLE_CATStringテーブルカタログ。
TABLE_SCHEMStringテーブルスキーマ。
TABLE_NAMEStringテーブル名。
TABLE_TYPEStringテーブルの種類。
REMARKSStringテーブルの説明。

CData JDBC Driver for Marketo

カラム

DatabaseMetaData インターフェースのgetColumns メソッドを使用して、カラム情報を取得できます。 結果は、テーブル名に基づいて制限できます。 次のコード例は、Leads テーブルのカラム名を取得します。

String connectionString = "jdbc:marketo:URL=https://MyMarketoURL.mktorest.com/;OAuthClientId=MyOAuthClientId;OAuthClientSecret=MyOAuthClientSecret;";

Connection conn = DriverManager.getConnection(connectionString);
DatabaseMetaData table_meta = conn.getMetaData();
ResultSet rs = table_meta.getColumns(null,null,"Leads", null);
while(rs.next()){
  System.out.println(rs.getString("COLUMN_NAME")); 
}
getColumns メソッドは次のカラムを返します。

カラム名データ型説明
TABLE_CATStringデータベース名。
TABLE_SCHEMStringテーブルスキーマ。
TABLE_NAMEStringテーブル名。
COLUMN_NAMEStringカラム名。
DATA_TYPEintjava.sql.Types で定義されている定数値によって識別されるデータ型。
TYPE_NAMEString本製品 によって使用されるデータ型名。
COLUMN_SIZEintカラムの文字数単位の長さ、または数値精度。
BUFFER_LENGTHintバッファ長。
DECIMAL_DIGITSintカラムのスケール(小数点以下の桁数)。
NUM_PREC_RADIXint基数。
NULLABLEintカラムに、次のJDBC DatabaseMetaData 定数で定義されているnull を含めることができるかどうか:parameterNoNulls (0) またはparameterNullable (1) 。
REMARKSStringカラムの説明。
COLUMN_DEFStringカラムのデフォルト値。
SQL_DATA_TYPEint仕様で予約されています。
SQL_DATETIME_SUBint仕様で予約されています。
CHAR_OCTET_LENGTHintバイナリおよび文字ベースのカラムの最大長。
ORDINAL_POSITIONint1から始まるカラムインデックス。
IS_NULLABLEStringNull 値が許可されるかどうか(YES またはNO)。
SCOPE_CATALOGString参照属性の範囲となるテーブルカタログ。
SCOPE_SCHEMAString参照属性の範囲となるテーブルスキーマ。
SCOPE_TABLEString参照属性の範囲となるテーブル名。
SOURCE_DATA_TYPEintDISTINCT 型のソース型。または、ユーザー生成Ref 型。DATA_TYPE がDISTINCT でない場合、この値はnull になります。ユーザー生成Ref の場合、この値はnull になります。
IS_AUTOINCREMENTStringMarketo によってカラムに固定増分値が割り当てられるかどうか。
IS_GENERATEDCOLUMNString生成されたカラムであるかどうか(YES またはNO)。

CData JDBC Driver for Marketo

プロシージャ

DatabaseMetaData インターフェースを使用して、ストアドプロシージャ情報を取得できます。getProcedures メソッドは、利用可能なストアドプロシージャの説明を返します。

次のコードは、利用可能なストアドプロシージャの名前を取得します。

String connectionString = "jdbc:marketo:URL=https://MyMarketoURL.mktorest.com/;OAuthClientId=MyOAuthClientId;OAuthClientSecret=MyOAuthClientSecret;";

Connection conn = DriverManager.getConnection(connectionString);
DatabaseMetaData meta = conn.getMetaData();
ResultSet rs = meta.getProcedures(null, null, "%");
while(rs.next()){
  System.out.println(rs.getString("PROCEDURE_NAME"));
}
getProcedures メソッドは次のカラムを返します。

カラム名データ型説明
PROCEDURE_CATStringプロシージャが属するカタログ。
PROCEDURE_SCHEMStringプロシージャが属するスキーマ。
PROCEDURE_NAMEStringストアドプロシージャ名。
REMARKSStringストアドプロシージャの説明。
PROCEDURE_TYPEshortプロシージャが結果を返す場合は2を返します。プロシージャが結果を返さない場合は1を返します。不明な場合は0を返します。
SPECIFIC_NAMEStringスキーマ内でストアドプロシージャを一意に識別する名前。

CData JDBC Driver for Marketo

プロシージャパラメータ

DatabaseMetaData インターフェースを使用して、ストアドプロシージャ情報を取得できます。getProcedureColumns メソッドは、ストアドプロシージャパラメータの説明を返します。 結果は、ストアドプロシージャ名に基づいて制限できます。

次のコード例は、GetEmailFullContent ストアドプロシージャのパラメータに関する情報を出力します。

String connectionString = "jdbc:marketo:URL=https://MyMarketoURL.mktorest.com/;OAuthClientId=MyOAuthClientId;OAuthClientSecret=MyOAuthClientSecret;";

Connection conn = DriverManager.getConnection(connectionString);
DatabaseMetaData meta = conn.getMetaData();
ResultSet rs=meta.getProcedureColumns(null, null, "GetEmailFullContent", null);  
while(rs.next()) {   
  for(int i=1;i<=rs.getMetaData().getColumnCount();i++)  {
    System.out.println(rs.getMetaData().getColumnName(i) +"="+rs.getString(i));
  }
}
getProcedureColumns メソッドは次のカラムを返します。

カラム名データ型説明
PROCEDURE_CATStringプロシージャが属しているカタログ。
PROCEDURE_SCHEMStringプロシージャが属しているスキーマ。
PROCEDURE_NAMEStringストアドプロシージャの名前。
COLUMN_NAMEStringプロシージャカラムの名前。
COLUMN_TYPEStringプロシージャカラムの種類。DatabaseMetaData の定数procedureColumnIn (1)、procedureColumnInOut (2)、procedureColumnResult (3)、procedureColumnOut (4)、およびprocedureColumnReturn (5) によって定義されます。
DATA_TYPEintjava.sql.Types で定義されているデータ型名。
TYPE_NAMEStringドライバー定義のデータ型名。
PRECISIONint数値データに許可される桁数。
LENGTHint文字データの場合は、許可される文字数。数値データに許可される桁数。
SCALEshort数値データの小数点以下の桁数。
RADIXshort基数。
NULLABLEshortパラメータに、次のDatabaseMetaData 定数で定義されているnull を含めることができるかどうか:parameterNoNulls (0)、parameterNullable (1)、およびparameterNullableUnknown (2)。
REMARKSStringパラメータの説明。
COLUMN_DEFStringパラメータのデフォルト値。
SQL_DATA_TYPEint仕様で予約されています。
SQL_DATETIME_SUBint仕様で予約されています。
CHAR_OCTET_LENGTHintバイナリベースおよび文字ベースのカラムの最大長。その他のデータ型ではNull。
ORDINAL_POSITIONint出力パラメータのインデックス。
IS_NULLABLEStringカラムにnull を含めることができるかどうか。(YES またはNO)。
SPECIFIC_NAMEStringスキーマ内でストアドプロシージャを一意に識別する名前。

CData JDBC Driver for Marketo

主キー

getPrimaryKeys メソッドを使用すると、Marketo テーブルの主キーに関する情報を返すことができます。結果は、テーブル名に基づいて制限できます。

次のコード例は、Leads テーブルの主キーを構成するカラムを出力します。

String connectionString = "jdbc:marketo:URL=https://MyMarketoURL.mktorest.com/;OAuthClientId=MyOAuthClientId;OAuthClientSecret=MyOAuthClientSecret;";

Connection conn = DriverManager.getConnection(connectionString);
ResultSet rs = conn.getMetaData().getPrimaryKeys(null,null,"Leads");
while(rs.next()){
  System.out.println(rs.getString("COLUMN_NAME"));
}

getPrimaryKeys メソッドは次のカラムを返します。

カラム名データ型説明
TABLE_CATStringテーブルカタログ。
TABLE_SCHEMStringテーブルスキーマ。
TABLE_NAMEStringテーブル名。
COLUMN_NAMEStringカラム名。
KEY_SEQshort外部キー内のシーケンス番号(1から始まるカラムインデックス)。
PK_NAMEString主キー名。

CData JDBC Driver for Marketo

接続プロパティ

利用可能な接続プロパティは、Driver クラスのgetPropertyInfo メソッドを使って取得できます。このメソッドは、DriverPropertyInfo タイプのエレメントを持つ配列を返します。

String connectionString = "jdbc:URL=https://MyMarketoURL.mktorest.com/;OAuthClientId=MyOAuthClientId;OAuthClientSecret=MyOAuthClientSecret;:";

Driver driver = DriverManager.getDriver(connectionString);
Properties info = new Properties();
DriverPropertyInfo[] attr = driver.getPropertyInfo(connectionString,info);
for(int i=0;i<attr.length;i++){
  System.out.println(attr[i].name);
  System.out.println(attr[i].description);
  System.out.println(attr[i].required);
  System.out.println(attr[i].value);
  String[] c = attr[i].choices;
  if(c != null) {
    for(String s: c)
      System.out.println(s);
  }
}

DriverPropertyInfo クラスには以下のプロパティがあります。

プロパティ名データ型説明
NameString接続プロパティ名。
DescriptionString接続プロパティの説明。
RequiredbooleanMarketo への接続に接続プロパティの設定が必要かどうか。
ChoicesString[]接続プロパティに許可された値の配列。
ValueString現在の接続プロパティの値、またはデフォルト値(ユーザーにより設定されていない場合)。

CData JDBC Driver for Marketo

結果セット

ResultSetMetaData を使用して、クエリの結果に関するメタデータを取得できます。

クエリには、次の要素を含めることができます。

  • 結合
  • 集計
  • エイリアス
  • 完全修飾名
  • 生成されたカラム

ResultSetMetaData オブジェクトは、Statement クラスのgetMetaData メソッドを呼び出すことで、インスタンス化できます。ステートメントが実行されると、ResultSetMetaData インスタンスにデータが挿入されます。次のクエリは、クエリの結果に含まれるカラムを出力します。

String connectionString = "jdbc:marketo:URL=https://MyMarketoURL.mktorest.com/;OAuthClientId=MyOAuthClientId;OAuthClientSecret=MyOAuthClientSecret;";

Connection conn = DriverManager.getConnection(connectionString);
PreparedStatement pstmt = conn.prepareStatement("SELECT Id, Email AS My_Email, GETDATE() FROM Leads WHERE Email = 'sample@email.com'");
pstmt.executeQuery();
ResultSetMetaData rs = pstmt.getMetaData();
for(int i=1;i<=rs.getColumnCount();i++) {
  System.out.println(rs.getColumnName(i));
}

CData JDBC Driver for Marketo

高度な機能

このセクションでは、Marketo 本製品 の高度な機能を厳選して説明します。

ユーザー定義ビュー

本製品 はユーザー定義ビューの使用をサポートします。これは事前設定されたユーザー定義クエリによって内容が決定される仮想テーブルです。 このビューは、ドライバーに発行されるクエリを直接制御できない場合に有効です。 カスタムビューの作成と設定の概要については、ユーザー定義ビュー を参照してください。

SSL の設定

SSL の設定 を使用して、本製品 が証明書のネゴシエーションをどのように扱うかを調整します。さまざまな証明書形式を選択できます。詳しくは、「接続文字列オプション」にあるSSLServerCert プロパティを参照してください。

ファイアウォールとプロキシ

Windows プロキシとHTTP プロキシを含むファイアウォールとプロキシ に合致するよう本製品 を設定します。トンネル接続を設定することもできます。

JDBC リモーティング

JDBC リモーティング を設定して、リモートマシンから本製品 に接続します。CLI によるリモーティングと設定ファイルによるリモーティングのどちらかを選択することができます。

データのキャッシュ

データのキャッシュ はデータへのより高速な接続を実現し、API 呼び出しの回数を減らすことでパフォーマンスを向上します。 コネクタは、複数の接続でキャッシュを共有することもできるシンプルなキャッシュモデルをサポートします。 キャッシュ接続を設定する際、自動的または明示的なデータキャッシュを指定できます。

クエリ処理

本製品 は、Marketo にできるだけ多くのSELECT ステートメント処理をオフロードし、残りのクエリをクライアント側のインメモリで処理します。

詳しくは、クエリ処理 を参照してください。

ログ

CData ログを調整するために使用可能な設定の概要については、ログ を参照してください。基本的なロギングに必要なのは2つの接続プロパティだけですが、より詳細なロギングをサポートする多くの機能があり、LogModules 接続プロパティを使用してロギングする情報のサブセットを指定することができます。

CData JDBC Driver for Marketo

ユーザー定義ビュー

CData JDBC Driver for Marketo はユーザー定義ビューの使用をサポートします。これは事前設定されたクエリによって内容が決定されるユーザー定義の仮想テーブルです。ユーザー定義ビューは、ツール からドライバーを使用する場合など、ドライバーに発行されるクエリを直接制御できない場合に役立ちます。

ユーザー定義ビューを使用して、常に適用されるプレディケートを定義することができます。ビューへのクエリで追加のプレディケートを指定すると、それらはビューの一部としてすでに定義されているクエリと結合されます。

ユーザー定義ビューを作成する方法は2つあります。

  • 必要なビューを定義したJSON 形式のコンフィギュレーションファイルを作成。
  • DDL ステートメント。

コンフィギュレーションファイルでビューの定義

ユーザー定義ビューは、UserDefinedViews.json というJSON 形式のコンフィギュレーションファイルで定義されています。本製品 は、このファイルで指定されたビューを自動的に検出します。

また、複数のビュー定義を持ち、UserDefinedViews 接続プロパティを使用して制御することも可能です。このプロパティを使用すると、指定されたビューのみが本製品 によって検知されます。

このユーザー定義ビューのコンフィギュレーションファイルは、各ルートエレメントがビューの名前を定義し、query と呼ばれる子エレメントを含むようにフォーマットされています。この子エレメントにはビューのカスタムSQL クエリが含まれています。

次に例を示します。

{
	"MyView": {
		"query": "SELECT * FROM Leads WHERE MyColumn = 'value'"
	},
	"MyView2": {
		"query": "SELECT * FROM MyTable WHERE Id IN (1,2,3)"
	}
}
UserDefinedViews 接続プロパティを使用して、JSON コンフィギュレーションファイルの場所を指定します。次に例を示します。
"UserDefinedViews", "C:\\Users\\yourusername\\Desktop\\tmp\\UserDefinedViews.json"

DDL ステートメントを使用したビューの定義

本製品 は、CREATE LOCAL VIEW、ALTER LOCAL VIEW、DROP LOCAL VIEW などのDDL ステートメントを介してスキーマを作成したり、変更したりすることもできます。

ビューの作成

DDL ステートメントを使用して新しいビューを作成するには、以下のようにビュー名とクエリを指定します。

CREATE LOCAL VIEW [MyViewName] AS SELECT * FROM Customers LIMIT 20;

JSON ファイルが存在しない場合は、上記のコードで作成されます。ビューはJSON コンフィギュレーションファイルで作成され、検出可能になります。JSON ファイルの場所はUserDefinedViews 接続プロパティで指定されます。

ビューの変更

既存のビューを変更するには、代わりに使用したい新しいクエリと一緒に既存のビュー名を指定します。

ALTER LOCAL VIEW [MyViewName] AS SELECT * FROM Customers WHERE TimeModified > '3/1/2020';

ビューはJSON コンフィギュレーションファイルで更新されます。

ビューの削除

既存のビューを削除するには、代わりに使用したい新しいクエリと一緒に既存のスキーマ名を指定します。

DROP LOCAL VIEW [MyViewName]

これにより、ビューがJSON コンフィギュレーションファイルから削除されます。クエリはできなくなります。

ユーザー定義ビューのスキーマ

ビューの名前がデータモデル内の実際のエンティティと衝突するのを避けるため、ユーザー定義ビューはデフォルトでUserViews スキーマで公開されます。UserViews で使用されるスキーマの名前を変更するには、UserViewsSchemaName プロパティを再設定します。

ユーザー定義ビューの使用

例えば、UserViews.RCustomers という名前のユーザー定義ビューを持つSQL ステートメントは、Raleigh の顧客のみをリストします。
SELECT * FROM Customers WHERE City = 'Raleigh';
ドライバーへのクエリは次のようになります。
SELECT * FROM UserViews.RCustomers WHERE Status = 'Active';
ソースへの効果的なクエリは次のようになります。
SELECT * FROM Customers WHERE City = 'Raleigh' AND Status = 'Active';
これは、ビュークエリとビュー定義を効果的に組み合わせた、ユーザー定義ビューへのクエリの非常にシンプルな例です。これらのクエリをはるかに複雑なパターンで構成することが可能です。すべてのSQL 操作は両方のクエリでサポートされ、必要に応じて組み合わされます。

CData JDBC Driver for Marketo

SSL の設定

SSL 設定のカスタマイズ

デフォルトでは、本製品 はサーバーとのTLS のネゴシエーションを試みます。サーバー証明書は、デフォルトのシステム信頼済み証明書ストアで検証されます。SSLServerCert 接続プロパティを使用して、証明書の検証方法をオーバーライドできます。

別の証明書を指定するには、SSLServerCert 接続プロパティを参照してください。

CData JDBC Driver for Marketo

ファイアウォールとプロキシ

Firewall またはProxy 経由の接続

HTTP プロキシ

HTTP プロキシへの認証には、以下のように設定します。

  • ProxyServer:HTTP トラフィックをルートするプロキシサーバーのホストネームもしくはIP アドレス。
  • ProxyPort:プロキシサーバーが起動しているTCP ポート。
  • ProxyAuthScheme:プロキシサーバーに対して認証する際に本製品 が使用する認証方法。
  • ProxyUser:プロキシサーバーに登録されているユーザーアカウントのユーザー名。
  • ProxyPasswordProxyUser に紐付けられたパスワード。

その他のプロキシ

次のプロパティを設定します。

  • プロキシベースのファイヤーウォールを使用するには、FirewallTypeFirewallServer、およびFirewallPort を設定します。
  • 接続をトンネルするには、FirewallType をTUNNEL に設定します。
  • 認証するには、FirewallUserFirewallPassword を設定します。
  • SOCKS プロキシへの認証には、さらにFirewallType をSOCKS5 に設定します。

CData JDBC Driver for Marketo

JDBC リモーティング

JDBC リモーティング機能を使用すると、リモートマシンからJDBC ドライバーに接続できます。リモーティング機能は、データベースクエリを監視して応答するデーモンプロセスです。ドライバーは、リモーティング用のMySQL プロトコルをサポートします。

JDBC リモーティングを使用すると、任意のMySQL クライアント(ODBC ドライバー、PHP、Perl、Python などのプログラミング言語、MySQL ワークベンチなどのツールやさまざまなアプリケーション)をMarketo に簡単に接続できます。

リモーティング用のドライバーの設定

リモーティングの設定は、コマンドラインインターフェースまたはINI 形式のコンフィギュレーションファイルのいずれかを使用して行うことができます。

CLI 経由のリモーティング

MySQL デーモンをコマンドラインから直接開始できます。これは、JAR を起動して必要なCLI オプション を指定することで実現できます。

コンフィギュレーションファイルでのリモーティング

すべての設定プロパティをコマンドラインで直接入力したくない場合は、コンフィグファイル を定義することで、すべてのプロパティを明示的にリストすることができます。一度定義すると、CLI でこのファイルを一回参照するだけでデーモンを起動できます。

CData JDBC Driver for Marketo

CLI オプション

次に示すように、MySQL デーモンをコマンドラインから開始できます。

java -jar cdata.jdbc.marketo.jar [ options ]
次のコマンドラインオプションを利用できます。

オプション説明
-h, --help使用できるオプションのヘルプを表示して終了します。
-f, --config-fileデーモンのコンフィギュレーションファイル。
-u, --user接続を許可されているユーザー。コンフィギュレーションファイルを使用して複数のユーザーを設定します。コマンドラインでユーザーが指定されている場合は、そのユーザーだけがアクセスを許可されます。
-p, --passwordユーザーオプションで指定されたユーザーのパスワード。ユーザーとパスワードの両方がコマンドラインで設定されている場合は、コンフィグファイルのユーザーセクションは無視されます。
-d, --databaseクライアントが接続に使用するデータベース。コンフィグファイルで複数のデータベースが指定されている場合は、コマンドラインで指定されているデータベースにのみ接続が許可されます。
-c, --connection対象となるデータソースに接続するために使用される接続文字列。コマンドラインで接続文字列が指定されない場合は、コンフィグファイルの接続文字列が読み込まれます。
-P, --portTCP/IP接続の監視に使用するポート番号。デフォルトポート番号は3306です。
-m, --max-connections許可されるTCP/IP接続の最大数。デフォルト値は25接続です。
--session-timeoutセッションタイムアウト時間(秒単位)。デフォルトのタイムアウトは20秒です。
-t, --protocolリモーティングに使用するプロトコル。デフォルト値はMYSQL です。
-g, --logfileログファイルの完全パス。
-F, --logrotationschemeログを切り捨てる間隔。オプションは、1(毎日。[MyFileName]_2016_3_21.txt 形式)、2(毎週。[MyFileName]_Week_5.txt 形式、5は一年の第5週目)、および3(毎月。[MyFileName]_2016_3_21.txt 形式)。
-v, --verbosityログのメッセージレベル。1 は情報提供レベル。レベルは5段階あり、以下の詳細が追加されます。(2) HTTP ヘッダー、(3) HTTP ボディ、(4) SSL を含むトランスポートレベルのコミュニケーション、(5) インターフェースコマンドおよびその他のデータソースコミュニケーション。
--test接続をテストするデータベース。このプロパティが指定されない場合は、デフォルトのデータベースが使用されます。
--ssl-certSSL 証明書へのパス。
--ssl-subjectSSL 証明書のサブジェクト。
--ssl-passwordSSL 証明書のパスワード。
-n, --nodeidこのシステムのNodeId を表示します。
-l, --licenseこのシステム上にライセンスをインストールします。このオプションは、ライセンスタイプおよびその他の詳細情報についてプロンプトします。

コマンドラインで指定されたオプションは、コンフィグファイルで指定されるオプションよりも優先されます。コマンドラインオプションを渡して、コンフィグファイル で使用できるオプションを制限するサブセットを指定できます。

CData JDBC Driver for Marketo

コンフィグファイル

MySQL リモーティングのコンフィギュレーション設定をコンフィグファイルに保存できます。ファイルは、INI ファイル形式で設定する必要があります。このファイルは-f コマンドラインオプションで指定します。コンフィグファイルには次のセクションがあります。

[mysqld]

mysqld セクションでは、次のプロパティを使用してMySQL デーモンを設定します。

名前説明
portTCP/IP 接続の監視に使用するポート番号。デフォルトポート番号は3306です。
max-connections許可されるTCP/IP 接続の最大数。デフォルト値は25 です。
session-timeoutセッションタイムアウト時間(秒単位)。デフォルトのタイムアウトは20秒です。
logfileログファイルの完全パス。
verbosityログのメッセージレベル。1 は情報提供レベル。レベルは5段階あり、以下の詳細が追加されます。(2) HTTP ヘッダー、(3) HTTP ボディ、(4) SSL を含むトランスポートレベルのコミュニケーション、(5) インターフェースコマンドおよびその他のデータソースコミュニケーション。
logrotationschemeログを切り捨てる間隔。オプションは、1(毎日。[MyFileName]_2016_3_21.txt 形式)、2(毎週。[MyFileName]_Week_5.txt 形式、5は一年の第5週目)、および3(毎月。[MyFileName]_2016_3_21.txt 形式)。

デフォルトは2です。

ssl-certSSL 証明書へのパス。
ssl-subjectSSL 証明書のサブジェクト。
ssl-passwordSSL 証明書のパスワード。

[databases]

databases セクションでは、MySQL データベースをMarketo 接続文字列にマッピングするキーを定義します。クライアントは、ここで定義されたMySQL データベースに接続します。本製品 は、Marketo に接続するために、このキーに対応する接続文字列を使用します。

[databases]
Marketo = "URL=https://MyMarketoURL.mktorest.com/;OAuthClientId=MyOAuthClientId;OAuthClientSecret=MyOAuthClientSecret;"

[users]

users セクションでは、サーバーのユーザーのユーザー名とパスワードを定義します。acl セクションが定義されていない場合は、すべてのユーザーがすべてのデータベースにアクセスできます。

[mysql_vars]

mysql_vars セクションでは、MySQL サーバーのシステム変数を定義します。標準の変数がサポートされます。以下に、いくつかの例を示します。

名前説明
version_commentこの値は、CData JDBC Driver for Marketo としてハードコードされます(MySQL リモーティング)。
character_set_clientクライアントによって送信されるステートメントでは、character_set が使用されます。

[acl]

acl セクションでは、ユーザーのMarketo データベースへのアクセスを許可します。データベースは、databases セクションで定義する必要があります。ユーザーは、users セクションで定義する必要があります。指定されたデータベースにアクセスすることを許可されたユーザーを区切るには、カンマを使用します。

コンフィグファイルの例

次にコンフィグファイルの例を示します。例には、サーバーの設定に必要なすべてのプロパティが含まれています。また、複数のユーザーとMarketo インスタンスへのアクセス制御を設定する方法も示します。

[mysqld]
port = 3306
max-connections = 25
session-timeout = 20
logfile = MarketoRemotingLog.txt
verbosity = 2
ssl-cert = "CData.JDBC.Marketo.Remoting.pfx"
ssl-subject = <subject>
ssl-password = <password>

[databases]
Marketo = "URL=https://MyMarketoURL.mktorest.com/;OAuthClientId=MyOAuthClientId;OAuthClientSecret=MyOAuthClientSecret;"
Marketo_ReadOnly = "URL=https://MyMarketoURL.mktorest.com/;OAuthClientId=MyOAuthClientId;OAuthClientSecret=MyOAuthClientSecret;ReadOnly=True"

[users]
root = <password>
test = <password>

[mysql_vars]
version_comment =  "CData JDBC Driver for Marketo (MySQL Remoting)"

[acl]
Marketo = root
Marketo_ReadOnly = root, test

コマンドラインでオプションを渡すことで、使用できるオプションをさらに制限できます。詳細については、CLI オプション を参照してください。

CData JDBC Driver for Marketo

データのキャッシュ

データのキャッシュ

データをキャッシュすると、データへのアクセスが速くなったりAPI コール数が減るなど、パフォーマンスが向上するいくつかの利点があります。コネクターは、複数の接続でキャッシュを共有することもできるシンプルなキャッシュモデルをサポートします。必要な接続プロパティを設定することで、キャッシュ機能を有効にして設定できます。

Contents

この章のセクションでは、本製品 のキャッシング機能と対応する接続プロパティへのリンク、およびSQL ステートメントについて詳しく説明します。

キャッシュ接続の設定

キャッシュ接続の設定 では、キャシュデータベースを設定するときに設定できるプロパティについて説明します。

メタデータのキャッシュ

メタデータのキャッシュ では、CacheMetadata プロパティについて説明します。このプロパティは、テーブルメタデータをファイルストアにキャッシュするかどうかを決定します。

データを自動的にキャッシュ

データの自動キャッシュ は、AutoCache プロパティが設定されたときに、本製品 が自動的にキャッシュをリフレッシュする方法を説明します。

データを明示的にキャッシュ

明示的なデータのキャッシュ は、どのデータをキャッシュに格納するか、またいつ更新するかを決定する方法について説明します。

データ型マッピング

データ型マッピング は、スキーマで設定されているデータ型とデータベースのデータ型のマッピングを示します。

CData JDBC Driver for Marketo

キャッシュ接続の設定

キャッシュデータベースの設定

このセクションでは、選択した永続ストアにデータをキャッシュするためのプロパティについて説明します。

CacheLocation

CacheLocation プロパティは、ファイルシステムベースのデータベースへのパスを指定します。キャッシュが有効な場合、ファイルシステムベースのデータベースがデフォルトで使用されます。CacheLocation が指定されていない場合、このデータベースはLocation のパスに格納されます。これらの接続プロパティがいずれも指定されていない場合、本製品 はプラットフォームに依存するデフォルトの場所を使用します。

CacheConnection

CacheConnection プロパティは、データベースドライバーとキャッシュデータベースへの接続文字列を指定します。

CacheDriver

CacheDriver プロパティは、データベースドライバーとキャッシュデータベースへの接続文字列を指定します。

CData JDBC Driver for Marketo

データの自動キャッシュ

クエリごとにキャッシュを再構築したくない場合は、データを自動的にキャッシュすると便利です。初めてデータをクエリすると、本製品 はバックグラウンドで自動的にキャッシュを初期化して構築します。AutoCache = true の場合、本製品 は後続のクエリ実行にキャッシュを使用するため、応答時間が短縮されます。

自動キャッシュの設定

Leads テーブルのキャッシュ

次の例は、接続文字列のCacheLocation プロパティで指定されたファイルのLeads テーブルをキャッシュします。

String connectionString = "jdbc:marketo:Cache Location=C:\\cache.db;" +
                          "AutoCache=true;" +
                          "URL=https://MyMarketoURL.mktorest.com/;OAuthClientId=MyOAuthClientId;OAuthClientSecret=MyOAuthClientSecret;";
Connection connection = DriverManager.getConnection(connectionString);
Statement stat = connection.createStatement();
boolean ret = stat.execute("SELECT Id, Email FROM Leads WHERE Email = 'sample@email.com'");
ResultSet rs=stat.getResultSet();
while(rs.next()){
  System.out.println("Read and cached the row with Id "+rs.getString("Id"));
}
connection.close();

一般的なユースケース

データを自動的にキャッシュする一般的な用途は、レポートの作成やビジュアライゼーションの作成など、ライブデータソースに繰り返し要求を行うときのドライバーのパフォーマンスを向上させることです。自動キャッシュが有効になっていると、同じデータに対する繰り返しの要求は短期間で実行されますが、"ライブ"データと見なされる許容範囲内(CacheTolerance)になります。

CData JDBC Driver for Marketo

明示的なデータのキャッシュ

明示的なキャッシュの場合は(AutoCache =false)、どのデータをキャッシュするかと、ライブデータではなくキャッシュをいつクエリするかを厳密に指定します。明示的なキャッシュでは、CACHE ステートメントを使用して、キャッシュの内容を完全に制御できます。このセクションでは、本製品 が提供するキャッシュ機能の活用方法をいくつか説明します。

キャッシュの作成

キャッシュにデータをロードするには、次のステートメントを発行します。

CACHE SELECT * FROM tableName WHERE ...

ステートメントが発行されると、tableName 内の一致するデータが対応するテーブルにロードされます。

キャッシュの更新

このセクションでは、キャッシュを更新する2つの方法について説明します。

SELECT ステートメントを使った更新

次の例は、キャッシュテーブル内で変更された行を更新し、不足している行を追加するステートメントを示します。ただし、このステートメントはキャッシュ内にすでに含まれている余分な行は削除しません。このステートメントは、新しい行をマージするか、または既存の行を更新するだけです。

String cmd = "CACHE SELECT * FROM Leads WHERE Email = 'sample@email.com'", connection";
stat.execute(cmd);
connection.close();

TRUNCATE ステートメントを使った更新

次の例は、キャッシュテーブル内で変更された行を更新し、不足している行を追加するステートメントを示します。このステートメントは、ライブデータソースに存在しないキャッシュテーブル内の行も削除できます。

String cmd = "CACHE WITH TRUNCATE SELECT * FROM Leads WHERE Email = 'sample@email.com'";
stat.execute(cmd);
connection.close();

オンラインまたはオフラインモードでデータをクエリ

このセクションでは、オンラインまたはオフラインモードでデータをクエリする方法について説明します。

Online:キャッシュテーブルの選択

次の例に示すように、tableName#CACHE 構文を使用して、オンラインのままキャッシュに対して明示的にクエリを実行することができます。

SELECT * FROM Leads#CACHE

Offline:キャッシュテーブルの選択

Offline がtrue に設定されている場合、実行するすべてのSELECT ステートメントは、キャッシュテーブルを明示的に指定するかどうかに関係なく、常にローカルキャッシュデータベースに対して実行されます。キャッシュデータだけが誤って更新されることがないように、Offline モードではキャッシュの変更は無効化されます。Offline が設定されている場合にDELETE/UPDATE/INSERT ステートメントを実行すると、例外が発生します。

次の例は、Offline がtrue に設定されているため、ライブデータソースからではなく、ローカルキャッシュに対してSELECT を実行します。

Connection connection = DriverManager.getConnection("jdbc:marketo:URL=https://MyMarketoURL.mktorest.com/;OAuthClientId=MyOAuthClientId;OAuthClientSecret=MyOAuthClientSecret;Offline=true;Cache Location=C:\\cache.db;");
Statement stat = connection.createStatement();
String query = "SELECT * FROM Leads WHERE Email='sample@email.com' ORDER BY Email ASC";
stat.execute(query);
connection.close();

キャッシュからのデータの削除

データベースへの直接接続を構築することによって、キャッシュからデータを削除できます。本製品 はキャッシュからデータを手動で削除することをサポートしていないことに注意してください。

一般的なユースケース

一般的なキャッシュの用途は、アプリケーションからのクエリは常にキャッシュデータに対して実行し、キャッシュの更新は設定された間隔(1日1回、2時間ごとなど)でのみ実行するというものです。この実装には2つの方法があります。

  • AutoCache = false とOffline = false。アプリケーションによって発行されるすべてのクエリは、明示的にtableName#CACHE テーブルを参照します。キャッシュを更新する必要がある場合、アプリケーションはtableName#CACHE ... ステートメントを実行して、キャッシュデータを最新の状態に保ちます。
  • Offline = true。キャッシュは、アプリケーションでは透過的に処理されます。すべてのクエリは常にテーブルに対して実行されるため、ほとんどのアプリケーションコードは、キャッシュの実行を認識する必要はありません。キャッシュデータを更新するには、Offline = false で個別の接続を作成し、tableName#CACHE ... ステートメントを実行するだけです。

CData JDBC Driver for Marketo

データ型マッピング

本製品 は、データソースの型を、選択されたキャッシュデータベースの対応するデータ型にマッピングします。次のテーブルは、スキーマで設定されているデータ型とデータベースのデータ型のマッピングを示します。一部のスキーマタイプにはシノニムがあり、Schema カラムにすべてリストされています。

データ型マッピング

Note: 文字列カラムは、長さに応じてさまざまなデータ型にマッピングできます。

スキーマ .NET JDBC SQL Server Derby MySQL Oracle SQLite Access
int, integer, int32 Int32 int int INTEGER INT NUMBER integer LONG
smallint, short, int16 Int16 short smallint SMALLINT SMALLINT NUMBER integer SHORT
double, float, real Double double float DOUBLE DOUBLE NUMBER double DOUBLE
date DateTime java.sql.Date date DATE DATE DATE date DATETIME
datetime, timestamp DateTime java.sql.Date datetime TIMESTAMP DATETIME TIMESTAMP datetime DATETIME
time, timespan TimeSpan java.sql.Time time TIME TIME TIMESTAMP datetime DATETIME
string, varchar String java.lang.String length > 4000: nvarchar(max)、それ以外: nvarchar(length)length > 32672: LONG VARCHAR、それ以外: VARCHAR(length)length > 255: LONGTEXT, それ以外: VARCHAR(length)length > 4000: CLOB, それ以外: VARCHAR2(length)nvarchar(length)length > 255: LONGTEXT, それ以外: VARCHAR(length)
long, int64, bigint Int64 long bigint BIGINT BIGINT NUMBER bigint LONG
boolean, bool Boolean boolean tinyint SMALLINT BIT NUMBER tinyint BIT
decimal, numeric Decimal java.math.BigDecimal decimal DECIMAL DECIMAL DECIMAL decimal CURRENCY
uuid Guid java.util.UUID nvarchar(length) VARCHAR(length)VARCHAR(length) VARCHAR2(length)nvarchar(length) VARCHAR(length)
binary, varbinary, longvarbinary byte[] byte[] SQL Server 2000以降binary(1000) またはvarbinary(max), それ以外image BLOB LONGBLOB BLOB BLOB LONGBINARY

CData JDBC Driver for Marketo

クエリ処理

クエリ処理

CData は、クライアントサイドのSQL エンジンを本製品 ライブラリに組み込んでいます。これにより、フィルタ、集約、関数など、SQL-92 が提供する全機能をサポートすることができます。

SQL-92をサポートしないソースに対しては、本製品 はMarketo にSQLステートメントの処理を可能な限りオフロードし、残りのクエリをクライアントサイドのインメモリで処理します。その結果、最適なパフォーマンスを得ることができます。

限られたクエリ能力のデータソースに対しては、本製品 はSQL クエリの変換をおこない、本製品 がより単純になるよう処理します。 目標はデータソースのクエリ能力に基づいて賢く判断し可能な限り計算を抑えることです。Marketo のクエリ評価コンポーネントはSQL クエリを検証し、本製品 がネイティブに実行できないクエリ部分を示す情報を返します。

Marketo のクエリスライサーコンポーネントはより具体的なケースにおいて1つのクエリを複数の独立したクエリに分割するために使用されます。クライアントサイドのクエリエンジンはクエリの簡素化、複数のクエリへの分割、結果セットのサイズを最小化しながらクライアントサイドで集約のプッシュダウンや計算をするなどの決定を行います。

クエリを部分的にでもクライアントサイドで評価するということには大きなトレードオフがあります。このモデルでは効果的に実行することが不可能なクエリは常に存在し、この方法で計算すると特にコストが高くなるものもあります。CData は可能な限り効率的なクエリを生成し、最も柔軟なクエリ機能を提供するために常にデータソースに対して実行可能な限りのクエリをプッシュダウンしています。

追加情報

CData がどのようにクエリ処理を行うかについては、CData Architecture: Query Execution を参照してください。

CData JDBC Driver for Marketo

ログ

ログ

本製品 のログを取得しておくことで、エラーメッセージや想定外の振る舞いを診断する際に役立ちます。

基本的なログの記録

本製品 のログの取得を開始するには、次のプロパティを設定します。

  • Logfile:ログファイルの名前と場所を指定するファイルパス。
  • Verbosity:ログの詳細レベルを決定する数値(1-5)。5段階数値の説明については、「接続プロパティ」セクションのページを確認してください。
  • MaxLogFileSize:サイズリミットを超えると、日付と時刻が末尾に追加された新しいログが同じフォルダ内に作成されます。リミットのデフォルトは100 MB です。100 kB より小さい値を設定した場合、100 kB がリミットとなります。
  • MaxLogFileCount:ログファイルの最大ファイル数を指定する文字列。サイズリミットを超えると、日付と時刻が末尾に追加された新しいログが同じフォルダ内に作成され、最も古いログファイルが削除されます。サポートされる最低値は2です。0や負の値は、数に制限がないことを示します。

これらのプロパティを設定すると、認証が実行されたときやクエリが実行されたときなど、さまざまなタスクを実行する際に、本製品 がログファイルを生成します。指定したファイルが存在しない場合は作成されます。

ログのVerbosity レベル

Verbosity レベルは本製品 がLogfile に記載する詳細レベルを指定します。1 から5 までのVerbosity レベルがサポートされています。

以下のリストで各レベルについて説明します。

1Verbosity を1に設定すると、クエリ、返された行数、実行開始とかかった時間、エラーが記録されます。
2Verbosity を2に設定すると、Verbosity 1に含まれるすべて、キャッシュクエリ、およびリクエストに関する追加の情報が記録されます。
3Verbosity を3に設定すると、2 に加えてHTTP ヘッダーおよびリクエストとレスポンスの本文が記録されます。
4Verbosity を4に設定すると、3 に加えてデータソースとのトランスポートレベルの通信が記録されます。これには、SSL ネゴシエーションが含まれます。
5Verbosity を5に設定すると、データソースとのやり取りおよび問題のトラブルシューティングに役立つ追加情報も記録されます。これには、インターフェースコマンドが含まれます。

通常の実行では、Verbosity を2以上に設定しないでください。高い詳細レベルでは、大量のデータをログに記録することになり、実行に遅れが生じる恐れがあります。

特定の情報に関するカテゴリを表示または非表示にしてログ内容を調整するには、LogModules を参照してください。

センシティブデータ

Verbosity レベル3以上では、組織外で共有したくない情報をキャプチャする場合があります。以下に、各レベルで懸念される情報をリストします。

  • Verbosity 3:本製品 から返されるすべてのデータを含むリクエストとレスポンスのボディ
  • Verbosity 4:SSL 証明書
  • Verbosity 5:ヒューマンリーダブルでないバイナリ転送データなど、Verbosity 3には含まれていない追加の転送データ

Note: パスワードなどのセンシティブデータは、接続文字列やログ内のすべてのリクエストでマスクされますが、組織外で共有する前に機密情報がないかログを確認することをお勧めします。

Java のログ出力

Logfile で Java のロギングが有効になっている場合、Verbosity は以下のログレベルにマッピングされます。

  • 0: Level.WARNING
  • 1: Level.INFO
  • 2: Level.CONFIG
  • 3: Level.FINE
  • 4: Level.FINER
  • 5: Level.FINEST

高度なログの記録

ログファイルに記録される情報を、正確に絞り込みたい場合があるかもしれません。これは、LogModules プロパティを使用することで可能です。このプロパティを使えば、セミコロン区切りでリスト化されたログモジュールを使用してログ内容をフィルタできます。

すべてのモジュール名は4文字です。注意点として、3文字のモジュール名は、必ず最後に空白文字を含みます。

利用可能なモジュールは次のとおりです。

  • EXEC:クエリの実行。元のSQL クエリ、パースされたSQL クエリ、正規化されたSQL クエリ用の実行メッセージを含みます。クエリとページングの成功または失敗のメッセージもここに表示されます。
  • INFO:一般的な情報。接続文字列、ドライバーのバージョン(ビルド番号)、初期接続メッセージを含みます。
  • HTTP:HTTP プロトコルメッセージ。HTTP リクエストとレスポンス(POST メッセージを含む)、Kerberos に関するメッセージを含みます。
  • SSL :SSL 証明書メッセージ。
  • OAUT:OAuth に関する失敗または成功のメッセージ。
  • SQL :SQL トランザクション、SQL 一括転送のメッセージ、SQL 結果セットのメッセージを含みます。
  • META:メタデータのキャッシュとスキーマのメッセージ。
  • TCP :TCP トランスポート層メッセージの送受信Raw バイト。

プロパティ値の例:

LogModules=INFO;EXEC;SSL ;SQL ;META;

これらのモジュールはVerbosity を考慮して、取得中の情報の詳細レベルを変更します。

CData JDBC Driver for Marketo

SQL 準拠

CData JDBC Driver for Marketo はクエリ、削除、編集、および挿入を含む、データに対する複数の処理をサポートします。

SELECT ステートメント

構文のリファレンスと例については、SELECT ステートメント を参照してください。

Marketo API 機能の詳細については、データモデル を参照してください。

INSERT ステートメント

構文のリファレンスと例については、INSERT ステートメント を参照してください。

UPDATE ステートメント

レコードの更新には、主キーId が必要です。構文のリファレンスと例については、UPDATE ステートメント を参照してください。

UPSERT ステートメント

UPSERT はレコードがある場合は更新し、ない場合は挿入します。構文のリファレンスと例については、UPSERT ステートメント を参照してください。

DELETE ステートメント

レコードの削除には、主キーId が必要です。構文のリファレンスと例については、DELETE ステートメント を参照してください。

GETDELETED ステートメント

GETDELETED ステートメントは削除されたレコードのId を返します。構文のリファレンスと例については、GETDELETED ステートメント を参照してください。

CACHE ステートメント

CACHE ステートメントは、本製品 のキャッシュ機能を細かく制御できます。構文のリファレンスと例については、CACHE ステートメント を参照してください。

キャッシング機能についての詳細は、データのキャッシュ を参照してください。

EXECUTE ステートメント

EXECUTE またはEXEC ステートメントを使用して、ストアドプロシージャを実行します。構文のリファレンスと例については、EXECUTE ステートメント を参照してください。

名前とかっこ

  • テーブルとカラムの名前は識別子名であると見なされます。このため、これらの名前には、次の文字のみを使用できます:[A-Z, a-z, 0-9, _:@]。
  • テーブルまたはカラムの名前に上記以外の文字を使用する場合は、SQL ステートメントではその名前を角かっこ ([name])で囲む必要があります。
  • パラメータ名の先頭にはオプションで@を付加できます(@p1、@CustomerName など)。パラメータ名をかっこで囲むことはできません。
  • 文字列は、一重引用符で囲む必要があります('John Doe'など)。

CData JDBC Driver for Marketo

SQL 関数

本製品 には、ほとんどの標準的なデータベースで使用できる関数と同様の関数が用意されています。これらの関数は、CData プロバイダーエンジンで実装されるため、同じ一貫したAPI を使用してすべてのデータソースに渡って使用できます。関数にはstring、date、math の3つのカテゴリがあります。

本製品 はすべてのSQL 関数入力を文字列またはカラム識別子のいずれかとして解釈するため、すべてのリテラルを単一引用符で文字列としてエスケープする必要があります。例えば、DATENAME 関数のSQL Server 構文と本製品 構文を比較すると次のようになります。

  • SQL Server
    SELECT DATENAME(yy,GETDATE())
  • 本製品
    SELECT DATENAME('yy',GETDATE())

文字列関数

これらの関数は、文字列操作を実行し、文字列値を返します。詳しくは、文字列関数 を参照してください。

日付関数

これらの関数は、日付および日時操作を実行します。詳しくは、日付関数 を参照してください。

算術関数

これらの関数は、数値演算を提供します。詳しくは、算術関数 を参照してください。

CData JDBC Driver for Marketo

文字列関数

ASCII(character_expression)

文字式の左端の文字のASCII コード値を返します。

  • character_expression:文字式。

                      SELECT ASCII('0');
                      --  Result: 48
                    

CHAR(integer_expression)

整数のASCII コードを対応する文字に変換します。

  • integer_expression:0 から255 までの整数。

                      SELECT CHAR(48);
                      -- Result: '0'
                    

CHARINDEX(expressionToFind ,expressionToSearch [,start_location ])

指定した文字列式の開始位置を返します。

  • expressionToFind:検索対象の文字式。
  • expressionToSearch:検索対象となる文字式(通常は、カラム)。
  • start_location:expressionToFind の検索を開始するexpressionToSearch 内の文字位置(オプション)。

                      SELECT CHARINDEX('456', '0123456');
                      -- Result: 4

                      SELECT CHARINDEX('456', '0123456', 5);
                      -- Result: -1
                    

CHAR_LENGTH(character_expression),

式内にあるUTF-8 文字の数を返します。

  • character_expression:長さを評価する文字のセット。

				 SELECT CHAR_LENGTH('sample text') FROM Account LIMIT 1
				 -- Result: 11			
				

CONCAT(string_value1, string_value2, ..., string_valueN)

2つ以上の文字列値を連結した文字列を返します。

  • string_value1:連結される最初の文字列。
  • string_value2:連結される2番目の文字列。
  • string_valueN:(オプション)連結される任意の追加の文字列。

                      SELECT CONCAT('Hello, ', 'world!');
                      -- Result: 'Hello, world!'
                    

CONTAINS(expressionToSearch, expressionToFind)

expressionToSearch 中にexpressionToFind が見つかった場合は1を、それ以外は0を返します。

  • expressionToSearch:検索対象となる文字式(通常は、カラム)。
  • expressionToFind:検索対象の文字式。

                      SELECT CONTAINS('0123456', '456');
                      -- Result: 1

                      SELECT CONTAINS('0123456', 'Not a number');
                      -- Result: 0
                    

ENDSWITH(character_expression, character_suffix)

character_expression がcharacter_suffix で終わる場合は1を、それ以外は0を返します。

  • character_expression:文字式。
  • character_suffix:検索する文字のサフィックス。

                      SELECT ENDSWITH('0123456', '456');
                      -- Result: 1

                      SELECT ENDSWITH('0123456', '012');
                      -- Result: 0
                    

FILESIZE(uri)

指定されたファイルパスのファイルに存在するバイト数を返します。

  • uri:サイズを読み取るファイルのパス。

				SELECT FILESIZE('C:/Users/User1/Desktop/myfile.txt');
				-- Result: 23684
				

FORMAT(value [, parseFormat], format )

指定された書式で値をフォーマットして返します。

  • value:フォーマットする文字列。
  • format:日付や数値形式の出力構文を指定する文字列。
  • parseFormat:日付値の入力構文を指定する文字列。整数型には適用されません。

                      SELECT FORMAT(12.34, '#');
                      -- Result: 12

                      SELECT FORMAT(12.34, '#.###');
                      -- Result: 12.34

                      SELECT FORMAT(1234, '0.000E0');
                      -- Result: 1.234E3
                      
                      SELECT FORMAT('2019/01/01', 'yyyy-MM-dd');
                      -- Result: 2019-01-01
                      
                      SELECT FORMAT('20190101', 'yyyyMMdd', 'yyyy-MM-dd');
                      -- Result: '2019-01-01'
                    

HASHBYTES(algorithm, value)

指定されたアルゴリズムを使用して、入力値のハッシュをバイト配列として返します。サポートされているアルゴリズムはMD5、SHA1、SHA2_256、SHA2_512、SHA3_224、SHA3_256、SHA3_384 およびSHA3_512 です。

  • algorithm:ハッシュ化に使用するアルゴリズム。MD5、SHA1、SHA2_256、SHA2_512、SHA3_224、SHA3_256、SHA3_384、SHA3_512 のいずれかでなければなりません。
  • value:ハッシュする値。文字列またはバイト配列でなければなりません。

                      SELECT HASHBYTES('MD5', 'Test');
                      -- Result (byte array): 0x0CBC6611F5540BD0809A388DC95A615B
                    

INDEXOF(expressionToSearch, expressionToFind [,start_location ])

指定した文字列式の開始位置を返します。

  • expressionToSearch:検索対象となる文字式(通常は、カラム)。
  • expressionToFind:検索対象の文字式。
  • start_location:expressionToFind の検索を開始するexpressionToSearch 内の文字位置(オプション)。

                      SELECT INDEXOF('0123456', '456');
                      -- Result: 4

                      SELECT INDEXOF('0123456', '456', 5);
                      -- Result: -1
                    

JSON_EXTRACT(json, jsonpath)

JSON 配列またはオブジェクトのあらゆる値を選択します。配列へのパスはjsonpath 引数で指定します。戻り値は数値またはnull です。

  • json:抽出するJSON ドキュメント。
  • jsonpath:ノードの選択に使用するXPath。JSONPath は文字列定数である必要があります。選択されたノードの値は、トークンで区切られたリストの形式で返されます。

                      SELECT JSON_EXTRACT('{"test": {"data": 1}}', '$.test');
                      -- Result: '{"data":1}'

                      SELECT JSON_EXTRACT('{"test": {"data": 1}}', '$.test.data');
                      -- Result: 1

                      SELECT JSON_EXTRACT('{"test": {"data": [1, 2, 3]}}', '$.test.data[1]');
                      -- Result: 2
                    

LEFT ( character_expression , integer_expression )

指定された文字列の左端から指定された数の文字を返します。

  • character_expression:文字式。
  • integer_expression:character_expression の左端から数えて何文字を返すかを指定する正の整数。

                      SELECT LEFT('1234567890', 3);
                      -- Result: '123'
                    

LEN(string_expression)

指定された文字列式の文字数を返します。

  • string_expression:文字列式。

                      SELECT LEN('12345');
                      -- Result: 5
                    

LOCATE(substring,string)

部分文字列が表示される文字列の文字数を表す整数を返します。

  • substring:より大きな文字列内で検索する部分文字列。
  • string:部分文字列を検索するより大きな文字列。
  • start locations:検索を開始する文字位置(オフセット)を設定するオプションの整数。

				SELECT LOCATE('sample','XXXXXsampleXXXXX');
				-- Result: 6

                SELECT LOCATE('sample', 'XXXXXsampleXXXXX', 7)
                -- Result: 0
				

LOWER ( character_expression )

大文字データを小文字に変換した文字式を返します。

  • character_expression:文字式。

                      SELECT LOWER('MIXED case');
                      -- Result: 'mixed case'
                    

LTRIM(character_expression)

先頭の空白を除いた文字式を返します。

  • character_expression:文字式。

                      SELECT LTRIM('     trimmed');
                      -- Result: 'trimmed'
                    

MASK(string_expression, mask_character [, start_index [, end_index ]])

start_index とend_index の間の文字を文字列内のmask_character に置き換えます。

  • string_expression:検索される文字列式。
  • mask_character:マスクする文字。
  • start_index:文字列の先頭でマスクされないままにする文字数(オプション)。デフォルトは0 です。
  • end_index:文字列の最後でマスクされないままにする文字数(オプション)。デフォルトは0 です。

                        SELECT MASK('1234567890','*',);
                        -- Result: '**********'
                        SELECT MASK('1234567890','*', 4);
                        -- Result: '1234******'
                        SELECT MASK('1234567890','*', 4, 2);
                        -- Result: '1234****90'  
                    

NCHAR(integer_expression)

Unicode 標準の定義に従って、指定された整数コードのUnicode 文字を返します。

  • integer_expression:0から65535までの整数(0からxFFFF まで)。

OCTET_LENGTH(character_expression),

式内にあるバイト数を返します。

  • character_expression:評価する文字のセット。

				 SELECT OCTET_LENGTH('text') FROM Account LIMIT 1
				 -- Result: 4
				

PATINDEX(pattern, expression)

式内に最初に見つかったパターンの開始位置を返します。パターンが見つからなかった場合は0を返します。

  • pattern:発見すべきシーケンスを含む文字式。ワイルドカード文字% は、式の先頭または末尾でのみ使用できます。
  • expression:パターンの検索対象となる式(通常は、カラム)。

                      SELECT PATINDEX('123%', '1234567890');
                      -- Result: 1

                      SELECT PATINDEX('%890', '1234567890');
                      -- Result: 8

                      SELECT PATINDEX('%456%', '1234567890');
                      -- Result: 4
                    

POSITION(expressionToFind IN expressionToSearch)

指定した文字列式の開始位置を返します。

  • expressionToFind:検索対象の文字式。
  • expressionToSearch:検索対象となる文字式(通常は、カラム)。

                      SELECT POSITION('456' IN '123456');
                      -- Result: 4

                      SELECT POSITION('x' IN '123456');
                      -- Result: 0
                    

QUOTENAME(character_string [, quote_character])

指定されたUnicode 文字列に必要な区切り記号を追加することで、有効なSQL Server の区切り付き識別子を返します。

  • character_string:Unicode 文字データの文字列。文字列は128文字に制限されます。文字を128文字を超えて入力すると、null が返されます。
  • quote_character:区切り記号として使用される1つの文字(オプション)。次を含みます:
    • 単一引用符(')
    • 左または右の大かっこ([])
    • 二重引用符(")
    • 左または右の小かっこ( () )
    • 大なりまたは小なり記号(><)
    • 左または右の中かっこ({})
    • バッククォート(`)

    quote_character を指定しない場合は、大かっこが使用されます。許容できない文字が指定された場合は、NULL を返します。


                      SELECT QUOTENAME('table_name');
                      -- Result: '[table_name]'

                      SELECT QUOTENAME('table_name', '"');
                      -- Result: '"table_name"'

                      SELECT QUOTENAME('table_name', '[');
                      -- Result: '[table_name]'
                    

REPLACE(string_expression, string_pattern, string_replacement)

見つかった文字列をすべて別の文字列に置換します。

  • string_expression:検索される文字列式。文字またはバイナリデータ型を指定できます。
  • string_pattern:検索されるサブ文字列。空の文字列を設定することはできません。
  • string_replacement:置き換え後の文字列。

                      SELECT REPLACE('1234567890', '456', '|');
                      -- Result: '123|7890'

                      SELECT REPLACE('123123123', '123', '.');
                      -- Result: '...'

                      SELECT REPLACE('1234567890', 'a', 'b');
                      -- Result: '1234567890'
                    

REPLICATE ( string_expression ,integer_expression )

文字列値を指定された回数だけ繰り返します。

  • string_expression:繰り返す文字列。
  • integer_expression:繰り返し回数。

                      SELECT REPLACE('x', 5);
                      -- Result: 'xxxxx'
                    

REVERSE ( string_expression )

文字列式を逆順序で返します。

  • string_expression:文字列。

                      SELECT REVERSE('1234567890');
                      -- Result: '0987654321'
                    

RIGHT ( character_expression , integer_expression )

文字列の右側から指定された数の文字を返します。

  • character_expression:文字式。
  • integer_expression:返される文字式の文字数を指定する正の整数。

                      SELECT RIGHT('1234567890', 3);
                      -- Result: '890'
                    

RTRIM(character_expression)

末尾の空白を削除した後の文字式を返します。

  • character_expression:文字式。

                      SELECT RTRIM('trimmed     ');
                      -- Result: 'trimmed'
                    

SOUNDEX(character_expression)

文字列の音声表現に基づいて、4文字のSoundex コードを返します。

  • character_expression:文字データの英数字式。

                      SELECT SOUNDEX('smith');
                      -- Result: 'S530'
                    

SPACE(repeatcount)

空白の繰り返しで構成される文字列を返します。

  • repeatcount:空白文字の数。

                      SELECT SPACE(5);
                      -- Result: '     '
                    

SPLIT(string, delimiter, offset)

区切り文字の間の文字列のセクションを返します。

  • string:分割する文字列。
  • delimiter:文字列を分割する文字。
  • offset:返す分割の数。正の数値は左からのオフセットとして扱われ、負の数値は右からのオフセットとして扱われます。

                      SELECT SPLIT('a/b/c/d', '/', 1);
                      -- Result: 'a'
                      SELECT SPLIT('a/b/c/d', '/', -2);
                      -- Result: 'c'
                    

STARTSWITH(character_expression, character_prefix)

character_expression がcharacter_prefix で始まる場合は1を、それ以外は0を返します。

  • character_expression:文字式。
  • character_prefix:検索する文字列のプレフィックス。

                      SELECT STARTSWITH('0123456', '012');
                      -- Result: 1

                      SELECT STARTSWITH('0123456', '456');
                      -- Result: 0
                    

STR ( float_expression [ , integer_length [ , integer_decimal ] ] )

数値データから変換された文字データを返します。例えば、STR(123.45, 6, 1) は123.5 を返します。

  • float_expression:浮動小数点型の式。
  • length:返される長さの合計(オプション)。これには、小数点、符号、数字、および空白も含まれます。デフォルトは10です。
  • decimal:小数点以下の桁数(オプション)。decimal には、16以下を指定する必要があります。

                      SELECT STR('123.456');
                      -- Result: '123'

                      SELECT STR('123.456', 2);
                      -- Result: '**'

                      SELECT STR('123.456', 10, 2);
                      -- Result: '123.46'
                    

STUFF(character_expression , integer_start , integer_length , replaceWith_expression)

文字列を別の文字列内に挿入します。まず、最初の文字列の指定された開始位置から指定された長さの文字を削除し、次に、2番目の文字列を最初の文字列の指定された開始位置に挿入します。

  • character_expression:文字列式。
  • start:削除および挿入を開始する位置を指定する整数値。start またはlength が負の場合は、null が返されます。start が変更される文字列(character_expression)の長さを超える場合は、null が返されます。
  • length:削除する文字数を指定する整数。length がcharacter_expression の長さを超える場合は、replaceWith_expression は最後の文字まで削除されます。
  • replaceWith_expression:character_expression のstart 値の位置から始まるlength 文字数を置き換える文字データの式。

                      SELECT STUFF('1234567890', 3, 2, 'xx');
                      -- Result: '12xx567890'
                    

SUBSTRING(string_value FROM start FOR length)

文字列のうち、指定されたインデックスから始まる指定された長さの部分を返します。

  • string_value:文字列。
  • start:返される文字の開始インデックスを指定する正の整数。
  • length:オプション。返される文字数を指定する正の整数。

                      SELECT SUBSTRING('1234567890' FROM 3 FOR 2);
                      -- Result: '34'

                      SELECT SUBSTRING('1234567890' FROM 3);
                      -- Result: '34567890'
                    
FROM 句とFOR 句を省略することもできます。
                    SELECT SUBSTRING('1234567890', 3, 2)
                    --Result: '34'
                    SELECT SUBSTRING('1234567890', 3)
                    --Result: '34567890'
                    

TOSTRING(string_value1)

インスタンスの値を同様の文字列表現に変換します。

  • string_value1:変換される文字列。

                      SELECT TOSTRING(123);
                      -- Result: '123'

                      SELECT TOSTRING(123.456);
                      -- Result: '123.456'

                      SELECT TOSTRING(null);
                      -- Result: ''
                    

TRIM(trimspec trimchar FROM string_value)

左および/または右の空白を除いた文字式を返します。

  • trimspec:オプション。含める場合、BOTHLEADINGTRAILING のいずれかの必要があります。
  • trimchar:オプション。含める場合、一文字の文字列値にする必要があります。
  • string_value:トリムする文字列値。

                      SELECT TRIM('     trimmed     ');
                      -- Result: 'trimmed'

                      SELECT TRIM(LEADING FROM '     trimmed     ');
                      -- Result: 'trimmed     '

                      SELECT TRIM('-' FROM '-----trimmed-----');
                      -- Result: 'trimmed'

                      SELECT TRIM(BOTH '-' FROM '-----trimmed-----');
                      -- Result: 'trimmed'

                      SELECT TRIM(TRAILING '-' FROM '-----trimmed-----');
                      -- Result: '-----trimmed'
                    

UNICODE(ncharacter_expression)

インプット式の最初の文字のUnicode 標準で定義された整数の値を返します。

  • ncharacter_expression:Unicode 文字式。

UPPER ( character_expression )

文字式の小文字データを大文字に変換して返します。

  • character_expression:文字式。

                      SELECT UPPER('MIXED case');
                      -- Result: 'MIXED CASE'
                    

XML_EXTRACT(xml, xpath [, separator])

指定されたXPath を使ってXML ドキュメントを抽出して、XML をフラット化します。デフォルトでは、出力の区切りにはカンマが使用されますが、これは3番目のパラメータを指定することで変更できます。

  • xml:抽出するXML ドキュメント。
  • xpath:ノードの選択に使用するXPath。選択されたノードの値は、トークンで区切られたリストの形式で返されます。
  • separator:フラット化された応答の中で、項目の区切りとして使用されるトークン。指定しない場合は、区切り記号はカンマになります。

                      SELECT XML_EXTRACT('<vowels><ch>a</ch><ch>e</ch><ch>i</ch><ch>o</ch><ch>u</ch></vowels>', '/vowels/ch');
                      -- Result: 'a,e,i,o,u'

                      SELECT XML_EXTRACT('<vowels><ch>a</ch><ch>e</ch><ch>i</ch><ch>o</ch><ch>u</ch></vowels>', '/vowels/ch', ';');
                      -- Result: 'a;e;i;o;u'
                    

CData JDBC Driver for Marketo

算術関数

ABS ( numeric_expression )

指定された数値の絶対値(正の値)を返します。

  • numeric_expression:真数(exact numeric)または概数(approximate numeric)データ型カテゴリの式(bit データ型を除く)。

                      SELECT ABS(15);
                      -- Result: 15

                      SELECT ABS(-15);
                      -- Result: 15
                    

ACOS ( float_expression )

指定された浮動小数点式がコサインの値となる角度をラジアン単位で返します。これは、アークコサインとも呼ばれます。

  • float_expression:-1~1の値を使用する浮動小数点数。この範囲外の値を使用すると、null が返されます。

                      SELECT ACOS(0.5);
                      -- Result: 1.0471975511966
                    

ASIN ( float_expression )

指定された浮動小数点式がサインの値となる角度をラジアン単位で返します。これは、アークサインとも呼ばれます。

  • float_expression:-1~1の値を使用する浮動小数点数の式。この範囲外の値を使用すると、null が返されます。

                      SELECT ASIN(0.5);
                      -- Result: 0.523598775598299
                    

ATAN ( float_expression )

指定された浮動小数点式がタンジェントの値となる角度をラジアン単位で返します。これは、アークタンジェントとも呼ばれます。

  • float_expression:浮動小数点型の式。

                      SELECT ATAN(10);
                      -- Result: 1.47112767430373
                    

ATN2 ( float_expression1 , float_expression2 )

正のx 軸と原点から点(y, x) までの線との間の角度をラジアン単位で返します。x とy は、指定された2つの浮動小数点式です。

  • float_expression1:浮動小数点型の式。
  • float_expression2:浮動小数点型の式。

                      SELECT ATN2(1, 1);
                      -- Result: 0.785398163397448
                    

CEILING ( numeric_expression ) or CEIL( numeric_expression )

指定された数値式以上で最小の整数を返します。

  • numeric_expression:真数(exact numeric)または概数(approximate numeric)データ型カテゴリの式(bit データ型を除く)。

                      SELECT CEILING(1.3);
                      -- Result: 2

                      SELECT CEILING(1.5);
                      -- Result: 2

                      SELECT CEILING(1.7);
                      -- Result: 2
                    

COS ( float_expression )

指定された式で示されるラジアン単位の角度の三角関数コサインを返します。

  • float_expression:浮動小数点型の式。

                      SELECT COS(1);
                      -- Result: 0.54030230586814
                    

COT ( float_expression )

指定された浮動小数点式で示されるラジアン単位の角度の三角関数コタンジェントを返します。

  • float_expression:浮動小数点型の式。

                      SELECT COT(1);
                      -- Result: 0.642092615934331
                    

DEGREES ( numeric_expression )

ラジアン単位で指定された角度に相当する度単位の角度を返します。

  • numeric_expression:真数(exact numeric)または概数(approximate numeric)データ型カテゴリの式(bit データ型を除く)。

                      SELECT DEGREES(3.1415926);
                      -- Result: 179.999996929531
                    

EXP ( float_expression )

指定された浮動小数点値の指数値を返します。例えば、EXP(LOG(20)) は20です。

  • float_expression:浮動小数点型の式。

                      SELECT EXP(2);
                      -- Result: 7.38905609893065
                    

EXPR ( expression )

式を評価します。

  • expression:数値データ型の式。使用できる演算子は、+, -, *, /, ==, !=, >, <, >=, および <= です。

                      SELECT EXPR('1 + 2 * 3');
                      -- Result: 7

                      SELECT EXPR('1 + 2 * 3 == 7');
                      -- Result: true
                    

FLOOR ( numeric_expression )

指定された数値式以下で最大の整数を返します。

  • numeric_expression:真数(exact numeric)または概数(approximate numeric)データ型カテゴリの式(bit データ型を除く)。

                      SELECT FLOOR(1.3);
                      -- Result: 1

                      SELECT FLOOR(1.5);
                      -- Result: 1

                      SELECT FLOOR(1.7);
                      -- Result: 1
                    

GREATEST(int1,int2,....)

指定された整数の最大値を返します。

				SELECT GREATEST(3,5,8,10,1)
				-- Result: 10			
				

HEX(value)

入力値に相当する16進数を返します。

  • value:16進数に変換される文字列または数値。

				SELECT HEX(866849198);
				-- Result: 33AB11AE
				
				SELECT HEX('Sample Text');
				-- Result: 53616D706C652054657874
				

JSON_AVG(json, jsonpath)

JSON オブジェクト内のJSON 配列の平均値を計算します。配列へのパスはjsonpath 引数で指定します。戻り値は数値またはnull です。

  • json:抽出するJSON ドキュメント。
  • jsonpath:ノードを選択します。[x], [2..], [.8] または[1...12] のように使います。[x] はすべてのノードを選択します。

                      SELECT JSON_AVG('[1,2,3,4,5]', '$[x]');
                      -- Result: 3

                      SELECT JSON_AVG('{"test": {"data": [1,2,3,4,5]}}', '$.test.data[x]');
                      -- Result: 3

                      SELECT JSON_AVG('{"test": {"data": [1,2,3,4,5]}}', '$.test.data[3..]');
                      -- Result: 4.5
                    

JSON_COUNT(json, jsonpath)

JSON オブジェクト内のJSON 配列のエレメント数を返します。配列へのパスはjsonpath 引数で指定します。戻り値は数値またはnull です。

  • json:抽出するJSON ドキュメント。
  • jsonpath:ノードを選択します。[x], [2..], [.8] または[1...12] のように使います。[x] はすべてのノードを選択します。

                      SELECT JSON_COUNT('[1,2,3,4,5]', '$[x]');
                      -- Result: 5

                      SELECT JSON_COUNT('{"test": {"data": [1,2,3,4,5]}}', '$.test.data[x]');
                      -- Result: 5

                      SELECT JSON_COUNT('{"test": {"data": [1,2,3,4,5]}}', '$.test.data[3..]');
                      -- Result: 2
                    

JSON_MAX(json, jsonpath)

JSON オブジェクト内のJSON 配列の最大値を取得します。配列へのパスはjsonpath 引数で指定します。戻り値は数値またはnull です。

  • json:抽出するJSON ドキュメント。
  • jsonpath:ノードを選択します。[x], [2..], [.8] または[1...12] のように使います。[x] はすべてのノードを選択します。

                      SELECT JSON_MAX('[1,2,3,4,5]', '$[x]');
                      -- Result: 5

                      SELECT JSON_MAX('{"test": {"data": [1,2,3,4,5]}}', '$.test.data[x]');
                      -- Result: 5

                      SELECT JSON_MAX('{"test": {"data": [1,2,3,4,5]}}', '$.test.data[..3]');
                      -- Result: 4
                    

JSON_MIN(json, jsonpath)

JSON オブジェクト内のJSON 配列の最小値を取得します。配列へのパスはjsonpath 引数で指定します。戻り値は数値またはnull です。

  • json:抽出するJSON ドキュメント。
  • jsonpath:ノードを選択します。[x], [2..], [.8] または[1...12] のように使います。[x] はすべてのノードを選択します。

                      SELECT JSON_MIN('[1,2,3,4,5]', '$[x]');
                      -- Result: 1

                      SELECT JSON_MIN('{"test": {"data": [1,2,3,4,5]}}', '$.test.data[x]');
                      -- Result: 1

                      SELECT JSON_MIN('{"test": {"data": [1,2,3,4,5]}}', '$.test.data[3..]');
                      -- Result: 4
                    

JSON_SUM(json, jsonpath)

JSONPath 式に応じたJSON のサマリー値を計算します。戻り値は数値またはnull です。

  • json:抽出するJSON ドキュメント。
  • jsonpath:ノードを選択します。[x], [2..], [.8] または[1...12] のように使います。[x] はすべてのノードを選択します。

                      SELECT JSON_SUM('[1,2,3,4,5]', '$[x]');
                      -- Result: 15

                      SELECT JSON_SUM('{"test": {"data": [1,2,3,4,5]}}', '$.test.data[x]');
                      -- Result: 15

                      SELECT JSON_SUM('{"test": {"data": [1,2,3,4,5]}}', '$.test.data[3..]');
                      -- Result: 9
                    

LEAST(int1,int2,....)

指定された整数の最小値を返します。

				SELECT LEAST(3,5,8,10,1)
				-- Result: 1			
				

LOG ( float_expression [, base ] )

指定された浮動小数点式の自然対数を返します。

  • float_expression:浮動小数点の式。
  • base:対数の底を設定する整数引数(オプション)。

                      SELECT LOG(7.3890560);
                      -- Result: 1.99999998661119
                    

LOG10 ( float_expression )

指定された浮動小数点式の10を底とする対数を返します。

  • float_expression:浮動小数点型の式。

                      SELECT LOG10(10000);
                      -- Result: 4
                    

MOD(dividend,divisor)

被除数を除数で除算したときの余剰に関連付けられた整数値を返します。

  • dividend:係数をとる数。
  • divisor:係数を決定するときに被除数を除算する数。

				SELECT MOD(10,3);
				-- Result: 1
				

NEGATE(real_number)

実数入力のopposite を返します。

  • real_number:opposite を見つけるための実数。

				SELECT NEGATE(10);
				-- Result: -10
				
				SELECT NEGATE(-12.4)
				--Result: 12.4
				

PI ( )

PI の定数値を返します。

                  SELECT PI()
                  -- Result: 3.14159265358979 
                

POWER ( float_expression , y )

指定された式の指定されたべき乗値を返します。

  • float_expression:浮動小数点型の式。
  • y:float_expression のべき乗。

                      SELECT POWER(2, 10);
                      -- Result: 1024

                      SELECT POWER(2, -2);
                      -- Result: 0.25
                    

RADIANS ( float_expression )

数値式が度単位で入力されたときのラジアン値を返します。

  • float_expression:真数(exact numeric)または概数(approximate numeric)データ型カテゴリの式(bit データ型を除く)。

                      SELECT RADIANS(180);
                      -- Result: 3.14159265358979
                    

RAND ( [ integer_seed ] )

0と1の間の(0と1は除く)の疑似乱数(浮動小数点値)を返します。

  • seed:seed 値を提供する整数式(オプション)。seed を指定しない場合は、ランダムなseed 値が割り当てられます。

                      SELECT RAND();
                      -- This result may be different, since the seed is randomized
                      -- Result: 0.873159630165044

                      SELECT RAND(1);
                      -- This result will always be the same, since the seed is constant
                      -- Result: 0.248668584157093
                    

ROUND ( numeric_expression [ ,integer_length] [ ,function ] )

指定された長さまたは有効桁数に丸められた数値を返します。

  • numeric_expression:数値の式。
  • length:numeric_expression を丸める有効桁数(オプション)。これを省略した場合、デフォルトの動作では最も近い整数に丸められます。
  • function:実行する操作の種類(オプション)。function パラメータを省略した場合、または0(デフォルト)の値を指定した場合、numeric_expression は丸められます。0以外の値を指定した場合、numeric_expression は切り捨てられます。

                      SELECT ROUND(1.3, 0);
                      -- Result: 1

                      SELECT ROUND(1.55, 1);
                      -- Result: 1.6

                      SELECT ROUND(1.7, 0, 0);
                      -- Result: 2

                      SELECT ROUND(1.7, 0, 1);
                      -- Result: 1
                      
                      SELECT ROUND (1.24);
                      -- Result: 1.0
                    

SIGN ( numeric_expression )

指定された式の符号を、正(+1)、ゼロ(0)、または負(-1)で返します。

  • numeric_expression:真数(exact numeric)または概数(approximate numeric)データ型カテゴリの式(bit データ型を除く)。

                      SELECT SIGN(0);
                      -- Result: 0

                      SELECT SIGN(10);
                      -- Result: 1

                      SELECT SIGN(-10);
                      -- Result: -1
                    

SIN ( float_expression )

指定された角度の三角関数のサイン値をラジアン単位で返します。

  • float_expression:浮動小数点型の式。

                     SELECT SIN(1);
                     -- Result: 0.841470984807897
                    

SQRT ( float_expression )

指定された浮動小数点値の平方根を返します。

  • float_expression:浮動小数点型の式。

                      SELECT SQRT(100);
                      -- Result: 10
                    

SQUARE ( float_expression )

指定された浮動小数点値の2乗を返します。

  • float_expression:浮動小数点型の式。

                      SELECT SQUARE(10);
                      -- Result: 100

                      SELECT SQUARE(-10);
                      -- Result: 100
                    

TAN ( float_expression )

入力式のタンジェントを返します。

  • float_expression:浮動小数点型の式。

                      SELECT TAN(1);
                      -- Result: 1.5574077246549
                    

TRUNC(decimal_number,precision)

指定された小数精度に切り捨てられた、指定された10進数を返します。

  • decimal_number:切り捨てる10進数値。
  • precision:10進数を切り捨てる小数点以下の桁数。

				SELECT TRUNC(10.3423,2);
				-- Result: 10.34
				

_ROW_NUMBER_()

行インデックスを追加カラムとして返します。

				SELECT ColumnName, _ROW_NUMBER_() FROM TableName
				-- Result: ColumnData, 0
				ColumnData2, 1
				ColumnData3, 2
				

CData JDBC Driver for Marketo

日付関数

CURRENT_DATE()

現在のdate 値を返します。

                  SELECT CURRENT_DATE();
                  -- Result: 2018-02-01
                

CURRENT_TIMESTAMP()

現在のデータベースシステムのタイムスタンプをdatetime 値で返します。この値はGETDATE およびSYSDATETIME と等しく、常にローカルタイムゾーンになります。

                  SELECT CURRENT_TIMESTAMP();
                  -- Result: 2018-02-01 03:04:05
                

DATEADD (datepart , integer_number , date [, dateformat])

date の指定されたdatepart に、指定されたnumber(符号付き整数)を加算したdatetime 値を返します。

  • datepart:整数値が加算される日付の部分。有効な値および省略形は次のとおりです。
    • year (yy, yyyy)
    • quarter (qq, q)
    • month (mm, m)
    • week (wk, ww)
    • weekday (dw)
    • dayofyear (dy, y)
    • day (dd, d)
    • hour (hh)
    • minute (mi, n)
    • second (ss, s)
    • millisecond (ms)
  • number:加算される数値。
  • date:datetime データ型の式。
  • dateformat:出力日付形式(オプション)。

                  SELECT DATEADD('d', 5, '2018-02-01');
                  -- Result: 2018-02-06

                  SELECT DATEADD('hh', 5, '2018-02-01 00:00:00');
                  -- Result: 2018-02-01 05:00:00
                

DATEDIFF (datepart , startdate , enddate)

指定されたstartdate とenddate の差(符号付き整数)を返します。

  • datepart:整数値が加算される日付の部分。有効な値(およびその省略形)は、day(dd、d)、hour(hh)、minute(mi、n)、second(ss、s)、millisecond(ms)です。
  • startdate:開始日のdatetime 式。
  • enddate:終了日のdatetime 式。

                  SELECT DATEDIFF('d', '2018-02-01', '2018-02-10');
                  -- Result: 9

                  SELECT DATEDIFF('hh', '2018-02-01 00:00:00', '2018-02-01 12:00:00');
                  -- Result: 12
                

DATE_FORMAT(date,format)

指定されたフォーマットで日付またはタイムスタンプを返します。この機能はMySQL DATE_FORMAT function を反映するものです。

  • date:日付またはタイムスタンプ文字列。
  • format:希望する出力フォーマットの指定文字列。サポートされているフォーマット指定子のリストは、MySQL DATE_FORMAT 関数(上記のMySQL ドキュメントへのリンクを参照)から得ています。

					SELECT DATE_FORMAT('9/4/2021 3:11:53 AM','%h')
					-- Result: 03
				  

DATEFROMPARTS(integer_year, integer_month, integer_day)

指定された年、月、および日のdatetime 値を返します。

  • year:年を指定する整数式。
  • month:1~12 までの月を指定する整数式。
  • day:日にちを指定する整数式。

                    SELECT DATEFROMPARTS(2018, 2, 1);
                    -- Result: 2018-02-01
                  

DATENAME(datepart , date)

指定されたdate の指定されたdatepart を表す文字列を返します。

  • datepart:返される日付の部分。有効な値(およびその省略形)は、year(yy、yyyy)、quarter(qq、q)、month(mm、m)、dayofyear(dy、y)、day(dd、d)、week(wk、ww)、weekday(dw)、hour(hh)、minute(mi、n)、second(ss、s)、millisecond(ms)、microsecond(mcs)、nanosecond(ns)です。
  • date:datetime 式。

                     SELECT DATENAME('yy', '2018-02-01');
                     -- Result: '2018'

                     SELECT DATENAME('dw', '2018-02-01');
                     -- Result: 'Thursday'
                   

DATEPART(datepart, date [,integer_datefirst])

指定されたdate の指定されたdatepart を表す文字列を返します。

  • datepart:返される日付の部分。有効な値(およびその省略形)は、year (yy, yyyy)、quarter (qq, q)、month (mm, m)、dayofyear (dy, y)、day (dd, d)、week (wk, ww)、weekday (dw)、hour (hh)、minute (mi, n)、second (ss, s)、millisecond (ms)、microsecond (mcs)、nanosecond (ns)、ISODOW、ISO_WEEK (isoweek, isowk,isoww)、ISOYEAR です。
  • date:datetime 文字列。
  • datefirst:週の最初の曜日に対応する整数(オプション)。ディフォルト値は7、日曜日。

                    SELECT DATEPART('yy', '2018-02-01');
                    -- Result: 2018

                    SELECT DATEPART('dw', '2018-02-01');
                    -- Result: 5
                  

DATETIMEFROMPARTS(integer_year, integer_month, integer_day, integer_hour, integer_minute, integer_seconds, integer_milliseconds)

指定されたdatepart のdatetime 値を返します。

  • year:年を指定する整数式。
  • month:1~12 までの月を指定する整数式。
  • day:日にちを指定する整数式。
  • hour:時間を指定する整数式。
  • minute:分を表す整数式。
  • seconds:秒を指定する整数式。
  • milliseconds:ミリ秒を指定する整数式。

                    SELECT DATETIMEFROMPARTS(2018, 2, 1, 1, 2, 3, 456);
                    -- Result: 2018-02-01 01:02:03.456
                  

DATETIME2FROMPARTS(integer_year, integer_month, integer_day, integer_hour, integer_minute, integer_seconds, integer_fractions, integer_precision)

指定されたdatepart のdatetime 値を返します。

  • year:年を指定する整数式。
  • month:1~12 までの月を指定する整数式。
  • day:日にちを指定する整数式。
  • hour:時間を指定する整数式。
  • minute:分を表す整数式。
  • seconds:秒を指定する整数式。
  • fractions:小数部分を表す整数式。
  • precision:小数部分の有効桁数を指定する整数式。

				    SELECT DATETIME2FROMPARTS(2018, 2, 1, 1, 2, 3, 456, 3);
                    -- Result: 2018-02-01 01:02:03.456
                  

DATE_TRUNC(date, datepart)

指定されたdatepart の精度に日付を切り捨てます。Oracle TRUNC 関数をモデルにしています。

  • date:日付を指定するdatetime 文字列。
  • datepart:有効なdatepart 構文についてはOracle のドキュメント を参照してください。

				    SELECT DATE_TRUNC('05-04-2005', 'YY');
                    -- Result: '1/1/2005'
					
                    SELECT DATE_TRUNC('05-04-2005', 'MM');
                    -- Result: '5/1/2005'                    
                  

DATE_TRUNC2(datepart, date, [weekday])

指定されたdatepart の精度に日付を切り捨てます。PostgreSQL date_trunc 関数をモデルにしています。

  • datepart:'millennium'、'century'、'decade'、'year'、'quarter'、'month'、'week'、'day'、'hour'、'minute' 、または'second' のいずれか。
  • date:日付を指定するdatetime 文字列。
  • weekday:週の最初の日として使用する曜日(オプション)。'sunday'、'monday' など。

                    SELECT DATE_TRUNC2('year', '2020-02-04');
                    -- Result: '2020-01-01'

                    SELECT DATE_TRUNC2('week', '2020-02-04', 'monday');
                    -- Result: '2020-02-02', which is the previous Monday
                  

DAY(date)

指定されたdate の日コンポーネントを指定する整数を返します。

  • date:日付を指定するdatetime 文字列。

                    SELECT DAY('2018-02-01');
                    -- Result: 1
                  

DAYNAME(date)

指定されたdate 部分の曜日名を返します。

  • date:日付を指定するdatetime 文字列。

                    SELECT DAYNAME('8/18/2021');
                    -- Result: Wednesday
                  

DAYOFMONTH(date)

指定されたdate 部分の日にちを返します。
  • date:日付を指定するdatetime 文字列。

				  SELECT DAYOFMONTH('04/15/2000');
				  -- Result: 15
				  

DAYOFWEEK(date)

指定されたdate 部分の曜日を返します。
  • date:日付を指定するdatetime 文字列。

				  SELECT DAYOFWEEK('04/15/2000');
				  -- Result: 7
				  

DAYOFYEAR(date)

指定されたdate 部分の年の通日を返します。
  • date:日付を指定するdatetime 文字列。

				  SELECT DAYOFYEAR('04/15/2000');
				  -- Result: 106
				  

EOMONTH(date [, integer_month_to_add ]) or LAST_DAY(date)

指定されたdate を含む月、またはオプションでその月からオフセットされた月の最終日を返します。

  • date:月の最終日を返す日付を指定するdatetime 式。
  • integer_month_to_add:月末を計算する前に日付に追加する月数を指定する整数式(オプション)。

                  SELECT EOMONTH('2018-02-01');
                  -- Result: 2018-02-28
                  
                  SELECT LAST_DAY('2018-02-01');
                  -- Result: 2018-02-28

                  SELECT EOMONTH('2018-02-01', 2);
                  -- Result: 2018-04-30
                

EXTRACT(date_part FROM date_column_name)

指定されたdate を含む月、またはオプションでその月からオフセットされた月の最終日を返します。

  • date_part:次のdate コンポーネントのいずれか1つ:YEAR、MONTH、DAY、HOUR、MINUTE、SECOND。
  • date_column_name:テーブルのdate カラムの名前。

                  SELECT EXTRACT(YEAR FROM DateColumn)
                  -- Result: 2021
                

FDWEEK(date)

指定されたdate 部分の週の最初の日付を返します。
  • date:日付を指定するdatetime 文字列。
  • weeks to add:最初の曜日を計算する前に日付に追加する月数を指定する整数式(オプション)。

				  SELECT FDWEEK('02-08-2018');
				  -- Result: 2/4/2018

          SELECT FDWEEK('02-08-2018', 1)
          --Result: 02/11/2018
				  

FDMONTH(date)

指定されたdate 部分の月の最初の日付を返します。
  • date:日付を指定するdatetime 文字列。
  • month to add:月の初日を計算する前に日付に追加する月数を指定する整数式(オプション)。

				  SELECT FDMONTH('02-08-2018');
				  -- Result: 2/1/2018

          SELECT FDMONTH('02-08-2018', 1) 
          --Result: 03/01/2018
				  

FDQUARTER(date)

指定されたdate 部分の四半期の最初の日付を返します。
  • date:日付を指定するdatetime 文字列。
  • quarters to add:四半期の初日を計算する前に日付に追加する月数を指定する整数式(オプション)。

				  SELECT FDQUARTER('05-08-2018');
				  -- Result: 4/1/2018

          SELECT FDQUARTER('05-08-2018',1)
          --Result: 07/01/2018
				  

FILEMODIFIEDTIME(uri)

関連ファイルの変更日に関連付けられたタイムスタンプを返します。

  • uri:ローカルファイルシステム上のファイルを指す絶対パス。

				 SELECT FILEMODIFIEDTIME('C:/Documents/myfile.txt');
				 -- Result: 6/25/2019 10:06:58 AM
				 

FROM_DAYS(datevalue)

1582-10-15以降の日数から派生した日付を返します(グレゴリオ暦に基づく)。これはMYSQL FROM_DAYS 関数と同等です。

  • datevalue:1582-10-15からの日数を表す整数値。

				SELECT FROM_DAYS(736000);
				-- Result: 2/6/2015
				

FROM_UNIXTIME(time, issecond)

unix_timestamp 引数を、現在のタイムゾーンで表されたYYYY-MM-DD HH:MM:SS の値で返します。

  • time:エポックタイムのタイムスタンプの値。ミリ秒が利用可能。
  • issecond:タイムスタンプの値がミリ秒であるとエポックタイムに示す。

                      SELECT FROM_UNIXTIME(1540495231, 1);
                      -- Result: 2018-10-25 19:20:31

                      SELECT FROM_UNIXTIME(1540495357385, 0);
                      -- Result: 2018-10-25 19:22:37
                    

GETDATE()

現在のデータベースシステムのタイムスタンプをdatetime 値で返します。この値はCURRENT_TIMESTAMP およびSYSDATETIME と等しく、常にローカルタイムゾーンになります。

                  SELECT GETDATE();
                  -- Result: 2018-02-01 03:04:05
                

GETUTCDATE()

UTC datetime 値としてフォーマットされた現在のデータベースシステムのタイムスタンプを返します。SYSUTCDATETIME と同じです。

さらに、GETUTCDATE はオプションの第2パラメータとして、UTC に変換された日付と時刻を受け取ることができます。

                  SELECT GETUTCDATE();
                  -- For example, if the local timezone is Eastern European Time (GMT+2)
                  -- Result: 2018-02-01 05:04:05

                  SELECT GETUTCDATE('2020/08/31 13:56:00')
                  --Result: '2020-08-31 17:56:00'
                

HOUR(date)

指定されたdatetime から時間コンポーネントを返します。

  • date:日付を指定するdatetime 文字列。

				SELECT HOUR('02-02-2020 11:30:00');
				-- Result: 11
				

ISDATE(date, [date_format])

この値が有効なdate、time、またはdatetime 値である場合は1を返します。それ以外の場合は0を返します。

  • date:datetime 文字列。
  • date_format:datetime 形式(オプション)。

                      SELECT ISDATE('2018-02-01', 'yyyy-MM-dd');
                      -- Result: 1

                      SELECT ISDATE('Not a date');
                      -- Result: 0
                    

LAST_WEEK()

現在の日付のちょうど一週間前のタイムスタンプを返します。

				SELECT LAST_WEEK();	//Assume the date is 3/17/2020	
			 -- Result: 3/10/2020 00:00:00
				

LAST_MONTH()

現在の日付のちょうど一ヶ月前のタイムスタンプを返します。

	
				SELECT LAST_MONTH(); //Assume the date is 3/17/2020
				-- Result: 2/17/2020 00:00:00
				

LAST_YEAR()

現在の日付のちょうど一年前のタイムスタンプを返します。

				SELECT LAST_YEAR();	//Assume the date is 3/17/2020	
				-- Result: 3/10/2019 00:00:00
				

LDWEEK(date)

指定された週の最終日を返します。

  • date:datetime 文字列。
  • weeks to add:最終の曜日を計算する前に日付に追加する月数を指定する整数式(オプション)。

				SELECT LDWEEK('02-02-2020');
				-- Result: 2/8/2020
				

LDMONTH(date)

指定された月の最終日を返します。

  • date:datetime 文字列。
  • months to add:月の最終日を計算する前に日付に追加する月数を指定する整数式(オプション)。

				SELECT LDMONTH('02-02-2020');
				-- Result: 2/29/2020

        SELECT LDMONTH('02-08-2020', 1)
        --Result: 03/31/2020
				

LDQUARTER(date)

指定された四半期の最終日を返します。

  • date:datetime 文字列。
  • quarters to add:四半期の最終日を計算する前に日付に追加する月数を指定する整数式(オプション)。

				SELECT LDQUARTER('02-02-2020');
				-- Result: 3/31/2020

        SELECT LDQUARTER('02-02-2020',1)
        --Result: 06/30/2020
				

MAKEDATE(year, days)

年と日数から日付値を返します。

  • year:年
  • days:その年の日数。値は1より大きい必要があります。

          SELECT MAKEDATE(2020, 1);
          -- Result: 2020-01-01
        

MINUTE(date)

指定されたdatetime から分コンポーネントを返します。

  • date:日付を指定するdatetime 文字列。

				SELECT MINUTE('02-02-2020 11:15:00');
				-- Result: 15
				

MONTH(date)

指定されたdatetime から月コンポーネントを返します。

  • date:日付を指定するdatetime 文字列。

				SELECT MONTH('02-02-2020');
				-- Result: 2
				

QUARTER(date)

指定されたdatetime に関連付けられた四半期を返します。

  • date:日付を指定するdatetime 文字列。

				SELECT QUARTER('02-02-2020');
				-- Result: 1
				

SECOND(date)

指定されたdatetime から秒コンポーネントを返します。

  • date:日付を指定するdatetime 文字列。

				SELECT SECOND('02-02-2020 11:15:23');
				-- Result: 23
				

SMALLDATETIMEFROMPARTS(integer_year, integer_month, integer_day, integer_hour, integer_minute)

指定された日時のdatetime 値を返します。

  • year:年を指定する整数式。
  • month:1~12 までの月を指定する整数式。
  • day:日にちを指定する整数式。
  • hour:時間を指定する整数式。
  • minute:分を指定する整数式。

                      SELECT SMALLDATETIMEFROMPARTS(2018, 2, 1, 1, 2);
                      -- Result: 2018-02-01 01:02:00
                    

STRTODATE(string,format)

指定された文字列値をパースし、対応する日時を返します。

  • string:datetime 形式に変換される文字列値。
  • format:最初の文字列入力を解釈する方法を説明するフォーマット文字列。 Oracle date format syntax標準に従います。 UNIX、UNIXMILIS、TICKS、FILETICKS など、いくつかの特殊な形式も利用可能です。

				SELECT STRTODATE('03*04*2020','dd*MM*yyyy');
				-- Result: 4/3/2020
				

SYSDATETIME()

現在のタイムスタンプをデータベースシステムのdatetime 値として返します。この値はGETDATE およびCURRENT_TIMESTAMP と等しく、常にローカルタイムゾーンになります。

                  SELECT SYSDATETIME();
                  -- Result: 2018-02-01 03:04:05
                

SYSUTCDATETIME()

現在のシステム日時をUTC datetime 値として返します。GETUTCDATE と同じです。

                  SELECT SYSUTCDATETIME();
                  -- For example, if the local timezone is Eastern European Time (GMT+2)
                  -- Result: 2018-02-01 05:04:05
                

TIMEFROMPARTS(integer_hour, integer_minute, integer_seconds, integer_fractions, integer_precision)

指定されたhour、minute、およびsecond のtime 値を指定した有効桁数で返します。

  • hour:時間を指定する整数式。
  • minute:分を指定する整数式。
  • seconds:秒を指定する整数式。
  • fractions:小数部分を指定する整数式。
  • precision :小数部分の有効桁数を指定する整数式。

                      SELECT TIMEFROMPARTS(1, 2, 3, 456, 3);
                      -- Result: 01:02:03.456
                    

TO_DAYS(date)

0000-00-01以降の日数を返します。1582-10-15以降の日付に対してのみ値を返します(グレゴリオ暦に基づく)。これはMYSQL TO_DAYS 関数と同等です。

  • date:日付を指定するdatetime 文字列。

				SELECT TO_DAYS('02-06-2015');
				-- Result: 736000
				

WEEK(date)

指定されたdatetime に関連付けられた(その年の)週を返します。

  • date:日付を指定するdatetime 文字列。

				SELECT WEEK('02-17-2020 11:15:23');
				-- Result: 8
				

YEAR(date)

指定されたdate の年を表す整数を返します。

  • date:datetime 文字列。

                      SELECT YEAR('2018-02-01');
                      -- Result: 2018
                    

CData JDBC Driver for Marketo

日付リテラル関数

次の日付リテラル関数を使用して、相対間隔を使って日付フィールドをフィルタできます。これらの関数では、<、>、および = 演算子がサポートされていますが、<= および >= はサポートされていないことに注意してください。

L_TODAY()

現在の日。

  SELECT * FROM MyTable WHERE MyDateField = L_TODAY()

L_YESTERDAY()

前の日。

  SELECT * FROM MyTable WHERE MyDateField = L_YESTERDAY()

L_TOMORROW()

次の日。

  SELECT * FROM MyTable WHERE MyDateField = L_TOMORROW()

L_LAST_WEEK()

前の週のすべての日。

  SELECT * FROM MyTable WHERE MyDateField = L_LAST_WEEK()

L_THIS_WEEK()

現在の週のすべての日。

  SELECT * FROM MyTable WHERE MyDateField = L_THIS_WEEK()

L_NEXT_WEEK()

次の週のすべての日。

  SELECT * FROM MyTable WHERE MyDateField = L_NEXT_WEEK()
以下も利用可能です:
  • L_LAST/L_THIS/L_NEXT MONTH
  • L_LAST/L_THIS/L_NEXT QUARTER
  • L_LAST/L_THIS/L_NEXT YEAR

L_LAST_N_DAYS(n)

現在の日を除く過去n 日。

  SELECT * FROM MyTable WHERE MyDateField = L_LAST_N_DAYS(3)

L_NEXT_N_DAYS(n)

現在の日を含む次のn 日。

  SELECT * FROM MyTable WHERE MyDateField = L_NEXT_N_DAYS(3)
以下も利用可能です:
  • L_LAST/L_NEXT_90_DAYS

L_LAST_N_WEEKS(n)

現在の週のn 週前から始まり、前の週で終わる、すべての週のすべての日。

  SELECT * FROM MyTable WHERE MyDateField = L_LAST_N_WEEKS(3)

L_NEXT_N_WEEKS(n)

次の週から始まり、n 週後に終わる、すべての週のすべての日。

  SELECT * FROM MyTable WHERE MyDateField = L_NEXT_N_WEEKS(3)
以下も利用可能です:
  • L_LAST/L_NEXT_N_MONTHS(n)
  • L_LAST/L_NEXT_N_QUARTERS(n)
  • L_LAST/L_NEXT_N_YEARS(n)

CData JDBC Driver for Marketo

SELECT ステートメント

SELECT ステートメントは次の基本的な句で構成できます。

  • SELECT
  • INTO
  • FROM
  • JOIN
  • WHERE
  • GROUP BY
  • HAVING
  • UNION
  • ORDER BY
  • LIMIT

SELECT 構文

次の構文ダイアグラムは、本製品 のSQL エンジンでサポートされている構文の概要を示します。

SELECT {
  [ TOP <numeric_literal> | DISTINCT ]
  { 
    * 
    | { 
        <expression> [ [ AS ] <column_reference> ] 
        | { <table_name> | <correlation_name> } .* 
      } [ , ... ] 
  }
  { 
    FROM <table_reference> [ [ AS ] <identifier> ] 
  } [ , ... ]
  [ [  
      INNER | { { LEFT | RIGHT | FULL } [ OUTER ] } 
    ] JOIN <table_reference> [ ON <search_condition> ] [ [ AS ] <identifier> ] 
  ] [ ... ] 
  [ WHERE <search_condition> ]
  [ GROUP BY <column_reference> [ , ... ]
  [ HAVING <search_condition> ]
  [ UNION [ ALL ] <select_statement> ]
  [ 
    ORDER BY 
    <column_reference> [ ASC | DESC ] [ NULLS FIRST | NULLS LAST ]
  ]
  [ 
    LIMIT <expression>
    [ 
      { OFFSET | , }
      <expression> 
    ]
  ] 
} | SCOPE_IDENTITY() 

<expression> ::=
  | <column_reference>
  | @ <parameter> 
  | ?
  | COUNT( * | { [ DISTINCT ] <expression> } )
  | { AVG | MAX | MIN | SUM | COUNT } ( <expression> ) 
  | NULLIF ( <expression> , <expression> ) 
  | COALESCE ( <expression> , ... ) 
  | CASE <expression>
      WHEN { <expression> | <search_condition> } THEN { <expression> | NULL } [ ... ]
    [ ELSE { <expression> | NULL } ]
    END 
  | {RANK() | DENSE_RANK()} OVER ([PARTITION BY <column_reference>] {ORDER BY <column_reference>})
  | <literal>
  | <sql_function> 

<search_condition> ::= 
  {
    <expression> { = | > | < | >= | <= | <> | != | LIKE | NOT LIKE | IN | NOT IN | IS NULL | IS NOT NULL | AND | OR | CONTAINS | BETWEEN } [ <expression> ]
  } [ { AND | OR } ... ] 

サンプル

  1. すべてのカラムを返す:
    SELECT * FROM Leads
  2. カラムをリネームする:
    SELECT [Email] AS MY_Email FROM Leads
  3. カラムのデータを別のデータ型としてキャストする:
    SELECT CAST(AnnualRevenue AS VARCHAR) AS Str_AnnualRevenue FROM Leads
  4. データを検索する:
    SELECT * FROM Leads WHERE Email = 'sample@email.com'
  5. クエリ条件に一致するアイテムの数を返す:
    SELECT COUNT(*) AS MyCount FROM Leads 
  6. クエリ条件に一致する一意のアイテムの数を返す:
    SELECT COUNT(DISTINCT Email) FROM Leads 
  7. クエリ条件に一致する一意のアイテムを返す:
    SELECT DISTINCT Email FROM Leads 
  8. 昇順で結果をソートする:
    SELECT Id, Email FROM Leads  ORDER BY Email ASC
  9. 指定した行数に結果を制限する:
    SELECT Id, Email FROM Leads LIMIT 10 
  10. 実行時にインプットに渡すためクエリをパラメータ化する。これにより、prepared statement を作成しSQL インジェクション攻撃を鎮めることができます:
    SELECT * FROM Leads WHERE Email = @param
オフラインモードでSELECT ステートメントを使う方法については、明示的なデータのキャッシュ を参照してください。

疑似カラム

SELECT ステートメントで入力専用フィールドを使用できます。これらのフィールド(疑似カラム)は、結果には 通常のカラムとして表示されることはありませんが、WHERE 句の一部として指定できます。疑似カラムを使用して、Marketo から追加機能にアクセスできます。

    SELECT * FROM Leads WHERE CampaignName = 'OldestUpdatedAt'
    

集計関数

集計関数を使用したSELECT の例については集計関数 を参照してください。

JOIN クエリ

JOIN を使用したSELECT クエリの例についてはJOIN クエリ を参照してください。

日付リテラル関数

日付リテラル関数 には、日付リテラル関数を使用したSELECT 例が含まれています。

Window 関数

Window 関数を含むSELECT 例については、Window 関数 を参照してください。

テーブル値関数

テーブル値関数を使用したSELECT 例については、テーブル値関数 を参照してください。

CData JDBC Driver for Marketo

集計関数

COUNT

クエリ条件に一致する行の数を返します。

SELECT COUNT(*) FROM Leads WHERE Email = 'sample@email.com'

COUNT(DISTINCT)

クエリ条件に一致する、null 以外の個別のフィールド値の数を返します。

SELECT COUNT(DISTINCT Id) AS DistinctValues FROM Leads WHERE Email = 'sample@email.com'

AVG

カラムの値の平均を返します。

SELECT Email, AVG(AnnualRevenue) FROM Leads WHERE Email = 'sample@email.com'  GROUP BY Email

MIN

カラムの値の最小値を返します。

SELECT MIN(AnnualRevenue), Email FROM Leads WHERE Email = 'sample@email.com' GROUP BY Email

MAX

カラムの値の最大値を返します。

SELECT Email, MAX(AnnualRevenue) FROM Leads WHERE Email = 'sample@email.com' GROUP BY Email

SUM

カラムの値の合計を返します。

SELECT SUM(AnnualRevenue) FROM Leads WHERE Email = 'sample@email.com'

CData JDBC Driver for Marketo

JOIN クエリ

CData JDBC Driver for Marketo は次の例のような標準SQL の結合をサポートします。

内部結合

内部結合は、結合条件に合う行のみを両テーブルから選択します。

SELECT l.FirstName, l.LastName, a.Link_Value, a.UserAgent FROM Leads l INNER JOIN Activities_Click_Link a ON l.Id = a.LeadId

左結合

左結合は、FROM テーブルのすべての行とJOIN テーブルの条件に合う行のみを選択します。

SELECT l.FirstName, l.LastName, a.Link_Value, a.UserAgent FROM Leads l LEFT JOIN Activities_Click_Link a ON l.Id = a.LeadId

CData JDBC Driver for Marketo

Window 関数

Window 関数を使用すると、集計関数のように行のセットに対して1つの計算結果を返すのではなく、行のグループ(Window)から計算フィールドを作成し、各行に対して1つの計算結果を返すことができます。本製品 は、以下のWindow 関数構文をサポートしています。

Note:Window 関数のサポートは本製品 の実験的な機能です。この機能は、SQL-92準拠という本製品 のコアスコープを超えています。そのため、Window 関数のパフォーマンスは最適ではない場合があります。

Window 関数句

OVER

OVER 句は、Window 関数が実行されるWindow を定義します。

SELECT A, B, <window function> OVER (<window frame>) FROM TableName

<window function> はサポートされているWindow 関数句を指し、<window frame> はWindow を定義するロジックを指定する1つ以上の句を指します。

PARTITION BY

PARTITION BY 句は、Window をパーティションと呼ばれるサブウィンドウに細分化します。PARTITION BY 句で指定された列の一意な値ごとに、その値を持つすべてのレコードがまとめて個々のパーティションを形成します。

SELECT A, B, <window function> OVER (PARTITION BY A ORDER BY B) From Leads

<window function> はサポートされているWindow 関数句を指します。

Window 関数

本製品 は、計算、ランク付け、分析のためのWindow 関数をサポートします。

計算

このWindow 関数は、Window 内のレコードに対して数学的操作を実行します。

COUNT()

各パーティションのレコード数を計算します。計算される列のデータ型は"int" です。

各パーティションでは、すべてのレコードにそのパーティション内のレコードの合計数が表示されます。

SELECT Name, Role, Earnings, COUNT() OVER (PARTITION BY Role) FROM Employees

COUNT_BIG()

各パーティションのレコード数を計算します。計算される列のデータ型は"bigint" です。

各パーティションでは、すべてのレコードにそのパーティション内のレコードの合計数が表示されます。

SELECT Name, Role, Earnings, COUNT_BIG() OVER (PARTITION BY Role) FROM Employees

MIN(numeric_column)

パーティションごとの数値列の最小値を計算します。

各パーティションでは、すべてのレコードにそのパーティションのレコード全体のnumeric_column の最小値が表示されます。

SELECT Name, Role, Earnings, MIN(Earnings) OVER (PARTITION BY Role) FROM Employees

MAX(numeric_column)

パーティションごとの数値列の最大値を計算します。

各パーティションでは、すべてのレコードにそのパーティションのレコード全体のnumeric_column の最大値が表示されます。

SELECT Name, Role, Earnings, MAX(Earnings) OVER (PARTITION BY Role) FROM Employees

SUM(numeric_column)

パーティションごとの数値列の合計を計算します。

各パーティションでは、すべてのレコードにそのパーティションのレコード全体のnumeric_column の合計が表示されます。

SELECT Name, Role, Earnings, SUM(Earnings) OVER (PARTITION BY Role) FROM Employees

AVG(numeric_column)

パーティションごとの数値列の平均値を計算します。

各パーティションでは、すべてのレコードにそのパーティションのレコード全体のnumeric_column の平均値が表示されます。

SELECT Name, Role, Earnings, AVG(Earnings) OVER (PARTITION BY Role) FROM Employees

MEDIAN(numeric_column)

パーティションごとの数値列の中央値を計算します。

各パーティションでは、すべてのレコードにそのパーティションのレコード全体のnumeric_column の中央値が表示されます。

SELECT Name, Role, Earnings, MEDIAN(Earnings) OVER (PARTITION BY Role) FROM Employees

STDEV(numeric_column)

パーティションごとの数値列の標準偏差を計算します。

各パーティションでは、すべてのレコードにそのパーティションのレコード全体のnumeric_column の標準偏差が表示されます。

SELECT Name, Role, Earnings, STDEV(Earnings) OVER (PARTITION BY Role) FROM Employees

STDEVP(numeric_column)

パーティションごとの数値列の母標準偏差を計算します。

各パーティションでは、すべてのレコードにそのパーティションのレコード全体のnumeric_column の母標準偏差が表示されます。

SELECT Name, Role, Earnings, STDEVP(Earnings) OVER (PARTITION BY Role) FROM Employees

VAR(numeric_column)

パーティションごとの数値列の統計的標準分散を計算します。

各パーティションでは、すべてのレコードにそのパーティションのレコード全体のnumeric_column の統計的標準分散が表示されます。

SELECT Name, Role, Earnings, VAR(Earnings) OVER (PARTITION BY Role) FROM Employees

VARP(numeric_column)

パーティションごとの数値列の母集団分散を計算します。

各パーティションでは、すべてのレコードにそのパーティションのレコード全体のnumeric_column の母集団分散が表示されます。

SELECT Name, Role, Earnings, VARP(Earnings) OVER (PARTITION BY Role) FROM Employees

ランク付け

これらのWindow 関数は、Window とそのパーティション内にあるレコードをランク付けします。

RANK()

必須のORDER BY 句で指定されたカラムの値に基づいて、Window 内の各レコードにランク番号を割り当てます。

2つ以上のレコードがランク付けされたカラムで同じ値を持つ場合、それらはすべて同じランク番号を受け取り、ランクカウントは内部的にインクリメントされ、ORDER BY カラムで重複する値を持つ各レコードのランク番号を1つ先にスキップします。

SELECT Id, Email, RANK() OVER (ORDER BY Email) AS Rank FROM Leads

PARTITION BY 句を追加すると、各パーティションに対して個別のランクが計算されます。

SELECT Id, Email, RANK() OVER (PARTITION BY Id ORDER BY Email) AS Rank FROM Leads

DENSE_RANK()

RANK() 関数のように動作しますが、ランク付けされたカラムで重複した値を持つ各レコードの内部ランクカウンタをインクリメントしません。

つまり、ORDER BY カラムで同じ値を持つレコードは同じランク番号を持ちますが、この関数がランク番号をスキップすることはありません。

SELECT Id, Email, DENSE_RANK() OVER (PARTITION BY Id ORDER BY Email) AS Rank FROM Leads

PARTITION BY 句を追加すると、各パーティションに対して個別のランクが計算されます。

SELECT Id, Email, DENSE_RANK() OVER (PARTITION BY Id ORDER BY Email) AS Rank FROM Leads

ROW_NUMBER()

各レコードの行番号を計算します。OVER 句の中のORDER BY 句は必須です。

SELECT Name, Role, Earnings, ROW_NUMBER() OVER (ORDER BY Role) FROM Employees
PARTITION BY で複数のパーティションを定義すると、パーティションごとに新しい行番号のセットが計算されます。
SELECT Name, Role, Earnings, ROW_NUMBER() OVER (PARTITION BY Role ORDER BY Earnings) FROM Employees

NTILE()

順序付けされたパーティションの行を、指定された数にほぼ等しいグループ、またはバケットに分割します。各グループに1から始まるバケット番号を割り当てます。グループ内の各行に対して、NTILE() 関数は、その行が属するグループを表すバケット番号を割り当てます。

NTILE() の構文は次のとおりです。

NTILE(buckets) OVER (
    [PARTITION BY partition_expression, ... ]
    ORDER BY sort_expression [ASC | DESC], ...
)
NTILE() がサポートするパラメータを以下に示します。

  • buckets:行を分割するバケット数。バケットには、正の整数として返される式やサブクエリを指定します。これはWindow 関数ではありません。
  • PARTITION BY:結果セットの行をNTILE() 関数が適用されるパーティションに分割します。
  • ORDER BY は、NTILE() が適用される各パーティションの行の論理的な順序を指定する句です。

行数がバケット数で割り切れない場合、NTILE() 関数は2つのサイズのグループを1つの差をつけて返します。OVER() 句のORDER BY で設定された順序に従い、大きなグループは小さなグループに常に先行します。

行の合計がバケット数で割り切れる場合、この関数は行をバケットに均等に分割します。 次のステートメントは、10個の整数を格納するntile_demo という新しいテーブルを作成します。

CREATE TABLE sales.ntile_demo (
	v INT NOT NULL
);
	
INSERT INTO sales.ntile_demo(v) 
VALUES(1),(2),(3),(4),(5),(6),(7),(8),(9),(10);	
	
SELECT * FROM sales.ntile_demo;
このステートメントでは、NTILE() 関数を使用して、10行を3つのグループに分割します。
SELECT 
	v, 
	NTILE (3) OVER (
		ORDER BY v
	) buckets
FROM 
	sales.ntile_demo;

分析

このWindow 関数は、Window 内のレコードに対して分析操作を実行します。

PERCENT_RANK()

各行の相対ランクSQL パーセンタイルを計算します。0より大きな値を返しますが、最大値は1です。NULL 値はカウントしません。この関数は非決定的です。

PERCENT_RANK() の構文は次のとおりです。

PERCENT_RANK() OVER (
      [PARTITION BY partition_expression, ... ]
      ORDER BY sort_expression [ASC | DESC], ...
  )
  
この構文では以下のパラメータを使用します。

  • PARTITION BY:デフォルトでは、SQL Server はデータセット全体を1つのセットとして扱います。PARTITION BY 句を指定すると、データを複数のセットに分けることができます。Percent_Rank 関数は、各セットの分析計算を行います。このパラメータはオプションです。
  • ORDER BY:データを昇順または降順に並べ替えます。このパラメータは必須です。

CData JDBC Driver for Marketo

テーブル値関数

テーブル値関数は、テーブル(行セット)を返す関数です。

Note: テーブル値関数のサポートは本製品 の実験的な機能です。この機能は、SQL-92準拠という本製品 のコアスコープを超えています。そのため、これらの関数のパフォーマンスは最適ではない場合があります。

テーブル値関数句

CROSS APPLY

CROSS APPLY 演算子は、直前のテーブル式によって生成されたテーブルまたは結果セットの各行に対してサブクエリを実行するために使用されます。

<table_expression_1> CROSS APPLY <table_expression_2>

第2のテーブル式は、第1のテーブル式の結果を参照して、テーブル値関数を介して派生カラムまたは変更されたレコードセットを作成することができます。

各結果レコードは、関数によって分割された値を含むカラムを除いて、すべて同じカラム値を持つ、分割されたレコードのインスタンスです。

WITH

WITH 句は、分割される構造内の構成要素(キー、要素名、属性名など)と照合したり、関数から生成されるカラムのメタデータを指定したりするために、特定のテーブル値関数と一緒に使用されます。
SELECT A.ColumnName, X.DerivedColumnName FROM TableName A CROSS APPLY <table-valued function> WITH (DerivedColumnName varchar(255)) AS X

テーブル値関数

STRING_SPLIT(input_text,delimiter)

直前のテーブル式のレコードセットの各レコードを受け取り、区切り文字を含むカラム(input_text)を区切り文字(delimiter)で区切られた部分文字列に分割し、部分文字列ごとに1レコードを返します。

  • input_text:パースしたい値を持つカラム。
  • delimiter:input_text で指定されたカラムの値を分割するために使用される文字。

次のような"SplitColumn" というカラムがあるとします。

One-Two-Three
複数のレコードに渡るこの値を分割するには:
SELECT A.ID, X.Value FROM [TableWithDelimitedStringField] A CROSS APPLY STRING_SPLIT(A.SplitColumn,'-') WITH (Value VARCHAR(255)) AS X

-- Results:
-----------
|ID|Value|
|1|One|
|1|Two|
|1|Three|

JSONTABLE(json_content,[jsonpath])

直前のテーブル式のレコードセットの各レコードについて、WITH 句で指定されたキーと一致するJSON 配列(json_content)のキーのインスタンスごとに、"jsonpath" 入力で指定されたスコープで1レコードを返します。

  • json_content:JSON の「テーブル」(オブジェクト配列)。コンテンツはネストできますが、ルートレベルで、他のJSON の構造体ではなく単一のJSON 配列でなければなりません
    • WITH 句で指定されたキーの各インスタンスの値は、ルートレベルのJSON 配列の直接の子である部分構造でのみ取得可能です。
  • jsonpath:オプションのJSONPath クエリで、json_content 配列の中からコンテンツを取り出したいスコープを定義します。WITH 句で識別されるJSON キーは、このパラメータで定義されるスコープに存在する必要があります。デフォルトはJSON ルート($)です。

ID カラムと以下の内容を持つ「JSONColumn」という名前のJSON コンテンツを持つカラムを含む、単一のレコードを持つサンプルテーブルを例にします:

[
	{
		"name": "Samuel",
		"email": "sam@gmail.com",
		"extrainfo": {
			"city": "Seattle"
		}
	},
	{
		"name": "Katherine",
		"email": "kat@gmail.com",
	},
	{
		"name": "George",
		"email": "george23@gmail.com",
	},
	{
		"name": "Carlos",
		"email": "carlos32@gmail.com",
	}
]

特定のキーのすべての値を抽出するには、JSONTABLE 関数でスコープを指定し、WITH 句で目的のキーを記述します。

SELECT A.ID, X.name FROM [TableWithJSONField] A CROSS APPLY JSONTABLE(A.JSONColumn) WITH (name VARCHAR(255)) AS X

-- Results: 
|ID|name|
---------
|1 |Samuel|
|1 |Katherine|
|1 |George|
|1 |Carlos|

XMLTABLE(xml_content,[xpath,child_type])

直前のテーブル式の結果セットの各レコードについて、WITH 句で指定されたタグ名や属性名に一致するXML 構造体(xml_content)の要素や属性ごとに、"xpath" 入力で指定されたスコープで1レコードを返します。

  • xml_content:XML 構造を含むカラム。
  • xpath:本製品 がWITH 句で指定されたタグ / 属性名に一致するコンテンツを抽出するXML 構造内のスコープを指定するオプションのXPath。
    • サブ要素のコンテンツを抽出する場合、本製品 は、ルートレベル(深さ0)、ルートの直属の子(深さ1)、およびルート直属の子の子(深さ2)のタグからすべてのコンテンツを取得できます。
    • 要素の属性のコンテンツを抽出する場合、本製品 は、ルートレベル(深さ0)とルートレベル要素の直属の子(深さ1)の指定された属性を含むタグからすべてのコンテンツを取得できます。
  • child_type:親要素(xpath 入力で指定される)のうち、WITH 句で指定されるカラムがコンテンツを識別するために照合される部分を指定するオプションのパラメータ。
    • 次の値を指定できます。
      • 0: WITH 句のカラムは、親要素の属性名およびサブ要素のタグ名との一致がチェックされます。
      • 1: WITH 句のカラムは、親要素の属性名と一致するかチェックされます。
      • 2: WITH 句のカラムは、親要素のサブ要素のタグ名と一致するかチェックされます。
    • 指定がない場合、デフォルトは0です。

サブ要素の値の抽出

ID カラムと、以下の内容を持つ「XMLContent」という名前のXML コンテンツを持つカラムを含む、単一のレコードを持つサンプルテーブルを例にします:
<shoppingList>
    <item>
        <name>Apples</name>
        <quantity>3</quantity>
        <unit>Kg</unit>
    </item>
    <item>
        <name>Bread</name>
        <quantity>2</quantity>
        <unit>Loaf</unit>
		<extrainfo>
			<Type>Whole-Grain</Type>
		</extrainfo>
    </item>
    <item>
        <name>Milk</name>
        <quantity>1</quantity>
        <unit>Carton</unit>
    </item>
    <item>
        <name>Eggs</name>
        <quantity>12</quantity>
        <unit></unit>
    </item>
</shoppingList>

サブ要素コンテンツを抽出するには、XMLTABLE 関数でスコープを指定し、WITH 句で必要な要素名を指定します。XMLTABLE 関数のchild_type 入力が2に設定されている場合、これは機能しないことに注意してください。

SELECT A.ID, X.name FROM [TableWithXMLField] A CROSS APPLY XMLTABLE(A.XMLContent,'//*/item') WITH (name VARCHAR(255)) AS X

-- Results: 
|ID|name|
---------
|1|Apples|
|1|Bread|
|1|Milk|
|1|Eggs|

要素タグ属性を使用した値の抽出

ID カラムと、以下の内容を持つ「XMLContent」という名前のXML コンテンツを持つカラムを含む、単一のレコードを持つサンプルテーブルを例にします:

<restaurant>
  <dish type="appetizer">
    <name lang="en">Caprese Salad</name>
    <chef>Chef Giovanni</chef>
    <price currency="USD">9.99</price>
  </dish>
  <dish type="main-course">
    <name lang="fr">Boeuf Bourguignon</name>
    <chef>Chef Marie</chef>
    <price currency="EUR">19.99</price>
  </dish>
  <dish type="dessert">
    <name lang="es">Tres Leches Cake</name>
    <chef>Chef Alejandro</chef>
    <price currency="MXN">89.99</price>
  </dish>
</restaurant>

属性コンテンツを抽出するには、XMLTABLE 関数でスコープを指定し、WITH 句で必要な属性名を指定します。XMLTABLE 関数のchild_type 入力が2に設定されている場合、これは機能しないことに注意してください。

SELECT A.ID, X.type FROM [TableWithXMLField] A CROSS APPLY XMLTABLE(A.XMLContent,'//*/dish') WITH (type VARCHAR(255)) AS X

-- Results: 
|ID|type|
---------
|1|appetizer|
|1|main-course|
|1|dessert|

CSVTABLE(csv_content,[delimiter])

直前のテーブル式の結果セットの各レコードについて、CSV テーブルを含むカラム(csv_content)から読み取り、そのCSV テーブルの各レコードについて、WITH 句で指定されたCSV カラムの値を含むレコードを1つ返します。

  • csv_content:CSV テーブルを含むカラム。
  • delimiter:csv_content 入力に含まれるCSV コンテンツを分割する、オプションのカスタム区切り文字(カンマの代わり)。

ID カラムと、以下のコンテンツを持つ「CSVContent」という名前のCSV テーブルを持つカラムを含む、単一のレコードを持つサンプルテーブルを例にします:

Name;Category;Price
Apple;Fruit;0.99
Spaghetti;Pasta;5.49
Chicken Breast;Meat;8.99
Broccoli;Vegetable;2.49

"Name" カラムのすべての値を選択し、カスタム区切り文字(;)を考慮するには:

SELECT A.ID, X.Name FROM [TableWithCSVField] A CROSS APPLY CSVTABLE(A.CSVContent,';') WITH (Name VARCHAR(255)) AS X

-- Results:
|ID|Name|
-----------
|1|Apple|
|1|Spaghetti|
|1|Chicken Breast|
|1|Broccoli|

CData JDBC Driver for Marketo

INSERT ステートメント

新しいレコードを作成するには、INSERT ステートメントを使用します。

INSERT 構文

INSERT ステートメントは、挿入するカラムと新しいカラム値を指定します。複数のカラム値は、次の例に示すように、VALUES 句のカンマ区切りリストで指定できます。

INSERT INTO <table_name> 
( <column_reference> [ , ... ] )
VALUES 
( { <expression> | NULL } [ , ... ] ) 
  

<expression> ::=
  | @ <parameter> 
  | ?
  | <literal>
Statement およびPreparedStatement クラスのexecuteUpdate メソッドを使って、データ操作コマンドを実行し影響を受ける行を取得できます。
String cmd = "INSERT INTO Leads (Email) VALUES (?)";
PreparedStatement pstmt = connection.prepareStatement(cmd);
pstmt.setString(1, "John");
int count = pstmt.executeUpdate();
System.out.println(count+" rows were affected");
connection.close();	

CData JDBC Driver for Marketo

UPDATE ステートメント

既存のレコードを変更するには、UPDATE ステートメントを使用します。

Update 構文

UPDATE 構文はカンマ区切りのカラムをインプットとして取り、SET 句のname-value ペアを新しいカラム値として取ります。

UPDATE <table_name> SET <select_statement> | {<column_reference> = <expression> [ , ... ]} WHERE { Id = <expression>  } [ { AND | OR } ... ] 

<expression> ::=
  | @ <parameter> 
  | ?
  | <literal>
Statement またはPreparedStatement クラスのexecuteUpdate メソッドを使って、データ操作コマンドを実行し影響を受けた行を取得できます。
String cmd = "UPDATE Leads SET Email='John' WHERE Id = ?";
PreparedStatement pstmt = connection.prepareStatement(cmd);
pstmt.setString(1, "c2ef66a5-a545-413b-9312-79a53caadbc4");
int count = pstmt.executeUpdate();
System.out.println(count + " rows were affected");
connection.close();

CData JDBC Driver for Marketo

UPSERT ステートメント

UPSERT ステートメントは、既存のレコードを更新するか、既存のレコードが識別されない場合は新しいレコードを作成します。

UPSERT 構文

UPSERT 構文はINSERT 構文と同じです。Marketo はVALUES 句で指定された入力を使用して、レコードがすでに存在するかどうかを判断します。レコードが存在しない場合は、レコードの挿入に必要なすべてのカラムが指定される必要があります。テーブル固有の情報については、データモデル を参照してください。

UPSERT INTO <table_name> 
( <column_reference> [ , ... ] )
VALUES 
( { <expression> | NULL } [ , ... ] ) 
  

<expression> ::=
  | @ <parameter> 
  | ?
  | <literal>
次の例に示すように、Statement およびPreparedStatement クラスのexecuteUpdate メソッドを使って、データ操作コマンドを発行し影響を受ける行を取得できます。
String cmd = "UPSERT INTO Leads (Email) VALUES (?)";
PreparedStatement pstmt = connection.prepareStatement(cmd);
pstmt.setString(1, "John");
int count = pstmt.executeUpdate();
System.out.println(count+" rows were affected");
connection.close();	

CData JDBC Driver for Marketo

DELETE ステートメント

テーブルから情報を削除するには、DELETE ステートメントを使用します。

DELETE 構文

DELETE ステートメントには、次の例に示すように、FROM 句のテーブル名とWHERE 句の行の主キーが必要です。

<delete_statement> ::= DELETE FROM <table_name> WHERE { Id = <expression> } [ { AND | OR } ... ]

<expression> ::=
  | @ <parameter> 
  | ?
  | <literal>
次の例に示すように、Statement またはPreparedStatement クラスのexecuteUpdate メソッドを使って、データ操作コマンドを実行し影響を受ける行数を取得できます。
Connection connection = DriverManager.getConnection("jdbc:marketo:URL=https://MyMarketoURL.mktorest.com/;OAuthClientId=MyOAuthClientId;OAuthClientSecret=MyOAuthClientSecret;",);
String cmd = "DELETE FROM Leads WHERE Id = ?";
PreparedStatement pstmt = connection.prepareStatement(cmd);
pstmt.setString(1, "c2ef66a5-a545-413b-9312-79a53caadbc4");
int count=pstmt.executeUpdate();
connection.close();

CData JDBC Driver for Marketo

CACHE ステートメント

キャッシュが有効な場合、CACHE ステートメントを使用すると、キャッシュ対象のデータとキャッシュ先のテーブルを制御することができます。CACHE ステートメントでは、指定されたSELECT ステートメントが実行され、その結果がキャッシュデータベース内の同じ名前のテーブルまたは<cached_table_name> で指定されたテーブルにキャッシュされます。本製品 では、キャッシュ内に行が存在すれば更新され、存在しなければ行が挿入されます。このため、選択するカラムには、既存の行の識別に使用される主キーが含まれている必要があります。

さまざまなキャッシュストラテジーについての詳細は、データのキャッシュ を参照してください。

CACHE ステートメント構文

CACHE ステートメントには、その動作を変更する次のオプションを含めることができます。

CACHE [ <cached_table_name> ] [ WITH TRUNCATE | AUTOCOMMIT | SCHEMA ONLY | DROP EXISTING | ALTER SCHEMA ] <select_statement> 

WITH TRUNCATE

WITH TRUNCATE オプションを設定すると、本製品 は選択した行が追加される前に、キャッシュテーブルから既存の行を削除します。このオプションは、キャッシュテーブル全体をリフレッシュし、既存のスキーマは維持する場合に使用します。

AUTOCOMMIT

AUTOCOMMIT オプションを設定すると、本製品 は各行を個別にコミットします。このオプションは、何らかの理由でキャッシュできなかった行を無視する場合に使用します。デフォルトでは、結果セット全体が1つのトランザクションとしてキャッシュされます。

DROP EXISTING

DROP EXISTING オプションを設定すると、本製品 は新しい結果がキャッシュされる前に、既存のキャッシュテーブルを削除します。このオプションは、キャッシュテーブル全体をスキーマを含めてリフレッシュする場合に使用します。

SCHEMA ONLY

SCHEMA ONLY オプションを設定すると、本製品 はキャッシュテーブルをSELECT ステートメントに基づいて作成しますが、クエリは実行されません。

ALTER SCHEMA

ALTER SCHEMA オプションを設定すると、本製品 はキャッシュ内にある既存のテーブルのスキーマがSELECT ステートメントのスキーマと一致しない場合に、そのスキーマを変更します。このオプションを指定すると、キャッシュテーブルとSELECT ステートメントのスキーマが一致しない場合に、新しいカラムが作成されるか、カラムが削除されます。

一般的なクエリ

次のCACHE ステートメントを使用すると、テーブルのすべての行がキャッシュされます。

CACHE SELECT * FROM Leads

次のCACHE ステートメントを使用すると、テーブルのすべての行がキャッシュテーブルCachedLeads にキャッシュされます。

CACHE CachedLeads SELECT * FROM Leads

次のCACHE ステートメントを使用すると、インクリメンタルキャッシュが行われます。DateModified カラムは、すべてのテーブルに存在するわけではありません。キャッシュステートメントは、DateModified カラムがある場合に、インクリメンタルキャッシュがどのように実行されるかを示しています。また、この場合、WITH TRUNCATE およびDROP EXISTING オプションは特に除外されているため、既存の行がすべて削除されます。

CACHE CachedLeads SELECT * FROM Leads WHERE DateModified > '2013-04-04'

次のCACHE ステートメントは、使用可能なカラムをすべて含むテーブルを作成し、その後いくつかのカラムのみをキャッシュする場合に使用します。一連のステートメントでは、キャッシュテーブルCachedLeads にLeads 内のカラムがすべて含まれている場合でも、Id とEmail のみがキャッシュされます。

CACHE CachedLeads SCHEMA ONLY SELECT * FROM Leads
CACHE CachedLeads SELECT Id, Email FROM Leads

CData JDBC Driver for Marketo

EXECUTE ステートメント

ストアドプロシージャを実行するには、EXECUTE またはEXEC ステートメントを使用できます。

EXEC およびEXECUTE は、名前で参照されたストアドプロシージャのインプットを値またはパラメータ名に割当てます。

ストアドプロシージャ構文

ストアドプロシージャをSQL ステートメントとして実行するには、次の構文を使用します。

 
{ EXECUTE | EXEC } <stored_proc_name> 
{
  [ @ ] <input_name> = <expression>
} [ , ... ]

<expression> ::=
  | @ <parameter> 
  | ?
  | <literal>

ステートメントの例

名前によるストアドプロシージャのインプットの参照:

EXECUTE my_proc @second = 2, @first = 1, @third = 3;

パラメータ化されたストアドプロシージャ構文の実行:

EXECUTE my_proc second = @p1, first = @p2, third = @p3; 

CData JDBC Driver for Marketo

PIVOT およびUNPIVOT

PIVOT およびUNPIVOT を使用すると、テーブル値式を別のテーブルに変更できます。

PIVOT

PIVOT は、テーブル値式の1つの列にある一意の値を出力内の複数の列に変換することにより、テーブル値式を行列変換します。PIVOT は任意の列値に対し必要に応じて集計を実行します。
PIVOT 構文

 
"SELECT 'AverageCost' AS Cost_Sorted_By_Production_Days, [0], [1], [2], [3], [4]
FROM
(
SELECT DaysToManufacture, StandardCost
FROM Production.Product
) AS SourceTable
PIVOT
(
AVG(StandardCost)
FOR DaysToManufacture IN ([0], [1], [2], [3], [4])
) AS PivotTable;"

UNPIVOT

UNPIVOT はPIVOT とは逆に、テーブル値式の列を列値に行列変換します。
UNPIVOT 構文

 
"SELECT VendorID, Employee, Orders
FROM
(SELECT VendorID, Emp1, Emp2, Emp3, Emp4, Emp5
FROM pvt) p
UNPIVOT
(Orders FOR Employee IN
(Emp1, Emp2, Emp3, Emp4, Emp5)
)AS unpvt;"

PIVOT およびUNPIVOT の詳細については FROM 句とJOIN、APPLY、PIVOT(Transact-SQL) を参照してください。

CData JDBC Driver for Marketo

INSERT INTO SELECT ステートメント

Marketo への1回の要求で複数の挿入処理を実行するには、INSERT INTO SELECT 構文を使用して、データの一時テーブルをMarketo に挿入します。このとき、Marketo に送信されるデータは、まず一時テーブルに入力されます。挿入するデータがすべて一時テーブルに入力されたら、そのテーブルがMarketo のテーブルに渡されます。

この機能は、JDBC で利用可能な標準バッチ処理 API 経由でも利用できます。詳しくは、バッチ処理 を参照してください。

一時テーブルへの入力

入力先の一時テーブルは動的なテーブルで、実行時に最初のデータをテーブルに入力するときに作成されます。一時テーブルは、その名前に「#」を付加して示されます。一時テーブルを使用してデータを挿入する場合、その一時テーブルには「[TableName]#TEMP」という形式で名前を付ける必要があります。「TableName」は、データを挿入するテーブルの名前です。 次に例を示します。

INSERT INTO Leads#TEMP (Email, MyCustomField__c) VALUES ('New Leads', '9000');
INSERT INTO Leads#TEMP (Email, MyCustomField__c) VALUES ('New Leads 2', '9001');
INSERT INTO Leads#TEMP (Email, MyCustomField__c) VALUES ('New Leads 3', '9002');

このコードでは、2つのデータカラムと3つのデータ行を含む「Leads#TEMP」という名前の一時テーブルが作成されます。一時テーブルでは型を指定できないため、すべての値が文字列としてメモリに保存されます。これらの値の型は、Leads テーブルに送信された後で正しい型に変換されます。

実際のテーブルへの挿入

一時テーブルにデータが入力されたら、Marketo の実際のテーブルに対して挿入を実行します。そのためには、実際のテーブルへの挿入(INSERT)を実行し、一時テーブルから入力データを選択します。次に例を示します。

INSERT INTO Leads (Email, MyCustomField__c) SELECT Email, MyCustomField__c FROM Leads#TEMP
この例では、Leads#TEMP テーブルのすべての内容がLeads テーブルに渡されます。この結果、各要求で複数のINSERT を送信できるため、Marketo に送信される要求の数が少なくて済み、多くのレコードを挿入する場合のパフォーマンスが向上します。

結果

クエリの結果は、一時テーブルLastResultInfo#TEMP に保存されます。次に一時テーブルが渡されてデータが変更されると、このテーブルはクリアされて、データが再挿入されます。LastResultInfo#TEMP テーブルはスキーマが事前定義されていないことに注意してください。データを読み取る前に、実行時にそのメタデータを確認する必要があります。

一時テーブルの存続時間

一時テーブルは、接続が開いている間だけ存続します。Marketo への接続が閉じられると、LastResultInfo#TEMP テーブルを含むすべての一時テーブルがクリアされます。

CData JDBC Driver for Marketo

UPDATE SELECT ステートメント

Marketo への1回の要求で複数の更新処理を実行するには、まずINSERT INTO 構文を使用して、データの一時テーブルをMarketo に挿入します。このとき、Marketo に送信されるデータは、まず一時テーブルに入力されます。更新するデータがすべて一時テーブルに入力されたら、UPDATE SELECT FROM を使用して、一時テーブルのデータをMarketo のテーブルに渡します。

この機能は、JDBC で利用可能な標準バッチ処理 API 経由でも利用できます。

一時テーブルへの入力

入力先の一時テーブルは動的なテーブルで、実行時に最初のデータをテーブルに入力するときに作成されます。一時テーブルは、その名前に「#」を付加して示されます。一時テーブルを使用してデータを更新する場合、その一時テーブルには「[TableName]#TEMP」という形式で名前を付ける必要があります。「TableName」は、データを挿入するテーブルの名前です。 次に例を示します。

INSERT INTO Leads#TEMP (Id, Name, MyCustomField__c) VALUES ('AX1000001', 'New Leads', '9000');
INSERT INTO Leads#TEMP (Id, Name, MyCustomField__c) VALUES ('AX1000002', 'New Leads 2', '9001');
INSERT INTO Leads#TEMP (Id, Name, MyCustomField__c) VALUES ('AX1000003', 'New Leads 3', '9002');

このコードでは、3つのデータカラムと3つのデータ行を含む「Leads#TEMP」という名前の一時テーブルが作成されます。一時テーブルでは型を指定できないため、すべての値が文字列としてメモリに保存されます。値は、Leads テーブルに送信された後で正しい型に変換されます。

実際のテーブルの更新

一時テーブルにデータが入力されたら、Marketo の実際のテーブルに対して更新を実行します。そのためには、実際のテーブルへの更新(UPDATE)を実行し、一時テーブルから入力データを選択します。次に例を示します。

UPDATE Leads (Id, Email, MyCustomField__c) SELECT Id, Email, MyCustomField__c FROM Leads#TEMP
この例では、Leads#TEMP テーブルのすべての内容がLeads テーブルに渡されます。この結果、各要求で複数の更新を送信できるため、Marketo に送信される要求の数が少なくて済み、多くのレコードを更新する場合のパフォーマンスが向上します。

結果

クエリの結果は、一時テーブルLastResultInfo#TEMP に保存されます。次に一時テーブルが渡されてデータが変更されると、このテーブルはクリアされて、データが再挿入されます。LastResultInfo#TEMP テーブルはスキーマが事前定義されていないことに注意してください。データを読み取る前に、実行時にそのメタデータを確認する必要があります。

一時テーブルの存続時間

一時テーブルは、接続が開いている間だけ存続します。Marketo への接続が閉じられると、LastResultInfo#TEMP テーブルを含むすべての一時テーブルがクリアされます。

CData JDBC Driver for Marketo

DELETE SELECT ステートメント

Marketo への1回の要求で複数の削除処理を実行するには、まずINSERT INTO 構文を使用して、削除するデータのインメモリ一時テーブルを作成します。削除するデータがすべて一時テーブルに入力されたら、DELETE FROM 構文を使用してMarketo のライブテーブルからデータを削除します。この機能は、JDBC で利用可能な標準バッチ処理API 経由でも利用できます。 この機能は、JDBC で利用可能な標準バッチ処理 API 経由でも利用できます。

一時テーブルへの入力

入力先の一時テーブルは動的なテーブルで、実行時に最初のデータをテーブルに入力するときに作成されます。一時テーブルは、その名前に「#」を付加して示されます。一時テーブルを使用してデータを削除する場合、その一時テーブルには「[TableName]#TEMP」という形式で名前を付ける必要があります。「TableName」は、データを挿入するテーブルの名前です。 次に例を示します。

INSERT INTO Leads#TEMP (Id) VALUES ('AX1000001');
INSERT INTO Leads#TEMP (Id) VALUES ('AX1000002');
INSERT INTO Leads#TEMP (Id) VALUES ('AX1000003');

このコードでは、1つのデータカラムと3つのデータ行を含む「Leads#TEMP」という名前の一時テーブルが作成されます。一時テーブルでは型を指定できないため、すべての値が文字列としてメモリに保存されます。これらの値の型は、Leads テーブルに送信された後で正しい型に変換されます。

実際のテーブルからの削除

一時テーブルにデータが入力されたら、Marketo の実際のテーブルに対して挿入を実行します。そのためには、実際のテーブルからの削除(DELETE)を実行し、一時テーブルから入力データを選択します。次に例を示します。

DELETE FROM Leads WHERE EXISTS SELECT Id FROM Leads#TEMP

この例では、Leads#TEMP テーブルのすべての内容がLeads テーブルに渡されます。この結果、各要求で複数の削除を送信できるため、Marketo に送信される要求の数が少なくて済み、多くのレコードを削除する場合のパフォーマンスが向上します。

結果

クエリの結果は、一時テーブルLastResultInfo#TEMP に保存されます。次に一時テーブルが渡されてデータが変更されると、このテーブルはクリアされて、データが再挿入されます。LastResultInfo#TEMP テーブルはスキーマが事前定義されていないことに注意してください。データを読み取る前に、実行時にそのメタデータを確認する必要があります。

一時テーブルの存続時間

一時テーブルは、接続が開いている間だけ存続します。Marketo への接続が閉じられると、LastResultInfo#TEMP テーブルを含むすべての一時テーブルがクリアされます。

CData JDBC Driver for Marketo

データモデル

CData JDBC Driver for Marketo は、Marketo エンティティをリレーショナルテーブル、ビュー、およびストアドプロシージャにモデル化します。

Note: バルクAPI を使用する場合、データモデルが異なる可能性があります。

テーブル

テーブル では、利用可能なテーブルを説明します。 CustomObjects、CustomActivities、Leads、StatiListLeads、Companies、NamedAccounts、Opportunities、Opportunityroles、SalesPersons、およびProgramMembers テーブルは動的テーブルです。データモデルは、Marketo データモデルの外観のサンプルを示します。 実際のデータモデルは、使用するMarketo インスタンスに基づいて動的に取得されます。

ビュー

ビュー では、Activities_New_Lead、WeeklyUsageStatistics などの利用可能な読み取り専用データについて説明します。

ストアドプロシージャ

ストアドプロシージャ は、Marketo のファンクションライクなインターフェースです。これらは、テーブルやビューとしてモデル化できない情報の作成、更新、変更、取得に使用できます。一部のプロシージャは、ファイルのダウンロード / アップロードやBulk API とのやりとりに使用されます。

CData JDBC Driver for Marketo

テーブル

本製品 はMarketo のデータを、標準のSQL ステートメントを使用してクエリできるリレーショナルデータベースのテーブルのリストとしてモデル化します。

CData JDBC Driver for Marketo テーブル

Name Description
Activities_Custom Sample custom activity.
Companies Query Companies in Marketo.
CustomObjects Query custom objects for a Marketo organization.
Emails Query emails for a Marketo organization.
EmailTemplates Query email templates for a Marketo organization.
Folders Create, update, delete, and query Folders for a Marketo organization.
Forms Create, update, delete and query Forms for a Marketo organization.
LandingPageContentSections Create, update, delete and query Content Sections of Landing Pages for a Marketo organization.
LandingPages Create, update, delete and query Landing Pages for a Marketo organization.
LandingPageTemplates Create, update, delete and query Landing Page Templates for a Marketo organization.
Leads Query Leads of a Marketo organization.
NamedAccounts Query Named Accounts for a Marketo organization.
Opportunities Query Opportunities in Marketo.
OpportunityRoles Query Opportunity Roles in Marketo.
ProgramMembers Query Program Members in Marketo.
Programs Create, update, delete, and query Programs for a Marketo organization.
SalesPersons Query Sales Persons in Marketo.
SmartCampaigns Query Smart Campaigns for a Marketo organization.
SmartLists Query Smart Lists for a Marketo organization.
Snippets Create, update, delete and query snippets for a Marketo organization.
StaticListMembership Query relations of static lists and leads in Marketo.
StaticLists Query Static Lists for a Marketo organization.
Tokens Create, delete, and query Tokens for a Marketo organization.

CData JDBC Driver for Marketo

Activities_Custom

Sample custom activity.

Each custom activity in your Marketo organization is returned as a separate table, appart from the main "Activities" table. Each table name is prefixed with 'Activity_' followed by the name of your custom activity and ends with "_c" to differentiate custom activities from system activities.

Select

Note: Filters provided with one of the supported operators listed in the "Operators" column are processed server-side, all the other filters are processed client-side.

The following queries are related to a sample custom activity 'Activities_Attend_Conference_c'. This table may not exist in your Marketo instance.

	SELECT * FROM Activities_Attend_Conference_c WHERE ActivityDateTime > '2024-01-01T00:00:00Z'
	SELECT * FROM Activities_Attend_Conference_c WHERE ActivityDateTime >= '2024-01-01T00:00:00Z' AND ActivityDateTime<='2024-03-01T00:00:00Z'
	SELECT * FROM Activities_Attend_Conference_c WHERE ListId='1014' AND ActivityDateTime>'2024-01-01T00:00:00Z'
	SELECT * FROM Activities_Attend_Conference_c WHERE ListId='1014'
	SELECT * FROM Activities_Attend_Conference_c WHERE ListId='1014' AND ActivityDateTime >' 2024-01-01T00:00:00Z'

Insert


	INSERT INTO Activities_Attend_Conference_c (ActivityDateTime, LeadId, PrimaryAttributeValue, ConferenceDate, NumberOfAttendees) VALUES ('2024-01-01T00:01:00Z', 4, 'asd', '2024-01-10', 4)

Columns

Name Type ReadOnly Operators Description
MarketoGUID [KEY] String False

Unique id of the activity.

Id String False

Integer id of the activity. This value could exceed Int.MAX. For instances which have been migrated to Activity Service, this field may not be present, and should not be treated as unique.

ActivityDateTime Datetime False >,>=,=,<,<=

Datetime of the activity.

LeadId Int False =,IN

Id of the lead associated to the activity.

CampaignId Int False

Id of the associated Smart Campaign, if applicable.

ListId Int False =

Mirror column that can be used only as a filter. Will retrieve activities for all leads that are members of this static list. Not available when UseBulkAPI=true.

ConferenceName_Id String False

ConferenceName_Value String False

ConferenceDate Datetime False

NumberOfAttendees Int False

CData JDBC Driver for Marketo

Companies

Query Companies in Marketo.

Note: This table is only available for Marketo subscriptions which do not have a native CRM sync enabled.

Select

Note: A server-side filter must be specified to query this table. Queries with the 'OR' operator are not supported.

Note: Filters provided with one of the supported operators listed in the "Operators" column are processed server-side, all the other filters are processed client-side.

Tip: This table uses server-side projection. Performance can be improved by minimizing the number of columns in projection.

	SELECT * FROM Companies WHERE [Id]=10
	SELECT * FROM Companies WHERE [Id] IN (10, 11, 22)
	SELECT * FROM Companies WHERE [ExternalCompanyId]='CData'
	SELECT * FROM Companies WHERE [ExternalCompanyId] IN ('CData', 'Marketo')
	SELECT * FROM Companies WHERE [Company]='CData'
	SELECT * FROM Companies WHERE [Company] IN ('CData', 'Marketo')
	SELECT * FROM Companies WHERE [ExternalSalesPersonId]='CDataSales'
	SELECT * FROM Companies WHERE [ExternalSalesPersonId] IN ('CDataSales', 'MarketoSales')

Insert

This table supports BATCH INSERT when UseBulkAPI is set to false.

	INSERT INTO Companies (ExternalCompanyId, Company, Industry, Website) VALUES ('cdata', 'CData', 'Tech', 'cdata.com'), ('marketo', 'Marketo', 'Tech', 'marketo.com')

Update

This table supports BATCH UPDATE when UseBulkAPI is set to false.

	UPDATE Companies SET Company='test_UPDATE_Companies', MainPhone='800-555-1234', AnnualRevenue='10000000.00' WHERE ExternalCompanyId='cdata'
	UPDATE Companies SET Company='CData', MainPhone='800-555-1234', AnnualRevenue='10000000.00' WHERE WHERE Id IN (2523781, 2523782, 2523783, 2523784)

Upsert

This table supports BATCH UPSERT when UseBulkAPI is set to false.

	UPSERT INTO Companies (ExternalCompanyId, Company, Industry, Website) VALUES ('testUpsert', 'Google', 'Tech', 'google.com')

Delete

This table supports BATCH DELETE when UseBulkAPI is set to false.

	DELETE FROM Companies WHERE externalCompanyId='cdata'
	DELETE FROM Companies WHERE Id IN (2521059, 2521060, 123, 2521058)
	DELETE FROM Companies WHERE Company='testName'

Columns

Name Type ReadOnly Operators Description
Id [KEY] Int True =,IN

ExternalCompanyId String True =,IN

AnnualRevenue Decimal False

BillingCity String False

BillingCountry String False

BillingPostalCode String False

BillingState String False

BillingStreet String False

Company String False =,IN

CompanyNotes String False

ExternalSalesPersonId String False =,IN

Industry String False

MainPhone String False

NumberOfEmployees Int False

SicCode String False

Site String False

Website String False

CreatedAt Datetime True

UpdatedAt Datetime True

CData JDBC Driver for Marketo

CustomObjects

Query custom objects for a Marketo organization.

Each custom object in your Marketo organization is returned as a separate table. Each table name is prefixed with 'CustomObject_' followed by the name of your custom object.

Select

Note: A server-side filter must be specified to query this table. Queries with the 'OR' operator are not supported.

Note: Filters provided with one of the supported operators listed in the "Operators" column are processed server-side, all the other filters are processed client-side.

The following queries are related to a sample custom object. This table may not exist in your Marketo instance.

	SELECT * FROM CustomObject_cdata WHERE MarketoGUID IN ('8207b49b-933c-40a0-995d-d12c90572a65', '71cce7c8-e7d1-4a00-8ea7-89806fee56be')
	SELECT * FROM CustomObject_cdata WHERE Mailaddress IN ('support@cdata.com', 'test@cdata.com')

Insert

This table supports BATCH INSERT when UseBulkAPI is set to false.

	INSERT INTO CustomObject_cdata (Names) VALUES ('tes123')

Update

This table supports BATCH UPDATE when UseBulkAPI is set to false.

	UPDATE CustomObject_cdata SET Value1='testupdate' WHERE Mailaddress='test01@cdata.com'
	UPDATE CustomObject_cdata SET Value1='testupdateMultipleValues' WHERE Mailaddress IN ('test01@cdata.com', 'test02@cdata.com')

Upsert

This table supports BATCH UPSERT when UseBulkAPI is set to false.

This table supports BULK UPSERT when UseBulkAPI is set to true.

	UPSERT INTO CustomObject_cdata (Mailaddress, Value1) VALUES ('test01New@cdata.com', 'test01')

Delete

This table supports BATCH DELETE when UseBulkAPI is set to false.

	DELETE FROM [CustomObject_cdata] WHERE MarketoGUID='8207b49b-933c-40a0-995d-d12c90572a65'
	DELETE FROM [CustomObject_cdata] WHERE MarketoGUID IN ('980415e9-3cf0-4168-ae99-8cf3c613c83b', '71cce7c8-e7d1-4a00-8ea7-89806fee56be')
	DELETE FROM [CustomObject_cdata] WHERE Mailaddress='test@cdata.com'
	DELETE FROM [CustomObject_cdata] WHERE Mailaddress IN ('test1@cdata.com', 'test2@cdata.com')

Bulk

When UseBulkAPI is set to true the UpdateAt filter can be processed server-side, in addition to that the following extra filters are available:

Name TypeReadOnlyOperators Description
ListIdIntTrue =

Mirror column that can be used only as a filter. Will retrieve custom objects related to the provided static list Id.

ListNameStringTrue =

Mirror column that can be used only as a filter. Will retrieve custom objects related to the provided static list name.

SmartListIdIntTrue =

Mirror column that can be used only as a filter. Will retrieve custom objects related to the provided smart list Id.

SmartListNameStringTrue =

Mirror column that can be used only as a filter. Will retrieve custom objects related to the provided smart list name.

Sample queries:

	SELECT * FROM CustomObject_cdata WHERE UpdatedAt>'2024-04-01T00:00:00Z'
	SELECT * FROM CustomObject_cdata WHERE UpdatedAt>'2024-04-01T00:00:00Z' AND UpdatedAt<'2024-09-01T00:00:00Z'
	SELECT * FROM CustomObject_cdata WHERE ListId=2

Columns

Name Type ReadOnly Operators Description
MarketoGUID [KEY] String True =,IN

UpdatedAt Datetime True

The datetime when the custom object was last updated.

CreatedAt Datetime True

Mailaddress String False =,IN

Value1 String False

CData JDBC Driver for Marketo

Emails

Query emails for a Marketo organization.

Note: This table uses the draft/approved versioning API. By default both versions are retrieved/modified. To interact with a specific version use the filter Status='draft' or Status='approved'.

GetEmailFullContent can be used to retrieve the full content of an email.

UpdateEmailContent can be used to update the content content of an email.

UpdateEmailFullContent can be used to update the full content of an email.

Select

Note: Filters provided with one of the supported operators listed in the "Operators" column are processed server-side, all the other filters are processed client-side.

For example, the following queries are processed server-side:

	SELECT * FROM Emails WHERE Id=15457
	SELECT * FROM Emails WHERE Name='support@cdata.com'
	SELECT * FROM Emails WHERE FolderId=26
	SELECT * FROM Emails WHERE UpdatedAt >= '2023-03-22 00:09:14.0' AND UpdatedAt <= '2023-03-22 01:49:03.0'

Insert


	INSERT INTO Emails (Name, TemplateId, FolderId, FolderType) VALUES ('My Email', 1037, 5111, 'Program')

Update


	UPDATE Emails SET Name='CRUD Test', Description='Testing CRUD' WHERE Id=23852

Delete


	DELETE FROM Emails WHERE Id=23838
	DELETE FROM Emails WHERE Id=23759 AND Status='approved'
	DELETE FROM Emails WHERE Id IN (17008, 23764) AND Status='draft'

Columns

Name Type ReadOnly Operators Description
Id [KEY] Int True =

The unique, Marketo-assigned identifier of the email.

Status [KEY] String True =

The status of the email, draft or approved version.

Name String False =

The name of the email.

Description String False

The description of the email.

Subject String False

The email subject.

FromName String False

The from name.

FromEmail String False

The from email address.

ReplyEmail String False

The reply email address.

PreHeader String False

The pre-header text for the email.

URL String True

The URL of the asset in the Marketo UI.

TemplateId Int False

The template associated with the email.

PublishToMSI Bool True

Identifies whether the email is published.

Version Int True

The Template version type.

Operational Bool False

Identifies whether the email is operational.

TextOnly Bool False

Identifies whether the email is text only.

WebView Bool False

Identifies whether the email is web view.

AutoCopyToText Bool False

Identifies whether the email is auto copied to text.

FolderId Int False =

The unique, Marketo-assigned identifier of the parent folder/program.

FolderName String True

The name of the folder

FolderType String False =

The type of folder (Folder,Program)

WorkspaceName String True

Name of the workspace the email is part of.

CreatedAt Datetime True

Datetime the email was created.

UpdatedAt Datetime True =,>,<,>=,<=

Datetime the email was most recently updated.

CData JDBC Driver for Marketo

EmailTemplates

Query email templates for a Marketo organization.

Note: This table uses the draft/approved versioning API. By default both versions are retrieved/modified. To interact with a specific version use the filter Status='draft' or Status='approved'.

CreateEmailTemplate can be used to create email templates.

GetEmailTemplateContent can be used to retrieve the email template content.

UpdateEmailTemplateContent can be used to update the email template content.

Select

Note: Filters provided with one of the supported operators listed in the "Operators" column are processed server-side, all the other filters are processed client-side.

For example, the following queries are processed server-side:

	SELECT * FROM EmailTemplates WHERE ID=1038
	SELECT * FROM EmailTemplates WHERE Name='Test Template 3'
	SELECT * FROM EmailTemplates WHERE Status='approved'
	SELECT * FROM EmailTemplates WHERE ID=1038 AND Status='approved'

Update


	UPDATE EmailTemplates SET Description='test update' WHERE Id=1039

Delete


	DELETE FROM EmailTemplates WHERE Id=1014
	DELETE FROM EmailTemplates WHERE Id=1034 AND Status='draft'
	DELETE FROM EmailTemplates WHERE Name='Serenity (Marketo Starter Template)

Columns

Name Type ReadOnly Operators Description
Id [KEY] Int True =

The id of the asset.

Status [KEY] String True =

Status of the email template, draft or approved versions.

Name String False =

The name of the asset.

Description String False

The description of the asset.

URL String True

The URL of the asset in the Marketo UI.

Version Int True

The Template version type.

WorkspaceName String True

Name of the workspace the email template is part of.

FolderId Int True

The unique, Marketo-assigned identifier of the parent folder/program.

FolderName String True

The name of the folder

FolderType String True

The type of folder (Folder,Program)

CreatedAt Datetime True

The date and time the asset was created.

UpdatedAt Datetime True

The date and time the asset was last updated.

CData JDBC Driver for Marketo

Folders

Create, update, delete, and query Folders for a Marketo organization.

Select

Note: Filters provided with one of the supported operators listed in the "Operators" column are processed server-side, all the other filters are processed client-side.

For example, the following queries are processed server-side:

	SELECT * FROM Folders WHERE Name='Marketo8'
	SELECT * FROM Folders WHERE Name='Default'
	SELECT * FROM Folders WHERE Name='Default' AND WorkspaceName='Default'
	SELECT * FROM Folders WHERE MaxDepth=1;
	SELECT * FROM Folders WHERE ParentId=12 AND ParentType='Folder'
	SELECT * FROM Folders WHERE ParentId=12

Insert


	INSERT INTO Folders (Name, ParentId, ParentType, Description) VALUES ('newFolder1234567', 38, 'Folder', 'test insert description')

Update

Note: Folders of Type='Program' can not be updated.
	UPDATE Folders SET Description='test update folders2', IsArchive='true' WHERE Id IN (5910, 5911) AND Type='Folder'

Delete

Note: Folders of Type='Program' and folders with IsSystem=true can not be deleted.

	DELETE FROM Folders WHERE Id=5363 AND Type='Folder'

Columns

Name Type ReadOnly Operators Description
Id [KEY] Int True =

The unique, Marketo-assigned identifier of the folder.

Type [KEY] String False =

The type of the folder (Folder or Program).

Name String False =

The name of the folder.

Description String False

The description of the folder.

FolderType String True

The type of the folder (Revenue Cycle Model, Marketing Folder, List, Smart List).

ParentId Int False =

The Id of the parent folder.

ParentType String False =

The type of the parent folder.

Path String True

The path of a folder shows its hierarchy in the folder tree, similar to a Unix-style path.

WorkspaceName String True =

The name of the smart campaign workspace.

URL String True

The explicit URL of the asset in the designated instance.

IsSystem Bool True

Whether or not the folder is a system folder.

IsArchive Bool False

Whether or not the folder is archived.

AccessZoneId Int True

The access zone id

CreatedAt Datetime True

The date and time the folder was created.

UpdatedAt Datetime True

The date and time the folder was last updated.

MaxDepth Int True =

Mirror column used to specify the maximum folder depth to traverse. Will be ignored when filtering by Id or Name.

CData JDBC Driver for Marketo

Forms

Create, update, delete and query Forms for a Marketo organization.

Note: This table uses the draft/approved versioning API. By default both versions are retrieved/modified. To interact with a specific version use the filter Status='draft' or Status='approved'.

Select

Note: Filters provided with one of the supported operators listed in the "Operators" column are processed server-side, all the other filters are processed client-side.

For example, the following queries are processed server-side:

	SELECT * FROM FORMS WHERE status='draft'
	SELECT * FROM FORMS WHERE Id=1001
	SELECT * FROM FORMS WHERE Name='Form1'
	SELECT * FROM FORMS WHERE Id=1001 AND Status='draft'
	SELECT * FROM FORMS WHERE FolderId=1089 AND FolderType='Program'
	SELECT * FROM FORMS WHERE FolderId=1002

Insert


	INSERT INTO Forms (Name, Description, FolderId, FolderType, FontFamily, FontSize, LabelPosition, Language, Locale, ProgressiveProfiling) 
	VALUES ('test insert form', 'test form description', 1089, 'Program', 'Arial', '12px', 'left', 'English', 'en_US', true)

Update


	UPDATE Forms SET Name='test update form', Description='Testing Update', FontSize='13px' WHERE Id=1016

Delete


	DELETE FROM Forms WHERE Id=1004
	DELETE FROM Forms WHERE Id=1004 AND Status='draft'
	DELETE FROM Forms WHERE Name IN ('test', 'My Snippet')

Columns

Name Type ReadOnly Operators Description
Id [KEY] Int True =

The unique, Marketo-assigned identifier of the form.

Status [KEY] String True =

Status of the form, draft or approved versions.

Name String False =

The name of the form.

Description String False

The description of the form.

URL String True

The URL of the form in the Marketo UI.

KnownVisitorTemplate String False

Template of the known visitor behavior for the form.

KnownVisitorType String False

Type of the known visitor behavior for the form.

Theme String False

CSS theme for the form to use.

Language String False

Language of the form.

Locale String False

Locale of the form.

ProgressiveProfiling Bool False

Whether progressive profiling is enabled for the form.

LabelPosition String False

Default positioning of labels.

ButtonLabel String False

Label text of the button.

ButtonWaitingLabel String False

Waiting text of the button.

ButtonLocation Int False

Location in pixels of the button relative to the left of the form.

FontFamily String False

font-family property for the form.

FontSize String False

font-size property of the form.

FolderId Int False =

The unique, Marketo-assigned identifier of the parent folder/program.

FolderName String True

The name of the folder

FolderType String False =

The type of folder (Folder,Program)

WorkspaceId Int True

Workspace Id of the asset.

CreatedAt Datetime True

Datetime the form was created.

UpdatedAt Datetime True

Datetime the form was most recently updated.

ThankYouList String True

JSON array of ThankYouPage JSON objects.

CData JDBC Driver for Marketo

LandingPageContentSections

Create, update, delete and query Content Sections of Landing Pages for a Marketo organization.

Note: This table uses the draft/approved versioning API. By default both versions are retrieved/modified. To interact with a specific version use the filter Status='draft' or Status='approved'.

Select

Note: Filters provided with one of the supported operators listed in the "Operators" column are processed server-side, all the other filters are processed client-side.

For example, the following queries are processed server-side:

	SELECT * FROM LandingPageContentSections WHERE LandingPageId='2'
	SELECT * FROM LandingPageContentSections WHERE LandingPageId='2' AND status='draft'

Insert


	INSERT INTO LandingPageContentSections (LandingPageId, Content, Type, Height, Width, Top, Left, Opacity, BorderColor, BackgroundColor, HideDesktop, HideMobile, ImageOpenNewWindow, ZIndex) 
	VALUES (1009, '<html><body>Hello World!</body></html>', 'HTML', '100', '101', '1', '2', '0.8', '#ff00ff', '#00ffff', false, true, true, 1)

Update


	UPDATE LandingPageContentSections BorderColor='#ff0000', BackgroundColor='#0000ff', HideMobile='true', ImageOpenNewWindow='true', Type='HTML', Top='1', Left='2', Width='101', HideDesktop='false', Opacity='0.8', Content='<html><body>Hello World!</body></html>', Height='100', ZIndex='1'
	WHERE LandingPageId=1009 AND Id=1049

Delete


	DELETE FROM LandingPageContentSections WHERE LandingPageId=1009

Columns

Name Type ReadOnly Operators Description
Id [KEY] String True

Id of the content section.

LandingPageId [KEY] String False =

Id of the landing page to which the content section belongs to.

Status [KEY] String True =

Status filter for draft or approved versions.

Index Int True

Index of the content section. Index orients the elements from lowest to highest.

Type String False

Type of content section.

Content String False

Content of the section. Expected values vary based on type. Image: An image URL. RichText: HTML Content.

RawContent String True

Raw content of the section. Expected values vary based on type. Image: An image URL. RichText: HTML Content.

ContentType String True

Content of the section. Expected values vary based on type. Image: An image URL. RichText: HTML Content.

ContentURL String True

Content of the section. Expected values vary based on type. Image: An image URL. RichText: HTML Content.

LinkURL String False

RL parameter of a link type section.

FollowupType String False

Follow-up behavior of a form. Only available for form-type content sections. Defaults to form defined behavior.

FollowupValue String False

Where to follow-up on form submission. When followupType is lp, accepts the integer id of a landing page. For url, it accepts a url string.

Height String False

The height of the content.

MinHeight String True

The min height of the content.

Width String False

The width of the content.

MinWidth String True

The min width of the content.

Top String False

The top margin of the content.

Left String False

The left margin of the content.

Opacity String False

The opacity of the content.

BorderWidth String False

The border width of the content.

BorderStyle String False

The border style of the content.

BorderColor String False

The border color of the content.

BackgroundColor String False

The background color of the content.

HideDesktop Bool False

Hide the section when displayed on a desktop browser. Default false.

HideMobile Bool False

Hide the section when displayed on a desktop browser. Default false.

ImageOpenNewWindow String False

ImageOpenNewWindow

ZIndex String False

The z-index of the content.

CData JDBC Driver for Marketo

LandingPages

Create, update, delete and query Landing Pages for a Marketo organization.

Note: This table uses the draft/approved versioning API. By default both versions are retrieved/modified. To interact with a specific version use the filter Status='draft' or Status='approved'.

Select

Note: Filters provided with one of the supported operators listed in the "Operators" column are processed server-side, all the other filters are processed client-side.

For example, the following queries are processed server-side:

	SELECT * FROM LandingPages WHERE status='approved'
	SELECT * FROM LandingPages WHERE folderId=1001
	SELECT * FROM LandingPages WHERE folderId=1001 AND status='draft'
	SELECT * FROM LandingPages WHERE name='string'

Insert


	INSERT INTO LandingPages (Name, CustomHeadHTML, Description, FacebookOgTags, FolderId, FolderType, Keywords, MobileEnabled, Robots, Template, Title)
	VALUES ('test insert landing page', '<!DOCTYPE html>\\n<html>\\n<body>\\n<h1>My landing page</h1>\\n<p>My landing page content.</p>\\n</body></html>', 'Testing  Insert operation', '', 1184, 'Program', '', true, 'index,  nofollow', 1, 'Insert Operation')	

Update


	UPDATE LandingPages SET Description='Testing Update', FacebookOgTags='', Keywords='',
	MobileEnabled=false, Name='Test Update', Robots='index, nofollow',Title='Updating Landing Page',
	CustomHeadHTML='<!DOCTYPE html>\n<html>\n<body>\n<h1>Updating Landing Page</h1>\n<p>Editing Landing Page</p>\n</body></html>'
	WHERE Id=1009

Delete

Note: Approved landing pages cannot be deleted. Use UnApproveAsset to revoke landing page approval.

	DELETE FROM LandingPages WHERE Id=1003
	DELETE FROM LandingPages WHERE Id=1003 WHERE status='draft'

Columns

Name Type ReadOnly Operators Description
Id [KEY] Int True =

The unique, Marketo-assigned identifier of the landing page.

Status [KEY] String True =

Status filter for draft or approved versions.

Name String False =

The name of the landing page.

Description String False

The description of the landing page.

Title String False

Title element of the landing page.

URL String True

The URL of the landing page in the Marketo UI.

ComputedURL String True

Computed URL of landing page.

WorkspaceName String False

Workspace name of the asset.

Template Int False

Id of the template used.

Robots String False

Robots directives to apply to the pages meta tags

MobileEnabled Bool False

Whether the page has mobile viewing enabled. Free-form pages only. Default false.

CustomHeadHTML String False

Any custom HTML to embed in the tag of the page.

Keywords String False

Keywords

FormPrefill Bool True

Boolean to toggle whether forms embedded in the page will prefill. Default false.

FacebookOgTags String False

Any OpenGraph meta tags to apply to the page.

FolderId Int False =

The unique, Marketo-assigned identifier of the parent folder/program.

FolderName String True

The name of the folder

FolderType String False =

The type of folder (Folder,Program)

CreatedAt Datetime True

Datetime the landing page was created.

UpdatedAt Datetime True

Datetime the landing page was most recently updated.

CData JDBC Driver for Marketo

LandingPageTemplates

Create, update, delete and query Landing Page Templates for a Marketo organization.

Note: This table uses the draft/approved versioning API. By default both versions are retrieved/modified. To interact with a specific version use the filter Status='draft' or Status='approved'.

Select

Note: Filters provided with one of the supported operators listed in the "Operators" column are processed server-side, all the other filters are processed client-side. The Name and Id filters will be processed server-side only if Status='approved'.

For example, the following queries are processed server-side:

	SELECT * FROM LandingPageTemplates WHERE Status='approved'
	SELECT * FROM LandingPageTemplates WHERE FolderId=19
	SELECT * FROM LandingPageTemplates WHERE Name='Test Insert 1' AND Status='approved'
	SELECT * FROM LandingPageTemplates WHERE Id=3 AND Status='approved'

Insert


	INSERT INTO LandingPageTemplates (Name, TemplateType, Description, EnableMunchkin, FolderId, FolderType)
	VALUES ('Test Insert 1', 'guided', 'Testing Insert', true, 19, 'Folder')

Update


	UPDATE LandingPageTemplates SET Description='Testing Update', EnableMunchkin=false, Name='Test Update' WHERE Id=1

Delete


	DELETE FROM LandingPageTemplates WHERE Id=2 AND Status='approved'
	DELETE FROM LandingPageTemplates WHERE Name='Test Insert 1'

Columns

Name Type ReadOnly Operators Description
Id [KEY] Int True =

The unique, Marketo-assigned identifier of the landing page template.

Status [KEY] String True =

Status of the landing page template, draft or approved versions.

Name String False =

The name of the landing page template.

Description String False

The description of the landing page template.

EnableMunchkin Bool False

Whether to enable munchkin on the derived pages. Defaults to true.

TemplateType String False

Type of template to create 'guided' or 'freeForm'

URL String True

The URL of the landing page in the Marketo UI.

WorkspaceName String True

Workspace name of the asset.

FolderId Int False =

The unique, Marketo-assigned identifier of the parent folder/program.

FolderName String True

The name of the folder

FolderType String False =

The type of folder (Folder,Program)

CreatedAt Datetime True

Datetime the landing page template was created.

UpdatedAt Datetime True

Datetime the landing page template was most recently updated.

CData JDBC Driver for Marketo

Leads

Query Leads of a Marketo organization.

Select

Note: Filters provided with one of the supported operators listed in the "Operators" column are processed server-side, all the other filters are processed client-side.

Tip: This table uses server-side projection. Performance can be improved by minimizing the number of columns in projection.

To optimize response time from the server, identify only the rows and columns you want to retrieve.

SELECT Id, FirstName, LastName FROM Leads WHERE Id IN (1, 2, 5, 10)

To achieve the best performance from this query, confine it to a list of known Leads within Marketo. Create a static list of Leads within Marketo, and then specify the ListId to retrieve them.

SELECT * FROM Leads WHERE ListId=1014
If you do not specify a filter, the driver retrieves all Leads, which might take a long time depending on the number of leads in your Marketo instance. Specify the UpdatedAt filter to improve query performance by limiting the number of records requested.
	SELECT * FROM Leads WHERE UpdatedAt >= '2024-03-20T15:49:22.000Z'
	SELECT Id, UpdatedAt FROM Leads WHERE UpdatedAt >= '2024-01-17T14:32:37.000-05:00'

Insert

This table supports BATCH INSERT when UseBulkAPI is set to false.

	INSERT INTO Leads (FirstName, LastName, Email, DoNotCall, DoNotCallReason, DateOfBirth) VALUES ('test', 'test', 'leadtestinser@cdata.com', true, 'Testing', '01/01/2000')
	INSERT INTO Leads (FirstName, LastName, Email, DoNotCall, DoNotCallReason, DateOfBirth) VALUES ('test1', 'test1', 'leadtest12@cdata.com', true, 'Testing', '01/01/2000'), ('test3', 'test3', 'leadtest32@cdata.com', true, 'Testing', '01/01/2000')
	INSERT INTO Leads (FirstName, LastName, Email, PartitionName) VALUES ('test', 'test', 'testPartitionNew@crud.com', 'testPartition')

To insert multiple leads at once via a #TEMP table, first create the #TEMP table, and then insert that table into your Leads table.

The following example creates a #TEMP table with three new Leads, and then inserts that #TEMP table into the Leads table:

	INSERT INTO Leads#TEMP (FirstName, LastName, Email, Company) VALUES ('John', 'Mangel', 'john@abc.com', 'ABC')
	INSERT INTO Leads#TEMP (FirstName, LastName, Email, Company) VALUES ('Steve', 'Puth', 'steve@abc.com', 'ABC')
	INSERT INTO Leads#TEMP (FirstName, LastName, Email, Company) VALUES ('Andrew', 'Stack', 'andy@abc', 'ABC')

	INSERT INTO Leads (FirstName, LastName, Email, Company) SELECT FirstName, LastName, Email, Company FROM Leads#TEMP

Update

This table supports BATCH UPDATE when UseBulkAPI is set to false.

You can update any field in the Leads table that is not read-only. All critria fields are used as deduplication fields. Use a field for deduplication if it supports server side filtering, otherwise the Id column is used for deduplication.

	UPDATE Leads SET Company='TestCompany', NumberOfEmployees=100 WHERE Id='2521004'
	UPDATE Leads SET Title='My Job', Address='123 Main St' WHERE Email='leadtest12@cdata.com'
	UPDATE LEADS SET Email='testUpdateEmailByIdNew@leads.marketo' WHERE Id=2523020
	UPDATE LEADS SET TestKpQA='test' WHERE TestCustomfieldEmail='indritb1231@cdata.com'

Upsert

This table supports BATCH UPSERT when UseBulkAPI is set to false.

This table supports BULK UPSERT when UseBulkAPI is set to true.

	UPSERT INTO Leads (Email, FirstName, LastName) VALUES ('testLeadUpsert@test.com', 'Lead', 'Upsert_InsertNewRecord')

Delete

This table supports BATCH DELETE when UseBulkAPI is set to false.

	DELETE FROM Leads WHERE Id=508
	DELETE FROM Leads WHERE Id IN (505, 506, 501, 507)
	DELETE FROM Leads WHERE Email='kk@gd.com'

GetDeleted

Note: The API returns only leads which have been deleted in the past 14 days.

	GetDeleted FROM Leads

GetDeleted supports filtering by UpdatedAt.

	GETDELETED FROM Leads WHERE UpdatedAt > '2024-01-01T01:00:00'
	GETDELETED FROM Leads WHERE UpdatedAt > '2024-01-01T01:00:00' AND UpdatedAt <= '2024-02-01T01:00:00' 

Bulk

When UseBulkAPI is set to true the CreatedAt filter can be processed server-side, in addition to that the following extra filters are available:

Name TypeReadOnlyOperators Description
ListNameStringTrue =

Mirror column that can be used only as a filter. Will retrieve custom objects related to the provided static list name.

SmartListIdIntTrue =

Mirror column that can be used only as a filter. Will retrieve custom objects related to the provided smart list Id.

SmartListNameStringTrue =

Mirror column that can be used only as a filter. Will retrieve custom objects related to the provided smart list name.

Sample queries:

	SELECT Id, UpdatedAt FROM LEADS WHERE UpdatedAt>'2024-01-17T14:28:57.000-05:00' AND UpdatedAt<'2024-01-29T04:29:55.000-05:00'
	SELECT Id, CreatedAt FROM LEADS WHERE CreatedAt>='2024-01-17T14:27:20.000-05:00' AND CreatedAt<'2024-01-29T04:29:30.000-05:00'
	SELECT * FROM LEADS WHERE ListId=1062
	SELECT * FROM LEADS WHERE ListName='test0614'
	SELECT Id FROM LEADS WHERE SmartListId=1095
	SELECT Id FROM LEADS WHERE SmartListName='LeadSmartListTest'

Columns

Name Type ReadOnly Operators Description
Id [KEY] Int True =,IN

The id of the lead.

CreatedAt Datetime True

The datetime when the lead was created.

UpdatedAt Datetime True =,>,>=,<,<=

The datetime when the lead was last updated.

ProgramId Int True =

Mirror column that can be used only as a filter. Will retrieve Leads related to the given email ProgramId. Not available when UseBulkAPI=true.

ListId Int True =

Mirror column that can be used only as a filter. Will retrieve Leads related to the provided static list Id.

PartitionName String False

Mirror column that can be used only during inserts to specify the partition of the lead.

AcmeAccessCode String False =,IN

AcquisitionProgramId String False

Address String False

AnnualRevenue Decimal False

AnonymousIP String False

BillingCity String False

BillingCountry String False

BillingPostalCode String False

BillingState String False

BillingStreet String False

BlackListed Bool False

BlackListedCause String False

City String False

Company String False

ContactCompany String True

Cookies String False =,IN

Country String False

Cstmfdtest1 String False =,IN

Cstmfdtest2 String False =,IN

DateOfBirth Date False

Department String False =,IN

DoNotCall Bool False

DoNotCallReason String False

Ecids String True

Email String False =,IN

EmailInvalid Bool False

EmailInvalidCause String False

EmailSuspended Bool False

EmailSuspendedAt Datetime False

EmailSuspendedCause String False =,IN

ExternalCompanyId String False =,IN

ExternalSalesPersonId String False =,IN

Fax String False

FirstName String False

Industry String False

InferredCity String True

InferredCompany String True

InferredCountry String True

InferredMetropolitanArea String True

InferredPhoneAreaCode String True

InferredPostalCode String True

InferredStateRegion String True

IsAnonymous Bool False

IsLead Bool False

LastName String False

LeadPartitionId String False =,IN

LeadPerson String True

LeadRevenueCycleModelId String False

LeadRevenueStageId String False

LeadRole String False

LeadScore Int False

LeadSource String False

LeadStatus String False

MainPhone String False

MarketingSuspended Bool False

MarketingSuspendedCause String False

MiddleName String False

MktoAcquisitionDate Datetime False

MktoCompanyNotes String False

MktoDoNotCallCause String False

MktoIsCustomer Bool False

MktoIsPartner Bool False

MktoName String True =,IN

MktoPersonNotes String False

MobilePhone String False

NumberOfEmployees Int False

OriginalReferrer String True

OriginalSearchEngine String True

OriginalSearchPhrase String True

OriginalSourceInfo String True

OriginalSourceType String True

PersonPrimaryLeadInterest String True

PersonTimeZone String True

PersonType String False

Phone String False

PostalCode String False

Priority Int False

Rating String False

RegistrationSourceInfo String False

RegistrationSourceType String False

RelativeScore Int False

RelativeUrgency Int False

Salutation String False

SicCode String False

Site String False

State String False

Test String False =,IN

Test1 Bool False

Test98 String False =,IN

TestCustomfieldEmail String False =,IN

TestFieldText1 String False =,IN

TestInteger Bool False

TestInteger_cf Int False =,IN

TestKpQA String False =,IN

Title String False

Unsubscribed Bool False

UnsubscribedReason String False

Urgency Double False

UTMTerm String False =,IN

Website String False

CData JDBC Driver for Marketo

NamedAccounts

Query Named Accounts for a Marketo organization.

Select

Note: A server-side filter must be specified to query this table. Queries with the 'OR' operator are not supported.

Note: Filters provided with one of the supported operators listed in the "Operators" column are processed server-side, all the other filters are processed client-side.

Tip: This table uses server-side projection. Performance can be improved by minimizing the number of columns in projection.

	SELECT * FROM NamedAccounts WHERE Name='MyNamedAccount1'

Insert

This table supports BATCH INSERT when UseBulkAPI is set to false.

	INSERT INTO NamedAccounts (Name, City, Country, DomainName, Industry) VALUES ('testNamedAccountInsert002', 'Chapel Hill', 'USA', 'MyDomain', 'Tech')

Update

This table supports BATCH UPDATE when UseBulkAPI is set to false.

	UPDATE NamedAccounts SET NumberOfEmployees=100, State='NC', AnnualRevenue='10000000.00' WHERE Name='testNamedAccountInsert002'
	UPDATE NamedAccounts SET NumberOfEmployees=999 WHERE MarketoGUID='197d0ecd-4264-4826-a44a-58a6df1f9ae5'

Upsert

This table supports BATCH UPSERT when UseBulkAPI is set to false.

	UPSERT INTO NamedAccounts (Name, City, Country, DomainName, Industry) VALUES ('testUpsert', 'Chapel Hill', 'USA', 'MyDomain', 'Tech')

Delete

This table supports BATCH DELETE when UseBulkAPI is set to false.

	DELETE FROM NamedAccounts WHERE Name IN ('MyAccount2', 'MyAccount')
	DELETE FROM NamedAccounts WHERE marketoGUID IN ('04da404b-c4e9-40c8-867f-d9fae0062343', 'fd422222-a37f-4c2b-86df-3ed4c22e9c79')

Columns

Name Type ReadOnly Operators Description
MarketoGUID [KEY] String True =,IN

Id Int True =,IN

ApproximateNumOfPeople Int True =,IN

ParentAccountId Int True =,IN

AccountOwnerId Int False =,IN

AccountPhoneNumber String False =,IN

AddressPostalCode String False =,IN

AddressRegion String False =,IN

AnnualRevenue Decimal False =,IN

City String False =,IN

Country String False =,IN

CreatedAt Datetime True

CrmGuid String False =,IN

CrmOrgId Int False =,IN

DomainName String False =,IN

ExternalSourceId String False =,IN

ExternalSourceInstanceId String False =,IN

ExternalSourceKey String False =,IN

ExternalSourceType String False =,IN

Industry String False =,IN

LogoUrl String False =,IN

MembershipCount Int True =,IN

Name String False =,IN

NumberOfEmployees Int False =,IN

OpptyAmount Decimal True =,IN

OpptyCount Int True =,IN

SicCode String False =,IN

SourceType String False =,IN

State String False =,IN

Street1 String False =,IN

UpdatedAt Datetime True

CData JDBC Driver for Marketo

Opportunities

Query Opportunities in Marketo.

Note: This table is only available for Marketo subscriptions which do not have a native CRM sync enabled.

Select

Note: Filters provided with one of the supported operators listed in the "Operators" column are processed server-side, all the other filters are processed client-side.

Tip: This table uses server-side projection. Performance can be improved by minimizing the number of columns in projection.

Note: A filter must be specified when retrieving Opportunities.

	SELECT * FROM Opportunities WHERE ExternalOpportunityId='test2'
	SELECT * FROM Opportunities WHERE ExternalCompanyId='CData'

Insert

This table supports BATCH INSERT when UseBulkAPI is set to false.

	INSERT INTO Opportunities (ExternalOpportunityId, Description, ExternalCompanyId, Name) VALUES ('testOpportunitiesInsert001', 'First Opportunity', 'cdata', 'Opp')

Update

This table supports BATCH UPDATE when UseBulkAPI is set to false.

	UPDATE Opportunities SET IsWon=true, FiscalYear=2016, Amount='1000.00' WHERE ExternalOpportunityId='testOpportunitiesInsert001'
	UPDATE Opportunities SET IsWon=false, FiscalYear=2017, Amount='1000.00' WHERE ExternalCompanyId='testInsert_ExternalCompanyId_012'

Upsert

This table supports BATCH UPSERT when UseBulkAPI is set to false.

	UPSERT INTO Opportunities (ExternalOpportunityId, Description, ExternalCompanyId, Name) VALUES ('testUpsert', 'First Opportunity', 'CData', 'Opp')

Delete

This table supports BATCH DELETE when UseBulkAPI is set to false.

	DELETE FROM Opportunities WHERE ExternalOpportunityId='CDATA2'
	DELETE FROM Opportunities WHERE marketoGUID IN ('c1bac835-e5d3-47cc-9c87-bd18fdf573f8', '04ecb93c-d140-4c38-96cc-1fc2821e91eb')

Columns

Name Type ReadOnly Operators Description
CreatedAt Datetime True

ExternalOpportunityId String True =,IN

MarketoGUID [KEY] String True =,IN

UpdatedAt Datetime True

Amount Decimal False

CloseDate Date False

Description String False

ExpectedRevenue Decimal False

ExternalCompanyId String False =,IN

ExternalCreatedDate Datetime False

ExternalSalesPersonId String False =,IN

Fiscal String False

FiscalQuarter Int False

FiscalYear Int False

ForecastCategory String False

ForecastCategoryName String False

IsClosed Bool False

IsWon Bool False

LastActivityDate Date False

LeadSource String False

Name String False

NextStep String False

Probability Int False

Quantity Double False

Stage String False

Type String False

CData JDBC Driver for Marketo

OpportunityRoles

Query Opportunity Roles in Marketo.

Note: This table is only available for Marketo subscriptions which do not have a native CRM sync enabled.

Select

Note: A server-side filter must be specified to query this table. Queries with the 'OR' operator are not supported.

Note: Filters provided with one of the supported operators listed in the "Operators" column are processed server-side, all the other filters are processed client-side.

Tip: This table uses server-side projection. Performance can be improved by minimizing the number of columns in projection.

	SELECT * FROM OpportunityRoles WHERE externalOpportunityId='test2'
	SELECT * FROM OpportunityRoles WHERE ExternalOpportunityId IN ('test@cdata.com', 'test2@cdata.com')

Insert

This table supports BATCH INSERT when UseBulkAPI is set to false.

	INSERT INTO OpportunityRoles (ExternalOpportunityId, LeadId, IsPrimary, Role) VALUES ('testOpportunitiesInsert', '12', false, 'Test')

Update

This table supports BATCH UPDATE when UseBulkAPI is set to false.

	UPDATE OpportunityRoles SET IsPrimary=true WHERE MarketoGUID='c92c78dd-b869-40dc-bb2b-7cba112e8f50'
	UPDATE OpportunityRoles SET IsPrimary=false WHERE ExternalOpportunityId='testOpportunitiesInsert'
	UPDATE OpportunityRoles SET IsPrimary=false WHERE ExternalOpportunityId='testOpportunitiesInsert001' AND LeadId=12 AND Role='Test1'

Upsert

This table supports BATCH UPSERT when UseBulkAPI is set to false.

	UPSERT INTO OpportunityRoles (ExternalOpportunityId, LeadId, IsPrimary, Role) VALUES ('testOpportunitiesInsert001', '4', false, 'Test')

Delete

This table supports BATCH DELETE when UseBulkAPI is set to false.

	DELETE FROM OpportunityRoles WHERE ExternalOpportunityId='CDATA1'
	DELETE FROM OpportunityRoles WHERE LeadId IN (4, 6)
	DELETE FROM OpportunityRoles WHERE ExternalOpportunityId='CDATA1' AND LeadId=6 AND Role='MyRole2'

Columns

Name Type ReadOnly Operators Description
CreatedAt Datetime True

MarketoGUID [KEY] String True =,IN

UpdatedAt Datetime True

ExternalCreatedDate Datetime False

ExternalOpportunityId String False =,IN

IsPrimary Bool False

LeadId Int False =,IN

Role String False

CData JDBC Driver for Marketo

ProgramMembers

Query Program Members in Marketo.

UpdateLeadProgramStatus can be used to update the membership status of a lead.

Select

Note: Filters provided with one of the supported operators listed in the "Operators" column are processed server-side, all the other filters are processed client-side.

Tip: This table uses server-side projection. Performance can be improved by minimizing the number of columns in projection.

Note: The REST API throws an error if you query program members for a program with more than 100'000 members. You can set UseBulkAPI to 'true' or 'auto' to automatically use the BULK API to retrieve the records.

	SELECT * FROM ProgramMembers WHERE ProgramId=1001

Insert

This table supports BATCH INSERT when UseBulkAPI is set to false.

	INSERT INTO ProgramMembers (ProgramId, LeadId, StatusName) VALUES ('1001', 4, 'member')

Update

This table supports BATCH UPDATE when UseBulkAPI is set to false.

	UPDATE ProgramMembers SET WebinarURL='wsfldknfs1.com', RegistrationCode='adcff5f12-a7c7-11eb-bcbc-0242ac130001' WHERE LeadId='13' AND ProgramId='1001'
	UPDATE ProgramMembers SET WebinarURL='test@cdata.com/sync' WHERE ProgramId=1001 AND LeadId IN (28, 29, -2)
	UPDATE ProgramMembers SET WebinarURL='test@cdata.com/sync' WHERE ProgramId IN (1001, 1018) AND LeadId IN (12, 14)

Upsert

This table supports only BULK UPSERT when UseBulkAPI is set to true.

	UPSERT INTO OpportunityRoles (ExternalOpportunityId, LeadId, IsPrimary, Role) VALUES ('testOpportunitiesInsert001', '4', false, 'Test')

Delete

This table supports BATCH DELETE when UseBulkAPI is set to false.

	DELETE FROM ProgramMembers WHERE ProgramId=1001 AND LeadId=21
	DELETE FROM ProgramMembers WHERE ProgramId=1001 AND LeadId IN (28, 29, -2)
	DELETE FROM ProgramMembers WHERE ProgramId IN (1001, 1018) AND LeadId IN (12, 14, -2)
	DELETE FROM ProgramMembers WHERE ProgramId=1001 AND registrationCode='494164'

Columns

Name Type ReadOnly Operators Description
ProgramId [KEY] Int False =

Id of the program.

LeadId [KEY] Int False

Id of the lead.

UpdatedAt Datetime True

Datetime the records was most recently updated.

IsExhausted Bool True

NurtureCadence String True

StatusName String False =,IN

AttendanceLikelihood Int True

CreatedAt Datetime True

MembershipDate Datetime True

Program String True

ReachedSuccess Bool True =,IN

ReachedSuccessDate Datetime True

RegistrationLikelihood Int True

TrackName String True

WaitlistPriority Int True

AcquiredBy Bool False

FlowStep Int False =,IN

RegistrationCode String False

ReiNewCustomField String False =,IN

StatusReason String False

Test99 Int False =,IN

TestCustomObjFd String False =,IN

UTMSource String False =,IN

WebinarUrl String False

CData JDBC Driver for Marketo

Programs

Create, update, delete, and query Programs for a Marketo organization.

Select

Note: Filters provided with one of the supported operators listed in the "Operators" column are processed server-side, all the other filters are processed client-side.

	SELECT * FROM Programs WHERE Id=6201
	SELECT * FROM Programs WHERE Id IN (6201, 6200, 6152, 6117)
	SELECT * FROM Programs WHERE Name='duplicateProgramName'
	SELECT * FROM Programs WHERE WorkspaceName='test'
	SELECT * FROM Programs WHERE FolderId=48
	SELECT * FROM Programs WHERE FolderId=48 AND folderType='Folder'
	SELECT * FROM Programs WHERE UpdatedAt >' 2023-03-28T00:19:32.000-04:00'
	SELECT * FROM Programs WHERE UpdatedA >=' 2023-03-28T00:19:32.000-04:00'
	SELECT * FROM Programs WHERE UpdatedAt =' 2023-03-28T00:19:32.000-04:00'
	SELECT * FROM Programs WHERE UpdatedAt <=' 2023-03-28T00:19:32.000-04:00' AND UpdatedAt>'2021-08-11T08:10:01.000Z'
	SELECT * FROM Programs WHERE UpdatedAt < '2023-03-28T00:19:32.000-04:00' AND UpdatedAt>'2021-08-11T08:10:01.000Z'

Insert

Inserting a new program:
	INSERT INTO Programs (Name, FolderId, FolderType, Type, Description, Channel)
	VALUES ('test insert program', '6152', 'Program', 'Event', 'Test Insert Description', 'Tradeshow')

Update

Updating a program:
	UPDATE Programs SET Name='UpdatedProgram', Description='Updated Description' WHERE Id=6224

Delete


	DELETE FROM Programs WHERE Id=2383
	DELETE FROM Programs WHERE Name='Sample0034'
	DELETE FROM Programs WHERE ID IN (1064, 1065, 1066, 1067)
	DELETE FROM Programs WHERE Name IN ('Sample0035', 'Sample0036', 'Sample0037')

Columns

Name Type ReadOnly Operators Description
Id [KEY] Int True =,IN

The unique, Marketo-assigned identifier of the program.

Name String False =

The name of the program.

Description String False

The description of the program.

Type String False

The program type.

Channel String False

The channel the program is associated with.

WorkspaceName String True =,IN

The name of the workspace where the program is located.

URL String True

The URL reference to the program.

Status String True

The status of the program.

FolderId Int False =,IN

The unique, Marketo-assigned identifier of the parent folder/program.

FolderName String True

The name of the folder

FolderType String False =

The type of folder (Folder,Program)

CreatedAt Datetime True

Datetime the channel was created.

UpdatedAt Datetime True =,>,<,>=,<=

Datetime the channel was most recently updated.

CData JDBC Driver for Marketo

SalesPersons

Query Sales Persons in Marketo.

Note: This table is only available for Marketo subscriptions which do not have a native CRM sync enabled.

Select

Note: A server-side filter must be specified to query this table. Queries with the 'OR' operator are not supported.

Note: Filters provided with one of the supported operators listed in the "Operators" column are processed server-side, all the other filters are processed client-side.

Tip: This table uses server-side projection. Performance can be improved by minimizing the number of columns in projection.

	SELECT * FROM SalesPersons WHERE ExternalSalesPersonId='test SalesPerson'
	SELECT * FROM SalesPersons WHERE Id=2520998
	SELECT * FROM SalesPersons WHERE Email='sales@cdata.com'
	SELECT * FROM SalesPersons WHERE Email IN ('sales@cdata.com', 'testemail@cdata.com')

Insert

This table supports BATCH INSERT when UseBulkAPI is set to false.

	INSERT INTO SalesPersons (ExternalSalesPersonId, Email, FirstName, LastName) VALUES ('testInsertSalesPersons001', 'sales@test.com', 'Sales', 'Person')

Update

This table supports BATCH UPDATE when UseBulkAPI is set to false.

	UPDATE SalesPersons SET Phone='800-123-4567', Title='Technical Sales', Email='sales@cdata.com' WHERE ExternalSalesPersonId='testInsertSalesPersons001'

Upsert

This table supports BATCH UPSERT when UseBulkAPI is set to false.

	UPSERT INTO SalesPersons (ExternalSalesPersonId, Email, FirstName, LastName) VALUES ('testInsertSalesPersons123', 'sales@test.com', 'Sales', 'Person')

Delete

This table supports BATCH DELETE when UseBulkAPI is set to false.

	DELETE FROM SalesPersons WHERE ExternalSalesPersonId='sales@cdata.com'
	DELETE FROM SalesPersons WHERE ID='2521702'
	DELETE FROM SalesPersons WHERE ID IN (2521703, 2521704)
	DELETE FROM SalesPersons WHERE Email='salesDelteTest1@cdata.com'
	DELETE FROM SalesPersons WHERE Email IN ('salesDelteTest2@cdata.com', 'salesDelteTest3@cdata.com')

Columns

Name Type ReadOnly Operators Description
Id [KEY] Int True =,IN

ExternalSalesPersonId String True =,IN

Email String False =,IN

Fax String False

FirstName String False

LastName String False

MobilePhone String False

Phone String False

Title String False

CreatedAt Datetime True

UpdatedAt Datetime True

CData JDBC Driver for Marketo

SmartCampaigns

Query Smart Campaigns for a Marketo organization.

Select

Note: Filters provided with one of the supported operators listed in the "Operators" column are processed server-side, all the other filters are processed client-side.

	SELECT * FROM SmartCampaigns WHERE IsActive='False'
	SELECT * FROM SmartCampaigns WHERE FolderId=5318 AND FolderType='Folder' AND IsActive='true'
	SELECT * FROM SmartCampaigns WHERE UpdatedAt >'2024-01-17T19:19:51Z'
	SELECT * FROM SmartCampaigns WHERE UpdatedAt >='2024-01-17T19:19:51Z'
	SELECT * FROM SmartCampaigns WHERE UpdatedAt <'2024-01-17T19:19:51Z'
	SELECT * FROM SmartCampaigns WHERE UpdatedAt <='2024-01-17T19:19:51Z'
	SELECT * FROM SmartCampaigns WHERE UpdatedAt = '2024-01-17T19:19:51Z'

Insert


	INSERT INTO SmartCampaigns (Name, FolderId, FolderType, Description)
    VALUES ('test insert smart campaign', '6152', 'Program', 'Test Insert Description')

Update


	UPDATE SmartCampaigns Set Name = 'UpdatedSmartCampaignName', Description = 'CData Campaign' WHERE Id = 1109

Delete


	DELETE FROM SmartCampaigns WHERE Id=1106
	DELETE FROM SmartCampaigns WHERE Name='JET - Test email link reports'
	DELETE FROM SmartCampaigns WHERE ID IN (1043, 5318)
	DELETE FROM SmartCampaigns WHERE Name IN ('TestCampaign1', 'RCM Success Only (v1) Known --> Engaged', 'Update Segmentation [1001](1001)')

Columns

Name Type ReadOnly Operators Description
Id [KEY] Int True =

Id of the smart campaign.

ParentProgramId Int True

The id of the parent program. Present if smart campaign is under program or nested folder

Name String False

Name of the smart campaign.

Description String False

Description of the smart campaign.

Type String True

The type of the the smart campaign. Batch: has at least one filter and no triggers. Trigger: has at least one trigger. Default: has no smart list rules.

ComputedUrl String True

The Computed Url of the Smart Campaign

Status String True

The status of the smart campaign.

IsSystem Bool True

Whether smart campaign is system managed.

IsActive Bool True =

Whether smart campaign is active.

IsRequestable Bool True

Whether smart campaign is requestable (is active and contains 'Campaign is Requested' trigger with Source of 'Web Service API').

IsCommunicationLimitEnabled Bool True

Whether smart campaign communication limit is enabled (i.e. block non-operational emails).

MaxMembers Int True

The smart campaign membership limit.

SmartListId Int True

The Id of the smart campaign's child smart list.

FlowId Int True

The Id of the smart campaign's child flow.

FolderId Int False =

The unique, Marketo-assigned identifier of the parent folder/program.

FolderType String False =

The type of folder (Folder,Program)

WorkspaceName String True

Name of the workspace the smart campaign is part of.

QualificationRuleType String True

The type of qualification rule.

QualificationRuleInterval Int True

The interval of qualification rule. Only set when qualificationRuleType is 'interval'

QualificationRuleUnit String True

The unit of measure of qualification rule. Only set when qualificationRuleType is 'interval' = ['hour', 'day', 'week', 'month']

RecurrenceStartAt Datetime True

The datetime of the first scheduled campaign to run. Required if setting recurrence. Not required to create a smart campaign that has no recurrence.

RecurrenceEndAt Datetime True

The datetime after which no further runs will be automatically scheduled.

RecurrenceIntervalType String True

The recurrence interval. Not required to create a smart campaign that has no recurrence = ['Daily', 'Weekly', 'Monthly'].

RecurrenceInterval Int True

The number of interval units between recurrences.

RecurrenceWeekDayOnly Bool True

Only run smart campaign on weekdays. May only be set if intervalType is 'Daily'.

RecurrenceWeekDayMask String True

String array of empty or one or more of 'Monday', 'Tuesday', 'Wednesday', 'Thursday', 'Friday', 'Saturday', 'Sunday'. May only be set if intervalType is 'Weekly'.

RecurrenceDayOfMonth Int True

The day of the month to recur. Permissible range 1-31. May only be set if intervalType is 'Monthly' and dayOfWeek and weekOfMonth are unset.

RecurrenceDayOfWeek String True

The day of the week to recur. May only be set if dayOfMonth is not set, and weekOfMonth is set = ['Monday', 'Tuesday', 'Wednesday', 'Thursday', 'Friday', 'Saturday', 'Sunday'].

RecurrenceWeekOfMonth Int True

The week of the month to recur. Permissible range 1-4. May only be set if dayOfMonth is not set, and dayOfWeek is set.

CreatedAt Datetime True

Datetime the smart campaign was created.

UpdatedAt Datetime True =,>,<,>=,<=

Datetime the smart campaign was most recently updated.

CData JDBC Driver for Marketo

SmartLists

Query Smart Lists for a Marketo organization.

Select

Note: Filters provided with one of the supported operators listed in the "Operators" column are processed server-side, all the other filters are processed client-side.

	SELECT * FROM SmartLists WHERE Id='1093'
	SELECT * FROM SmartLists WHERE Name='LeadSmartListTest'
	SELECT * FROM SmartLists WHERE FolderId=7
	SELECT * FROM SmartLists WHERE ProgramId=6116
	SELECT * FROM SmartLists WHERE SmartCampaignId=1043
	SELECT * FROM SmartLists WHERE UpdatedAt = '2021-02-02T08:26:01Z'
	SELECT * FROM SmartLists WHERE UpdatedAt > '2021-02-02T08:26:01Z'
	SELECT * FROM SmartLists WHERE UpdatedAt >= '2021-02-02T08:26:01Z'
	SELECT * FROM SmartLists WHERE UpdatedAt <' 2022-06-08T06:17:24Z'
	SELECT * FROM SmartLists WHERE UpdatedAt <=' 2022-06-08T06:17:24Z'

Delete


	DELETE FROM SmartLists WHERE Id=3991
	DELETE FROM SmartLists WHERE ID IN (3560, 1266, 3999)
	DELETE FROM SmartLists WHERE Name='TestProgram Opportunities'
	DELETE FROM SmartLists WHERE Name IN ('test_from_ui', 'JET - email tests')

Columns

Name Type ReadOnly Operators Description
Id [KEY] Int False =

Id of the smart list.

Name String False =

Name of the smart list.

Description String False

Description of the smart list.

URL String False

The URL of the smart list in the Marketo UI

WorkspaceName String False

Name of the workspace the smart list is part of.

FolderId Int False =

The unique, Marketo-assigned identifier of the parent folder/program.

FolderType String False =

The type of folder (Folder,Program)

CreatedAt Datetime False

Datetime the smart list was created.

UpdatedAt Datetime False =,>,<,>=,<=

Datetime the smart list was most recently updated.

SmartCampaignId Int False =

Mirror column that can be used only as a filter. Will retrieve SmartLists related to the given SmartCampaignId.

ProgramId Int False =

Mirror column that can be used only as a filter. Will retrieve SmartLists related to the given email ProgramId.

CData JDBC Driver for Marketo

Snippets

Create, update, delete and query snippets for a Marketo organization.

GetSnippetContent can be used to get the content of a snippet.

UpdateSnippetContent can be used to update the content of a snippet.

Select

Note: Filters provided with one of the supported operators listed in the "Operators" column are processed server-side, all the other filters are processed client-side.

	SELECT * FROM Snippets WHERE status='approved'
	SELECT * FROM Snippets WHERE Id='9'
	SELECT * FROM Snippets WHERE Id='9' AND Status='approved'

Insert


	INSERT INTO Snippets (Name, FolderId, FolderType, Description)
	VALUES ('test insert smart snippet', '31', 'Folder', 'Test Insert Description')

Update


	UPDATE Snippets SET Description='Testing Update', IsArchive='true', Name='Test Update' WHERE Id=12

Delete


	DELETE FROM Snippets WHERE Id=7
	DELETE FROM Snippets WHERE Name='My Snippet2'
	DELETE FROM Snippets WHERE ID IN (1, 9, 111)
	DELETE FROM Snippets WHERE Name IN ('My Snippet1', 'My Snippet11')

Columns

Name Type ReadOnly Operators Description
Id [KEY] Int True =

The unique, Marketo-assigned identifier of the snippet.

Status [KEY] String True =

Status filter for draft or approved versions.

Name String False

The name of the snippet.

Description String False

The description of the snippet.

IsArchive Bool False

Whether or not the snippet is archived.

URL String True

The URL of the snippet in the Marketo UI.

WorkspaceName String True

Workspace name of the asset.

FolderId Int False =

The unique, Marketo-assigned identifier of the parent folder/program.

FolderName String True

The name of the folder

FolderType String False =

The type of folder (Folder,Program)

CreatedAt Datetime True

Datetime the snippet was created.

UpdatedAt Datetime True

Datetime the snippet was most recently updated.

CData JDBC Driver for Marketo

StaticListMembership

Query relations of static lists and leads in Marketo.

Select

Note: Filters provided with one of the supported operators listed in the "Operators" column are processed server-side, all the other filters are processed client-side.

	SELECT * FROM StaticListMembership WHERE ListId='1014'
	SELECT * FROM StaticListMembership WHERE LeadId='4'
Other queries partialy server-side:
	SELECT * FROM StaticListMembership WHERE ListId IN (1014, 1044, 1057)
	SELECT * FROM StaticListMembership WHERE LeadId IN (4, 9999, 1199433)
	SELECT * FROM StaticListMembership WHERE ListId=1014 AND LeadId=1199433
	SELECT * FROM StaticListMembership WHERE ListId=1014 AND LeadId IN (4, 9999, 1199433, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10)

Insert

This table supports BATCH INSERT when UseBulkAPI is set to false.

	INSERT INTO StaticListMemberShip (ListId, LeadId) VALUES (1014, 4)
	INSERT INTO StaticListMemberShip (ListId, LeadId) VALUES (1014, 4), (1014, 8), (1014, 12), (1014, 21)
	INSERT INTO StaticListMemberShip (ListId, LeadId) VALUES (1014, 4), (1014, 8), (1014, 12), (1014, 21), (1349, 4), (1349, 8), (1062, 8), (1349, 21), (1349, 22)

Delete

This table supports BATCH DELETE when UseBulkAPI is set to false.

	DELETE FROM StaticListMembership WHERE ListId=1057 AND LeadId=1083278
	DELETE FROM StaticListMembership WHERE ListId=1057 AND LeadId IN (1083292, 1083293, 1199432)
	DELETE FROM StaticListMembership WHERE ListId=1057
	DELETE FROM StaticListMembership WHERE LeadId=9999
	DELETE FROM StaticListMembership WHERE ListId IN (1057, 1568) AND LeadId IN (1083292, 1083293, 1199432, 1199433, 2521698)
	DELETE FROM StaticListMembership WHERE LeadId IN (1083292, 1083293, 1199432, 1199433, 2521698, 4, 5, 6, 7, 8, 9, 10)

Columns

Name Type ReadOnly Operators Description
ListId [KEY] Int False =

Id of the static list.

LeadId [KEY] Int False =

Id of the Lead.

CData JDBC Driver for Marketo

StaticLists

Query Static Lists for a Marketo organization.

Select

Note: Filters provided with one of the supported operators listed in the "Operators" column are processed server-side, all the other filters are processed client-side.

	SELECT * FROM StaticLists WHERE Id='1556'
	SELECT * FROM StaticLists WHERE Name='Anti-Smart List'
	SELECT * FROM StaticLists WHERE FolderId='12'
	SELECT * FROM StaticLists WHERE FolderType='Folder'
	SELECT * FROM StaticLists WHERE FolderId='6113' AND FolderType='Program'
	SELECT * FROM StaticLists WHERE UpdatedAt = '2024-01-17T14:31:26.000'
	SELECT * FROM StaticLists WHERE UpdatedAt > '2023-06-07T08:00:01.000'
	SELECT * FROM StaticLists WHERE UpdatedAt >= '2023-06-07T08:00:01.000'
	SELECT * FROM StaticLists WHERE UpdatedAt < '2023-06-07T08:00:01.000'
	SELECT * FROM StaticLists WHERE UpdatedAt <= '2023-06-07T08:00:01.000'
	SELECT * FROM StaticLists WHERE UpdatedAt >= '2022-09-01T14:08:37.000' AND UpdatedAt < '2023-10-06T10:43:02.000'

Insert


	INSERT INTO StaticLists (Name, FolderId, FolderType, Description) VALUES ('test insert StaticLists', '6152', 'Program', 'Test Insert Description')

Update


	UPDATE StaticLists Set Name = 'UpdatedStaticList', Description = 'CData StaticList' WHERE Id = 1570

Delete


	DELETE FROM StaticLists WHERE Id=1561
	DELETE FROM StaticLists WHERE Name='test'
	DELETE FROM StaticLists WHERE ID IN (1563, 1564, 1565, 111)
	DELETE FROM StaticLists WHERE Name IN ('test46AU1gBBg1', 'asd', 'testsDxzV3BAqn')

Columns

Name Type ReadOnly Operators Description
Id [KEY] Int True =

Id of the static list.

Name String False =

Name of the static list.

Description String False

Description of the static list.

URL String True

The URL of the static list in the Marketo UI

ComputedURL String True

Computed URL of static list.

WorkspaceName String True

Name of the workspace the static list is part of.

FolderId Int False =

The unique, Marketo-assigned identifier of the parent folder/program.

FolderName String True

The name of the folder

FolderType String False =

The type of folder (Folder,Program)

CreatedAt Datetime True

Datetime the static list was created.

UpdatedAt Datetime True =,>,<,>=,<=

Datetime the static list was most recently updated.

CData JDBC Driver for Marketo

Tokens

Create, delete, and query Tokens for a Marketo organization.

Select

Note: Filters provided with one of the supported operators listed in the "Operators" column are processed server-side, all the other filters are processed client-side.

	SELECT * FROM Tokens WHERE folderId=70
	SELECT * FROM Tokens WHERE folderId=70 and FolderType='Folder'

Insert


	INSERT INTO Tokens (Name, Type, Value, FolderId, FolderType) VALUES ('test insert token', 'text', 'test token value', 5365, 'Folder')

Delete


	DELETE FROM Tokens WHERE FolderId=1111 AND FolderType='Program' AND Name='testname2' AND Type='text'
	DELETE FROM Tokens WHERE FolderId=1112 AND FolderType='Program' AND Name='test'
	DELETE FROM Tokens WHERE FolderId=1112

Columns

Name Type ReadOnly Operators Description
Name [KEY] String False

The name of the Token.

Type [KEY] String False

The data type of the Token. The supported values are date, number, rich text, score, sfdc campaign and text

Value String False

The value of the Token.

ComputedURL String False

The Computed URL of the Token.

FolderId [KEY] Int False =

The unique, Marketo-assigned identifier of the parent folder/program.

FolderType [KEY] String False =

The type of folder (Folder,Program)

CData JDBC Driver for Marketo

ビュー

ビューは、データを示すという点でテーブルに似ていますが、ビューは読み取り専用です。

クエリは、ビューに対して通常のテーブルと同様に実行することができます。

CData JDBC Driver for Marketo ビュー

Name Description
Activities Retrieve activities of different types after a specific datetime.
Activities_Add_to_List Add a person/record to a list
Activities_Add_to_Nurture Add a lead to a nurture program
Activities_Add_to_Opportunity Add to an Opportunity
Activities_Asks_questions_in_webinar Lead asks questions in a webinar event
Activities_Asset_downloads_in_webinar Lead downloads file/asset in a webinar event
Activities_Call_to_action_clicked_in_webinar Lead clicks on a Call to Action Link in a webinar event
Activities_Call_Webhook Call a Webhook
Activities_Change_Data_Value Changed attribute value for a person/record
Activities_Change_Lead_Partition Lead partition is changed for a lead
Activities_Change_Nurture_Cadence Change the nurture cadence for a lead
Activities_Change_Nurture_Track Change the nurture track for a lead
Activities_Change_Program_Member_Data Change Program Member Data
Activities_Change_Revenue_Stage Modify the value of a revenue stage field
Activities_Change_Revenue_Stage_Manually Revenue stage is changed manually (e.g. Lead Database or Salesforce)
Activities_Change_Score Modify the value of a score field
Activities_Change_Segment Change segment (within a segmentation) for a lead
Activities_Change_Status_in_Progression Change a Status in an program progression
Activities_Click_Email User clicks on a link in a Marketo Email
Activities_Click_Link User clicks link on a page
Activities_Click_Sales_Email User clicks on a link in a sales Email
Activities_Create_Buying_Group Create Buying Group
Activities_Delete_Lead Delete lead from Marketo database
Activities_Email_Bounced Marketo Email is bounced for a lead
Activities_Email_Bounced_Soft Campaign Email is bounced soft for a lead
Activities_Email_Delivered Marketo Email is delivered to a lead/contact
Activities_Engaged_with_an_Agent_in_Conversational_Flow Lead engages with an Agent in Dynamic Chat conversational flow
Activities_Engaged_with_an_Agent_in_Dialogue Lead engages with an Agent in Dynamic Chat dialogue
Activities_Engaged_with_a_Conversational_Flow Lead engages with Dynamic Chat conversational flow
Activities_Engaged_with_a_Dialogue Lead engages with Dynamic Chat dialogue
Activities_Execute_Campaign Invoke an executable campaign
Activities_Fill_Out_Form User fills out and submits a form on web page
Activities_Has_attended_event Has attended event
Activities_Interacted_with_Document_in_Conversational_Flow Lead interacts with a document in Dynamic Chat conversational flow
Activities_Interacted_with_Document_in_Dialogue Lead interacts with a document in Dynamic Chat dialogue
Activities_Merge_Leads Merge two or more leads into a single record
Activities_New_Lead New person/record is added to the lead database
Activities_Open_Email User opens Marketo Email
Activities_Open_Sales_Email User opens a sales Email
Activities_Push_Lead_to_Marketo Push leads to Marketo
Activities_Reached_Conversational_Flow_Goal Lead reaches a goal in Dynamic Chat conversational flow
Activities_Reached_Dialogue_Goal Lead reaches a goal in Dynamic Chat dialogue
Activities_Received_Forward_to_Friend_Email User receives forwarded Email from friend
Activities_Receive_Sales_Email Receive Email using Sales View (Outlook Plugin)
Activities_Remove_from_List Remove this lead from a list
Activities_Remove_from_Opportunity Remove from an Opportunity
Activities_Reply_to_Sales_Email User replies to a sales email
Activities_Request_Campaign Campaign membership is requested for lead
Activities_Responded_to_a_poll_in_webinar Lead responds to a poll in a webinar event
Activities_Sales_Email_Bounced Sales Email bounced
Activities_Scheduled_Meeting_in_Conversational_Flow Lead schedules an appointment in Dynamic Chat conversational flow
Activities_Scheduled_Meeting_in_Dialogue Lead schedules an appointment in Dynamic Chat dialogue
Activities_Send_Alert Send alert Email about a lead
Activities_Send_Email Send Marketo Email to a person
Activities_Send_Sales_Email Send Email using Sales View (Outlook Plugin)
Activities_Sent_Forward_to_Friend_Email User Forwards Email to a person/record
Activities_Share_Content Share Content
Activities_Unsubscribe_Email Person unsubscribed from Marketo Emails
Activities_Update_Opportunity Update an Opportunity
Activities_Visit_Webpage User visits a web page
ActivityTypes Get available activity types.
ActivityTypesAttributes Get available activity type attributes.
BulkExportJobs Returns a list of bulk export jobs that were created in the past 7 days.
Campaigns Query Campaigns for a Marketo organization.
ChannelProgressionStatuses Query ProgressionStatuses of Channels for a Marketo organization.
Channels Query Channels for a Marketo organization.
DailyErrorStatistics Retrieve the count of each error users have encountered in the current day.
DailyUsageStatistics Retrieve the number of API calls that specific users have consumed in the current day.
EmailCCFields Query Emails CC Fields for a Marketo organization.
EmailTemplatesUsedBy Query email records which depend on a given email template.
Files Query files for a Marketo organization.
FolderContents Query Folders contents for a Marketo organization.
FormThankYouPages Query form thank you pages for a Marketo organization.
LandingPageTemplateContents Query landing page template contents for a Marketo organization.
LeadChanges Query Lead changes.
LeadChangesAttributes Query Lead changes attributes.
LeadChangesFields Query fields of lead changes.
LeadPartitions Query Lead Partitions for a Marketo organization.
LeadPrograms Query program membership for leads.
Lists Query Static Lists for a Marketo organization from the Leads API.
ProgramCosts Query, insert and delete program cost relations for a Marketo organization.
ProgramTags Query tags relations for a Marketo organization.
Segmentations Query segmentations for a Marketo organization.
Segments Query segments for a Marketo organization.
SmartListFilterConditions Query filters of smart lists in a Marketo organization.
SmartListFilters Query filters of smart lists in a Marketo organization.
SmartListTriggers Query rules of smart lists in a Marketo organization.
StaticListLeads Query leads of a static list in Marketo.
TagAllowedValues Query allowed values for tags in a Marketo organization.
Tags Query tags for a Marketo organization.
WeeklyErrorStatistics Retrieve the count of each error users have encountered in the past 7 days.
WeeklyUsageStatistics Retrieve the number of API calls that specific users have consumed in the past 7 days.

CData JDBC Driver for Marketo

Activities

Retrieve activities of different types after a specific datetime.

Each activity type in your Marketo organization is returned as a separate table. Each table name is prefixed with 'Activities_' followed by the name of the activity type. CustomActivities will have the "_c" postfix to differentiate them.

All activites tables support BULK SELECT when UseBulkAPI is set to true.

Select

By default this view retrieves all activity types from the creation of Marketo.

It is advised to provide a filter for ActivityTypeId and ActivityDateTime or to instead make use of tables such as Activities_Add_to_List, Activities_Add_to_Nurture, Activities_Add_to_Opportunity, etc. which are linked to a specific activity type.

Note: Filters provided with one of the supported operators listed in the "Operators" column are processed server-side, all the other filters are processed client-side.

	SELECT * FROM Activities WHERE ActivityDateTime > '2024-01-01T00:00:00Z'
	SELECT * FROM Activities WHERE ActivityDateTime >=' 2024-01-01T00:00:00Z' AND ActivityDateTime<='2024-03-01T00:00:00Z'
	SELECT * FROM Activities WHERE ListId='1014' AND ActivityDateTime>'2024-01-01T00:00:00Z'
	SELECT * FROM Activities WHERE ListId='1014' AND ActivityTypeId='13'
	SELECT * FROM Activities WHERE ListId='1014' AND ActivityTypeId='13' AND ActivityDateTime >' 2024-01-01T00:00:00Z'
	SELECT * FROM Activities WHERE ActivityTypeId=24
	SELECT * FROM Activities WHERE ActivityTypeId IN (1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 13)

Columns

Name Type Operators Description
MarketoGUID [KEY] String Unique id of the activity.
Id String Integer id of the activity. This value could exceed Int.MAX. For instances which have been migrated to Activity Service, this field may not be present, and should not be treated as unique.
ActivityDateTime Datetime >,>=,=,<,<= Datetime of the activity.
ActivityTypeId Int =,IN Id of the activity type.
LeadId Int =,IN Id of the lead associated to the activity.
CampaignId Int Id of the associated Smart Campaign, if applicable.
PrimaryAttributeValueId Int Id of the primary attribute field.
PrimaryAttributeValue String Value of the primary attribute.
Attributes String JSON aggregate containing the list of attribute key value pair for this activity.
ListId Int = Mirror column that can be used only as a filter. Will retrieve activities for all leads that are members of this static list. Not available when UseBulkAPI=true.

CData JDBC Driver for Marketo

Activities_Add_to_List

Add a person/record to a list

Columns

Name Type Operators Description
MarketoGUID [KEY] String Unique id of the activity.
Id String Integer id of the activity. This value could exceed Int.MAX. For instances which have been migrated to Activity Service, this field may not be present, and should not be treated as unique.
ActivityDateTime Datetime >,>=,=,<,<= Datetime of the activity.
LeadId Int =,IN Id of the lead associated to the activity.
CampaignId Int Id of the associated Smart Campaign, if applicable.
PrimaryAttributeValueId Int Id of the primary attribute field.
PrimaryAttributeValue String Value of the primary attribute.
ListId Int = Mirror column that can be used only as a filter. Will retrieve activities for all leads that are members of this static list. Not available when UseBulkAPI=true.
List_Id String
List_Value String
Source String

CData JDBC Driver for Marketo

Activities_Add_to_Nurture

Add a lead to a nurture program

Columns

Name Type Operators Description
MarketoGUID [KEY] String Unique id of the activity.
Id String Integer id of the activity. This value could exceed Int.MAX. For instances which have been migrated to Activity Service, this field may not be present, and should not be treated as unique.
ActivityDateTime Datetime >,>=,=,<,<= Datetime of the activity.
LeadId Int =,IN Id of the lead associated to the activity.
CampaignId Int Id of the associated Smart Campaign, if applicable.
PrimaryAttributeValueId Int Id of the primary attribute field.
PrimaryAttributeValue String Value of the primary attribute.
ListId Int = Mirror column that can be used only as a filter. Will retrieve activities for all leads that are members of this static list. Not available when UseBulkAPI=true.
Program_Id String
Program_Value String
Track_ID Int
Track_Name String

CData JDBC Driver for Marketo

Activities_Add_to_Opportunity

Add to an Opportunity

Columns

Name Type Operators Description
MarketoGUID [KEY] String Unique id of the activity.
Id String Integer id of the activity. This value could exceed Int.MAX. For instances which have been migrated to Activity Service, this field may not be present, and should not be treated as unique.
ActivityDateTime Datetime >,>=,=,<,<= Datetime of the activity.
LeadId Int =,IN Id of the lead associated to the activity.
CampaignId Int Id of the associated Smart Campaign, if applicable.
PrimaryAttributeValueId Int Id of the primary attribute field.
PrimaryAttributeValue String Value of the primary attribute.
ListId Int = Mirror column that can be used only as a filter. Will retrieve activities for all leads that are members of this static list. Not available when UseBulkAPI=true.
Oppty_Id String
Oppty_Value String
Is_Primary Bool
Role String

CData JDBC Driver for Marketo

Activities_Asks_questions_in_webinar

Lead asks questions in a webinar event

Columns

Name Type Operators Description
MarketoGUID [KEY] String Unique id of the activity.
Id String Integer id of the activity. This value could exceed Int.MAX. For instances which have been migrated to Activity Service, this field may not be present, and should not be treated as unique.
ActivityDateTime Datetime >,>=,=,<,<= Datetime of the activity.
LeadId Int =,IN Id of the lead associated to the activity.
CampaignId Int Id of the associated Smart Campaign, if applicable.
PrimaryAttributeValueId Int Id of the primary attribute field.
PrimaryAttributeValue String Value of the primary attribute.
ListId Int = Mirror column that can be used only as a filter. Will retrieve activities for all leads that are members of this static list. Not available when UseBulkAPI=true.
Program_Id String
Program_Value String
Question String
Question_was_answered Bool

CData JDBC Driver for Marketo

Activities_Asset_downloads_in_webinar

Lead downloads file/asset in a webinar event

Columns

Name Type Operators Description
MarketoGUID [KEY] String Unique id of the activity.
Id String Integer id of the activity. This value could exceed Int.MAX. For instances which have been migrated to Activity Service, this field may not be present, and should not be treated as unique.
ActivityDateTime Datetime >,>=,=,<,<= Datetime of the activity.
LeadId Int =,IN Id of the lead associated to the activity.
CampaignId Int Id of the associated Smart Campaign, if applicable.
PrimaryAttributeValueId Int Id of the primary attribute field.
PrimaryAttributeValue String Value of the primary attribute.
ListId Int = Mirror column that can be used only as a filter. Will retrieve activities for all leads that are members of this static list. Not available when UseBulkAPI=true.
Program_Id String
Program_Value String
Downloaded_asset String

CData JDBC Driver for Marketo

Activities_Call_to_action_clicked_in_webinar

Lead clicks on a Call to Action Link in a webinar event

Columns

Name Type Operators Description
MarketoGUID [KEY] String Unique id of the activity.
Id String Integer id of the activity. This value could exceed Int.MAX. For instances which have been migrated to Activity Service, this field may not be present, and should not be treated as unique.
ActivityDateTime Datetime >,>=,=,<,<= Datetime of the activity.
LeadId Int =,IN Id of the lead associated to the activity.
CampaignId Int Id of the associated Smart Campaign, if applicable.
PrimaryAttributeValueId Int Id of the primary attribute field.
PrimaryAttributeValue String Value of the primary attribute.
ListId Int = Mirror column that can be used only as a filter. Will retrieve activities for all leads that are members of this static list. Not available when UseBulkAPI=true.
Program_Id String
Program_Value String
Link_clicked String

CData JDBC Driver for Marketo

Activities_Call_Webhook

Call a Webhook

Columns

Name Type Operators Description
MarketoGUID [KEY] String Unique id of the activity.
Id String Integer id of the activity. This value could exceed Int.MAX. For instances which have been migrated to Activity Service, this field may not be present, and should not be treated as unique.
ActivityDateTime Datetime >,>=,=,<,<= Datetime of the activity.
LeadId Int =,IN Id of the lead associated to the activity.
CampaignId Int Id of the associated Smart Campaign, if applicable.
PrimaryAttributeValueId Int Id of the primary attribute field.
PrimaryAttributeValue String Value of the primary attribute.
ListId Int = Mirror column that can be used only as a filter. Will retrieve activities for all leads that are members of this static list. Not available when UseBulkAPI=true.
Webhook_Id String
Webhook_Value String
Error_Type Int
Response String

CData JDBC Driver for Marketo

Activities_Change_Data_Value

Changed attribute value for a person/record

Columns

Name Type Operators Description
MarketoGUID [KEY] String Unique id of the activity.
Id String Integer id of the activity. This value could exceed Int.MAX. For instances which have been migrated to Activity Service, this field may not be present, and should not be treated as unique.
ActivityDateTime Datetime >,>=,=,<,<= Datetime of the activity.
LeadId Int =,IN Id of the lead associated to the activity.
CampaignId Int Id of the associated Smart Campaign, if applicable.
PrimaryAttributeValueId Int Id of the primary attribute field.
PrimaryAttributeValue String Value of the primary attribute.
ListId Int = Mirror column that can be used only as a filter. Will retrieve activities for all leads that are members of this static list. Not available when UseBulkAPI=true.
Attribute_Name_Id String
Attribute_Name_Value String
New_Value String
Old_Value String
Reason String
Source String
API_Method_Name String
Modifying_User String
Request_Id String

CData JDBC Driver for Marketo

Activities_Change_Lead_Partition

Lead partition is changed for a lead

Columns

Name Type Operators Description
MarketoGUID [KEY] String Unique id of the activity.
Id String Integer id of the activity. This value could exceed Int.MAX. For instances which have been migrated to Activity Service, this field may not be present, and should not be treated as unique.
ActivityDateTime Datetime >,>=,=,<,<= Datetime of the activity.
LeadId Int =,IN Id of the lead associated to the activity.
CampaignId Int Id of the associated Smart Campaign, if applicable.
PrimaryAttributeValueId Int Id of the primary attribute field.
PrimaryAttributeValue String Value of the primary attribute.
ListId Int = Mirror column that can be used only as a filter. Will retrieve activities for all leads that are members of this static list. Not available when UseBulkAPI=true.
New_Partition_Id String
New_Partition_Value String
Old_Partition_ID Int
Reason String

CData JDBC Driver for Marketo

Activities_Change_Nurture_Cadence

Change the nurture cadence for a lead

Columns

Name Type Operators Description
MarketoGUID [KEY] String Unique id of the activity.
Id String Integer id of the activity. This value could exceed Int.MAX. For instances which have been migrated to Activity Service, this field may not be present, and should not be treated as unique.
ActivityDateTime Datetime >,>=,=,<,<= Datetime of the activity.
LeadId Int =,IN Id of the lead associated to the activity.
CampaignId Int Id of the associated Smart Campaign, if applicable.
PrimaryAttributeValueId Int Id of the primary attribute field.
PrimaryAttributeValue String Value of the primary attribute.
ListId Int = Mirror column that can be used only as a filter. Will retrieve activities for all leads that are members of this static list. Not available when UseBulkAPI=true.
Program_Id String
Program_Value String
New_Nurture_Cadence String
Previous_Nurture_Cadence String

CData JDBC Driver for Marketo

Activities_Change_Nurture_Track

Change the nurture track for a lead

Columns

Name Type Operators Description
MarketoGUID [KEY] String Unique id of the activity.
Id String Integer id of the activity. This value could exceed Int.MAX. For instances which have been migrated to Activity Service, this field may not be present, and should not be treated as unique.
ActivityDateTime Datetime >,>=,=,<,<= Datetime of the activity.
LeadId Int =,IN Id of the lead associated to the activity.
CampaignId Int Id of the associated Smart Campaign, if applicable.
PrimaryAttributeValueId Int Id of the primary attribute field.
PrimaryAttributeValue String Value of the primary attribute.
ListId Int = Mirror column that can be used only as a filter. Will retrieve activities for all leads that are members of this static list. Not available when UseBulkAPI=true.
Program_Id String
Program_Value String
New_Track_ID Int
Previous_Track_ID Int
Track_Name String
Previous_Track_Name String

CData JDBC Driver for Marketo

Activities_Change_Program_Member_Data

Change Program Member Data

Columns

Name Type Operators Description
MarketoGUID [KEY] String Unique id of the activity.
Id String Integer id of the activity. This value could exceed Int.MAX. For instances which have been migrated to Activity Service, this field may not be present, and should not be treated as unique.
ActivityDateTime Datetime >,>=,=,<,<= Datetime of the activity.
LeadId Int =,IN Id of the lead associated to the activity.
CampaignId Int Id of the associated Smart Campaign, if applicable.
PrimaryAttributeValueId Int Id of the primary attribute field.
PrimaryAttributeValue String Value of the primary attribute.
ListId Int = Mirror column that can be used only as a filter. Will retrieve activities for all leads that are members of this static list. Not available when UseBulkAPI=true.
Program_Id String
Program_Value String
Attribute_Name Int
New_Value String
Old_Value String
Reason String
Source String
Attribute_Display_Name String

CData JDBC Driver for Marketo

Activities_Change_Revenue_Stage

Modify the value of a revenue stage field

Columns

Name Type Operators Description
MarketoGUID [KEY] String Unique id of the activity.
Id String Integer id of the activity. This value could exceed Int.MAX. For instances which have been migrated to Activity Service, this field may not be present, and should not be treated as unique.
ActivityDateTime Datetime >,>=,=,<,<= Datetime of the activity.
LeadId Int =,IN Id of the lead associated to the activity.
CampaignId Int Id of the associated Smart Campaign, if applicable.
PrimaryAttributeValueId Int Id of the primary attribute field.
PrimaryAttributeValue String Value of the primary attribute.
ListId Int = Mirror column that can be used only as a filter. Will retrieve activities for all leads that are members of this static list. Not available when UseBulkAPI=true.
Model_Id String
Model_Value String
New_Stage_ID Int
Old_Stage_ID Int
SLA_Expiration Datetime
Reason String
New_Stage String
Old_Stage String

CData JDBC Driver for Marketo

Activities_Change_Revenue_Stage_Manually

Revenue stage is changed manually (e.g. Lead Database or Salesforce)

Columns

Name Type Operators Description
MarketoGUID [KEY] String Unique id of the activity.
Id String Integer id of the activity. This value could exceed Int.MAX. For instances which have been migrated to Activity Service, this field may not be present, and should not be treated as unique.
ActivityDateTime Datetime >,>=,=,<,<= Datetime of the activity.
LeadId Int =,IN Id of the lead associated to the activity.
CampaignId Int Id of the associated Smart Campaign, if applicable.
PrimaryAttributeValueId Int Id of the primary attribute field.
PrimaryAttributeValue String Value of the primary attribute.
ListId Int = Mirror column that can be used only as a filter. Will retrieve activities for all leads that are members of this static list. Not available when UseBulkAPI=true.

CData JDBC Driver for Marketo

Activities_Change_Score

Modify the value of a score field

Columns

Name Type Operators Description
MarketoGUID [KEY] String Unique id of the activity.
Id String Integer id of the activity. This value could exceed Int.MAX. For instances which have been migrated to Activity Service, this field may not be present, and should not be treated as unique.
ActivityDateTime Datetime >,>=,=,<,<= Datetime of the activity.
LeadId Int =,IN Id of the lead associated to the activity.
CampaignId Int Id of the associated Smart Campaign, if applicable.
PrimaryAttributeValueId Int Id of the primary attribute field.
PrimaryAttributeValue String Value of the primary attribute.
ListId Int = Mirror column that can be used only as a filter. Will retrieve activities for all leads that are members of this static list. Not available when UseBulkAPI=true.
Score_Name_Id String
Score_Name_Value String
Change_Value String
New_Value Int
Old_Value Int
Reason String

CData JDBC Driver for Marketo

Activities_Change_Segment

Change segment (within a segmentation) for a lead

Columns

Name Type Operators Description
MarketoGUID [KEY] String Unique id of the activity.
Id String Integer id of the activity. This value could exceed Int.MAX. For instances which have been migrated to Activity Service, this field may not be present, and should not be treated as unique.
ActivityDateTime Datetime >,>=,=,<,<= Datetime of the activity.
LeadId Int =,IN Id of the lead associated to the activity.
CampaignId Int Id of the associated Smart Campaign, if applicable.
PrimaryAttributeValueId Int Id of the primary attribute field.
PrimaryAttributeValue String Value of the primary attribute.
ListId Int = Mirror column that can be used only as a filter. Will retrieve activities for all leads that are members of this static list. Not available when UseBulkAPI=true.
Segmentation_Id String
Segmentation_Value String
New_Segment_ID Int

CData JDBC Driver for Marketo

Activities_Change_Status_in_Progression

Change a Status in an program progression

Columns

Name Type Operators Description
MarketoGUID [KEY] String Unique id of the activity.
Id String Integer id of the activity. This value could exceed Int.MAX. For instances which have been migrated to Activity Service, this field may not be present, and should not be treated as unique.
ActivityDateTime Datetime >,>=,=,<,<= Datetime of the activity.
LeadId Int =,IN Id of the lead associated to the activity.
CampaignId Int Id of the associated Smart Campaign, if applicable.
PrimaryAttributeValueId Int Id of the primary attribute field.
PrimaryAttributeValue String Value of the primary attribute.
ListId Int = Mirror column that can be used only as a filter. Will retrieve activities for all leads that are members of this static list. Not available when UseBulkAPI=true.
Program_Id String
Program_Value String
New_Status_ID Int
Old_Status_ID Int
Reason String
Acquired_By Bool
Success Bool
Program_Member_ID Int
Reached_Success_Date Datetime
Status_Reason String
Webinar_URL String
Registration_Code String
New_Status String
Old_Status String

CData JDBC Driver for Marketo

Activities_Click_Email

User clicks on a link in a Marketo Email

Columns

Name Type Operators Description
MarketoGUID [KEY] String Unique id of the activity.
Id String Integer id of the activity. This value could exceed Int.MAX. For instances which have been migrated to Activity Service, this field may not be present, and should not be treated as unique.
ActivityDateTime Datetime >,>=,=,<,<= Datetime of the activity.
LeadId Int =,IN Id of the lead associated to the activity.
CampaignId Int Id of the associated Smart Campaign, if applicable.
PrimaryAttributeValueId Int Id of the primary attribute field.
PrimaryAttributeValue String Value of the primary attribute.
ListId Int = Mirror column that can be used only as a filter. Will retrieve activities for all leads that are members of this static list. Not available when UseBulkAPI=true.
Mailing_Id String
Mailing_Value String
Step_ID Int
Choice_Number Int
Link String
Test_Variant Int
Link_ID String
Is_Mobile_Device Bool
Device String
Platform String
User_Agent String
Campaign_Run_ID Int
Is_Predictive Bool
Is_Bot_Activity Bool
Bot_Activity_Pattern String
Browser String

CData JDBC Driver for Marketo

Activities_Click_Link

CData JDBC Driver for Marketo

Activities_Click_Sales_Email

User clicks on a link in a sales Email

Columns

Name Type Operators Description
MarketoGUID [KEY] String Unique id of the activity.
Id String Integer id of the activity. This value could exceed Int.MAX. For instances which have been migrated to Activity Service, this field may not be present, and should not be treated as unique.
ActivityDateTime Datetime >,>=,=,<,<= Datetime of the activity.
LeadId Int =,IN Id of the lead associated to the activity.
CampaignId Int Id of the associated Smart Campaign, if applicable.
PrimaryAttributeValueId Int Id of the primary attribute field.
PrimaryAttributeValue String Value of the primary attribute.
ListId Int = Mirror column that can be used only as a filter. Will retrieve activities for all leads that are members of this static list. Not available when UseBulkAPI=true.
Artifact_Id String
Artifact_Value String
Sent_by String
Link String
Template_ID Int
Campaign_Run_ID Int
Is_Predictive Bool
Source String
Sales_Template_URL String
Sales_Campaign_URL String
Sales_Template_Name String
Sales_Campaign_Name String
Marketo_Sales_Person_ID Int
Sales_Email_URL String
Is_Bot_Activity Bool
Bot_Activity_Pattern String

CData JDBC Driver for Marketo

Activities_Create_Buying_Group

Create Buying Group

Columns

Name Type Operators Description
MarketoGUID [KEY] String Unique id of the activity.
Id String Integer id of the activity. This value could exceed Int.MAX. For instances which have been migrated to Activity Service, this field may not be present, and should not be treated as unique.
ActivityDateTime Datetime >,>=,=,<,<= Datetime of the activity.
LeadId Int =,IN Id of the lead associated to the activity.
CampaignId Int Id of the associated Smart Campaign, if applicable.
PrimaryAttributeValueId Int Id of the primary attribute field.
PrimaryAttributeValue String Value of the primary attribute.
ListId Int = Mirror column that can be used only as a filter. Will retrieve activities for all leads that are members of this static list. Not available when UseBulkAPI=true.
Buying_Group_Id Int
Buying_Group_Template_Id Int
Solution_Interest_Id Int
Marketo_GUID Int

CData JDBC Driver for Marketo

Activities_Delete_Lead

Delete lead from Marketo database

Columns

Name Type Operators Description
MarketoGUID [KEY] String Unique id of the activity.
Id String Integer id of the activity. This value could exceed Int.MAX. For instances which have been migrated to Activity Service, this field may not be present, and should not be treated as unique.
ActivityDateTime Datetime >,>=,=,<,<= Datetime of the activity.
LeadId Int =,IN Id of the lead associated to the activity.
CampaignId Int Id of the associated Smart Campaign, if applicable.
PrimaryAttributeValueId Int Id of the primary attribute field.
PrimaryAttributeValue String Value of the primary attribute.
ListId Int = Mirror column that can be used only as a filter. Will retrieve activities for all leads that are members of this static list. Not available when UseBulkAPI=true.
Lead_Id String
Lead_Value String
Remove_from_CRM Bool
API_Method_Name String
Modifying_User String
Request_Id String

CData JDBC Driver for Marketo

Activities_Email_Bounced

Marketo Email is bounced for a lead

Columns

Name Type Operators Description
MarketoGUID [KEY] String Unique id of the activity.
Id String Integer id of the activity. This value could exceed Int.MAX. For instances which have been migrated to Activity Service, this field may not be present, and should not be treated as unique.
ActivityDateTime Datetime >,>=,=,<,<= Datetime of the activity.
LeadId Int =,IN Id of the lead associated to the activity.
CampaignId Int Id of the associated Smart Campaign, if applicable.
PrimaryAttributeValueId Int Id of the primary attribute field.
PrimaryAttributeValue String Value of the primary attribute.
ListId Int = Mirror column that can be used only as a filter. Will retrieve activities for all leads that are members of this static list. Not available when UseBulkAPI=true.
Mailing_Id String
Mailing_Value String
Step_ID Int
Choice_Number Int
Category String
Details String
Subcategory String
Email String
Test_Variant Int
Campaign_Run_ID Int
Has_Predictive Bool
Browser String
Platform String
Device String
User_Agent String

CData JDBC Driver for Marketo

Activities_Email_Bounced_Soft

Campaign Email is bounced soft for a lead

Columns

Name Type Operators Description
MarketoGUID [KEY] String Unique id of the activity.
Id String Integer id of the activity. This value could exceed Int.MAX. For instances which have been migrated to Activity Service, this field may not be present, and should not be treated as unique.
ActivityDateTime Datetime >,>=,=,<,<= Datetime of the activity.
LeadId Int =,IN Id of the lead associated to the activity.
CampaignId Int Id of the associated Smart Campaign, if applicable.
PrimaryAttributeValueId Int Id of the primary attribute field.
PrimaryAttributeValue String Value of the primary attribute.
ListId Int = Mirror column that can be used only as a filter. Will retrieve activities for all leads that are members of this static list. Not available when UseBulkAPI=true.
Mailing_Id String
Mailing_Value String
Step_ID Int
Choice_Number Int
Category String
Details String
Subcategory String
Email String
Test_Variant Int
Campaign_Run_ID Int
Has_Predictive Bool
Browser String
Platform String
Device String
User_Agent String

CData JDBC Driver for Marketo

Activities_Email_Delivered

Marketo Email is delivered to a lead/contact

Columns

Name Type Operators Description
MarketoGUID [KEY] String Unique id of the activity.
Id String Integer id of the activity. This value could exceed Int.MAX. For instances which have been migrated to Activity Service, this field may not be present, and should not be treated as unique.
ActivityDateTime Datetime >,>=,=,<,<= Datetime of the activity.
LeadId Int =,IN Id of the lead associated to the activity.
CampaignId Int Id of the associated Smart Campaign, if applicable.
PrimaryAttributeValueId Int Id of the primary attribute field.
PrimaryAttributeValue String Value of the primary attribute.
ListId Int = Mirror column that can be used only as a filter. Will retrieve activities for all leads that are members of this static list. Not available when UseBulkAPI=true.
Mailing_Id String
Mailing_Value String
Step_ID Int
Choice_Number Int
Test_Variant Int
Campaign_Run_ID Int
Has_Predictive Bool
Browser String
Platform String
Device String
User_Agent String

CData JDBC Driver for Marketo

Activities_Engaged_with_an_Agent_in_Conversational_Flow

Lead engages with an Agent in Dynamic Chat conversational flow

Columns

Name Type Operators Description
MarketoGUID [KEY] String Unique id of the activity.
Id String Integer id of the activity. This value could exceed Int.MAX. For instances which have been migrated to Activity Service, this field may not be present, and should not be treated as unique.
ActivityDateTime Datetime >,>=,=,<,<= Datetime of the activity.
LeadId Int =,IN Id of the lead associated to the activity.
CampaignId Int Id of the associated Smart Campaign, if applicable.
PrimaryAttributeValueId Int Id of the primary attribute field.
PrimaryAttributeValue String Value of the primary attribute.
ListId Int = Mirror column that can be used only as a filter. Will retrieve activities for all leads that are members of this static list. Not available when UseBulkAPI=true.
Conversational_Flow_Id String
Conversational_Flow_Value String
Conversational_Flow_Name String
Lead_ID String
Page_URL String
Agent_ID Int
Agent_Email String
Agent_Name String
Routing_Queue_ID Int
Routing_Queue_Type String
Routing_Queue_Name String
Conversation_Transcript String
Conversation_Summary String
Conversation_Status String
Discussed_Topics String

CData JDBC Driver for Marketo

Activities_Engaged_with_an_Agent_in_Dialogue

Lead engages with an Agent in Dynamic Chat dialogue

Columns

Name Type Operators Description
MarketoGUID [KEY] String Unique id of the activity.
Id String Integer id of the activity. This value could exceed Int.MAX. For instances which have been migrated to Activity Service, this field may not be present, and should not be treated as unique.
ActivityDateTime Datetime >,>=,=,<,<= Datetime of the activity.
LeadId Int =,IN Id of the lead associated to the activity.
CampaignId Int Id of the associated Smart Campaign, if applicable.
PrimaryAttributeValueId Int Id of the primary attribute field.
PrimaryAttributeValue String Value of the primary attribute.
ListId Int = Mirror column that can be used only as a filter. Will retrieve activities for all leads that are members of this static list. Not available when UseBulkAPI=true.
Dialogue_Id String
Dialogue_Value String
Dialogue_Name String
Lead_ID String
Page_URL String
Agent_ID Int
Agent_Email String
Agent_Name String
Routing_Queue_ID Int
Routing_Queue_Type String
Routing_Queue_Name String
Conversation_Transcript String
Conversation_Summary String
Conversation_Status String
Discussed_Topics String

CData JDBC Driver for Marketo

Activities_Engaged_with_a_Conversational_Flow

Lead engages with Dynamic Chat conversational flow

Columns

Name Type Operators Description
MarketoGUID [KEY] String Unique id of the activity.
Id String Integer id of the activity. This value could exceed Int.MAX. For instances which have been migrated to Activity Service, this field may not be present, and should not be treated as unique.
ActivityDateTime Datetime >,>=,=,<,<= Datetime of the activity.
LeadId Int =,IN Id of the lead associated to the activity.
CampaignId Int Id of the associated Smart Campaign, if applicable.
PrimaryAttributeValueId Int Id of the primary attribute field.
PrimaryAttributeValue String Value of the primary attribute.
ListId Int = Mirror column that can be used only as a filter. Will retrieve activities for all leads that are members of this static list. Not available when UseBulkAPI=true.
Conversational_Flow_Id String
Conversational_Flow_Value String
Conversational_Flow_Name String
Page_URL String
Conversation_Status String
Conversation_Transcript String
Conversation_Summary String
Source_Type String
Source_Name String
Interacted_UI_Type String
Language String
Workspace String
Discussed_Topics String

CData JDBC Driver for Marketo

Activities_Engaged_with_a_Dialogue

Lead engages with Dynamic Chat dialogue

Columns

Name Type Operators Description
MarketoGUID [KEY] String Unique id of the activity.
Id String Integer id of the activity. This value could exceed Int.MAX. For instances which have been migrated to Activity Service, this field may not be present, and should not be treated as unique.
ActivityDateTime Datetime >,>=,=,<,<= Datetime of the activity.
LeadId Int =,IN Id of the lead associated to the activity.
CampaignId Int Id of the associated Smart Campaign, if applicable.
PrimaryAttributeValueId Int Id of the primary attribute field.
PrimaryAttributeValue String Value of the primary attribute.
ListId Int = Mirror column that can be used only as a filter. Will retrieve activities for all leads that are members of this static list. Not available when UseBulkAPI=true.
Dialogue_Id String
Dialogue_Value String
Dialogue_Name String
Page_URL String
Conversation_Status String
Conversation_Transcript String
Conversation_Summary String
Language String
Workspace String
Discussed_Topics String

CData JDBC Driver for Marketo

Activities_Execute_Campaign

Invoke an executable campaign

Columns

Name Type Operators Description
MarketoGUID [KEY] String Unique id of the activity.
Id String Integer id of the activity. This value could exceed Int.MAX. For instances which have been migrated to Activity Service, this field may not be present, and should not be treated as unique.
ActivityDateTime Datetime >,>=,=,<,<= Datetime of the activity.
LeadId Int =,IN Id of the lead associated to the activity.
CampaignId Int Id of the associated Smart Campaign, if applicable.
PrimaryAttributeValueId Int Id of the primary attribute field.
PrimaryAttributeValue String Value of the primary attribute.
ListId Int = Mirror column that can be used only as a filter. Will retrieve activities for all leads that are members of this static list. Not available when UseBulkAPI=true.
Campaign_Id String
Campaign_Value String
Qualified Bool
Used_Parent_Campaign_Token_Context Bool
Token_Context_Campaign_ID Int

CData JDBC Driver for Marketo

Activities_Fill_Out_Form

User fills out and submits a form on web page

Columns

Name Type Operators Description
MarketoGUID [KEY] String Unique id of the activity.
Id String Integer id of the activity. This value could exceed Int.MAX. For instances which have been migrated to Activity Service, this field may not be present, and should not be treated as unique.
ActivityDateTime Datetime >,>=,=,<,<= Datetime of the activity.
LeadId Int =,IN Id of the lead associated to the activity.
CampaignId Int Id of the associated Smart Campaign, if applicable.
PrimaryAttributeValueId Int Id of the primary attribute field.
PrimaryAttributeValue String Value of the primary attribute.
ListId Int = Mirror column that can be used only as a filter. Will retrieve activities for all leads that are members of this static list. Not available when UseBulkAPI=true.
Webform_Id String
Webform_Value String
Form_Fields String
Webpage_ID Int
Query_Parameters String
Client_IP_Address String
Referrer_URL String
User_Agent String
Browser String
Platform String
Device String

CData JDBC Driver for Marketo

Activities_Has_attended_event

Has attended event

Columns

Name Type Operators Description
MarketoGUID [KEY] String Unique id of the activity.
Id String Integer id of the activity. This value could exceed Int.MAX. For instances which have been migrated to Activity Service, this field may not be present, and should not be treated as unique.
ActivityDateTime Datetime >,>=,=,<,<= Datetime of the activity.
LeadId Int =,IN Id of the lead associated to the activity.
CampaignId Int Id of the associated Smart Campaign, if applicable.
PrimaryAttributeValueId Int Id of the primary attribute field.
PrimaryAttributeValue String Value of the primary attribute.
ListId Int = Mirror column that can be used only as a filter. Will retrieve activities for all leads that are members of this static list. Not available when UseBulkAPI=true.
Program_Id String
Program_Value String
Number_of_poll_responses Int
Number_of_answered_questions Int
Number_of_unanswered_questions Int
Live_watch_time_by_percent Int
Number_of_CTAs_clicked Int
Number_of_assets_downloaded Int
Event_Mode String
Watch_duration_in_minutes Int
Watched_Date Datetime

CData JDBC Driver for Marketo

Activities_Interacted_with_Document_in_Conversational_Flow

Lead interacts with a document in Dynamic Chat conversational flow

Columns

Name Type Operators Description
MarketoGUID [KEY] String Unique id of the activity.
Id String Integer id of the activity. This value could exceed Int.MAX. For instances which have been migrated to Activity Service, this field may not be present, and should not be treated as unique.
ActivityDateTime Datetime >,>=,=,<,<= Datetime of the activity.
LeadId Int =,IN Id of the lead associated to the activity.
CampaignId Int Id of the associated Smart Campaign, if applicable.
PrimaryAttributeValueId Int Id of the primary attribute field.
PrimaryAttributeValue String Value of the primary attribute.
ListId Int = Mirror column that can be used only as a filter. Will retrieve activities for all leads that are members of this static list. Not available when UseBulkAPI=true.
Document_Id String
Document_Value String
Document_Name String
Document_URL String
Conversational_Flow_ID Int
Conversational_Flow_Name String
Page_URL String
Document_Opened Bool
Document_Downloaded Bool
Search_Terms String
Language String
Workspace String

CData JDBC Driver for Marketo

Activities_Interacted_with_Document_in_Dialogue

Lead interacts with a document in Dynamic Chat dialogue

Columns

Name Type Operators Description
MarketoGUID [KEY] String Unique id of the activity.
Id String Integer id of the activity. This value could exceed Int.MAX. For instances which have been migrated to Activity Service, this field may not be present, and should not be treated as unique.
ActivityDateTime Datetime >,>=,=,<,<= Datetime of the activity.
LeadId Int =,IN Id of the lead associated to the activity.
CampaignId Int Id of the associated Smart Campaign, if applicable.
PrimaryAttributeValueId Int Id of the primary attribute field.
PrimaryAttributeValue String Value of the primary attribute.
ListId Int = Mirror column that can be used only as a filter. Will retrieve activities for all leads that are members of this static list. Not available when UseBulkAPI=true.
Document_Id String
Document_Value String
Document_Name String
Document_URL String
Dialogue_ID Int
Dialogue_Name String
Page_URL String
Document_Opened Bool
Document_Downloaded Bool
Search_Terms String
Language String
Workspace String

CData JDBC Driver for Marketo

Activities_Merge_Leads

Merge two or more leads into a single record

Columns

Name Type Operators Description
MarketoGUID [KEY] String Unique id of the activity.
Id String Integer id of the activity. This value could exceed Int.MAX. For instances which have been migrated to Activity Service, this field may not be present, and should not be treated as unique.
ActivityDateTime Datetime >,>=,=,<,<= Datetime of the activity.
LeadId Int =,IN Id of the lead associated to the activity.
CampaignId Int Id of the associated Smart Campaign, if applicable.
PrimaryAttributeValueId Int Id of the primary attribute field.
PrimaryAttributeValue String Value of the primary attribute.
ListId Int = Mirror column that can be used only as a filter. Will retrieve activities for all leads that are members of this static list. Not available when UseBulkAPI=true.
Lead_Id String
Lead_Value String
Merge_IDs String
Master_Updated Bool
Merged_in_Sales Bool
Merge_Source String
API_Method_Name String
Modifying_User String
Request_Id String

CData JDBC Driver for Marketo

Activities_New_Lead

New person/record is added to the lead database

Columns

Name Type Operators Description
MarketoGUID [KEY] String Unique id of the activity.
Id String Integer id of the activity. This value could exceed Int.MAX. For instances which have been migrated to Activity Service, this field may not be present, and should not be treated as unique.
ActivityDateTime Datetime >,>=,=,<,<= Datetime of the activity.
LeadId Int =,IN Id of the lead associated to the activity.
CampaignId Int Id of the associated Smart Campaign, if applicable.
PrimaryAttributeValueId Int Id of the primary attribute field.
PrimaryAttributeValue String Value of the primary attribute.
ListId Int = Mirror column that can be used only as a filter. Will retrieve activities for all leads that are members of this static list. Not available when UseBulkAPI=true.
Source_Type String
Form_Name String
List_Name String
SFDC_Type String
Lead_Source String
Created_Date Date
API_Method_Name String
Modifying_User String
Request_Id String

CData JDBC Driver for Marketo

Activities_Open_Email

User opens Marketo Email

Columns

Name Type Operators Description
MarketoGUID [KEY] String Unique id of the activity.
Id String Integer id of the activity. This value could exceed Int.MAX. For instances which have been migrated to Activity Service, this field may not be present, and should not be treated as unique.
ActivityDateTime Datetime >,>=,=,<,<= Datetime of the activity.
LeadId Int =,IN Id of the lead associated to the activity.
CampaignId Int Id of the associated Smart Campaign, if applicable.
PrimaryAttributeValueId Int Id of the primary attribute field.
PrimaryAttributeValue String Value of the primary attribute.
ListId Int = Mirror column that can be used only as a filter. Will retrieve activities for all leads that are members of this static list. Not available when UseBulkAPI=true.
Mailing_Id String
Mailing_Value String
Step_ID Int
Choice_Number Int
Test_Variant Int
Is_Mobile_Device Bool
Device String
Platform String
User_Agent String
Campaign_Run_ID Int
Has_Predictive Bool
Is_Bot_Activity Bool
Bot_Activity_Pattern String
Browser String

CData JDBC Driver for Marketo

Activities_Open_Sales_Email

User opens a sales Email

Columns

Name Type Operators Description
MarketoGUID [KEY] String Unique id of the activity.
Id String Integer id of the activity. This value could exceed Int.MAX. For instances which have been migrated to Activity Service, this field may not be present, and should not be treated as unique.
ActivityDateTime Datetime >,>=,=,<,<= Datetime of the activity.
LeadId Int =,IN Id of the lead associated to the activity.
CampaignId Int Id of the associated Smart Campaign, if applicable.
PrimaryAttributeValueId Int Id of the primary attribute field.
PrimaryAttributeValue String Value of the primary attribute.
ListId Int = Mirror column that can be used only as a filter. Will retrieve activities for all leads that are members of this static list. Not available when UseBulkAPI=true.
Artifact_Id String
Artifact_Value String
Sent_by String
Template_ID Int
Campaign_Run_ID Int
Has_Predictive Bool
Source String
Sales_Template_URL String
Sales_Campaign_URL String
Sales_Template_Name String
Sales_Campaign_Name String
Marketo_Sales_Person_ID Int
Sales_Email_URL String
Is_Bot_Activity Bool
Bot_Activity_Pattern String

CData JDBC Driver for Marketo

Activities_Push_Lead_to_Marketo

Push leads to Marketo

Columns

Name Type Operators Description
MarketoGUID [KEY] String Unique id of the activity.
Id String Integer id of the activity. This value could exceed Int.MAX. For instances which have been migrated to Activity Service, this field may not be present, and should not be treated as unique.
ActivityDateTime Datetime >,>=,=,<,<= Datetime of the activity.
LeadId Int =,IN Id of the lead associated to the activity.
CampaignId Int Id of the associated Smart Campaign, if applicable.
PrimaryAttributeValueId Int Id of the primary attribute field.
PrimaryAttributeValue String Value of the primary attribute.
ListId Int = Mirror column that can be used only as a filter. Will retrieve activities for all leads that are members of this static list. Not available when UseBulkAPI=true.
Program_Id String
Program_Value String
Source String
Reason String
API_Method_Name String
Modifying_User String
Request_Id String

CData JDBC Driver for Marketo

Activities_Reached_Conversational_Flow_Goal

Lead reaches a goal in Dynamic Chat conversational flow

Columns

Name Type Operators Description
MarketoGUID [KEY] String Unique id of the activity.
Id String Integer id of the activity. This value could exceed Int.MAX. For instances which have been migrated to Activity Service, this field may not be present, and should not be treated as unique.
ActivityDateTime Datetime >,>=,=,<,<= Datetime of the activity.
LeadId Int =,IN Id of the lead associated to the activity.
CampaignId Int Id of the associated Smart Campaign, if applicable.
PrimaryAttributeValueId Int Id of the primary attribute field.
PrimaryAttributeValue String Value of the primary attribute.
ListId Int = Mirror column that can be used only as a filter. Will retrieve activities for all leads that are members of this static list. Not available when UseBulkAPI=true.
Conversational_Flow_Id String
Conversational_Flow_Value String
Goal_Name String
Conversational_Flow_Name String
Page_URL String
Language String
Workspace String

CData JDBC Driver for Marketo

Activities_Reached_Dialogue_Goal

Lead reaches a goal in Dynamic Chat dialogue

Columns

Name Type Operators Description
MarketoGUID [KEY] String Unique id of the activity.
Id String Integer id of the activity. This value could exceed Int.MAX. For instances which have been migrated to Activity Service, this field may not be present, and should not be treated as unique.
ActivityDateTime Datetime >,>=,=,<,<= Datetime of the activity.
LeadId Int =,IN Id of the lead associated to the activity.
CampaignId Int Id of the associated Smart Campaign, if applicable.
PrimaryAttributeValueId Int Id of the primary attribute field.
PrimaryAttributeValue String Value of the primary attribute.
ListId Int = Mirror column that can be used only as a filter. Will retrieve activities for all leads that are members of this static list. Not available when UseBulkAPI=true.
Dialogue_Id String
Dialogue_Value String
Goal_Name String
Page_URL String
Dialogue_Name String
Language String
Workspace String

CData JDBC Driver for Marketo

Activities_Received_Forward_to_Friend_Email

User receives forwarded Email from friend

Columns

Name Type Operators Description
MarketoGUID [KEY] String Unique id of the activity.
Id String Integer id of the activity. This value could exceed Int.MAX. For instances which have been migrated to Activity Service, this field may not be present, and should not be treated as unique.
ActivityDateTime Datetime >,>=,=,<,<= Datetime of the activity.
LeadId Int =,IN Id of the lead associated to the activity.
CampaignId Int Id of the associated Smart Campaign, if applicable.
PrimaryAttributeValueId Int Id of the primary attribute field.
PrimaryAttributeValue String Value of the primary attribute.
ListId Int = Mirror column that can be used only as a filter. Will retrieve activities for all leads that are members of this static list. Not available when UseBulkAPI=true.
Mailing_Id String
Mailing_Value String
Step_ID Int
Choice_Number Int
Lead_ID String

CData JDBC Driver for Marketo

Activities_Receive_Sales_Email

Receive Email using Sales View (Outlook Plugin)

Columns

Name Type Operators Description
MarketoGUID [KEY] String Unique id of the activity.
Id String Integer id of the activity. This value could exceed Int.MAX. For instances which have been migrated to Activity Service, this field may not be present, and should not be treated as unique.
ActivityDateTime Datetime >,>=,=,<,<= Datetime of the activity.
LeadId Int =,IN Id of the lead associated to the activity.
CampaignId Int Id of the associated Smart Campaign, if applicable.
PrimaryAttributeValueId Int Id of the primary attribute field.
PrimaryAttributeValue String Value of the primary attribute.
ListId Int = Mirror column that can be used only as a filter. Will retrieve activities for all leads that are members of this static list. Not available when UseBulkAPI=true.
Artifact_Id String
Artifact_Value String
Received_by String
Source String

CData JDBC Driver for Marketo

Activities_Remove_from_List

Remove this lead from a list

Columns

Name Type Operators Description
MarketoGUID [KEY] String Unique id of the activity.
Id String Integer id of the activity. This value could exceed Int.MAX. For instances which have been migrated to Activity Service, this field may not be present, and should not be treated as unique.
ActivityDateTime Datetime >,>=,=,<,<= Datetime of the activity.
LeadId Int =,IN Id of the lead associated to the activity.
CampaignId Int Id of the associated Smart Campaign, if applicable.
PrimaryAttributeValueId Int Id of the primary attribute field.
PrimaryAttributeValue String Value of the primary attribute.
ListId Int = Mirror column that can be used only as a filter. Will retrieve activities for all leads that are members of this static list. Not available when UseBulkAPI=true.
List_Id String
List_Value String
Source String

CData JDBC Driver for Marketo

Activities_Remove_from_Opportunity

Remove from an Opportunity

Columns

Name Type Operators Description
MarketoGUID [KEY] String Unique id of the activity.
Id String Integer id of the activity. This value could exceed Int.MAX. For instances which have been migrated to Activity Service, this field may not be present, and should not be treated as unique.
ActivityDateTime Datetime >,>=,=,<,<= Datetime of the activity.
LeadId Int =,IN Id of the lead associated to the activity.
CampaignId Int Id of the associated Smart Campaign, if applicable.
PrimaryAttributeValueId Int Id of the primary attribute field.
PrimaryAttributeValue String Value of the primary attribute.
ListId Int = Mirror column that can be used only as a filter. Will retrieve activities for all leads that are members of this static list. Not available when UseBulkAPI=true.
Oppty_Id String
Oppty_Value String
Is_Primary Bool
Role String

CData JDBC Driver for Marketo

Activities_Reply_to_Sales_Email

User replies to a sales email

Columns

Name Type Operators Description
MarketoGUID [KEY] String Unique id of the activity.
Id String Integer id of the activity. This value could exceed Int.MAX. For instances which have been migrated to Activity Service, this field may not be present, and should not be treated as unique.
ActivityDateTime Datetime >,>=,=,<,<= Datetime of the activity.
LeadId Int =,IN Id of the lead associated to the activity.
CampaignId Int Id of the associated Smart Campaign, if applicable.
PrimaryAttributeValueId Int Id of the primary attribute field.
PrimaryAttributeValue String Value of the primary attribute.
ListId Int = Mirror column that can be used only as a filter. Will retrieve activities for all leads that are members of this static list. Not available when UseBulkAPI=true.
Artifact_Id String
Artifact_Value String
Sent_by String
Template_ID Int
Campaign_Run_ID Int
Has_Predictive Bool
Source String
Sales_Template_URL String
Sales_Campaign_URL String
Sales_Template_Name String
Sales_Campaign_Name String
Marketo_Sales_Person_ID Int
Sales_Email_URL String

CData JDBC Driver for Marketo

Activities_Request_Campaign

Campaign membership is requested for lead

Columns

Name Type Operators Description
MarketoGUID [KEY] String Unique id of the activity.
Id String Integer id of the activity. This value could exceed Int.MAX. For instances which have been migrated to Activity Service, this field may not be present, and should not be treated as unique.
ActivityDateTime Datetime >,>=,=,<,<= Datetime of the activity.
LeadId Int =,IN Id of the lead associated to the activity.
CampaignId Int Id of the associated Smart Campaign, if applicable.
PrimaryAttributeValueId Int Id of the primary attribute field.
PrimaryAttributeValue String Value of the primary attribute.
ListId Int = Mirror column that can be used only as a filter. Will retrieve activities for all leads that are members of this static list. Not available when UseBulkAPI=true.
Campaign_Id String
Campaign_Value String
Source String

CData JDBC Driver for Marketo

Activities_Responded_to_a_poll_in_webinar

Lead responds to a poll in a webinar event

Columns

Name Type Operators Description
MarketoGUID [KEY] String Unique id of the activity.
Id String Integer id of the activity. This value could exceed Int.MAX. For instances which have been migrated to Activity Service, this field may not be present, and should not be treated as unique.
ActivityDateTime Datetime >,>=,=,<,<= Datetime of the activity.
LeadId Int =,IN Id of the lead associated to the activity.
CampaignId Int Id of the associated Smart Campaign, if applicable.
PrimaryAttributeValueId Int Id of the primary attribute field.
PrimaryAttributeValue String Value of the primary attribute.
ListId Int = Mirror column that can be used only as a filter. Will retrieve activities for all leads that are members of this static list. Not available when UseBulkAPI=true.
Program_Id String
Program_Value String
Poll_question String
Poll_response String

CData JDBC Driver for Marketo

Activities_Sales_Email_Bounced

Sales Email bounced

Columns

Name Type Operators Description
MarketoGUID [KEY] String Unique id of the activity.
Id String Integer id of the activity. This value could exceed Int.MAX. For instances which have been migrated to Activity Service, this field may not be present, and should not be treated as unique.
ActivityDateTime Datetime >,>=,=,<,<= Datetime of the activity.
LeadId Int =,IN Id of the lead associated to the activity.
CampaignId Int Id of the associated Smart Campaign, if applicable.
PrimaryAttributeValueId Int Id of the primary attribute field.
PrimaryAttributeValue String Value of the primary attribute.
ListId Int = Mirror column that can be used only as a filter. Will retrieve activities for all leads that are members of this static list. Not available when UseBulkAPI=true.
Artifact_Id String
Artifact_Value String
Sent_by String
Category String
Details String
Subcategory String
Email String
Campaign_Run_ID Int
Has_Predictive Bool
Template_ID Int
Marketo_Sales_Person_ID Int
Source String

CData JDBC Driver for Marketo

Activities_Scheduled_Meeting_in_Conversational_Flow

Lead schedules an appointment in Dynamic Chat conversational flow

Columns

Name Type Operators Description
MarketoGUID [KEY] String Unique id of the activity.
Id String Integer id of the activity. This value could exceed Int.MAX. For instances which have been migrated to Activity Service, this field may not be present, and should not be treated as unique.
ActivityDateTime Datetime >,>=,=,<,<= Datetime of the activity.
LeadId Int =,IN Id of the lead associated to the activity.
CampaignId Int Id of the associated Smart Campaign, if applicable.
PrimaryAttributeValueId Int Id of the primary attribute field.
PrimaryAttributeValue String Value of the primary attribute.
ListId Int = Mirror column that can be used only as a filter. Will retrieve activities for all leads that are members of this static list. Not available when UseBulkAPI=true.
Agent_Id String
Agent_Value String
Agent_Email String
Agent_Name String
Conversational_Flow_ID Int
Conversational_Flow_Name String
Page_URL String
Meeting_Status String
Scheduled_For Datetime
Routing_Queue_ID Int
Routing_Queue_Type String
Routing_Queue_Name String

CData JDBC Driver for Marketo

Activities_Scheduled_Meeting_in_Dialogue

Lead schedules an appointment in Dynamic Chat dialogue

Columns

Name Type Operators Description
MarketoGUID [KEY] String Unique id of the activity.
Id String Integer id of the activity. This value could exceed Int.MAX. For instances which have been migrated to Activity Service, this field may not be present, and should not be treated as unique.
ActivityDateTime Datetime >,>=,=,<,<= Datetime of the activity.
LeadId Int =,IN Id of the lead associated to the activity.
CampaignId Int Id of the associated Smart Campaign, if applicable.
PrimaryAttributeValueId Int Id of the primary attribute field.
PrimaryAttributeValue String Value of the primary attribute.
ListId Int = Mirror column that can be used only as a filter. Will retrieve activities for all leads that are members of this static list. Not available when UseBulkAPI=true.
Agent_Id String
Agent_Value String
Agent_Email String
Agent_Name String
Dialogue_ID Int
Dialogue_Name String
Page_URL String
Meeting_Status String
Scheduled_For Datetime
Routing_Queue_ID Int
Routing_Queue_Type String
Routing_Queue_Name String

CData JDBC Driver for Marketo

Activities_Send_Alert

Send alert Email about a lead

Columns

Name Type Operators Description
MarketoGUID [KEY] String Unique id of the activity.
Id String Integer id of the activity. This value could exceed Int.MAX. For instances which have been migrated to Activity Service, this field may not be present, and should not be treated as unique.
ActivityDateTime Datetime >,>=,=,<,<= Datetime of the activity.
LeadId Int =,IN Id of the lead associated to the activity.
CampaignId Int Id of the associated Smart Campaign, if applicable.
PrimaryAttributeValueId Int Id of the primary attribute field.
PrimaryAttributeValue String Value of the primary attribute.
ListId Int = Mirror column that can be used only as a filter. Will retrieve activities for all leads that are members of this static list. Not available when UseBulkAPI=true.
Mailing_Id String
Mailing_Value String
Send_To_Owner String
Send_To_Smart_List String
Send_To_List String

CData JDBC Driver for Marketo

Activities_Send_Email

Send Marketo Email to a person

Columns

Name Type Operators Description
MarketoGUID [KEY] String Unique id of the activity.
Id String Integer id of the activity. This value could exceed Int.MAX. For instances which have been migrated to Activity Service, this field may not be present, and should not be treated as unique.
ActivityDateTime Datetime >,>=,=,<,<= Datetime of the activity.
LeadId Int =,IN Id of the lead associated to the activity.
CampaignId Int Id of the associated Smart Campaign, if applicable.
PrimaryAttributeValueId Int Id of the primary attribute field.
PrimaryAttributeValue String Value of the primary attribute.
ListId Int = Mirror column that can be used only as a filter. Will retrieve activities for all leads that are members of this static list. Not available when UseBulkAPI=true.
Mailing_Id String
Mailing_Value String
Step_ID Int
Choice_Number Int
Test_Variant Int
Campaign_Run_ID Int
Has_Predictive Bool
Browser String
Platform String
Device String
User_Agent String

CData JDBC Driver for Marketo

Activities_Send_Sales_Email

Send Email using Sales View (Outlook Plugin)

Columns

Name Type Operators Description
MarketoGUID [KEY] String Unique id of the activity.
Id String Integer id of the activity. This value could exceed Int.MAX. For instances which have been migrated to Activity Service, this field may not be present, and should not be treated as unique.
ActivityDateTime Datetime >,>=,=,<,<= Datetime of the activity.
LeadId Int =,IN Id of the lead associated to the activity.
CampaignId Int Id of the associated Smart Campaign, if applicable.
PrimaryAttributeValueId Int Id of the primary attribute field.
PrimaryAttributeValue String Value of the primary attribute.
ListId Int = Mirror column that can be used only as a filter. Will retrieve activities for all leads that are members of this static list. Not available when UseBulkAPI=true.
Artifact_Id String
Artifact_Value String
Sent_by String
Template_ID Int
Campaign_Run_ID Int
Has_Predictive Bool
Source String
Sales_Template_URL String
Sales_Campaign_URL String
Sales_Template_Name String
Sales_Campaign_Name String
Marketo_Sales_Person_ID Int
Sales_Email_URL String

CData JDBC Driver for Marketo

Activities_Sent_Forward_to_Friend_Email

User Forwards Email to a person/record

Columns

Name Type Operators Description
MarketoGUID [KEY] String Unique id of the activity.
Id String Integer id of the activity. This value could exceed Int.MAX. For instances which have been migrated to Activity Service, this field may not be present, and should not be treated as unique.
ActivityDateTime Datetime >,>=,=,<,<= Datetime of the activity.
LeadId Int =,IN Id of the lead associated to the activity.
CampaignId Int Id of the associated Smart Campaign, if applicable.
PrimaryAttributeValueId Int Id of the primary attribute field.
PrimaryAttributeValue String Value of the primary attribute.
ListId Int = Mirror column that can be used only as a filter. Will retrieve activities for all leads that are members of this static list. Not available when UseBulkAPI=true.
Mailing_Id String
Mailing_Value String
Step_ID Int
Choice_Number Int
Lead_ID String

CData JDBC Driver for Marketo

Activities_Share_Content

Share Content

Columns

Name Type Operators Description
MarketoGUID [KEY] String Unique id of the activity.
Id String Integer id of the activity. This value could exceed Int.MAX. For instances which have been migrated to Activity Service, this field may not be present, and should not be treated as unique.
ActivityDateTime Datetime >,>=,=,<,<= Datetime of the activity.
LeadId Int =,IN Id of the lead associated to the activity.
CampaignId Int Id of the associated Smart Campaign, if applicable.
PrimaryAttributeValueId Int Id of the primary attribute field.
PrimaryAttributeValue String Value of the primary attribute.
ListId Int = Mirror column that can be used only as a filter. Will retrieve activities for all leads that are members of this static list. Not available when UseBulkAPI=true.
Social_App_Id String
Social_App_Value String
Webpage_ID Int
Social_Network String
Social_App_Type_ID Int
Share_Message String

CData JDBC Driver for Marketo

Activities_Unsubscribe_Email

Person unsubscribed from Marketo Emails

Columns

Name Type Operators Description
MarketoGUID [KEY] String Unique id of the activity.
Id String Integer id of the activity. This value could exceed Int.MAX. For instances which have been migrated to Activity Service, this field may not be present, and should not be treated as unique.
ActivityDateTime Datetime >,>=,=,<,<= Datetime of the activity.
LeadId Int =,IN Id of the lead associated to the activity.
CampaignId Int Id of the associated Smart Campaign, if applicable.
PrimaryAttributeValueId Int Id of the primary attribute field.
PrimaryAttributeValue String Value of the primary attribute.
ListId Int = Mirror column that can be used only as a filter. Will retrieve activities for all leads that are members of this static list. Not available when UseBulkAPI=true.
Mailing_Id String
Mailing_Value String
Webpage_ID Int
Query_Parameters String
Client_IP_Address String
Referrer_URL String
User_Agent String
Webform_ID Int
Form_Fields String
Test_Variant Int
Campaign_Run_ID Int
Has_Predictive Bool
Browser String
Platform String
Device String

CData JDBC Driver for Marketo

Activities_Update_Opportunity

Update an Opportunity

Columns

Name Type Operators Description
MarketoGUID [KEY] String Unique id of the activity.
Id String Integer id of the activity. This value could exceed Int.MAX. For instances which have been migrated to Activity Service, this field may not be present, and should not be treated as unique.
ActivityDateTime Datetime >,>=,=,<,<= Datetime of the activity.
LeadId Int =,IN Id of the lead associated to the activity.
CampaignId Int Id of the associated Smart Campaign, if applicable.
PrimaryAttributeValueId Int Id of the primary attribute field.
PrimaryAttributeValue String Value of the primary attribute.
ListId Int = Mirror column that can be used only as a filter. Will retrieve activities for all leads that are members of this static list. Not available when UseBulkAPI=true.
Oppty_Id String
Oppty_Value String
Data_Value_Changes String
Attribute_Name String
New_Value String
Old_Value String

CData JDBC Driver for Marketo

Activities_Visit_Webpage

User visits a web page

Columns

Name Type Operators Description
MarketoGUID [KEY] String Unique id of the activity.
Id String Integer id of the activity. This value could exceed Int.MAX. For instances which have been migrated to Activity Service, this field may not be present, and should not be treated as unique.
ActivityDateTime Datetime >,>=,=,<,<= Datetime of the activity.
LeadId Int =,IN Id of the lead associated to the activity.
CampaignId Int Id of the associated Smart Campaign, if applicable.
PrimaryAttributeValueId Int Id of the primary attribute field.
PrimaryAttributeValue String Value of the primary attribute.
ListId Int = Mirror column that can be used only as a filter. Will retrieve activities for all leads that are members of this static list. Not available when UseBulkAPI=true.
Webpage_Id String
Webpage_Value String
Webpage_URL String
Query_Parameters String
Client_IP_Address String
Referrer_URL String
User_Agent String
Search_Engine String
Search_Query String
Token String
Browser String
Platform String
Device String

CData JDBC Driver for Marketo

ActivityTypes

Get available activity types.

Select

Note: Filters provided with one of the supported operators listed in the "Operators" column are processed server-side, all the other filters are processed client-side.

	SELECT * FROM ActivityTypes WHERE Id=123

Columns

Name Type Operators Description
Id [KEY] Int The unique, Marketo-assigned identifier of the Activity type.
Name String The name of the Activity type.
Description String The description of the Activity type.
PrimaryAttributeName String The name of the primary attribute.
PrimaryAttributeDatatype String The data type of the primary attribute.
Attributes String The activity attributes JSON aggregate.

CData JDBC Driver for Marketo

ActivityTypesAttributes

Get available activity type attributes.

Select

Note: Filters provided with one of the supported operators listed in the "Operators" column are processed server-side, all the other filters are processed client-side.

	SELECT * FROM ActivityTypesAttributes WHERE ActivityTypeId=123

Columns

Name Type Operators Description
ActivityTypeId [KEY] Int The unique, Marketo-assigned identifier of the activity type.
ActivityName String The name of the activity type.
AttributeName [KEY] String The name of the attribute.
AttributeDataType String The data type of the attribute.

CData JDBC Driver for Marketo

BulkExportJobs

Returns a list of bulk export jobs that were created in the past 7 days.

Select

Note: Filters provided with one of the supported operators listed in the "Operators" column are processed server-side, all the other filters are processed client-side.

	SELECT * FROM BulkExportJobs WHERE Table='Leads'
	SELECT * FROM BulkExportJobs WHERE Table='Leads' AND Status='Created'

Columns

Name Type Operators Description
ExportId [KEY] String Unique id of the export job.
Table [KEY] String = Name of the table the export job was created for. Can be Activities, Leads, ProgramMembers or any CustomObject_ table.
Status String = The status of the export.
Format String The format of the file.
CreatedAt Datetime The date when the export request was created.
QueuedAt Datetime The queue time of the export job. This column will have a value only when 'Queued' status is reached.
StartedAt Datetime The start time of the export job. This column will have a value only when 'Processing' status is reached.
FinishedAt Datetime The finish time of export job. This column will have a value only when status is 'Completed' or 'Failed'.
FileSize Long The size of file in bytes. This column will have a value only when status is 'Completed'.
FileChecksum String The checksum of the generated file.
NumberOfRecords Long The number of records in the export file. This column will have a value only when the status is 'Completed'.
ErrorMessage String The error message in case of failed status.

CData JDBC Driver for Marketo

Campaigns

Query Campaigns for a Marketo organization.

Select

Note: Filters provided with one of the supported operators listed in the "Operators" column are processed server-side, all the other filters are processed client-side.

	SELECT * FROM Campaigns WHERE Id='1037'
	SELECT * FROM Campaigns WHERE Id IN (1037, 1055, 1058)
	SELECT * FROM Campaigns WHERE Name='TestCampaign1'
	SELECT * FROM Campaigns WHERE Name='test' AND WorkspaceName='Default'
	SELECT * FROM Campaigns WHERE ProgramName='Program6'

Columns

Name Type Operators Description
Id [KEY] Int =,IN The unique, Marketo-assigned identifier of the campaign.
Name String =,IN The name of the campaign.
Description String The description of the campaign.
Type String The campaign type.
ProgramId Int The Id of the program associated with the campaign.
ProgramName String =,IN The name of the program associated with the campaign.
WorkspaceName String =,IN The name of the workspace associated with the campaign.
Active Bool Identifies whether the campaign is active.
CreatedAt Datetime The date and time the campaign was created.
UpdatedAt Datetime The date and time the campaign was last updated.

CData JDBC Driver for Marketo

ChannelProgressionStatuses

Query ProgressionStatuses of Channels for a Marketo organization.

Select

Note: Filters provided with one of the supported operators listed in the "Operators" column are processed server-side, all the other filters are processed client-side.

	SELECT * FROM ChannelProgressionStatuses WHERE ChannelName='Online Advertising'

Other queries:

	SELECT * FROM ChannelProgressionStatuses WHERE ChannelName IN (SELECT Channel FROM Programs WHERE id=1010)

Columns

Name Type Operators Description
ChannelName [KEY] String = The name of the channel.
Name [KEY] String Name of the status.
Description String Description of the program status.
Hidden Bool Whether the status has been hidden.
Type String Type of the status.
Step Int Step number of the status.
Success Bool Whether this status is a success step for program members.

CData JDBC Driver for Marketo

Channels

Query Channels for a Marketo organization.

Select

Note: Filters provided with one of the supported operators listed in the "Operators" column are processed server-side, all the other filters are processed client-side.

	SELECT * FROM Channels WHERE Name='Online Advertising'

Columns

Name Type Operators Description
Id [KEY] Int The unique, Marketo-assigned identifier of the channel.
Name String = The name of the channel.
ApplicableProgramType String The type of program that the channel is used for.
CreatedAt Datetime The date and time the channel was created.
UpdatedAt Datetime The date and time the channel was last updated.
ProgressionStatuses String JSON array of progression statuses aggregates. Additionally exposed as the separate table ChannelProgressionStatuses.

CData JDBC Driver for Marketo

DailyErrorStatistics

Retrieve the count of each error users have encountered in the current day.

Select

Note: Filters provided with one of the supported operators listed in the "Operators" column are processed server-side, all the other filters are processed client-side.

	SELECT * FROM DailyErrorStatistics WHERE ErrorCode='610'

Columns

Name Type Operators Description
Date Date The date when the error was encountered.
ErrorCode String The error code.
Count Int The error count for the particular error code.

CData JDBC Driver for Marketo

DailyUsageStatistics

Retrieve the number of API calls that specific users have consumed in the current day.

Select

Note: Filters provided with one of the supported operators listed in the "Operators" column are processed server-side, all the other filters are processed client-side.

	SELECT * FROM DailyUsageStatistics WHERE UserId='User123'

Columns

Name Type Operators Description
Date Date The date when the API Calls were made.
UserId String The ID of the user.
Count Int The individual count for the user.

CData JDBC Driver for Marketo

EmailCCFields

Query Emails CC Fields for a Marketo organization.

Select

Note: Filters provided with one of the supported operators listed in the "Operators" column are processed server-side, all the other filters are processed client-side.

	SELECT * FROM EmailCCFields WHERE AttributeId='attribute_123'

Columns

Name Type Operators Description
AttributeId [KEY] String The attribute identifier.
ObjectName String Object name. Lead or Company.
DisplayName String The display name.
ApiName String The API name.

CData JDBC Driver for Marketo

EmailTemplatesUsedBy

Query email records which depend on a given email template.

Select

Note: Filters provided with one of the supported operators listed in the "Operators" column are processed server-side, all the other filters are processed client-side.

	SELECT * FROM EmailTemplatesUsedBy WHERE EmailTemplateId=1

Columns

Name Type Operators Description
EmailTemplateId [KEY] Int = The id of the email template.
Id [KEY] Int The id of the email that uses the email template.
Name String The name of the email.
Type String The type of the asset.
Status String The status of the email.
UpdatedAt Datetime The update date time of the email.

CData JDBC Driver for Marketo

Files

Query files for a Marketo organization.

CreateFile can be used to upload a file.

UpdateFile can be used to update the file content.

Select

Note: Filters provided with one of the supported operators listed in the "Operators" column are processed server-side, all the other filters are processed client-side.

	SELECT * FROM Files WHERE id='421'
	SELECT * FROM Files WHERE Name='CData.png'
	SELECT * FROM Files WHERE FolderId='34'
	SELECT * FROM Files WHERE FolderId='34' AND ParentType='Folder'

Columns

Name Type Operators Description
Id [KEY] Int = The unique, Marketo-assigned identifier of the file.
Name String = The name of the file.
Description String Description of the file.
FolderId Int = The unique, Marketo-assigned identifier of the folder.
FolderName String The Name of the folder
FolderType String The type of folder (Folder,Program)
MimeType String MIME type of the file
Size Int Size of the file in bytes
URL String The explicit URL of the asset in the designated instance.
CreatedAt Datetime The date and time the folder was created.
UpdatedAt Datetime The date and time the folder was last updated.
ParentType String = Mirror column used as server side filter for the type of the parent folder. Will be ignored when filtering by Id or Name.

CData JDBC Driver for Marketo

FolderContents

Query Folders contents for a Marketo organization.

Select

Note: Filters provided with one of the supported operators listed in the "Operators" column are processed server-side, all the other filters are processed client-side.

	SELECT * FROM FolderContents WHERE FolderId=12
	SELECT * FROM FolderContents WHERE FolderId=12 AND FolderType='Folder'

Columns

Name Type Operators Description
Id [KEY] Int The marketo-assigned identifier of the folder content.
Type String The type of the folder content.
FolderId Int = The unique, Marketo-assigned identifier of the folder.
FolderType String = The type of the folder. Folder or Program, defaults to Folder.

CData JDBC Driver for Marketo

FormThankYouPages

Query form thank you pages for a Marketo organization.

Select

Note: Filters provided with one of the supported operators listed in the "Operators" column are processed server-side, all the other filters are processed client-side.

	SELECT * FROM FormThankYouPages WHERE FormId=1

Columns

Name Type Operators Description
FormId Int = Id of the form.
FollowupType String The follow up type.
FollowupValue String The follow up value.
Default Bool If this is the default ThankYouPage.
Operator String The operator for the ThankYouPage.
SubjectField String The subject field of the ThankYouPage.
Values String JSON array of values.

CData JDBC Driver for Marketo

LandingPageTemplateContents

Query landing page template contents for a Marketo organization.

Note: This table uses the draft/approved versioning API. By default both versions are retrieved/modified. To interact with a specific version use the filter Status='draft' or Status='approved'.

UpdateLandingPageTemplateContent can be used to update the Landing Page Template Content.

Select

Note: Filters provided with one of the supported operators listed in the "Operators" column are processed server-side, all the other filters are processed client-side.

	SELECT * FROM LandingPageTemplateContents WHERE LandingPageTemplateId=1 AND LandingPageTemplateStatus='approved'
	SELECT * FROM LandingPageTemplateContents WHERE LandingPageTemplateId IN (1, 1005) AND LandingPageTemplateStatus IN ('draft', 'approved')
	SELECT * FROM LandingPageTemplateContents WHERE LandingPageTemplateId IN (1, 1005)
	SELECT * FROM LandingPageTemplateContents WHERE LandingPageTemplateStatus='draft'
	SELECT * FROM LandingPageTemplateContents

Columns

Name Type Operators Description
LandingPageTemplateId [KEY] Int = The unique, Marketo-assigned identifier of the landing page template.
LandingPageTemplateStatus [KEY] String = Status of the landing page template, draft or approved versions.
Content String HTML content of the landing page template.
EnableMunchkin Bool Whether to enable munchkin on the derived pages. Defaults to true.
TemplateType String Type of template.

CData JDBC Driver for Marketo

LeadChanges

Query Lead changes.

Select

Note: Filters provided with one of the supported operators listed in the "Operators" column are processed server-side, all the other filters are processed client-side.

	SELECT * FROM LeadChanges WHERE ActivityDateTime='2024-02-02 08:15:10.0'
	SELECT * FROM LeadChanges WHERE ActivityDateTime >'2024-01-17T14:32:21'
	SELECT * FROM LeadChanges WHERE ActivityDateTime >='2024-01-17T14:32:21'
	SELECT * FROM LeadChanges WHERE ActivityDateTime >'2024-01-17T14:32:21' AND ActivityDateTime<'2024-02-17T14:32:21'
	SELECT * FROM LeadChanges WHERE LeadId IN (4, 14454)
	SELECT * FROM LeadChanges WHERE ListId=1014
	SELECT * FROM LeadChanges WHERE ListId=1014 AND ActivityDateTime>'2023-06-14T14:13:27Z'
	SELECT * FROM LeadChanges WHERE LeadId=9 AND ActivityDateTime >'2023-06-14T14:13:27Z'

Use LeadFields to specify the Lead columns from which you want to retrieve changes. Defaults to all columns. Retrieve column names from SYS_TABLECOLUMNS and provide them as comma-separated values.

SELECT * FROM LeadChanges WHERE LeadFields='mobilePhone'
SELECT * FROM LeadChanges WHERE LeadId=4 AND LeadFields='mobilePhone'

Columns

Name Type Operators Description
ActivityMarketoGUID [KEY] String Unique id of the activity.
ActivityId String Integer id of the activity. This value could exceed Int.MAX. For instances which have been migrated to Activity Service, this field may not be present, and should not be treated as unique.
ActivityDateTime Datetime >,>=,=,<,<= Datetime of the activity.
ActivityTypeId Int Id of the activity type.
LeadId Int =,IN Id of the lead associated to the activity.
CampaignId Int Id of the associated Smart Campaign, if applicable.
Attributes String JSON aggregate containing the list of attribute key value pair for this activity.
Fields String JSON aggregate containing a list of changes made to lead fields.
ListId Int = Mirror column that can be used only as a filter. Will retrieve activities for all leads that are members of this static list. Not available when UseBulkAPI=true.

Pseudo-Columns

SELECT ステートメントのWHERE 句では、疑似列フィールドを使用して、データソースから返されるタプルを詳細に制御することができます。

Name Type Description
LeadFields String Mirror column used to specify Lead columns for which you want to retrieve changes for. Defaults to all columns. Column names can be retrieved from SYS_TABLECOLUMNS. SELECT [ColumnName] FROM SYS_TABLECOLUMNS WHERE TableName='leads' and should be provided as comma separated values.

CData JDBC Driver for Marketo

LeadChangesAttributes

Query Lead changes attributes.

Select

Note: Filters provided with one of the supported operators listed in the "Operators" column are processed server-side, all the other filters are processed client-side.

	SELECT * FROM LeadChangesAttributes WHERE ActivityDateTime='2024-02-02 08:15:10.0'
	SELECT * FROM LeadChangesAttributes WHERE ActivityDateTime >'2024-01-17T14:32:21'
	SELECT * FROM LeadChangesAttributes WHERE ActivityDateTime >='2024-01-17T14:32:21'
	SELECT * FROM LeadChangesAttributes WHERE ActivityDateTime >'2024-01-17T14:32:21' AND ActivityDateTime<'2024-02-17T14:32:21'
	SELECT * FROM LeadChangesAttributes WHERE LeadId IN (4, 14454)
	SELECT * FROM LeadChangesAttributes WHERE ListId=1014
	SELECT * FROM LeadChangesAttributes WHERE ListId=1014 AND ActivityDateTime>'2023-06-14T14:13:27Z'
	SELECT * FROM LeadChangesAttributes WHERE LeadId=9 AND ActivityDateTime >'2023-06-14T14:13:27Z'

Use LeadFields to specify the Lead columns from which you want to retrieve changes. Defaults to all columns. Retrieve column names from SYS_TABLECOLUMNS and provide them as comma-separated values.

SELECT * FROM LeadChangesAttributes WHERE LeadFields='mobilePhone'
SELECT * FROM LeadChangesAttributes WHERE LeadId=4 AND LeadFields='mobilePhone'

Columns

Name Type Operators Description
ActivityMarketoGUID String Unique id of the activity.
ActivityId String Integer id of the activity. This value could exceed Int.MAX. For instances which have been migrated to Activity Service, this field may not be present, and should not be treated as unique.
ActivityDateTime Datetime >,>=,=,<,<= Datetime of the activity.
ActivityTypeId Int Id of the activity type.
LeadId Int =,IN Id of the lead associated to the activity.
APIName String API Name of the attribute
Name String Name of the attribute
Value String Value of the attribute
ListId Int = Mirror column that can be used only as a filter. Will retrieve activities for all leads that are members of this static list. Not available when UseBulkAPI=true.

Pseudo-Columns

SELECT ステートメントのWHERE 句では、疑似列フィールドを使用して、データソースから返されるタプルを詳細に制御することができます。

Name Type Description
LeadFields String Mirror column used to specify Lead columns for which you want to retrieve changes for. Defaults to all columns. Column names can be retrieved from SYS_TABLECOLUMNS. SELECT [ColumnName] FROM SYS_TABLECOLUMNS WHERE TableName='leads' and should be provided as comma separated values.

CData JDBC Driver for Marketo

LeadChangesFields

Query fields of lead changes.

Select

Note: Filters provided with one of the supported operators listed in the "Operators" column are processed server-side, all the other filters are processed client-side.

	SELECT * FROM LeadChangesFields WHERE ActivityDateTime='2024-02-02 08:15:10.0'
	SELECT * FROM LeadChangesFields WHERE ActivityDateTime > '2024-01-17T14:32:21'
	SELECT * FROM LeadChangesFields WHERE ActivityDateTime >= '2024-01-17T14:32:21'
	SELECT * FROM LeadChangesFields WHERE ActivityDateTime > '2024-01-17T14:32:21' AND ActivityDateTime<'2024-02-17T14:32:21'
	SELECT * FROM LeadChangesFields WHERE LeadId IN (4, 14454)
	SELECT * FROM LeadChangesFields WHERE ListId=1014
	SELECT * FROM LeadChangesFields WHERE ListId=1014 AND ActivityDateTime>'2023-06-14T14:13:27Z'
	SELECT * FROM LeadChangesFields WHERE LeadId=9 AND ActivityDateTime > '2023-06-14T14:13:27Z'

Use LeadFields to specify the Lead columns from which you want to retrieve changes. Defaults to all columns. Retrieve column names from SYS_TABLECOLUMNS and provide them as comma-separated values.

SELECT * FROM LeadChangesFields WHERE LeadFields='mobilePhone'
SELECT * FROM LeadChangesFields WHERE LeadId=4 AND LeadFields='mobilePhone'

Columns

Name Type Operators Description
ActivityMarketoGUID String Unique id of the activity.
ActivityId String Integer id of the activity. This value could exceed Int.MAX. For instances which have been migrated to Activity Service, this field may not be present, and should not be treated as unique.
ActivityDateTime Datetime >,>=,=,<,<= Datetime of the activity.
ActivityTypeId Int Id of the activity type.
LeadId Int =,IN Id of the lead associated to the activity.
Id Int Unique integer id of the change record.
Name String Name of the field which was changed.
NewValue String New value after the change.
OldValue String Old value before the change.
ListId Int = Mirror column that can be used only as a filter. Will retrieve activities for all leads that are members of this static list. Not available when UseBulkAPI=true.

Pseudo-Columns

SELECT ステートメントのWHERE 句では、疑似列フィールドを使用して、データソースから返されるタプルを詳細に制御することができます。

Name Type Description
LeadFields String Mirror column used to specify Lead columns for which you want to retrieve changes for. Defaults to all columns. Column names can be retrieved from SYS_TABLECOLUMNS. SELECT [ColumnName] FROM SYS_TABLECOLUMNS WHERE TableName='leads' and should be provided as comma separated values.

CData JDBC Driver for Marketo

LeadPartitions

Query Lead Partitions for a Marketo organization.

UpdateLeadPartition can be used to update the partition of a lead.

Select

Note: Filters provided with one of the supported operators listed in the "Operators" column are processed server-side, all the other filters are processed client-side.

	SELECT * FROM LeadPartitions WHERE Id=123

Columns

Name Type Operators Description
Id [KEY] Int The unique, Marketo-assigned identifier of the lead partition.
Name String The name of the partition.
Description String The description of the partition.

CData JDBC Driver for Marketo

LeadPrograms

Query program membership for leads.

Select

Note: Filters provided with one of the supported operators listed in the "Operators" column are processed server-side, all the other filters are processed client-side. If no LeadId filter is specified, this table queries all available LeadIds. This process is time-consuming because querying the Leads table is resource-intensive.

	SELECT * FROM LeadPrograms WHERE LeadId=4

Columns

Name Type Operators Description
LeadId [KEY] Int = The Marketo lead id.
ProgramId [KEY] Int Unique integer id of a program record.
ProgressionStatus String Program status of the lead in the parent program.
ProgressionStatusType String Program status Type of the lead in the parent program.
IsExhausted Bool Whether the lead is currently exhausted in the stream, if applicable.
AcquiredBy Bool Whether the lead was acquired by the parent program.
ReachedSuccess Bool Whether the lead is in a success-status in the parent program.
MembershipDate Datetime Date the lead first became a member of the program.
UpdatedAt Datetime Datetime when the program was most recently updated.

CData JDBC Driver for Marketo

Lists

Query Static Lists for a Marketo organization from the Leads API.

This table contains the same records as StaticLists, however it has different columns and server-side filters that might be of use since the tables are retrieved from differnt API endpoints.

Select

Note: Filters provided with one of the supported operators listed in the "Operators" column are processed server-side, all the other filters are processed client-side.

	SELECT * FROM Lists WHERE Id=1556
	SELECT * FROM Lists WHERE Id IN (1556, 1057)
	SELECT * FROM Lists WHERE Name='test0319'
	SELECT * FROM Lists WHERE ProgramName='ImportTest0407'
	SELECT * FROM Lists WHERE WorkspaceName='Default' AND Id=1014

Columns

Name Type Operators Description
Id [KEY] Int =,IN Id of the static list.
Name String =,IN Name of the static list.
Description String Description of the static list.
ProgramName String =,IN Name of the program.
WorkspaceId Int WorkspaceId of the static list.
WorkspaceName String =,IN Name of the workspace the static list is part of.
CreatedAt Datetime Datetime the static list was created.
UpdatedAt Datetime Datetime the static list was most recently updated.

CData JDBC Driver for Marketo

ProgramCosts

Query, insert and delete program cost relations for a Marketo organization.

Select

Note: Filters provided with one of the supported operators listed in the "Operators" column are processed server-side, all the other filters are processed client-side.

	SELECT * FROM ProgramCosts WHERE ProgramId='6205'

Columns

Name Type Operators Description
ProgramId Int = The unique, Marketo-assigned identifier of the program.
Cost Int Amount of the cost.
CostNote String Note of the cost.
CostStartDate Datetime Start datetime of the period cost.

CData JDBC Driver for Marketo

ProgramTags

Query tags relations for a Marketo organization.

Select

Note: Filters provided with one of the supported operators listed in the "Operators" column are processed server-side, all the other filters are processed client-side.

	SELECT * FROM ProgramTags WHERE tagType='test' AND tagValue='asd1'
	SELECT * FROM ProgramTags WHERE ProgramId=6138 

Columns

Name Type Operators Description
ProgramId [KEY] Int = The unique, Marketo-assigned identifier of the program.
TagType [KEY] String = The tag type associated with the program. Each TagType has a value associated with it which is returned via the TagValue column.
TagValue String = Value of the tag type.

CData JDBC Driver for Marketo

Segmentations

Query segmentations for a Marketo organization.

Note: This table uses the draft/approved versioning API. By default both versions are retrieved/modified. To interact with a specific version use the filter Status='draft' or Status='approved'.

Select

Note: Filters provided with one of the supported operators listed in the "Operators" column are processed server-side, all the other filters are processed client-side.

	SELECT * FROM Segmentations WHERE Status='draft'

Columns

Name Type Operators Description
Id [KEY] Int Id of the segmentation.
Status [KEY] String = Status of the segmentation, draft or approved.
Name String Name of the segmentation.
Description String Description of the segmentation.
URL String Url of the segmentation in the Marketo UI.
FolderId Int The unique, Marketo-assigned identifier of the parent folder/program.
FolderName String The name of the folder
FolderType String The type of folder (Folder,Program)
WorkspaceName String Workspace Name of the asset.
CreatedAt Datetime Datetime the segmentation was created.
UpdatedAt Datetime Datetime the segmentation was most recently updated.

CData JDBC Driver for Marketo

Segments

Query segments for a Marketo organization.

Note: This table uses the draft/approved versioning API. By default both versions are retrieved/modified. To interact with a specific version use the filter Status='draft' or Status='approved'.

Select

Note: Filters provided with one of the supported operators listed in the "Operators" column are processed server-side, all the other filters are processed client-side.

	SELECT * FROM Segments WHERE SegmentationId=1001 AND Status='draft'
	SELECT * FROM Segments WHERE SegmentationId=1001

Columns

Name Type Operators Description
Id [KEY] Int Id of the segment.
Status [KEY] String = Status of the segment, draft or approved.
SegmentationId Int = Id of the segmentation.
Name String Name of the segment.
Description String Description of the segmentation.
URL String Url of the segmentation in the Marketo UI.
CreatedAt Datetime Datetime segment form was created.
UpdatedAt Datetime Datetime the segment was most recently updated.

CData JDBC Driver for Marketo

SmartListFilterConditions

Query filters of smart lists in a Marketo organization.

Select

Note: Filters provided with one of the supported operators listed in the "Operators" column are processed server-side, all the other filters are processed client-side.

	SELECT * FROM SmartListFilterConditions WHERE SmartListId='1093'

Columns

Name Type Operators Description
FilterId Int Id of the smart list filter.
SmartListId Int = Id of the smart list.
ActivityAttributeId String Id of activity attribute.
ActivityAttributeName String Name of activity attribute.
AttributeId String Id of attribute.
AttributeName String Name of attribute.
Operator String Value of operator.
Values String List of values.
IsPrimary String Whether the condition is primary or not (first condition of the smart list).
IsError String Whether the condition is error.
ErrorMessage String The error message if IsError=true.

CData JDBC Driver for Marketo

SmartListFilters

Query filters of smart lists in a Marketo organization.

Select

Note: Filters provided with one of the supported operators listed in the "Operators" column are processed server-side, all the other filters are processed client-side.

	SELECT * FROM SmartListFilters WHERE SmartListId='3560'

Columns

Name Type Operators Description
Id [KEY] Int Id of the smart list filter.
SmartListId Int = Id of the smart list.
Name String The name of the smart list rule filter.
Operator String The operator used in the filter.
RuleType String The type of the rule.
RuleTypeId Int The Id of the rule type.
FilterMatchType String The rule filter match type
Conditions String JSON aggregate of smart list filter conditions.

CData JDBC Driver for Marketo

SmartListTriggers

Query rules of smart lists in a Marketo organization.

Select

Note: Filters provided with one of the supported operators listed in the "Operators" column are processed server-side, all the other filters are processed client-side.

	SELECT * FROM SmartListTriggers WHERE SmartListId='3560'

Columns

Name Type Operators Description
SmartListId Int = Id of the smart list.
Trigger String Smart list trigger.

CData JDBC Driver for Marketo

StaticListLeads

Query leads of a static list in Marketo.

Select

Note: Filters provided with one of the supported operators listed in the "Operators" column are processed server-side, all the other filters are processed client-side.

Tip: This table uses server-side projection. Performance can be improved by minimizing the number of columns in projection.

	SELECT * FROM StaticListLeads WHERE ListId=123

Columns

Name Type Operators Description
ListId [KEY] Int = Id of the static list.
Id [KEY] Int The lead Id.
AcmeAccessCode String
AcquisitionProgramId String
Address String
AnnualRevenue Decimal
AnonymousIP String
BillingCity String
BillingCountry String
BillingPostalCode String
BillingState String
BillingStreet String
BlackListed Bool
BlackListedCause String
City String
Company String
ContactCompany String
Cookies String
Country String
CreatedAt Datetime
Cstmfdtest1 String
Cstmfdtest2 String
DateOfBirth Date
Department String
DoNotCall Bool
DoNotCallReason String
Ecids String
Email String
EmailInvalid Bool
EmailInvalidCause String
EmailSuspended Bool
EmailSuspendedAt Datetime
EmailSuspendedCause String
ExternalCompanyId String
ExternalSalesPersonId String
Fax String
FirstName String
Industry String
InferredCity String
InferredCompany String
InferredCountry String
InferredMetropolitanArea String
InferredPhoneAreaCode String
InferredPostalCode String
InferredStateRegion String
IsAnonymous Bool
IsLead Bool
LastName String
LeadPartitionId String
LeadPerson String
LeadRevenueCycleModelId String
LeadRevenueStageId String
LeadRole String
LeadScore Int
LeadSource String
LeadStatus String
MainPhone String
MarketingSuspended Bool
MarketingSuspendedCause String
MiddleName String
MktoAcquisitionDate Datetime
MktoCompanyNotes String
MktoDoNotCallCause String
MktoIsCustomer Bool
MktoIsPartner Bool
MktoName String
MktoPersonNotes String
MobilePhone String
NumberOfEmployees Int
OriginalReferrer String
OriginalSearchEngine String
OriginalSearchPhrase String
OriginalSourceInfo String
OriginalSourceType String
PersonPrimaryLeadInterest String
PersonTimeZone String
PersonType String
Phone String
PostalCode String
Priority Int
Rating String
RegistrationSourceInfo String
RegistrationSourceType String
RelativeScore Int
RelativeUrgency Int
Salutation String
SicCode String
Site String
State String
Test String
Test1 Bool
Test98 String
TestCustomfieldEmail String
TestFieldText1 String
TestInteger Bool
TestInteger_cf Int
TestKpQA String
Title String
Unsubscribed Bool
UnsubscribedReason String
UpdatedAt Datetime
Urgency Double
UTMTerm String
Website String

CData JDBC Driver for Marketo

TagAllowedValues

Query allowed values for tags in a Marketo organization.

Select

Note: Filters provided with one of the supported operators listed in the "Operators" column are processed server-side, all the other filters are processed client-side.

	SELECT * FROM TagAllowedValues WHERE TagType='test'

Columns

Name Type Operators Description
TagType [KEY] String = The name/type of the tag.
AllowableValues String The acceptable values for the tag type.

CData JDBC Driver for Marketo

Tags

Query tags for a Marketo organization.

Select

Note: Filters provided with one of the supported operators listed in the "Operators" column are processed server-side, all the other filters are processed client-side.

	SELECT * FROM Tags WHERE TagType='test'

Columns

Name Type Operators Description
TagType [KEY] String = The name/type of the tag.
Required Bool Whether the tag is required for its applicable program types.
ApplicableProgramTypes String The types of program that the tag is used for.

CData JDBC Driver for Marketo

WeeklyErrorStatistics

Retrieve the count of each error users have encountered in the past 7 days.

Select

Note: Filters provided with one of the supported operators listed in the "Operators" column are processed server-side, all the other filters are processed client-side.

	SELECT * FROM WeeklyErrorStatistics WHERE ErrorCode='610'

Columns

Name Type Operators Description
Date Date The date when the error was encountered.
ErrorCode String The error code.
Count Int The error count for the particular error code.

CData JDBC Driver for Marketo

WeeklyUsageStatistics

Retrieve the number of API calls that specific users have consumed in the past 7 days.

Select

Note: Filters provided with one of the supported operators listed in the "Operators" column are processed server-side, all the other filters are processed client-side.

	SELECT * FROM WeeklyUsageStatistics WHERE UserId='User123'

Columns

Name Type Operators Description
Date Date The date when the API Calls were made.
UserId String The ID of the user.
Count Int The individual count for the user.

CData JDBC Driver for Marketo

ストアドプロシージャ

ストアドプロシージャはファンクションライクなインターフェースで、Marketo の単純なSELECT/INSERT/UPDATE/DELETE 処理にとどまらず本製品 の機能を拡張します。

ストアドプロシージャは、パラメータのリストを受け取り、目的の機能を実行し、プロシージャが成功したか失敗したかを示すとともにMarketo から関連するレスポンスデータを返します。

CData JDBC Driver for Marketo ストアドプロシージャ

Name Description
ActivateSmartCampaign Activates a trigger smart campaign.
ApproveAsset Approves the asset based on the given asset type and id.
AssociateLead Associates a known Marketo lead record to a munchkin cookie and its associated web activity history.
BulkExportActivities A combination of CreateExportJob, EnqueueExportJob, PollExportJobStatus and GetExportJobFile.
BulkExportCustomObjects A combination of CreateExportJob, EnqueueExportJob, PollExportJobStatus and GetExportJobFile.
BulkExportLeads A combination of CreateExportJob, EnqueueExportJob, PollExportJobStatus and GetExportJobFile.
BulkExportProgramMembers A combination of CreateExportJob, EnqueueExportJob, PollExportJobStatus and GetExportJobFile.
BulkImportCustomObjects Imports the custom object records from the provided file, waits for the job to finish and returns the job completion details.
BulkImportLeads Imports the lead records from the provided file, waits for the job to finish and returns the job completion details.
BulkImportProgramMembers Imports the program member records from the provided file, waits for the job to finish and returns the job completion details.
CancelExportJob Cancel a bulk export job.
CreateActivitiesExportJob Create an activities export job based on the given filters.
CreateCustomObjectsExportJob Create a custom object export job based on the given filters. Only 1 filter type can be specified.
CreateCustomObjectsImportJob Imports the program custom object records from the provided file.
CreateEmailTemplate Creates a new email template.
CreateExportJob Create an export job for the search criteria defined via the filter aggregate input. Returns the 'JobId' which can be passed as a parameter in subsequent calls to Bulk Export Activities. Use EnqueueExportJob to queue the export job for processing. Use GetExportJobStatus to retrieve status of export job.
CreateFile Creates a new file from the included payload.
CreateLeadsExportJob Create a leads export job based on the given filters. Only 1 filter type can be specified.
CreateLeadsImportJob Imports the lead records from the provided file.
CreateProgramMembersExportJob Create a program members export job based on the given filters.
CreateProgramMembersImportJob Imports the program member records from the provided file.
DeactivateSmartCampaign Deactivates a trigger smart campaign.
EnqueueExportJob Puts an export job in queue and starts the job when computing resources become available.
GetEmailFullContent Returns the serialized HTML version of the email.
GetEmailTemplateContent Returns the content for a given email template.
GetExportJobFile Returns the file generated by the bulk job with the given Id.
GetExportJobStatus Returns the status of an export job. Job status is available for 30 days after Completed or Failed status was reached.
GetImportJobFailures Returns the list of failures for the import batch job
GetImportJobStatus Returns the status of an import job.
GetImportJobWarnings Returns the list of warnings for the import batch job
GetOAuthAccessToken Get an access token from Marketo.
GetSnippetContent Returns the content for a given snippet.
MergeLeads Merges two or more known lead records into a single lead record.
PollExportJobStatus Continuously polls the bulk API for the status of the export job until one of the following statuses is returned: Completed, Cancelled, Failed.
PollImportJobStatus Will continuously poll the bulk API for the status of the import job until one of the following statuses is returned: Complete, Failed.
ScheduleCampaign Passes a set of leads to a trigger campaign to run through the campaign's flow.
SendEmailSample Sends a sample email to the given email address. Leads may be impersonated to populate data for tokens and dynamic content.
TriggerCampaign Remotely schedules a batch campaign to run at a given time.
UnApproveAsset Revokes approval based on the given asset type and id.
UpdateEmailContent Updates the content of an email.
UpdateEmailFullContent Replaces the HTML of an Email that has had its relationship broken from its template.
UpdateEmailTemplateContent Updates the content of the given email template.
UpdateFile Updates the content of the given file.
UpdateLandingPageTemplateContent Updates the content for the target landing page template.
UpdateLeadPartition Update the lead partition for a list of leads.
UpdateLeadProgramStatus Changes the program status for a list of leads in a target program. Only existing members of the program may have their status changed with this procedure.
UpdateSnippetContent Updates the content of a snippet.

CData JDBC Driver for Marketo

ActivateSmartCampaign

Activates a trigger smart campaign.

Execute

Sample
	EXECUTE ActivateSmartCampaign Id=1

Input

Name Type Required Description
Id String True Id of the trigger smart campaign to activate.

Result Set Columns

Name Type Description
Success Boolean Boolean indicating if the procedure was executed successfully. If false, the output parameter 'Details' will contain the failure details.
Details String Details of execution failure. NULL if success=true.

CData JDBC Driver for Marketo

ApproveAsset

Approves the asset based on the given asset type and id.

Execute

Sample
	EXECUTE ApproveAsset Id=1005, Type='LandingPage'

Input

Name Type Required Description
Id String True Id of the asset.
Type String True Type of the asset.

使用できる値は次のとおりです。EmailTemplate, Email, Form, LandingPageTemplate, LandingPage, Snippet

Result Set Columns

Name Type Description
Success Boolean Boolean indicating if the procedure was executed successfully. If false, the output parameter 'Details' will contain the failure details.
Details String Details of execution failure. NULL if success=true.

CData JDBC Driver for Marketo

AssociateLead

Associates a known Marketo lead record to a munchkin cookie and its associated web activity history.

Execute

Sample
	EXECUTE AssociateLead LeadId='1755', Cookie='id:063-GJP-217&token:_mch-marketo.com-1594662481190-60776'

Input

Name Type Required Description
LeadId Integer True Id of the Lead to associate
Cookie String True The cookie value to associate

Result Set Columns

Name Type Description
Success Boolean Boolean indicating if the procedure was executed successfully. If false, the output parameter 'Details' will contain the failure details.
Details String Details of execution failure. NULL if success=true.

CData JDBC Driver for Marketo

BulkExportActivities

A combination of CreateExportJob, EnqueueExportJob, PollExportJobStatus and GetExportJobFile.

Execute

Sample
	EXECUTE BulkExportActivities CreatedAtStartAt='2023-01-01T00:00:00Z', CreatedAtStartAt='2023-01-10T00:00:00Z'
	EXECUTE BulkExportActivities CreatedAtStartAt='2023-01-01T00:00:00Z', CreatedAtStartAt='2023-01-10T00:00:00Z', LocalPath='C:/Users/cdata/export.csv'
	EXECUTE BulkExportActivities CreatedAtStartAt='2023-01-01T00:00:00Z', CreatedAtStartAt='2023-01-10T00:00:00Z', LocalPath='/tmp/export.csv'
	EXECUTE BulkExportActivities ActivityTypeIds='1', CreatedAtStartAt='2023-01-01T00:00:00Z', CreatedAtStartAt='2023-02-25T00:00:00Z'
	EXECUTE BulkExportActivities ActivityTypeIds='1,2,23', CreatedAtStartAt='2023-01-01T00:00:00Z', CreatedAtStartAt='2023-02-25T00:00:00Z'
	EXECUTE BulkExportActivities ActivityTypeIds='1', PrimaryAttributeValueIds='1,2,3', CreatedAtStartAt='2023-01-01T00:00:00Z', CreatedAtStartAt='2023-02-25T00:00:00Z'
	EXECUTE BulkExportActivities ActivityTypeIds='1', PrimaryAttributeValues='value1,value2', CreatedAtStartAt='2023-01-01T00:00:00Z', CreatedAtStartAt='2023-02-25T00:00:00Z'

Input

Name Type Required Accepts Output Streams Description
Format String False False Format of export file to be generated. Available values are: CSV, TSV, SSV

使用できる値は次のとおりです。CSV, TSV, SSV

デフォルト値はCSVです。

Columns String False False Comma separated list of columns that will be retrieved. Defaults to * (all columns). Different header names can be specified for each column using this syntax: columnName=csvHeaderName i.e.:leadRole=Role,marketingSuspendedCause=SuspendedCause,*

デフォルト値は*です。

UseAPINames Boolean False False If set to true, you must specify fields in the columns input based on their name in the Marketo API. Defaults to false, meaning you can provided column names based on the drivers metadata (sys_tablecolumns).

デフォルト値はfalseです。

CreatedAtStartAt Datetime False False Inclusive lower bound filter for the activity creation datetime.
CreatedAtEndAt Datetime False False Inclusive upper bound filter for the activity creation datetime.
ActivityTypeIds Integer False False The id of a the activity type. Available activity types can be queried from the view ActivityTypes.
PrimaryAttributeValueIds Integer False False Filter based on the id of the primary attribute of the activity. When used, the activityTypeIds filter must be present and only contain activity ids that match the corresponding asset group. Cannot be combined with PrimaryAttributeValues.
PrimaryAttributeValues String False False Filter based on the values of the primary attribute of the activity. When used, the activityTypeIds filter must be present and only contain activity ids that match the corresponding asset group. Cannot be combined with PrimaryAttributeValueIds.
PollingInterval Integer False False The time in milliseconds between each poll. If not specified the value provided in the connection string will be used. See JobPollingInterval connection property for more information and the default value.
LocalPath String False False The absolute path where the file will be saved.
OutputStream Binary False True An instance of an output stream where file data is written to. Only used if LocalPath is not set.
ChunkSize Long False False The chunk size based on which the CSV file will be downloaded. Defaults to the value of the connection property 'ChunkSize'. Set to -1 to download the whole file at once.
MaxThreads Integer False False The number of threads used to download the file. Defaults to the value specified in the connection string property 'MaxThreads'.

Result Set Columns

Name Type Description
Id String The Id of the export job.
FileData String If the LocalPath and FileStream inputs are empty, file data will be output as BASE64.
Success Boolean Boolean indicating if the procedure was executed successfully. If false, the output parameter 'Details' will contain the failure details.
Details String Details of execution failure. NULL if success=true.

CData JDBC Driver for Marketo

BulkExportCustomObjects

A combination of CreateExportJob, EnqueueExportJob, PollExportJobStatus and GetExportJobFile.

Execute

Sample
	EXECUTE BulkExportCustomObjects Table='CustomObject_cdatajp3', UpdatedAtStartAt='2023-01-01T00:00:00Z', UpdatedAtStartAt='2023-01-10T00:00:00Z'
	EXECUTE BulkExportCustomObjects Table='CustomObject_cdatajp3', UpdatedAtStartAt='2023-01-01T00:00:00Z', UpdatedAtStartAt='2023-01-10T00:00:00Z', LocalPath='C:/Users/cdata/export.csv'
	EXECUTE BulkExportCustomObjects Table='CustomObject_cdatajp3', UpdatedAtStartAt='2023-01-01T00:00:00Z', UpdatedAtStartAt='2023-01-10T00:00:00Z', LocalPath='/tmp/export.csv'
	EXECUTE BulkExportCustomObjects Table='CustomObject_cdatajp3', UpdatedAtStartAt='2023-01-01T00:00:00Z', UpdatedAtStartAt='2023-02-25T00:00:00Z', Columns='lead=LeadId,*'
	EXECUTE BulkExportCustomObjects Table='CustomObject_cdatajp3', SmartListName='CDataSmartList'
	EXECUTE BulkExportCustomObjects Table='CustomObject_cdatajp3', SmartListId=12
	EXECUTE BulkExportCustomObjects Table='CustomObject_cdatajp3', StaticListName='ImportTest0407_csv'
	EXECUTE BulkExportCustomObjects Table='CustomObject_cdatajp3', StaticListId=13

Input

Name Type Required Accepts Output Streams Description
Table String True False Name of the custom object to export data for. Matches the name of custom objects listed in sys_tables.
Format String False False Format of export file to be generated. Available values are: CSV, TSV, SSV

使用できる値は次のとおりです。CSV, TSV, SSV

デフォルト値はCSVです。

Columns String False False Comma separated list of columns that will be retrieved. Defaults to * (all columns). Different header names can be specified for each column using this syntax: columnName=csvHeaderName i.e.:leadRole=Role,marketingSuspendedCause=SuspendedCause,*

デフォルト値は*です。

UseAPINames Boolean False False If set to true, you must specify fields in the columns input based on their name in the Marketo API. Defaults to false, meaning you can provided column names based on the drivers metadata (sys_tablecolumns).

デフォルト値はfalseです。

UpdatedAtStartAt Datetime False False Inclusive lower bound filter for the lead update datetime.
UpdatedAtEndAt Datetime False False Inclusive upper bound filter for the lead update datetime.
StaticListId Integer False False The id of a static list you want to use as a filter.
StaticListName String False False The name of a static list you want to use as a filter.
SmartListId Integer False False The id of a smart list you want to use as a filter.
SmartListName String False False The name of a smart list you want to use as a filter.
PollingInterval Integer False False The time in milliseconds between each poll. If not specified the value provided in the connection string will be used. See JobPollingInterval connection property for more information and the default value.
LocalPath String False False The absolute path where the file will be saved.
OutputStream Binary False True An instance of an output stream where file data is written to. Only used if LocalPath is not set.
ChunkSize Long False False The chunk size based on which the CSV file will be downloaded. Defaults to the value of the connection property 'ChunkSize'. Set to -1 to download the whole file at once.
MaxThreads Integer False False The number of threads used to download the file. Defaults to the value specified in the connection string property 'MaxThreads'.

Result Set Columns

Name Type Description
Id String The Id of the export job.
FileData String If the LocalPath and FileStream inputs are empty, file data will be output as BASE64.
Success Boolean Boolean indicating if the procedure was executed successfully. If false, the output parameter 'Details' will contain the failure details.
Details String Details of execution failure. NULL if success=true.

CData JDBC Driver for Marketo

BulkExportLeads

A combination of CreateExportJob, EnqueueExportJob, PollExportJobStatus and GetExportJobFile.

Execute

Sample
	EXECUTE BulkExportLeads CreatedAtStartAt='2024-02-02T00:00:00Z', CreatedAtEndAt='2024-02-02T00:00:00Z'
	EXECUTE BulkExportLeads CreatedAtStartAt='2024-02-02T00:00:00Z', CreatedAtEndAt='2024-02-02T00:00:00Z', LocalPath='C:/Users/cdata/export.csv'
	EXECUTE BulkExportLeads CreatedAtStartAt='2024-02-02T00:00:00Z', CreatedAtEndAt='2024-02-02T00:00:00Z', LocalPath='/tmp/export.csv'
	EXECUTE BulkExportLeads CreatedAtStartAt='2023-01-01T00:00:00Z', CreatedAtEndAt='2023-02-25T00:00:00Z', Columns='Id'
	EXECUTE BulkExportLeads CreatedAtStartAt='2023-01-01T00:00:00Z', CreatedAtEndAt='2023-01-10T00:00:00Z', Columns='id=LeadID,*'
	EXECUTE BulkExportLeads SmartListName='CDataSmartList'
	EXECUTE BulkExportLeads StaticListName='ImportTest0407_csv'
	EXECUTE BulkExportLeads SmartListId=12
	EXECUTE BulkExportLeads StaticListId=13

Input

Name Type Required Accepts Output Streams Description
Format String False False Format of export file to be generated. Available values are: CSV, TSV, SSV

使用できる値は次のとおりです。CSV, TSV, SSV

デフォルト値はCSVです。

Columns String False False Comma separated list of columns that will be retrieved. Defaults to * (all columns). Different header names can be specified for each column using this syntax: columnName=csvHeaderName i.e.:leadRole=Role,marketingSuspendedCause=SuspendedCause,*

デフォルト値は*です。

UseAPINames Boolean False False If set to true, you must specify fields in the columns input based on their name in the Marketo API. Defaults to false, meaning you can provided column names based on the drivers metadata (sys_tablecolumns).

デフォルト値はfalseです。

CreatedAtStartAt Datetime False False Inclusive lower bound filter for the lead creation datetime.
CreatedAtEndAt Datetime False False Inclusive upper bound filter for the lead creation datetime.
UpdatedAtStartAt Datetime False False Inclusive lower bound filter for the lead update datetime.
UpdatedAtEndAt Datetime False False Inclusive upper bound filter for the lead update datetime.
StaticListId Integer False False The id of a static list you want to use as a filter.
StaticListName String False False The name of a static list you want to use as a filter.
SmartListId Integer False False The id of a smart list you want to use as a filter.
SmartListName String False False The name of a smart list you want to use as a filter.
PollingInterval Integer False False The time in milliseconds between each poll. If not specified the value provided in the connection string will be used. See JobPollingInterval connection property for more information and the default value.
LocalPath String False False The absolute path where the file will be saved.
OutputStream Binary False True An instance of an output stream where file data is written to. Only used if LocalPath is not set.
ChunkSize Long False False The chunk size based on which the CSV file will be downloaded. Defaults to the value of the connection property 'ChunkSize'. Set to -1 to download the whole file at once.
MaxThreads Integer False False The number of threads used to download the file. Defaults to the value specified in the connection string property 'MaxThreads'.

Result Set Columns

Name Type Description
Id String The Id of the export job.
FileData String If the LocalPath and FileStream inputs are empty, file data will be output as BASE64.
Success Boolean Boolean indicating if the procedure was executed successfully. If false, the output parameter 'Details' will contain the failure details.
Details String Details of execution failure. NULL if success=true.

CData JDBC Driver for Marketo

BulkExportProgramMembers

A combination of CreateExportJob, EnqueueExportJob, PollExportJobStatus and GetExportJobFile.

Execute

Sample
	EXECUTE BulkExportProgramMembers ProgramId='6117'
	EXECUTE BulkExportProgramMembers ProgramId='6117,6182'
	EXECUTE BulkExportProgramMembers ProgramId='6117', Columns='acquiredBy=acqBy,*'
	EXECUTE BulkExportProgramMembers ProgramId='6117', LocalPath='/tmp/export.csv'
	EXECUTE BulkExportProgramMembers ProgramId='6117', LocalPath='C:/Users/cdata/export.csv'
	EXECUTE BulkExportProgramMembers ProgramId='6117,6182', UpdatedAtStartAt='2024-01-01', UpdatedAtEndAt='2024-01-30', IsExhausted='false', NurtureCadence='paus', StatusNames='Not in Program'

Input

Name Type Required Accepts Output Streams Description
Format String False False Format of export file to be generated. Available values are: CSV, TSV, SSV

使用できる値は次のとおりです。CSV, TSV, SSV

デフォルト値はCSVです。

Columns String False False Comma separated list of columns that will be retrieved. Defaults to * (all columns). Different header names can be specified for each column using this syntax: columnName=csvHeaderName i.e.:leadRole=Role,marketingSuspendedCause=SuspendedCause,*

デフォルト値は*です。

UseAPINames Boolean False False If set to true, you must specify fields in the columns input based on their name in the Marketo API. Defaults to false, meaning you can provided column names based on the drivers metadata (sys_tablecolumns).

デフォルト値はfalseです。

UpdatedAtStartAt Datetime False False Inclusive lower bound filter for the lead update datetime.
UpdatedAtEndAt Datetime False False Inclusive upper bound filter for the lead update datetime.
ProgramId String True False Comma separated list of up to 10 program ids for which program members will be retrieved.
IsExhausted Boolean False False Boolean used to filter program membership records for people who have exhausted content.
NurtureCadence String False False Used to filter program membership records for a given nurture cadence.

使用できる値は次のとおりです。paus, norm

StatusNames String False False Comma separated list of program member status names to filter by.
PollingInterval Integer False False The time in milliseconds between each poll. If not specified the value provided in the connection string will be used. See JobPollingInterval connection property for more information and the default value.
LocalPath String False False The absolute path where the file will be saved.
OutputStream Binary False True An instance of an output stream where file data is written to. Only used if LocalPath is not set.
ChunkSize Long False False The chunk size based on which the CSV file will be downloaded. Defaults to the value of the connection property 'ChunkSize'. Set to -1 to download the whole file at once.
MaxThreads Integer False False The number of threads used to download the file. Defaults to the value specified in the connection string property 'MaxThreads'.

Result Set Columns

Name Type Description
Id String The Id of the export job.
FileData String If the LocalPath and FileStream inputs are empty, file data will be output as BASE64.
Success Boolean Boolean indicating if the procedure was executed successfully. If false, the output parameter 'Details' will contain the failure details.
Details String Details of execution failure. NULL if success=true.

CData JDBC Driver for Marketo

BulkImportCustomObjects

Imports the custom object records from the provided file, waits for the job to finish and returns the job completion details.

Execute

Sample
	EXECUTE BulkImportCustomObjects Table='CustomObject_customObject_cdatajp', LocalPath='C:/users/cdata/file.csv'
	EXECUTE BulkImportCustomObjects Table='CustomObject_customObject_cdatajp', LocalPath='/tmp/file.csv'
	EXECUTE BulkImportCustomObjects Table='CustomObject_customObject_cdatajp', FileData='bWFpbEFkZHJlc3MsbmFtZQpzdXBwb3J0X2NkYXRhLmNvLmpwMUBjZHRhLmNvbSxjZGF0YTE3CnN1cHBvcnRfY2RhdGEuY28uanAyQGNkdGEuY29tLGNkYXRhMTg='

Input

Name Type Required Accepts Input Streams Description
Table String True False The custom object table name.
Format String False False Format of the import file. Available values are: CSV, TSV, SSV

使用できる値は次のとおりです。CSV, TSV, SSV

デフォルト値はCSVです。

LocalPath String False False The absolute path of the file to import.
InputStream Binary False True An instance of an input stream where file data is read from. Only used if LocalPath is not set.
FileData String False False Base64 string representation of the CSV content. Only used if LocalPath and InputStream are not set.

Result Set Columns

Name Type Description
Id String The Id of the import job.
Status String The status of the import process.
RowsProcessed Integer The number of rows processed so far.
RowsFailed Integer The number of rows failed so far.
RowsWithWarning Integer The number of rows with a warning so far.
Message String The status message of the batch.
Success Boolean Boolean indicating if the procedure was executed successfully. If false, the output parameter 'Details' will contain the failure details.
Details String Details of execution failure. NULL if success=true.

CData JDBC Driver for Marketo

BulkImportLeads

Imports the lead records from the provided file, waits for the job to finish and returns the job completion details.

Execute

Sample
	EXECUTE BulkImportLeads LocalPath='C:/users/cdata/file.csv'
	EXECUTE BulkImportLeads LocalPath='/tmp/file.csv'
	EXECUTE BulkImportLeads LookupField='testCustomfieldEmail', ListId=1570, PartitionName='testPartition', LocalPath='/tmp/file.csv'
	EXECUTE BulkImportLeads FileData='ZW1haWwsZmlyc3ROYW1lLGxhc3ROYW1lLHRlc3RDdXN0b21maWVsZEVtYWlsCnRlc3RAZXhhbXBsZS5jb20sSm9obixEb2UsdGVzdEB0ZXN0Q3VzdG9tZmllbGRFbWFpbC5jZGF0YS5jb20KdGVzdDEyMzFAZXhhbXBsZS5jb20sSm9obixEb2UsdGVzdDFAdGVzdEN1c3RvbWZpZWxkRW1haWwuY2RhdGEuY29t'

Input

Name Type Required Accepts Input Streams Description
LookupField String False False Field to use for deduplication. Custom fields (string, email, integer), and the following field types are supported: id, cookies, email, twitterId, facebookId, linkedInId, sfdcAccountId, sfdcContactId, sfdcLeadId, sfdcLeadOwnerId, sfdcOpptyId. Default is email. You can use id for update only operations.
PartitionName String False False Name of the lead partition to import to.
ListId Integer False False Id of the static list to import into.
Format String False False Format of the import file. Available values are: CSV, TSV, SSV

使用できる値は次のとおりです。CSV, TSV, SSV

デフォルト値はCSVです。

LocalPath String False False The absolute path of the file to import.
InputStream Binary False True An instance of an input stream where file data is read from. Only used if LocalPath is not set.
FileData String False False Base64 string representation of the CSV content. Only used if LocalPath and InputStream are not set.

Result Set Columns

Name Type Description
Id String The Id of the import job.
Status String The status of the import process.
RowsProcessed Integer The number of rows processed so far.
RowsFailed Integer The number of rows failed so far.
RowsWithWarning Integer The number of rows with a warning so far.
Message String The status message of the batch.
Success Boolean Boolean indicating if the procedure was executed successfully. If false, the output parameter 'Details' will contain the failure details.
Details String Details of execution failure. NULL if success=true.

CData JDBC Driver for Marketo

BulkImportProgramMembers

Imports the program member records from the provided file, waits for the job to finish and returns the job completion details.

Execute

Sample
	EXECUTE BulkImportProgramMembers ProgramId=6145, ProgramMemberStatus='Influenced', LocalPath='C:/users/cdata/file.csv'
	EXECUTE BulkImportProgramMembers ProgramId=6145, ProgramMemberStatus='Influenced', LocalPath='/tmp/file.csv'
	EXECUTE BulkImportProgramMembers ProgramId=6145, ProgramMemberStatus='Influenced', FileData='Zmlyc3ROYW1lLGxhc3ROYW1lLGVtYWlsLHRpdGxlLGNvbXBhbnksbGVhZFNjb3JlCkpvYW5uYSxMYW5uaXN0ZXIsSm9hbm5hQExhbm5pc3Rlci5jb20sTGFubmlzdGVyLEhvdXNlIExhbm5pc3RlciwwClR5d2luLExhbm5pc3RlcixUeXdpbkBMYW5uaXN0ZXIuY29tLExhbm5pc3RlcixIb3VzZSBMYW5uaXN0ZXIsMA=='

Input

Name Type Required Accepts Input Streams Description
ProgramId Integer True False Id of the program to add members to.
ProgramMemberStatus String True False Program member status for members being added.
Format String False False Format of the import file. Available values are: CSV, TSV, SSV

使用できる値は次のとおりです。CSV, TSV, SSV

デフォルト値はCSVです。

LocalPath String False False The absolute path of the file to import.
InputStream Binary False True An instance of an input stream where file data is read from. Only used if LocalPath is not set.
FileData String False False Base64 string representation of the CSV content. Only used if LocalPath and InputStream are not set.

Result Set Columns

Name Type Description
Id String The Id of the import job.
Status String The status of the import process.
RowsProcessed Integer The number of rows processed so far.
RowsFailed Integer The number of rows failed so far.
RowsWithWarning Integer The number of rows with a warning so far.
Message String The status message of the batch.
Success Boolean Boolean indicating if the procedure was executed successfully. If false, the output parameter 'Details' will contain the failure details.
Details String Details of execution failure. NULL if success=true.

CData JDBC Driver for Marketo

CancelExportJob

Cancel a bulk export job.

Execute

Sample
	EXECUTE CancelExportJob Table='Leads', Id='b4841291-0d27-48bc-8e9a-c639a6f33a0d'
	EXECUTE CancelExportJob Table='CustomObject_cdata', Id='b4841291-0d27-48bc-8e9a-c639a6f33a0d'
	EXECUTE CancelExportJob Table='Activities', Id='b4841291-0d27-48bc-8e9a-c639a6f33a0d'
	EXECUTE CancelExportJob Table='Activities_New_Lead', Id='b4841291-0d27-48bc-8e9a-c639a6f33a0d'
	EXECUTE CancelExportJob Table='ProgramMembers', Id='b4841291-0d27-48bc-8e9a-c639a6f33a0d'

Input

Name Type Required Description
Id String True The id of the export job.
Table String True The table to export. Only certain tables support bulk exports, including: Activities, Leads, ProgramMembers and any custom object.

Result Set Columns

Name Type Description
Id String The Id of the export job.
Status String The status of the export process.
Format String The format of the export job.
CreatedAt Datetime The date when the export job was created.
QueuedAt Datetime The date when the export job was queued.
StartedAt Datetime The date when the export job was started.
Success Boolean Boolean indicating if the procedure was executed successfully. If false, the output parameter 'Details' will contain the failure details.
Details String Details of execution failure. NULL if success=true.

CData JDBC Driver for Marketo

CreateActivitiesExportJob

Create an activities export job based on the given filters.

Execute

Sample
	EXECUTE CreateActivitiesExportJob CreatedAtStartAt='2023-01-01T00:00:00Z', CreatedAtStartAt='2023-01-10T00:00:00Z'
	EXECUTE CreateActivitiesExportJob ActivityTypeIds='1', CreatedAtStartAt='2023-01-01T00:00:00Z', CreatedAtStartAt='2023-02-25T00:00:00Z'
	EXECUTE CreateActivitiesExportJob ActivityTypeIds='1,2,23', CreatedAtStartAt='2023-01-01T00:00:00Z', CreatedAtStartAt='2023-02-25T00:00:00Z'
	EXECUTE CreateActivitiesExportJob ActivityTypeIds='1', PrimaryAttributeValueIds='1,2,3', CreatedAtStartAt='2023-01-01T00:00:00Z', CreatedAtStartAt='2023-02-25T00:00:00Z'
	EXECUTE CreateActivitiesExportJob ActivityTypeIds='1', PrimaryAttributeValues='value1,value2', CreatedAtStartAt='2023-01-01T00:00:00Z', CreatedAtStartAt='2023-02-25T00:00:00Z'

Input

Name Type Required Description
Format String False Format of export file to be generated. Available values are: CSV, TSV, SSV

使用できる値は次のとおりです。CSV, TSV, SSV

デフォルト値はCSVです。

Columns String False Comma separated list of columns that will be retrieved. Defaults to * (all columns). Different header names can be specified for each column using this syntax: columnName=csvHeaderName i.e.:leadRole=Role,marketingSuspendedCause=SuspendedCause,*

デフォルト値は*です。

UseAPINames Boolean False If set to true, you must specify fields in the columns input based on their name in the Marketo API. Defaults to false, meaning you can provided column names based on the drivers metadata (sys_tablecolumns).

デフォルト値はfalseです。

CreatedAtStartAt Datetime False Inclusive lower bound filter for the activity creation datetime.
CreatedAtEndAt Datetime False Inclusive upper bound filter for the activity creation datetime.
ActivityTypeIds Integer False The id of a the activity type. Available activity types can be queried from the view ActivityTypes.
PrimaryAttributeValueIds Integer False Filter based on the id of the primary attribute of the activity. When used, the activityTypeIds filter must be present and only contain activity ids that match the corresponding asset group. Cannot be combined with PrimaryAttributeValues.
PrimaryAttributeValues String False Filter based on the values of the primary attribute of the activity. When used, the activityTypeIds filter must be present and only contain activity ids that match the corresponding asset group. Cannot be combined with PrimaryAttributeValueIds.

Result Set Columns

Name Type Description
Id String The Id of the export job.
Format String The format of the export job.
CreatedAt Datetime The date when the export job was created.
Status String The status of the export process.
Success Boolean Boolean indicating if the procedure was executed successfully. If false, the output parameter 'Details' will contain the failure details.
Details String Details of execution failure. NULL if success=true.

CData JDBC Driver for Marketo

CreateCustomObjectsExportJob

Create a custom object export job based on the given filters. Only 1 filter type can be specified.

Execute

Sample
	EXECUTE CreateCustomObjectsExportJob Table='CustomObject_cdatajp3', UpdatedAtStartAt='2023-01-01T00:00:00Z', UpdatedAtStartAt='2023-01-10T00:00:00Z'
	EXECUTE CreateCustomObjectsExportJob Table='CustomObject_cdatajp3', UpdatedAtStartAt='2023-01-01T00:00:00Z', UpdatedAtStartAt='2023-02-25T00:00:00Z', Columns='lead=LeadId,*'
	EXECUTE CreateCustomObjectsExportJob Table='CustomObject_cdatajp3', SmartListName='CDataSmartList'
	EXECUTE CreateCustomObjectsExportJob Table='CustomObject_cdatajp3', SmartListId=12
	EXECUTE CreateCustomObjectsExportJob Table='CustomObject_cdatajp3', StaticListName='ImportTest0407_csv'
	EXECUTE CreateCustomObjectsExportJob Table='CustomObject_cdatajp3', StaticListId=13

Input

Name Type Required Description
Table String True Name of the custom object to export data for. Matches the name of custom objects listed in sys_tables.
Format String False Format of export file to be generated. Available values are: CSV, TSV, SSV

使用できる値は次のとおりです。CSV, TSV, SSV

デフォルト値はCSVです。

Columns String False Comma separated list of columns that will be retrieved. Defaults to * (all columns). Different header names can be specified for each column using this syntax: columnName=csvHeaderName i.e.:leadRole=Role,marketingSuspendedCause=SuspendedCause,*

デフォルト値は*です。

UseAPINames Boolean False If set to true, you must specify fields in the columns input based on their name in the Marketo API. Defaults to false, meaning you can provided column names based on the drivers metadata (sys_tablecolumns).

デフォルト値はfalseです。

UpdatedAtStartAt Datetime False Inclusive lower bound filter for the lead update datetime.
UpdatedAtEndAt Datetime False Inclusive upper bound filter for the lead update datetime.
StaticListId Integer False The id of a static list you want to use as a filter.
StaticListName String False The name of a static list you want to use as a filter.
SmartListId Integer False The id of a smart list you want to use as a filter.
SmartListName String False The name of a smart list you want to use as a filter.

Result Set Columns

Name Type Description
Id String The Id of the export job.
Format String The format of the export job.
CreatedAt Datetime The date when the export job was created.
Status String The status of the export process.
Success Boolean Boolean indicating if the procedure was executed successfully. If false, the output parameter 'Details' will contain the failure details.
Details String Details of execution failure. NULL if success=true.

CData JDBC Driver for Marketo

CreateCustomObjectsImportJob

Imports the program custom object records from the provided file.

Execute

Sample
	EXECUTE CreateCustomObjectsImportJob Table='CustomObject_customObject_cdatajp', LocalPath='C:/users/cdata/file.csv'
	EXECUTE CreateCustomObjectsImportJob Table='CustomObject_customObject_cdatajp', LocalPath='/tmp/file.csv'
	EXECUTE CreateCustomObjectsImportJob Table='CustomObject_customObject_cdatajp', FileData='bWFpbEFkZHJlc3MsbmFtZQpzdXBwb3J0X2NkYXRhLmNvLmpwMUBjZHRhLmNvbSxjZGF0YTE3CnN1cHBvcnRfY2RhdGEuY28uanAyQGNkdGEuY29tLGNkYXRhMTg='

Input

Name Type Required Accepts Input Streams Description
Table String True False The custom object table name.
Format String False False Format of the import file. Available values are: CSV, TSV, SSV

使用できる値は次のとおりです。CSV, TSV, SSV

デフォルト値はCSVです。

LocalPath String False False The absolute path of the file to import.
InputStream Binary False True An instance of an input stream where file data is read from. Only used if LocalPath is not set.
FileData String False False Base64 string representation of the CSV content. Only used if LocalPath and InputStream are not set.
PollingInterval Integer False False In case the job queue is full Marketo will throw an error. We will keep trying to enqueue the job until the queue is freed. This value specifies the time in milliseconds between each poll. Set to -1 to simply throw the error instead of retrying. If not specified the value provided in the connection string will be used. See JobPollingInterval connection property for more information and the default value.

Result Set Columns

Name Type Description
Id String The Id of the import job.
Status String The status of the import process.
Success Boolean Boolean indicating if the procedure was executed successfully. If false, the output parameter 'Details' will contain the failure details.
Details String Details of execution failure. NULL if success=true.

CData JDBC Driver for Marketo

CreateEmailTemplate

Creates a new email template.

Execute

Sample
	EXECUTE CreateEmailTemplate Name='TestTemplateNewDriver_', FileData='PGh0bWw+Cjxib2R5Pgo8aDE+VEVTVCBIVE1MPC9oMT4KPC9ib2R5Pgo8L2h0bWw+', Description='Test Create Email Template', FolderId=27, FolderType='Folder'
	EXECUTE CreateEmailTemplate Name='TestTemplateNewDriver_', LocalPath='C:/users/cdata/file.txt', Description='Test Create Email Template', FolderId=27, FolderType='Folder'
	EXECUTE CreateEmailTemplate Name='TestTemplateNewDriver_', LocalPath='/tmp/file.txt', Description='Test Create Email Template', FolderId=27, FolderType='Folder'

Input

Name Type Required Accepts Input Streams Description
Name String True False Name of the Email Template. Must be unique under the parent folder.
Description String False False Description of the email template.
FolderId String True False Id of the folder where the template will be created.
FolderType Integer True False Type of the folder where the template will be created.
LocalPath String False False The absolute path to a file where data is read from.
InputStream Binary False True An instance of an input stream where file data is read from. Only used if LocalPath is not set.
FileData String False False Base64 string representation of the file content. Only used if LocalPath and InputStream are not set.

Result Set Columns

Name Type Description
Id Integer Id of the created email template.
URL String Url of the created email template.
Success Boolean Boolean indicating if the procedure was executed successfully. If false, the output parameter 'Details' will contain the failure details.
Details String Details of execution failure. NULL if success=true.

CData JDBC Driver for Marketo

CreateExportJob

Create an export job for the search criteria defined via the filter aggregate input. Returns the 'JobId' which can be passed as a parameter in subsequent calls to Bulk Export Activities. Use EnqueueExportJob to queue the export job for processing. Use GetExportJobStatus to retrieve status of export job.

Execute

Sample
	EXECUTE CreateExportJob Table='Leads', FiltersAggregate='{"createdAt": {endAt": "2023-12-01", startAt": "2023-11-01"}}'
	EXECUTE CreateExportJob Table='Leads', Columns='Id,test98,updatedAt,*', FiltersAggregate='{"createdAt": {endAt": "2023-12-01", startAt": "2023-11-01"}}'

Input

Name Type Required Description
Table String True The table to export. Only certain tables support bulk exports, including: Activities, Leads, ProgramMembers and any custom object.
Format String False Format of export file to be generated.

使用できる値は次のとおりです。CSV, TSV, SSV

デフォルト値はCSVです。

Columns String False Comma separated list of columns that you want to retrieve. Defaults to * (all columns). You can specify different header names for each column using this syntax: columnName=csvHeaderName i.e.:leadRole=Role,marketingSuspendedCause=SuspendedCause,*

デフォルト値は*です。

UseAPINames Boolean False If set to true, you must specify fields in the columns input based on their name in the Marketo API. The exported file headers will be built using API names. Exported file column names can be changed using the Columns input. Defaults to false, meaning you can provided column names based on the drivers metadata (sys_tablecolumns).

デフォルト値はfalseです。

FiltersAggregate String False JSON aggregate for the filters required in the request body.

Result Set Columns

Name Type Description
Id String The Id of the export job.
Format String The format of the export job.
CreatedAt Datetime The date when the export job was created.
Status String The status of the export process.
Success Boolean Boolean indicating if the procedure was executed successfully. If false, the output parameter 'Details' will contain the failure details.
Details String Details of execution failure. NULL if success=true.

CData JDBC Driver for Marketo

CreateFile

Creates a new file from the included payload.

Execute

Sample
	EXECUTE CreateFile FileData='aGVsbG8gd29ybGQ=', Description='Test Create File', Name='newFile_0', FolderId=35, FolderType='Folder'
	EXECUTE CreateFile LocalPath='C:/users/cdata/file.txt', Description='Test Create File', Name='newFile_0', FolderId=35, FolderType='Folder'
	EXECUTE CreateFile LocalPath='/tmp/file.txt', Description='Test Create File', Name='newFile_0', FolderId=35, FolderType='Folder'

Input

Name Type Required Accepts Input Streams Description
Name String True False Name of the file. Must be unique under the parent folder.
Description String False False Description of the file.
FolderId String True False Id of the folder where the file will be created.
FolderType Integer True False Type of the folder where the file will be created.
InsertOnly Boolean False False Indicates whether the call should fail if there is already an existing file with the same name.
LocalPath String False False The absolute path to a file where data is read from.
InputStream Binary False True An instance of an input stream where file data is read from. Only used if LocalPath is not set.
FileData String False False Base64 string representation of the file content. Only used if LocalPath and InputStream are not set.

Result Set Columns

Name Type Description
Id Integer Id of the created file.
URL String URL of the created file.
Success Boolean Boolean indicating if the procedure was executed successfully. If false, the output parameter 'Details' will contain the failure details.
Details String Details of execution failure. NULL if success=true.

CData JDBC Driver for Marketo

CreateLeadsExportJob

Create a leads export job based on the given filters. Only 1 filter type can be specified.

Execute

Sample
	EXECUTE CreateLeadsExportJob CreatedAtStartAt='2024-02-02T00:00:00Z', CreatedAtEndAt='2024-02-02T00:00:00Z'
	EXECUTE CreateLeadsExportJob CreatedAtStartAt='2023-01-01T00:00:00Z', CreatedAtEndAt='2023-02-25T00:00:00Z', Columns='Id'
	EXECUTE CreateLeadsExportJob CreatedAtStartAt='2023-01-01T00:00:00Z', CreatedAtEndAt='2023-01-10T00:00:00Z', Columns='id=LeadID,*'
	EXECUTE CreateLeadsExportJob SmartListName='CDataSmartList'
	EXECUTE CreateLeadsExportJob StaticListName='ImportTest0407_csv'
	EXECUTE CreateLeadsExportJob SmartListId=12
	EXECUTE CreateLeadsExportJob StaticListId=13

Input

Name Type Required Description
Format String False Format of export file to be generated. Available values are: CSV, TSV, SSV

使用できる値は次のとおりです。CSV, TSV, SSV

デフォルト値はCSVです。

Columns String False Comma separated list of columns that will be retrieved. Defaults to * (all columns). Different header names can be specified for each column using this syntax: columnName=csvHeaderName i.e.:leadRole=Role,marketingSuspendedCause=SuspendedCause,*

デフォルト値は*です。

UseAPINames Boolean False If set to true, you must specify fields in the columns input based on their name in the Marketo API. Defaults to false, meaning you can provided column names based on the drivers metadata (sys_tablecolumns).

デフォルト値はfalseです。

CreatedAtStartAt Datetime False Inclusive lower bound filter for the lead creation datetime.
CreatedAtEndAt Datetime False Inclusive upper bound filter for the lead creation datetime.
UpdatedAtStartAt Datetime False Inclusive lower bound filter for the lead update datetime.
UpdatedAtEndAt Datetime False Inclusive upper bound filter for the lead update datetime.
StaticListId Integer False The id of a static list you want to use as a filter.
StaticListName String False The name of a static list you want to use as a filter.
SmartListId Integer False The id of a smart list you want to use as a filter.
SmartListName String False The name of a smart list you want to use as a filter.

Result Set Columns

Name Type Description
Id String The Id of the export job.
Format String The format of the export job.
CreatedAt Datetime The date when the export job was created.
Status String The status of the export process.
Success Boolean Boolean indicating if the procedure was executed successfully. If false, the output parameter 'Details' will contain the failure details.
Details String Details of execution failure. NULL if success=true.

CData JDBC Driver for Marketo

CreateLeadsImportJob

Imports the lead records from the provided file.

Execute

Sample
	EXECUTE CreateLeadsImportJob LocalPath='C:/users/cdata/file.csv'
	EXECUTE CreateLeadsImportJob LocalPath='/tmp/file.csv'
	EXECUTE CreateLeadsImportJob LookupField='testCustomfieldEmail', ListId=1570, PartitionName='testPartition', LocalPath='/tmp/file.csv'
	EXECUTE CreateLeadsImportJob FileData='ZW1haWwsZmlyc3ROYW1lLGxhc3ROYW1lLHRlc3RDdXN0b21maWVsZEVtYWlsCnRlc3RAZXhhbXBsZS5jb20sSm9obixEb2UsdGVzdEB0ZXN0Q3VzdG9tZmllbGRFbWFpbC5jZGF0YS5jb20KdGVzdDEyMzFAZXhhbXBsZS5jb20sSm9obixEb2UsdGVzdDFAdGVzdEN1c3RvbWZpZWxkRW1haWwuY2RhdGEuY29t'

Input

Name Type Required Accepts Input Streams Description
LookupField String False False Field to use for deduplication. Custom fields (string, email, integer), and the following field types are supported: id, cookies, email, twitterId, facebookId, linkedInId, sfdcAccountId, sfdcContactId, sfdcLeadId, sfdcLeadOwnerId, sfdcOpptyId. Default is email. You can use id for update only operations.
PartitionName String False False Name of the lead partition to import to.
ListId Integer False False Id of the static list to import into.
Format String False False Format of the import file. Available values are: CSV, TSV, SSV

使用できる値は次のとおりです。CSV, TSV, SSV

デフォルト値はCSVです。

LocalPath String False False The absolute path of the file to import.
InputStream Binary False True An instance of an input stream where file data is read from. Only used if LocalPath is not set.
FileData String False False Base64 string representation of the CSV content. Only used if LocalPath and InputStream are not set.
PollingInterval Integer False False In case the job queue is full Marketo will throw an error. We will keep trying to enqueue the job until the queue is freed. This value specifies the time in milliseconds between each poll. Set to -1 to simply throw the error instead of retrying. If not specified the value provided in the connection string will be used. See JobPollingInterval connection property for more information and the default value.

Result Set Columns

Name Type Description
Id String The Id of the import job.
Status String The status of the import process.
Success Boolean Boolean indicating if the procedure was executed successfully. If false, the output parameter 'Details' will contain the failure details.
Details String Details of execution failure. NULL if success=true.

CData JDBC Driver for Marketo

CreateProgramMembersExportJob

Create a program members export job based on the given filters.

Execute

Sample
	EXECUTE CreateProgramMembersExportJob ProgramId='6117'
	EXECUTE CreateProgramMembersExportJob ProgramId='6117,6182'
	EXECUTE CreateProgramMembersExportJob ProgramId='6117', Columns='acquiredBy=acqBy,*'
	EXECUTE CreateProgramMembersExportJob ProgramId='6117,6182', UpdatedAtStartAt='2024-01-01', UpdatedAtEndAt='2024-01-30', IsExhausted='false', NurtureCadence='paus', StatusNames='Not in Program'

Input

Name Type Required Description
Format String False Format of export file to be generated. Available values are: CSV, TSV, SSV

使用できる値は次のとおりです。CSV, TSV, SSV

デフォルト値はCSVです。

Columns String False Comma separated list of columns that will be retrieved. Defaults to * (all columns). Different header names can be specified for each column using this syntax: columnName=csvHeaderName i.e.:leadRole=Role,marketingSuspendedCause=SuspendedCause,*

デフォルト値は*です。

UseAPINames Boolean False If set to true, you must specify fields in the columns input based on their name in the Marketo API. Defaults to false, meaning you can provided column names based on the drivers metadata (sys_tablecolumns).

デフォルト値はfalseです。

UpdatedAtStartAt Datetime False Inclusive lower bound filter for the lead update datetime.
UpdatedAtEndAt Datetime False Inclusive upper bound filter for the lead update datetime.
ProgramId String True Comma separated list of up to 10 program ids for which program members will be retrieved.
IsExhausted Boolean False Boolean used to filter program membership records for people who have exhausted content.
NurtureCadence String False Used to filter program membership records for a given nurture cadence.

使用できる値は次のとおりです。paus, norm

StatusNames String False Comma separated list of program member status names to filter by.

Result Set Columns

Name Type Description
Id String The Id of the export job.
Format String The format of the export job.
CreatedAt Datetime The date when the export job was created.
Status String The status of the export process.
Success Boolean Boolean indicating if the procedure was executed successfully. If false, the output parameter 'Details' will contain the failure details.
Details String Details of execution failure. NULL if success=true.

CData JDBC Driver for Marketo

CreateProgramMembersImportJob

Imports the program member records from the provided file.

Execute

Sample
	EXECUTE CreateProgramMembersImportJob ProgramId=6145, ProgramMemberStatus='Influenced', LocalPath='C:/users/cdata/file.csv'
	EXECUTE CreateProgramMembersImportJob ProgramId=6145, ProgramMemberStatus='Influenced', LocalPath='/tmp/file.csv'
	EXECUTE CreateProgramMembersImportJob ProgramId=6145, ProgramMemberStatus='Influenced', FileData='Zmlyc3ROYW1lLGxhc3ROYW1lLGVtYWlsLHRpdGxlLGNvbXBhbnksbGVhZFNjb3JlCkpvYW5uYSxMYW5uaXN0ZXIsSm9hbm5hQExhbm5pc3Rlci5jb20sTGFubmlzdGVyLEhvdXNlIExhbm5pc3RlciwwClR5d2luLExhbm5pc3RlcixUeXdpbkBMYW5uaXN0ZXIuY29tLExhbm5pc3RlcixIb3VzZSBMYW5uaXN0ZXIsMA=='

Input

Name Type Required Accepts Input Streams Description
ProgramId Integer True False Id of the program to add members to.
ProgramMemberStatus String True False Program member status for members being added.
Format String False False Format of the import file. Available values are: CSV, TSV, SSV

使用できる値は次のとおりです。CSV, TSV, SSV

デフォルト値はCSVです。

LocalPath String False False The absolute path of the file to import.
InputStream Binary False True An instance of an input stream where file data is read from. Only used if LocalPath is not set.
FileData String False False Base64 string representation of the CSV content. Only used if LocalPath and InputStream are not set.
PollingInterval Integer False False In case the job queue is full Marketo will throw an error. We will keep trying to enqueue the job until the queue is freed. This value specifies the time in milliseconds between each poll. Set to -1 to simply throw the error instead of retrying. If not specified the value provided in the connection string will be used. See JobPollingInterval connection property for more information and the default value.

Result Set Columns

Name Type Description
Id String The Id of the import job.
Status String The status of the import process.
Success Boolean Boolean indicating if the procedure was executed successfully. If false, the output parameter 'Details' will contain the failure details.
Details String Details of execution failure. NULL if success=true.

CData JDBC Driver for Marketo

DeactivateSmartCampaign

Deactivates a trigger smart campaign.

Execute

Sample
	EXECUTE DeActivateSmartCampaign Id=1

Input

Name Type Required Description
Id String True Id of the trigger smart campaign to deactivate.

Result Set Columns

Name Type Description
Success Boolean Boolean indicating if the procedure was executed successfully. If false, the output parameter 'Details' will contain the failure details.
Details String Details of execution failure. NULL if success=true.

CData JDBC Driver for Marketo

EnqueueExportJob

Puts an export job in queue and starts the job when computing resources become available.

Execute

Sample
	EXECUTE EnqueueExportJob Table='Leads', Id='b4841291-0d27-48bc-8e9a-c639a6f33a0d'
	EXECUTE EnqueueExportJob Table='CustomObject_cdata', Id='b4841291-0d27-48bc-8e9a-c639a6f33a0d'
	EXECUTE EnqueueExportJob Table='Activities', Id='b4841291-0d27-48bc-8e9a-c639a6f33a0d'
	EXECUTE EnqueueExportJob Table='Activities_New_Lead', Id='b4841291-0d27-48bc-8e9a-c639a6f33a0d'
	EXECUTE EnqueueExportJob Table='ProgramMembers', Id='b4841291-0d27-48bc-8e9a-c639a6f33a0d'

Input

Name Type Required Description
Id String True The id of the export job.
Table String True The table to export. Only certain tables support bulk exports, including: Activities, Leads, ProgramMembers and any custom object.
PollingInterval Integer False In case the job queue is full Marketo will throw an error. We will keep trying to enqueue the job until the queue is freed. This value specifies the time in milliseconds between each poll. Set to -1 to simply throw the error instead of retrying. If not specified the value provided in the connection string will be used. See JobPollingInterval connection property for more information and the default value.

Result Set Columns

Name Type Description
Id String The Id of the export job.
Status String The status of the export process.
Format String The format of the export job.
CreatedAt Datetime The date when the export job was created.
QueuedAt Datetime The date when the export job was queued.
Success Boolean Boolean indicating if the procedure was executed successfully. If false, the output parameter 'Details' will contain the failure details.
Details String Details of execution failure. NULL if success=true.

CData JDBC Driver for Marketo

GetEmailFullContent

Returns the serialized HTML version of the email.

Execute

Sample
	EXECUTE GetEmailFullContent Id=23685
	EXECUTE GetEmailFullContent Id=23685, EmailContentType='Text'

Input

Name Type Required Description
Id String True The Id of the email.
Status String False Status filter for draft or approved versions. Defaults to approved if asset is approved, draft if not.

使用できる値は次のとおりです。approved, draft

LeadId String False The lead id to impersonate. Email is rendered as though it was received by this lead.
EmailContentType String False Email content type to return. Default is HTML.

使用できる値は次のとおりです。HTML, Text

Result Set Columns

Name Type Description
Id String The Id of the email.
Content String The content of the email.
Success Boolean Boolean indicating if the procedure was executed successfully. If false, the output parameter 'Details' will contain the failure details.
Details String Details of execution failure. NULL if success=true.

CData JDBC Driver for Marketo

GetEmailTemplateContent

Returns the content for a given email template.

Execute

Sample
	EXECUTE GetEmailTemplateContent Id=1054

Input

Name Type Required Description
Id Integer True Id of the email template.
Status String False The status of the email template to retrieve the content from.

使用できる値は次のとおりです。draft, approved

Result Set Columns

Name Type Description
Id Integer Id of the email template.
Content String Content of the email template.
Success Boolean Boolean indicating if the procedure was executed successfully. If false, the output parameter 'Details' will contain the failure details.
Details String Details of execution failure. NULL if success=true.

CData JDBC Driver for Marketo

GetExportJobFile

Returns the file generated by the bulk job with the given Id.

Execute

Sample
	EXECUTE GetExportJobFile Table='Leads', Id='b4841291-0d27-48bc-8e9a-c639a6f33a0d'
	EXECUTE GetExportJobFile Table='CustomObject_cdata', Id='b4841291-0d27-48bc-8e9a-c639a6f33a0d'
	EXECUTE GetExportJobFile Table='Activities', Id='b4841291-0d27-48bc-8e9a-c639a6f33a0d'
	EXECUTE GetExportJobFile Table='Activities_New_Lead', Id='b4841291-0d27-48bc-8e9a-c639a6f33a0d'
	EXECUTE GetExportJobFile Table='ProgramMembers', Id='b4841291-0d27-48bc-8e9a-c639a6f33a0d'
	EXECUTE GetExportJobFile Table='Leads', Id='b4841291-0d27-48bc-8e9a-c639a6f33a0d', LocalPath='C:/users/cdata/file.txt'
	EXECUTE GetExportJobFile Table='Leads', Id='b4841291-0d27-48bc-8e9a-c639a6f33a0d', LocalPath='/tmp/file.txt'

Input

Name Type Required Accepts Output Streams Description
Id String True False The id of the export job.
Table String True False The exported table. Only certain tables support bulk exports, including: Activities, Leads, ProgramMembers and any custom object.
LocalPath String False False The absolute path where the file will be saved.
OutputStream Binary False True An instance of an output stream where file data is written to. Only used if LocalPath is not set.
ChunkSize Long False False The chunk size based on which the CSV file will be downloaded. Defaults to the value of the connection property 'ChunkSize'. Set to -1 to download the whole file at once.
DownloadSize Long False False The size in bytes to download. Can be retrieved from the field fileSize of the /status.json endpoint. If not set it will be automatically resolved and the whole file will be downloaded.
MaxThreads Integer False False The number of threads used to download the file. Defaults to the value specified in the connection string property 'MaxThreads'.

Result Set Columns

Name Type Description
FileData String If the LocalPath and FileStream inputs are empty, file data will be output as BASE64.
Success Boolean Boolean indicating if the procedure was executed successfully. If false, the output parameter 'Details' will contain the failure details.
Details String Details of execution failure. NULL if success=true.

CData JDBC Driver for Marketo

GetExportJobStatus

Returns the status of an export job. Job status is available for 30 days after Completed or Failed status was reached.

Execute

Sample
	EXECUTE GetExportJobStatus Table='Leads', Id='b4841291-0d27-48bc-8e9a-c639a6f33a0d'
	EXECUTE GetExportJobStatus Table='CustomObject_cdata', Id='b4841291-0d27-48bc-8e9a-c639a6f33a0d'
	EXECUTE GetExportJobStatus Table='Activities', Id='b4841291-0d27-48bc-8e9a-c639a6f33a0d'
	EXECUTE GetExportJobStatus Table='Activities_New_Lead', Id='b4841291-0d27-48bc-8e9a-c639a6f33a0d'
	EXECUTE GetExportJobStatus Table='ProgramMembers', Id='b4841291-0d27-48bc-8e9a-c639a6f33a0d'

Input

Name Type Required Description
Id String True The id of the export job.
Table String True The exported table. Only certain tables support bulk exports, including: Activities, Leads, ProgramMembers and any custom object.

Result Set Columns

Name Type Description
Id String The Id of the export job.
Status String The status of the export job. Applicable values: Created, Queued, Processing, Cancelled, Completed, Failed.
Format String The format of the export job.
CreatedAt Datetime The date when the export job was created.
QueuedAt Datetime The date when the export job was queued.
StartedAt Datetime The date when the export job was started.
FinishedAt Datetime The date when the export job was finished.
NumberOfRecords Long The number of records contained within the generated file.
FileSize Long The size in bytes of the generated file.
FileChecksum String The checksum of the generated file.
ErrorMessage String The error message in case of failed status.
Success Boolean Boolean indicating if the procedure was executed successfully. If false, the output parameter 'Details' will contain the failure details.
Details String Details of execution failure. NULL if success=true.

CData JDBC Driver for Marketo

GetImportJobFailures

Returns the list of failures for the import batch job

Execute

Sample
	EXECUTE GetImportJobFailures Id=1612, Table='Leads'
	EXECUTE GetImportJobFailures Id=1612, Table='CustomObject_cdata', LocalPath='C:/users/cdata/file.txt'
	EXECUTE GetImportJobFailures Id=1612, Table='ProgramMembers ', LocalPath='/tmp/file.txt'

Input

Name Type Required Accepts Output Streams Description
Id String True False The id of the import job.
Table String True False The table that data was imported to. Only certain tables support bulk imports, including: Leads, ProgramMembers and any custom object.
LocalPath String False False The absolute path where the file will be saved.
OutputStream Binary False True An instance of an output stream where file data is written to. Only used if LocalPath is not set.

Result Set Columns

Name Type Description
FileData String If the LocalPath and FileStream inputs are empty, file data will be output as BASE64.
Success Boolean Boolean indicating if the procedure was executed successfully. If false, the output parameter 'Details' will contain the failure details.
Details String Details of execution failure. NULL if success=true.

CData JDBC Driver for Marketo

GetImportJobStatus

Returns the status of an import job.

Execute

Sample
	EXECUTE GetImportJobStatus Id=1608, Table='Leads'
	EXECUTE GetImportJobStatus Id=1609, Table='CustomObject_cdata'
	EXECUTE GetImportJobStatus Id=1610, Table='ProgramMembers'

Input

Name Type Required Description
Id String True The id of the import job.
Table String True The table that data was imported to. Only certain tables support bulk imports, including: Leads, ProgramMembers and any custom object.

Result Set Columns

Name Type Description
Id String The Id of the import job.
Status String The status of the import job. Applicable values: Queued, Importing, Complete, Failed.
RowsProcessed Integer The number of rows processed so far.
RowsFailed Integer The number of rows failed so far.
RowsWithWarning Integer The number of rows with a warning so far.
Message String The status message of the batch.
Success Boolean Boolean indicating if the procedure was executed successfully. If false, the output parameter 'Details' will contain the failure details.
Details String Details of execution failure. NULL if success=true.

CData JDBC Driver for Marketo

GetImportJobWarnings

Returns the list of warnings for the import batch job

Execute

Sample
	EXECUTE GetImportJobWarnings Id=1612, Table='Leads'
	EXECUTE GetImportJobWarnings Id=1612, Table='CustomObject_cdata', LocalPath='C:/users/cdata/file.txt'
	EXECUTE GetImportJobWarnings Id=1612, Table='ProgramMembers ', LocalPath='/tmp/file.txt'

Input

Name Type Required Accepts Output Streams Description
Id String True False The id of the import job.
Table String True False The table that data was imported to. Only certain tables support bulk imports, including: Leads, ProgramMembers and any custom object.
LocalPath String False False The absolute path where the file will be saved.
OutputStream Binary False True An instance of an output stream where file data is written to. Only used if LocalPath is not set.

Result Set Columns

Name Type Description
FileData String If the LocalPath and FileStream inputs are empty, file data will be output as BASE64.
Success Boolean Boolean indicating if the procedure was executed successfully. If false, the output parameter 'Details' will contain the failure details.
Details String Details of execution failure. NULL if success=true.

CData JDBC Driver for Marketo

GetOAuthAccessToken

Get an access token from Marketo.

Execute

Sample
	EXECUTE GetOAuthAccessToken

Result Set Columns

Name Type Description
OAuthAccessToken String The access token used for communication with Marketo.
ExpiresIn String The remaining lifetime of the access token.

CData JDBC Driver for Marketo

GetSnippetContent

Returns the content for a given snippet.

Execute

Sample
	EXECUTE GetSnippetContent SnippetId=1054
	EXECUTE GetSnippetContent SnippetId=1054, Status='draft'

Input

Name Type Required Description
SnippetId Integer True Id of the snippet.
Status String False The status of the snippet to retrieve the content from.

使用できる値は次のとおりです。draft, approved

Result Set Columns

Name Type Description
Content String Content of the snippet.
Type String Type of the snippet content.
Success Boolean Boolean indicating if the procedure was executed successfully. If false, the output parameter 'Details' will contain the failure details.
Details String Details of execution failure. NULL if success=true.

CData JDBC Driver for Marketo

MergeLeads

Merges two or more known lead records into a single lead record.

Execute

Sample
	EXECUTE MergeLeads WinningLeadId=1657, LosingLeadId='1665,1666,1667'

Input

Name Type Required Description
WinningLeadId Integer True Id of the winning lead record.
LosingLeadId String True Ids of losing Lead records.
MergeInCRM Boolean False Name of the new status for the program member.

Result Set Columns

Name Type Description
Success Boolean Boolean indicating if the procedure was executed successfully. If false, the output parameter 'Details' will contain the failure details.
Details String Details of execution failure. NULL if success=true.

CData JDBC Driver for Marketo

PollExportJobStatus

Continuously polls the bulk API for the status of the export job until one of the following statuses is returned: Completed, Cancelled, Failed.

Execute

Sample
	EXECUTE PollExportJobStatus Table='Leads', Id='b4841291-0d27-48bc-8e9a-c639a6f33a0d'
	EXECUTE PollExportJobStatus Table='CustomObject_cdata', Id='b4841291-0d27-48bc-8e9a-c639a6f33a0d'
	EXECUTE PollExportJobStatus Table='Activities', Id='b4841291-0d27-48bc-8e9a-c639a6f33a0d'
	EXECUTE PollExportJobStatus Table='Activities_New_Lead', Id='b4841291-0d27-48bc-8e9a-c639a6f33a0d'
	EXECUTE PollExportJobStatus Table='ProgramMembers', Id='b4841291-0d27-48bc-8e9a-c639a6f33a0d'

Input

Name Type Required Description
Id String True The id of the export job.
Table String True The exported table. Only certain tables support bulk exports, including: Activities, Leads, ProgramMembers and any custom object.
PollingInterval Integer False The time in milliseconds between each poll. If not specified the value provided in the connection string will be used. See JobPollingInterval connection property for more information and the default value.

Result Set Columns

Name Type Description
Id String The Id of the export job.
Status String The status of the export process. Applicable values: Created, Queued, Processing, Cancelled, Completed, Failed.
Format String The format of the export job.
CreatedAt Datetime The date when the export job was created.
QueuedAt Datetime The date when the export job was queued.
StartedAt Datetime The date when the export job was started.
FinishedAt Datetime The date when the export job was finished.
NumberOfRecords Long The number of records contained within the generated file.
FileSize Long The size in bytes of the generated file.
FileChecksum String The checksum of the generated file.
ErrorMessage String The error message in case of failed status.
Success Boolean Boolean indicating if the procedure was executed successfully. If false, the output parameter 'Details' will contain the failure details.
Details String Details of execution failure. NULL if success=true.

CData JDBC Driver for Marketo

PollImportJobStatus

Will continuously poll the bulk API for the status of the import job until one of the following statuses is returned: Complete, Failed.

Execute

Sample
	EXECUTE PollImportJobStatus Id=1608, Table='Leads'
	EXECUTE PollImportJobStatus Id=1609, Table='CustomObject_cdata'
	EXECUTE PollImportJobStatus Id=1610, Table='ProgramMembers'

Input

Name Type Required Description
Id String True The id of the import job.
Table String True The table to import. Only certain tables support bulk imports, including: Leads, ProgramMembers and any custom object.
PollingInterval Integer False The time in milliseconds between each poll. If not specified the value provided in the connection string will be used. See JobPollingInterval connection property for more information and the default value.

Result Set Columns

Name Type Description
Id String The Id of the import job.
Status String The status of the import job. Applicable values: Queued, Importing, Complete, Failed.
RowsProcessed Integer The number of rows processed so far.
RowsFailed Integer The number of rows failed so far.
RowsWithWarning Integer The number of rows with a warning so far.
Message String The status message of the batch.
Success Boolean Boolean indicating if the procedure was executed successfully. If false, the output parameter 'Details' will contain the failure details.
Details String Details of execution failure. NULL if success=true.

CData JDBC Driver for Marketo

ScheduleCampaign

Passes a set of leads to a trigger campaign to run through the campaign's flow.

Execute

Sample
	EXECUTE ScheduleCampaign CampaignId=1107, RunAt='2024-06-06T01:00:00', CloneToProgramName='Program 1', TokenName='TestingSP', TokenValue='test'
	EXECUTE ScheduleCampaign CampaignId=1107, RunAt='2024-06-06T01:00:00', TokenName='TestingSP,testTokenIndritB', TokenValue='\"test,asd\",2024-12-12'
	EXECUTE ScheduleCampaign CampaignId=1107, RunAt='2024-06-06T01:00:00', TokenName#1='TestingSP', TokenValue#1='test',  TokenName#2='testTokenIndritB', TokenValue#2='2024-12-12'

Input

Name Type Required Description
CampaignId Integer True Id of the campaign to schedule.
RunAt Datetime False Datetime to run the campaign at. If unset, the campaign will be run five minutes after the call is made.
CloneToProgramName String False Name of the resulting program. When used, this procedure is limited to 20 calls per day.
TokenName String False Name of the token. Should be formatted as '{{my.name}}'.
TokenValue String False Value of the token.

Result Set Columns

Name Type Description
Success Boolean Boolean indicating if the procedure was executed successfully. If false, the output parameter 'Details' will contain the failure details.
Details String Details of execution failure. NULL if success=true.

CData JDBC Driver for Marketo

SendEmailSample

Sends a sample email to the given email address. Leads may be impersonated to populate data for tokens and dynamic content.

Execute

Sample
	EXECUTE SendEmailSample Id=23685, Email='support@cdata.com'

Input

Name Type Required Description
Id String True The Id of the email.
Email String True Email address to receive the sample email.
LeadId String False Id of a lead to impersonate. Tokens and dynamic content will be populated as though it were sent to the lead.
TextOnly String False Set to true to send the text only version along with the HTML version. Default false/

Result Set Columns

Name Type Description
Success Boolean Boolean indicating if the procedure was executed successfully. If false, the output parameter 'Details' will contain the failure details.
Details String Details of execution failure. NULL if success=true.

CData JDBC Driver for Marketo

TriggerCampaign

Remotely schedules a batch campaign to run at a given time.

Execute

Sample
	EXECUTE TriggerCampaign CampaignId=12
	EXECUTE TriggerCampaign CampaignId=12, LeadIds='1'
	EXECUTE TriggerCampaign CampaignId=12, LeadIds='1,2,3', TokenName='token1,token2', TokenValue='value1,value2'

Input

Name Type Required Description
CampaignId Integer True Id of the campaign to schedule.
LeadIds String False Lead ids to run through the campaign's flow.
TokenName String False Name of the token. Should be formatted as '{{my.name}}'
TokenValue String False Value of the token

Result Set Columns

Name Type Description
Success Boolean Boolean indicating if the procedure was executed successfully. If false, the output parameter 'Details' will contain the failure details.
Details String Details of execution failure. NULL if success=true.

CData JDBC Driver for Marketo

UnApproveAsset

Revokes approval based on the given asset type and id.

Execute

Sample
	EXECUTE UnApproveAsset Id=1005, Type='LandingPage'

Input

Name Type Required Description
Id String True Id of the asset.
Type String True Type of the asset.

使用できる値は次のとおりです。EmailTemplate, Email, Form, LandingPageTemplate, LandingPage, Snippet

Result Set Columns

Name Type Description
Success Boolean Boolean indicating if the procedure was executed successfully. If false, the output parameter 'Details' contains the failure details.
Details String Details of execution failure. NULL if success=true.

CData JDBC Driver for Marketo

UpdateEmailContent

Updates the content of an email.

Execute

Sample
	EXECUTE UpdateEmailContent EmailId=23685, FromEmail='test@cdata.com', FromName='test', Subject='test subject', ReplyTo='support2@cdata.com'

Input

Name Type Required Description
EmailId String True The Id of the email.
Subject String False Subject Line of the Email.
FromEmail String False From-address of the Email.
FromName String False From-name of the Email.
ReplyTo String False Reply-To address of the Email.

Result Set Columns

Name Type Description
EmailId String The Id of the updated email content.
Success Boolean Boolean indicating if the procedure was executed successfully. If false, the output parameter 'Details' will contain the failure details.
Details String Details of execution failure. NULL if success=true.

CData JDBC Driver for Marketo

UpdateEmailFullContent

Replaces the HTML of an Email that has had its relationship broken from its template.

Execute

Sample
	EXECUTE UpdateEmailFullContent EmailId=23685, FileData='aGVsbG8gd29ybGQ='
	EXECUTE UpdateEmailFullContent EmailId=23685, LocalPath='C:/users/cdata/file.txt'
	EXECUTE UpdateEmailFullContent EmailId=23685, LocalPath='/tmp/file.txt'

Input

Name Type Required Accepts Input Streams Description
EmailId String True False The Id of the email.
LocalPath String False False The absolute path to a file where data is read from.
InputStream Binary False True An instance of an input stream where file data is read from. Only used if LocalPath is not set.
FileData String False False Base64 string representation of the file content. Only used if LocalPath and InputStream are not set.

Result Set Columns

Name Type Description
EmailId Integer Id of the updated email template.
Success Boolean Boolean indicating if the procedure was executed successfully. If false, the output parameter 'Details' will contain the failure details.
Details String Details of execution failure. NULL if success=true.

CData JDBC Driver for Marketo

UpdateEmailTemplateContent

Updates the content of the given email template.

Execute

Sample
	EXECUTE UpdateEmailTemplateContent EmailTemplateId=1054, FileData='PGh0bWw+Cjxib2R5Pgo8aDE+VEVTVCBIVE1MIFVQREFURUQ8L2gxPgo8L2JvZHk+CjwvaHRtbD4='
	EXECUTE UpdateEmailTemplateContent EmailTemplateId=1054, LocalPath='C:/users/cdata/file.txt'
	EXECUTE UpdateEmailTemplateContent EmailTemplateId=1054, LocalPath='/tmp/file.txt'

Input

Name Type Required Accepts Input Streams Description
EmailTemplateId Integer True False Id of the email template to update.
LocalPath String False False The absolute path to a file where data is read from.
InputStream Binary False True An instance of an input stream where file data is read from. Only used if LocalPath is not set.
FileData String False False Base64 string representation of the file content. Only used if LocalPath and InputStream are not set.

Result Set Columns

Name Type Description
EmailTemplateId Integer Id of the updated email template.
Success Boolean Boolean indicating if the procedure was executed successfully. If false, the output parameter 'Details' will contain the failure details.
Details String Details of execution failure. NULL if success=true.

CData JDBC Driver for Marketo

UpdateFile

Updates the content of the given file.

Execute

Sample
	EXECUTE UpdateFile Id=3312, FileData='aGVsbG8gd29ybGQgdXBkYXRlZA=='
	EXECUTE UpdateFile LocalPath='C:/users/cdata/file.txt'
	EXECUTE UpdateFile LocalPath='/tmp/file.txt'

Input

Name Type Required Accepts Input Streams Description
Id Integer True False Id of the file to update.
LocalPath String False False The absolute path to a file where data is read from.
InputStream Binary False True An instance of an input stream where file data is read from. Only used if LocalPath is not set.
FileData String False False Base64 string representation of the file content. Only used if LocalPath and InputStream are not set.

Result Set Columns

Name Type Description
Id Integer Id of the updated file.
Success Boolean Boolean indicating if the procedure was executed successfully. If false, the output parameter 'Details' will contain the failure details.
Details String Details of execution failure. NULL if success=true.

CData JDBC Driver for Marketo

UpdateLandingPageTemplateContent

Updates the content for the target landing page template.

Execute

Sample
	EXECUTE UpdateLandingPageTemplateContent LandingPageTemplateId=1005, FileData='aGVsbG8gd29ybGQgdXBkYXRlZA=='
	EXECUTE UpdateLandingPageTemplateContent LandingPageTemplateId=1005, LocalPath='C:/users/cdata/file.txt'
	EXECUTE UpdateLandingPageTemplateContent LandingPageTemplateId=1005, LocalPath='/tmp/file.txt'

Input

Name Type Required Accepts Input Streams Description
LandingPageTemplateId Integer True False Id of the landing page template.
LocalPath String False False The absolute path to a file where data is read from.
InputStream Binary False True An instance of an input stream where file data is read from. Only used if LocalPath is not set.
FileData String False False Base64 string representation of the file content. Only used if LocalPath and InputStream are not set.

Result Set Columns

Name Type Description
LandingPageTemplateId String Id of the asset.
Success Boolean Boolean indicating if the procedure was executed successfully. If false, the output parameter 'Details' will contain the failure details.
Details String Details of execution failure. NULL if success=true.

CData JDBC Driver for Marketo

UpdateLeadPartition

Update the lead partition for a list of leads.

Execute

Sample
	EXECUTE UpdateLeadPartition LeadId='1557', PartitionName='testPartition'
	EXECUTE UpdateLeadPartition LeadId='1557,1558,1559', PartitionName='testPartition'

Input

Name Type Required Description
PartitionName String True Name of the partition.
LeadId String True Ids of Lead records to update.

Result Set Columns

Name Type Description
Id Integer Id of the lead.
Status String Status of update operation.
Success Boolean Boolean indicating if the procedure was executed successfully. If false, the output parameter 'Details' will contain the failure details.
Details String Details of execution failure. NULL if success=true.

CData JDBC Driver for Marketo

UpdateLeadProgramStatus

Changes the program status for a list of leads in a target program. Only existing members of the program may have their status changed with this procedure.

Execute

Sample
	EXECUTE UpdateLeadProgramStatus LeadIds='1557,1558,1559', ProgramId=1001, StatusName='Not in Program'

Input

Name Type Required Description
ProgramId Integer True Id of the program.
LeadIds String True Ids of Lead records to update.
StatusName String True Name of the new status for the program member.

Result Set Columns

Name Type Description
Id Integer Id of the lead.
Status String Status of update operation.
Success Boolean Boolean indicating if the procedure was executed successfully. If false, the output parameter 'Details' will contain the failure details.
Details String Details of execution failure. NULL if success=true.

CData JDBC Driver for Marketo

UpdateSnippetContent

Updates the content of a snippet.

Execute

Sample
	EXECUTE UpdateSnippetContent SnippetId=1054, Content='<h1>test<h1>', Type='HTML'

Input

Name Type Required Description
SnippetId Integer True The Id of the snippet.
Content String True The content of the snippet.
Type String False The type of the content of the snippet.

使用できる値は次のとおりです。DynamicContent, Text, HTML

デフォルト値はTextです。

Result Set Columns

Name Type Description
Id Integer The Id of the updated snippet.
Success Boolean Boolean indicating if the procedure was executed successfully. If false, the output parameter 'Details' will contain the failure details.
Details String Details of execution failure. NULL if success=true.

CData JDBC Driver for Marketo

システムテーブル

このセクションで説明されているシステムテーブルをクエリして、スキーマ情報、データソース機能に関する情報、およびバッチ操作の統計にアクセスできます。

スキーマテーブル

以下のテーブルは、Marketo のデータベースメタデータを返します。

  • sys_catalogs:利用可能なデータベースをリスト。
  • sys_schemas:利用可能なスキーマをリスト。
  • sys_tables:利用可能なテーブルおよびビューをリスト。
  • sys_tablecolumns:利用可能なテーブルおよびビューのカラムについて説明。
  • sys_procedures:利用可能なストアドプロシージャについて説明。
  • sys_procedureparameters:ストアドプロシージャパラメータについて説明。
  • sys_keycolumns:主キーおよび外部キーについて説明。
  • sys_indexes:利用可能なインデックスについて説明。

データソーステーブル

以下のテーブルは、データソースへの接続方法およびクエリ方法についての情報を返します。

  • sys_connection_props:利用可能な接続プロパティについての情報を返す。
  • sys_sqlinfo:本製品 がデータソースにオフロードできるSELECT クエリについて説明。

クエリ情報テーブル

次のテーブルは、データ変更クエリ(バッチ処理を含む)のクエリ統計を返します。

  • sys_identity:バッチ処理または単一の更新に関する情報を返す。

CData JDBC Driver for Marketo

sys_catalogs

利用可能なデータベースをリストします。

次のクエリは、接続文字列で決定されるすべてのデータベースを取得します。

SELECT * FROM sys_catalogs

Columns

Name Type Description
CatalogName String データベース名。

CData JDBC Driver for Marketo

sys_schemas

利用可能なスキーマをリストします。

次のクエリは、すべての利用可能なスキーマを取得します。

          SELECT * FROM sys_schemas
          

Columns

Name Type Description
CatalogName String データベース名。
SchemaName String スキーマ名。

CData JDBC Driver for Marketo

sys_tables

利用可能なテーブルをリストします。

次のクエリは、利用可能なテーブルおよびビューを取得します。

          SELECT * FROM sys_tables
          

Columns

Name Type Description
CatalogName String テーブルまたはビューを含むデータベース。
SchemaName String テーブルまたはビューを含むスキーマ。
TableName String テーブル名またはビュー名。
TableType String テーブルの種類(テーブルまたはビュー)。
Description String テーブルまたはビューの説明。
IsUpdateable Boolean テーブルが更新可能かどうか。

CData JDBC Driver for Marketo

sys_tablecolumns

利用可能なテーブルおよびビューのカラムについて説明します。

次のクエリは、Leads テーブルのカラムとデータ型を返します。

SELECT ColumnName, DataTypeName FROM sys_tablecolumns WHERE TableName='Leads' 

Columns

Name Type Description
CatalogName String テーブルまたはビューを含むデータベースの名前。
SchemaName String テーブルまたはビューを含むスキーマ。
TableName String カラムを含むテーブルまたはビューの名前。
ColumnName String カラム名。
DataTypeName String データ型の名前。
DataType Int32 データ型を示す整数値。この値は、実行時に環境に基づいて決定されます。
Length Int32 カラムのストレージサイズ。
DisplaySize Int32 指定されたカラムの通常の最大幅(文字数)。
NumericPrecision Int32 数値データの最大桁数。文字データおよび日時データの場合は、カラムの長さ(文字数)。
NumericScale Int32 カラムのスケール(小数点以下の桁数)。
IsNullable Boolean カラムがNull を含められるかどうか。
Description String カラムの簡単な説明。
Ordinal Int32 カラムのシーケンスナンバー。
IsAutoIncrement String カラムに固定増分値が割り当てられるかどうか。
IsGeneratedColumn String 生成されたカラムであるかどうか。
IsHidden Boolean カラムが非表示かどうか。
IsArray Boolean カラムが配列かどうか。
IsReadOnly Boolean カラムが読み取り専用かどうか。
IsKey Boolean sys_tablecolumns から返されたフィールドがテーブルの主キーであるかどうか。

CData JDBC Driver for Marketo

sys_procedures

利用可能なストアドプロシージャをリストします。

次のクエリは、利用可能なストアドプロシージャを取得します。

          SELECT * FROM sys_procedures
          

Columns

Name Type Description
CatalogName String ストアドプロシージャを含むデータベース。
SchemaName String ストアドプロシージャを含むスキーマ。
ProcedureName String ストアドプロシージャの名前。
Description String ストアドプロシージャの説明。
ProcedureType String PROCEDURE やFUNCTION などのプロシージャのタイプ。

CData JDBC Driver for Marketo

sys_procedureparameters

ストアドプロシージャパラメータについて説明します。

次のクエリは、GetEmailFullContent ストアドプロシージャのすべての入力パラメータについての情報を返します。

SELECT * FROM sys_procedureparameters WHERE ProcedureName='GetEmailFullContent' AND Direction=1 OR Direction=2

Columns

Name Type Description
CatalogName String ストアドプロシージャを含むデータベースの名前。
SchemaName String ストアドプロシージャを含むスキーマの名前。
ProcedureName String パラメータを含むストアドプロシージャの名前。
ColumnName String ストアドプロシージャパラメータの名前。
Direction Int32 パラメータのタイプに対応する整数値:input (1)。input/output (2)、またはoutput(4)。input/output タイプパラメータは、入力パラメータと出力パラメータの両方になれます。
DataTypeName String データ型の名前。
DataType Int32 データ型を示す整数値。この値は、実行時に環境に基づいて決定されます。
Length Int32 文字データの場合は、許可される文字数。数値データの場合は、許可される桁数。
NumericPrecision Int32 数値データの場合は最大精度。文字データおよび日時データの場合は、カラムの長さ(文字数)。
NumericScale Int32 数値データの小数点以下の桁数。
IsNullable Boolean パラメータがNull を含められるかどうか。
IsRequired Boolean プロシージャの実行にパラメータが必要かどうか。
IsArray Boolean パラメータが配列かどうか。
Description String パラメータの説明。
Ordinal Int32 パラメータのインデックス。

CData JDBC Driver for Marketo

sys_keycolumns

主キーおよび外部キーについて説明します。

次のクエリは、Leads テーブルの主キーを取得します。

         SELECT * FROM sys_keycolumns WHERE IsKey='True' AND TableName='Leads' 
          

Columns

Name Type Description
CatalogName String キーを含むデータベースの名前。
SchemaName String キーを含むスキーマの名前。
TableName String キーを含むテーブルの名前。
ColumnName String キーカラムの名前
IsKey Boolean カラムがTableName フィールドで参照されるテーブル内の主キーかどうか。
IsForeignKey Boolean カラムがTableName フィールドで参照される外部キーかどうか。
PrimaryKeyName String 主キーの名前。
ForeignKeyName String 外部キーの名前。
ReferencedCatalogName String 主キーを含むデータベース。
ReferencedSchemaName String 主キーを含むスキーマ。
ReferencedTableName String 主キーを含むテーブル。
ReferencedColumnName String 主キーのカラム名。

CData JDBC Driver for Marketo

sys_foreignkeys

外部キーについて説明します。

次のクエリは、他のテーブルを参照するすべての外部キーを取得します。

         SELECT * FROM sys_foreignkeys WHERE ForeignKeyType = 'FOREIGNKEY_TYPE_IMPORT'
          

カラム

名前 タイプ 説明
CatalogName String キーを含むデータベースの名前。
SchemaName String キーを含むスキーマの名前。
TableName String キーを含むテーブルの名前。
ColumnName String キーカラムの名前
PrimaryKeyName String 主キーの名前。
ForeignKeyName String 外部キーの名前。
ReferencedCatalogName String 主キーを含むデータベース。
ReferencedSchemaName String 主キーを含むスキーマ。
ReferencedTableName String 主キーを含むテーブル。
ReferencedColumnName String 主キーのカラム名。
ForeignKeyType String 外部キーがインポート(他のテーブルを指す)キーかエクスポート(他のテーブルから参照される)キーかを指定します。

CData JDBC Driver for Marketo

sys_primarykeys

主キーについて説明します。

次のクエリは、すべてのテーブルとビューから主キーを取得します。

         SELECT * FROM sys_primarykeys
          

Columns

Name Type Description
CatalogName String キーを含むデータベースの名前。
SchemaName String キーを含むスキーマの名前。
TableName String キーを含むテーブルの名前。
ColumnName String キーカラムの名前。
KeySeq String 主キーのシーケンス番号。
KeyName String 主キーの名前。

CData JDBC Driver for Marketo

sys_indexes

利用可能なインデックスについて説明します。インデックスをフィルタリングすることで、より高速なクエリ応答時間でセレクティブクエリを記述できます。

次のクエリは、主キーでないすべてのインデックスを取得します。

          SELECT * FROM sys_indexes WHERE IsPrimary='false'
          

Columns

Name Type Description
CatalogName String インデックスを含むデータベースの名前。
SchemaName String インデックスを含むスキーマの名前。
TableName String インデックスを含むテーブルの名前。
IndexName String インデックス名。
ColumnName String インデックスに関連付けられたカラムの名前。
IsUnique Boolean インデックスが固有の場合はTrue。そうでない場合はFalse。
IsPrimary Boolean インデックスが主キーの場合はTrue。そうでない場合はFalse。
Type Int16 インデックスタイプに対応する整数値:statistic (0)、clustered (1)、hashed (2)、またはother (3)。
SortOrder String 並べ替え順序:A が昇順、D が降順。
OrdinalPosition Int16 インデックスのカラムのシーケンスナンバー。

CData JDBC Driver for Marketo

sys_connection_props

利用可能な接続プロパティと、接続文字列に設定されている接続プロパティに関する情報を返します。

このテーブルをクエリする際は、config 接続文字列を使用する必要があります。

jdbc:cdata:marketo:config:

この接続文字列を使用すると、有効な接続がなくてもこのテーブルをクエリできます。

次のクエリは、接続文字列に設定されている、あるいはデフォルト値で設定されているすべての接続プロパティを取得します。

SELECT * FROM sys_connection_props WHERE Value <> ''

Columns

Name Type Description
Name String 接続プロパティ名。
ShortDescription String 簡単な説明。
Type String 接続プロパティのデータ型。
Default String 明示的に設定されていない場合のデフォルト値。
Values String 可能な値のカンマ区切りリスト。別な値が指定されていると、検証エラーがスローされます。
Value String 設定した値またはあらかじめ設定されたデフォルト。
Required Boolean プロパティが接続に必要かどうか。
Category String 接続プロパティのカテゴリ。
IsSessionProperty String プロパティが、現在の接続に関する情報を保存するために使用されるセッションプロパティかどうか。
Sensitivity String プロパティの機密度。これは、プロパティがロギングおよび認証フォームで難読化されているかどうかを通知します。
PropertyName String キャメルケースの短縮形の接続プロパティ名。
Ordinal Int32 パラメータのインデックス。
CatOrdinal Int32 パラメータカテゴリのインデックス。
Hierarchy String このプロパティと一緒に設定する必要がある、関連のある依存プロパティを表示します。
Visible Boolean プロパティが接続UI に表示されるかどうかを通知します。
ETC String プロパティに関するその他のさまざまな情報。

CData JDBC Driver for Marketo

sys_sqlinfo

本製品 がデータソースにオフロードできるSELECT クエリ処理について説明します。

SQL 構文の詳細については、SQL 準拠 を参照してください。

データソースのSELECT 機能

以下はSQL 機能のサンプルデータセットです。 SELECT 機能のいくつかの側面がサポートされている場合には、カンマ区切りのリストで返されます。サポートされていない場合、カラムにはNO が入ります。

名前説明有効な値
AGGREGATE_FUNCTIONSサポートされている集計関数。AVG, COUNT, MAX, MIN, SUM, DISTINCT
COUNTCOUNT 関数がサポートされているかどうか。YES, NO
IDENTIFIER_QUOTE_OPEN_CHAR識別子をエスケープするための開始文字。[
IDENTIFIER_QUOTE_CLOSE_CHAR識別子をエスケープするための終了文字。]
SUPPORTED_OPERATORSサポートされているSQL 演算子。=, >, <, >=, <=, <>, !=, LIKE, NOT LIKE, IN, NOT IN, IS NULL, IS NOT NULL, AND, OR
GROUP_BYGROUP BY がサポートされているかどうか。サポートされている場合、どのレベルでサポートされているか。NO, NO_RELATION, EQUALS_SELECT, SQL_GB_COLLATE
OJ_CAPABILITIESサポートされている外部結合の種類。NO, LEFT, RIGHT, FULL, INNER, NOT_ORDERED, ALL_COMPARISON_OPS
OUTER_JOINS外部結合がサポートされているかどうか。YES, NO
SUBQUERIESサブクエリがサポートされているかどうか。サポートされていれば、どのレベルでサポートされているか。NO, COMPARISON, EXISTS, IN, CORRELATED_SUBQUERIES, QUANTIFIED
STRING_FUNCTIONSサポートされている文字列関数。LENGTH, CHAR, LOCATE, REPLACE, SUBSTRING, RTRIM, LTRIM, RIGHT, LEFT, UCASE, SPACE, SOUNDEX, LCASE, CONCAT, ASCII, REPEAT, OCTET, BIT, POSITION, INSERT, TRIM, UPPER, REGEXP, LOWER, DIFFERENCE, CHARACTER, SUBSTR, STR, REVERSE, PLAN, UUIDTOSTR, TRANSLATE, TRAILING, TO, STUFF, STRTOUUID, STRING, SPLIT, SORTKEY, SIMILAR, REPLICATE, PATINDEX, LPAD, LEN, LEADING, KEY, INSTR, INSERTSTR, HTML, GRAPHICAL, CONVERT, COLLATION, CHARINDEX, BYTE
NUMERIC_FUNCTIONSサポートされている数値関数。ABS, ACOS, ASIN, ATAN, ATAN2, CEILING, COS, COT, EXP, FLOOR, LOG, MOD, SIGN, SIN, SQRT, TAN, PI, RAND, DEGREES, LOG10, POWER, RADIANS, ROUND, TRUNCATE
TIMEDATE_FUNCTIONSサポートされている日付および時刻関数。NOW, CURDATE, DAYOFMONTH, DAYOFWEEK, DAYOFYEAR, MONTH, QUARTER, WEEK, YEAR, CURTIME, HOUR, MINUTE, SECOND, TIMESTAMPADD, TIMESTAMPDIFF, DAYNAME, MONTHNAME, CURRENT_DATE, CURRENT_TIME, CURRENT_TIMESTAMP, EXTRACT
REPLICATION_SKIP_TABLESレプリケーション中にスキップされたテーブルを示します。
REPLICATION_TIMECHECK_COLUMNSレプリケーション中に更新判断のカラムとして使用するかどうかを、(指定された順に)チェックするカラムのリストを含む文字列の配列。
IDENTIFIER_PATTERN識別子としてどの文字列が有効かを示す文字列値。
SUPPORT_TRANSACTIONプロバイダーが、コミットやロールバックなどのトランザクションをサポートしているかどうかを示します。YES, NO
DIALECT使用するSQL ダイアレクトを示します。
KEY_PROPERTIESUniform データベースを特定するプロパティを示します。
SUPPORTS_MULTIPLE_SCHEMASプロバイダー用に複数のスキームが存在するかどうかを示します。YES, NO
SUPPORTS_MULTIPLE_CATALOGSプロバイダー用に複数のカタログが存在するかどうかを示します。YES, NO
DATASYNCVERSIONこのドライバーにアクセスするために必要な、CData Sync のバージョン。Standard, Starter, Professional, Enterprise
DATASYNCCATEGORYこのドライバーのCData Sync カテゴリ。Source, Destination, Cloud Destination
SUPPORTSENHANCEDSQLAPI で提供されている以上の、追加SQL 機能がサポートされているかどうか。TRUE, FALSE
SUPPORTS_BATCH_OPERATIONSバッチ操作がサポートされているかどうか。YES, NO
SQL_CAPこのドライバーでサポートされているすべてのSQL 機能。SELECT, INSERT, DELETE, UPDATE, TRANSACTIONS, ORDERBY, OAUTH, ASSIGNEDID, LIMIT, LIKE, BULKINSERT, COUNT, BULKDELETE, BULKUPDATE, GROUPBY, HAVING, AGGS, OFFSET, REPLICATE, COUNTDISTINCT, JOINS, DROP, CREATE, DISTINCT, INNERJOINS, SUBQUERIES, ALTER, MULTIPLESCHEMAS, GROUPBYNORELATION, OUTERJOINS, UNIONALL, UNION, UPSERT, GETDELETED, CROSSJOINS, GROUPBYCOLLATE, MULTIPLECATS, FULLOUTERJOIN, MERGE, JSONEXTRACT, BULKUPSERT, SUM, SUBQUERIESFULL, MIN, MAX, JOINSFULL, XMLEXTRACT, AVG, MULTISTATEMENTS, FOREIGNKEYS, CASE, LEFTJOINS, COMMAJOINS, WITH, LITERALS, RENAME, NESTEDTABLES, EXECUTE, BATCH, BASIC, INDEX
PREFERRED_CACHE_OPTIONS使用したいcacheOptions を指定する文字列値。
ENABLE_EF_ADVANCED_QUERYドライバーがEntity Framework の高度なクエリをサポートしているかどうかを示します。サポートしていなければ、クエリはクライアントサイドで処理されます。YES, NO
PSEUDO_COLUMNS利用可能な疑似カラムを示す文字列の配列。
MERGE_ALWAYS値がtrue であれば、CData Sync 内でMerge Model が強制的に実行されます。TRUE, FALSE
REPLICATION_MIN_DATE_QUERYレプリケート開始日時を返すSELECT クエリ。
REPLICATION_MIN_FUNCTIONサーバーサイドでmin を実行するために使用する式名を、プロバイダーが指定できるようになります。
REPLICATION_START_DATEレプリケート開始日を、プロバイダーが指定できるようになります。
REPLICATION_MAX_DATE_QUERYレプリケート終了日時を返すSELECT クエリ。
REPLICATION_MAX_FUNCTIONサーバーサイドでmax を実行するために使用する式名を、プロバイダーが指定できるようになります。
IGNORE_INTERVALS_ON_INITIAL_REPLICATE初回のレプリケートで、レプリケートをチャンクに分割しないテーブルのリスト。
CHECKCACHE_USE_PARENTIDCheckCache 構文を親キーカラムに対して実行するかどうかを示します。TRUE, FALSE
CREATE_SCHEMA_PROCEDURESスキーマファイルの生成に使用できる、ストアドプロシージャを示します。

次のクエリは、WHERE 句で使用できる演算子を取得します。

SELECT * FROM sys_sqlinfo WHERE Name = 'SUPPORTED_OPERATORS'
WHERE 句では、個々のテーブルの制限や要件が異なる場合がありますので注意してください。詳しくは、データモデル セクションを参照してください。

Columns

Name Type Description
NAME String SQL 構文のコンポーネント、またはサーバー上で処理できる機能。
VALUE String サポートされるSQL またはSQL 構文の詳細。

CData JDBC Driver for Marketo

sys_identity

試行された変更に関する情報を返します。

次のクエリは、バッチ処理で変更された行のId を取得します。

         SELECT * FROM sys_identity
          

Columns

Name Type Description
Id String データ変更処理から返された、データベース生成Id。
Batch String バッチの識別子。1 は単一処理。
Operation String バッチ内の処理の結果:INSERTED、UPDATED、またはDELETED。
Message String SUCCESS、またはバッチ内の更新が失敗した場合のエラーメッセージ。

CData JDBC Driver for Marketo

sys_information

利用可能なシステム情報を説明します。

次のクエリは、すべてのカラムを取得します。

SELECT * FROM sys_information

Columns

NameTypeDescription
ProductString製品名。
VersionString製品のバージョン番号。
DatasourceString製品が接続するデータソースの名前。
NodeIdString製品がインストールされているマシンの固有識別子。
HelpURLString製品のヘルプドキュメントのURL。
LicenseString製品のライセンス情報。(この情報が利用できない場合、この項目は空白のままか「N/A」と表示されます。)
LocationString製品のライブラリが格納されているファイルパスの場所。
EnvironmentString製品が現在稼働している環境またはランタイムのバージョン。
DataSyncVersionString本コネクタを使用するために必要なCData Sync のティア。
DataSyncCategoryStringCData Sync 機能のカテゴリ(例:Source、Destination)。

CData JDBC Driver for Marketo

接続文字列オプション

接続文字列プロパティは、接続を確立するために使用できるさまざまなオプションです。このセクションでは、本プロバイダーの接続文字列で設定できるオプションの一覧を示します。詳細については各リンクをクリックしてください。

接続を確立する方法について詳しくは、接続の確立を参照してください。

Connection


プロパティ説明
URLThe URL of the Marketo instance to connect to.

OAuth


プロパティ説明
InitiateOAuth接続時にOAuth アクセストークンを取得またはリフレッシュするプロセスを開始するには、このプロパティを設定します。
OAuthClientIdOAuth 認証サーバーを使用してアプリケーションを登録する場合に割り当てられたクライアントId。
OAuthClientSecretOAuth 認証サーバーにアプリケーションを登録する場合に割り当てられたクライアントシークレット。
OAuthAccessTokenOAuth を使用して接続するためのアクセストークン。
OAuthSettingsLocationInitiateOAuth が GETANDREFRESH 、または REFRESH に設定されているときの設定ファイルの場所。代わりに、'memory://' で始まる値を指定することで、この場所をメモリに保持することができます。
OAuthExpiresInOAuth アクセストークンの有効期限(秒単位)。
OAuthTokenTimestamp現在のアクセストークンが作成されたときのUnix エポックタイムスタンプ(ミリ秒)。

SSL


プロパティ説明
SSLServerCertTLS/SSL を使用して接続するときに、サーバーが受け入れ可能な証明書。

Firewall


プロパティ説明
FirewallTypeプロキシベースのファイアウォールで使われるプロトコル。
FirewallServerプロキシベースのファイアウォールの名前もしくはIP アドレス。
FirewallPortプロキシベースのファイアウォールのTCP ポート。
FirewallUserプロキシベースのファイアウォールに認証するために使うユーザー名。
FirewallPasswordプロキシベースのファイアウォールへの認証に使われるパスワード。

Proxy


プロパティ説明
ProxyAutoDetectこの接続プロパティをTrue に設定すると、provider は既存のプロキシサーバー構成についてシステムプロキシ設定をチェックします(プロキシサーバーの詳細を手動で入力する必要はありません)。特定のプロキシサーバーに接続するためにprovider を手動で構成する場合は、False に設定します。
ProxyServerHTTP トラフィックをルートするプロキシサーバーのホストネームもしくはIP アドレス。
ProxyPortプロキシサーバー( ProxyServer 接続プロパティで指定)が起動しているTCP ポート。
ProxyAuthSchemeProxyServer 接続プロパティで指定されたプロキシサーバーに対して認証する際にprovider が使用する認証方法。
ProxyUserProxyServer 接続プロパティで指定されたプロキシサーバーに登録されているユーザーアカウントのユーザー名。
ProxyPasswordProxyUser 接続プロパティで指定されたユーザに紐付けられたパスワード。
ProxySSLTypeProxyServer プロキシへの接続時に使用するSSL タイプ。
ProxyExceptionsProxyServer 経由での接続が免除される宛先ホスト名またはIP のセミコロン区切りのリスト。

Logging


プロパティ説明
Logfileログファイルの名前と場所を指定するファイルパス。
Verbosityログファイルの記述をどの程度の詳細さで記載するかを決定するverbosity レベル。
LogModulesログファイルに含めるコアモジュール。
MaxLogFileSizeログファイルの最大バイトサイズ(例えば、10MB)を指定する文字列。
MaxLogFileCountログファイルの最大ファイル数を指定する文字列。

Schema


プロパティ説明
Locationテーブル、ビュー、およびストアドプロシージャを定義するスキーマファイルを格納するディレクトリへのパス。
BrowsableSchemasこのプロパティは、使用可能なスキーマのサブセットにレポートされるスキーマを制限します。例えば、BrowsableSchemas=SchemaA,SchemaB,SchemaC です。
Tablesこのプロパティは、使用可能なテーブルのサブセットにレポートされるテーブルを制限します。例えば、Tables=TableA,TableB,TableC です。
Views使用可能なテーブルのサブセットにレポートされるビューを制限します。例えば、Views=ViewA,ViewB,ViewC です。

Caching


プロパティ説明
AutoCacheSELECT クエリの結果を、 CacheLocation 、または CacheConnection と CacheProvider の両方で指定されたキャッシュデータベースに自動的にキャッシュします。
CacheDriverデータのキャッシュに使用されるデータベースドライバー。
CacheConnectionキャッシュデータベースの接続文字列。このプロパティは、常に CacheProvider と一緒に使用します。両プロパティを設定すると、データをキャッシュするための CacheLocation のバリューセットがオーバーライドされます。
CacheLocationキャッシュデータベースへのパスとファイル名を指定します。
CacheToleranceAutoCache 使用時のキャッシュ内の失効データに対する許容範囲の秒数。
Offlineオフラインモードを使用して、ライブソースではなくキャッシュからデータを取得します。
CacheMetadataこのプロパティは、テーブルメタデータをファイルストアにキャッシュするかどうかを決定します。

Miscellaneous


プロパティ説明
BatchSize送信する各バッチ処理の最大サイズ。
BulkLeadsSupportsUpdatedAtIf set to true, the updatedAt filter will be marked as server-side supported.
BulkProgramMembersSupportsUpdatedAtIf set to true, the updatedAt filter will be marked as server-side supported.
ConnectionLifeTime接続の最大有効期間(秒単位)。その時間が経過すると、接続オブジェクトは削除されます。
ConnectOnOpenこのプロパティは、接続が開かれたときにMarketo に接続するかどうかを指定します。
DownloadChunkSizeThe size of chunks (in bytes) when downloading large files.
IsCRMEnabledSet to true to avoid pushing tables that are not available when CRM is enabled in Marketo.
JobPollingIntervalThe maxmimum wait time in milliseconds between each job status poll.
MaxRowsクエリで集計またはGROUP BY を使用しない場合に返される行数を制限します。これはLIMIT 句よりも優先されます。
MaxThreads同時リクエスト数を指定します。
Otherこれらの隠しプロパティは特定のユースケースでのみ使用されます。
PagesizeMarketo から返されるページあたりの結果の最大数。
PoolIdleTimeout接続が閉じられる前に許容されたアイドル時間。
PoolMaxSizeプールの最大接続数。
PoolMinSizeプール内の最小接続数。
PoolWaitTime使用可能な接続を待機する最大秒数。
PseudoColumnsカラムとして公開する擬似カラムのセットを指定します。
Readonlyこのプロパティを使用して、provider からMarketo へのアクセスを読み取り専用に設定できます。
RTKライセンス供与で使用されるランタイムキー。
Timeoutタイムアウトエラーがスローされ、処理をキャンセルするまでの秒数。
UploadChunkSizeThe size of chunks (in bytes) when uploading large files.
UseBulkAPISpecifies whether to use the Marketo Bulk API.
UseConnectionPoolingこのプロパティは、コネクションプーリングを有効にします。
UserDefinedViewsカスタムビューを含むJSON コンフィギュレーションファイルを指すファイルパス。
CData JDBC Driver for Marketo

Connection

このセクションでは、本プロバイダーの接続文字列で設定可能なConnection プロパティの全リストを提供します。


プロパティ説明
URLThe URL of the Marketo instance to connect to.
CData JDBC Driver for Marketo

URL

The URL of the Marketo instance to connect to.

データ型

string

デフォルト値

""

解説

The URL of the REST API Service. Can be found in Admin -> Integration -> Web Services -> REST API. Example: https://123-abc-456.mktorest.com/ or https://123-abc-456.mktorest.com/rest.

CData JDBC Driver for Marketo

OAuth

このセクションでは、本プロバイダーの接続文字列で設定可能なOAuth プロパティの全リストを提供します。


プロパティ説明
InitiateOAuth接続時にOAuth アクセストークンを取得またはリフレッシュするプロセスを開始するには、このプロパティを設定します。
OAuthClientIdOAuth 認証サーバーを使用してアプリケーションを登録する場合に割り当てられたクライアントId。
OAuthClientSecretOAuth 認証サーバーにアプリケーションを登録する場合に割り当てられたクライアントシークレット。
OAuthAccessTokenOAuth を使用して接続するためのアクセストークン。
OAuthSettingsLocationInitiateOAuth が GETANDREFRESH 、または REFRESH に設定されているときの設定ファイルの場所。代わりに、'memory://' で始まる値を指定することで、この場所をメモリに保持することができます。
OAuthExpiresInOAuth アクセストークンの有効期限(秒単位)。
OAuthTokenTimestamp現在のアクセストークンが作成されたときのUnix エポックタイムスタンプ(ミリ秒)。
CData JDBC Driver for Marketo

InitiateOAuth

接続時にOAuth アクセストークンを取得またはリフレッシュするプロセスを開始するには、このプロパティを設定します。

Possible Values

OFF, REFRESH, GETANDREFRESH

データ型

string

デフォルト値

"GETANDREFRESH"

解説

次のオプションが利用可能です。

  1. OFF:OAuth フローが完全にユーザーにより操作されることを示します。認証にはOAuth アクセストークンが必要です。
  2. GETANDREFRESH:OAuth フローが完全に本製品 により操作されることを示します。現在トークンが存在しない場合にはブラウザを通じてユーザーをプロンプトすることで取得されます。トークンが存在する場合には必要に応じてリフレッシュされます。
  3. REFRESH:本製品 がOAuthAccessToken のリフレッシュのみを操作することを示します。ユーザーは本製品 によりブラウザを通じて認証することをプロンプトされることはありません。OAuthAccessToken とOAuthRefreshToken の最初の取得はユーザーが行う必要があります。

CData JDBC Driver for Marketo

OAuthClientId

OAuth 認証サーバーを使用してアプリケーションを登録する場合に割り当てられたクライアントId。

データ型

string

デフォルト値

""

解説

OAuth アプリケーションの登録の一環として、コンシューマキーとも呼ばれるOAuthClientId 値、およびクライアントシークレットOAuthClientSecret が提供されます。

CData JDBC Driver for Marketo

OAuthClientSecret

OAuth 認証サーバーにアプリケーションを登録する場合に割り当てられたクライアントシークレット。

データ型

string

デフォルト値

""

解説

OAuth アプリケーションの登録の一環として、コンシューマキーとも呼ばれるOAuthClientId が提供されます。また、コンシューマーシークレットと呼ばれるクライアントシークレットも提供されます。クライアントシークレットをOAuthClientSecret プロパティに設定します。

CData JDBC Driver for Marketo

OAuthAccessToken

OAuth を使用して接続するためのアクセストークン。

データ型

string

デフォルト値

""

解説

OAuth を使用して接続するには、OAuthAccessToken プロパティが使用されます。認証プロセスにおいてOAuth サーバーからOAuthAccessToken が取得されます。このプロパティは、サーバーに依存するタイムアウトがあり、要求の間で再利用することができます。

アクセストークンは、ユーザー名とパスワードの代わりに使用されます。サーバー上で維持することで、認証情報が保護されます。

CData JDBC Driver for Marketo

OAuthSettingsLocation

InitiateOAuth が GETANDREFRESH 、または REFRESH に設定されているときの設定ファイルの場所。代わりに、'memory://' で始まる値を指定することで、この場所をメモリに保持することができます。

データ型

string

デフォルト値

"%APPDATA%\\CData\\Marketo Data Provider\\OAuthSettings.txt"

解説

InitiateOAuthGETANDREFRESH またはREFRESH に設定されている場合、本製品 がOAuth 値を保存するため、ユーザーが手動でOAuth 接続プロパティを入力する必要がなくなり、接続やプロセス間でクレデンシャルを共有できるようになります。

ファイルパスを指定する代わりに、メモリストレージを使用することができます。メモリの場所は、'memory://' で始まる値とそのクレデンシャルのセット(例:memory://user1)の一意の識別子を使用して指定します。識別子は何でも構いませんが、ユーザーに固有のものでなければなりません。資格情報が接続間で永続化されるファイルベースのストレージとは異なり、メモリストレージは資格情報を静的メモリにロードし、資格情報はプロセスが継続している間は同じ識別子を使用して接続間で共有されます。そのプロセス外で資格情報を永続化するには、接続を閉じる前に資格情報を手動で保存する必要があります。これにより、プロセスが再開されたときに接続にそれらを設定することができます。OAuth プロパティ値は、sys_connection_props システムテーブルへのクエリで取得できます。複数の接続で同じ資格情報を使用している場合は、プロパティは最後に閉じた接続から読み取られます。

デフォルトの場所は"%APPDATA%\\CData\\Marketo Data Provider\\OAuthSettings.txt" となり、%APPDATA% はユーザーのコンフィギュレーションディレクトリに設定されます。デフォルト値は次のとおりです。

  • Windows:"register://%DSN"
  • Unix:"%AppData%..."
  • Mac:"%AppData%..."

DSN はオープン接続で使用される現在のDSN の名前です。

以下のテーブルは、OS 別の%APPDATA% 値の一覧です。

プラットフォーム %APPDATA%
Windows APPDATA 環境変数の値
Mac ~/Library/Application Support
Linux ~/.config

CData JDBC Driver for Marketo

OAuthExpiresIn

OAuth アクセストークンの有効期限(秒単位)。

データ型

string

デフォルト値

""

解説

OAuthTokenTimestamp と併用して、アクセストークンの有効期限を決定します。

CData JDBC Driver for Marketo

OAuthTokenTimestamp

現在のアクセストークンが作成されたときのUnix エポックタイムスタンプ(ミリ秒)。

データ型

string

デフォルト値

""

解説

OAuthExpiresIn と併用して、アクセストークンの有効期限を決定します。

CData JDBC Driver for Marketo

SSL

このセクションでは、本プロバイダーの接続文字列で設定可能なSSL プロパティの全リストを提供します。


プロパティ説明
SSLServerCertTLS/SSL を使用して接続するときに、サーバーが受け入れ可能な証明書。
CData JDBC Driver for Marketo

SSLServerCert

TLS/SSL を使用して接続するときに、サーバーが受け入れ可能な証明書。

データ型

string

デフォルト値

""

解説

TLS/SSL 接続を使用する場合は、このプロパティを使用して、サーバーが受け入れるTLS/SSL 証明書を指定できます。コンピュータによって信頼されていない他の証明書はすべて拒否されます。

このプロパティは、次のフォームを取ります:

説明
フルPEM 証明書(例では省略されています) -----BEGIN CERTIFICATE----- MIIChTCCAe4CAQAwDQYJKoZIhv......Qw== -----END CERTIFICATE-----
証明書を保有するローカルファイルへのパス。 C:\cert.cer
公開鍵(例では省略されています) -----BEGIN RSA PUBLIC KEY----- MIGfMA0GCSq......AQAB -----END RSA PUBLIC KEY-----
MD5 Thumbprint (hex 値はスペースおよびコロン区切り) ecadbdda5a1529c58a1e9e09828d70e4
SHA1 Thumbprint (hex 値はスペースおよびコロン区切り) 34a929226ae0819f2ec14b4a3d904f801cbb150d

これを指定しない場合は、マシンが信用するすべての証明書が受け入れられます。

証明書は、システムのトラストストアに基づいてマシンによって信頼されていると検証されています。使用されるトラストストアは、システムに指定された'javax.net.ssl.trustStore' 値になります。このプロパティに値が指定されていない場合は、Java のデフォルトのトラストストア(例えば、JAVA_HOME\lib\security\cacerts)が使用されます。

すべての証明書の受け入れを示すには、'*'を使用します。セキュリティ上の理由から、これはお勧めできません。

CData JDBC Driver for Marketo

Firewall

このセクションでは、本プロバイダーの接続文字列で設定可能なFirewall プロパティの全リストを提供します。


プロパティ説明
FirewallTypeプロキシベースのファイアウォールで使われるプロトコル。
FirewallServerプロキシベースのファイアウォールの名前もしくはIP アドレス。
FirewallPortプロキシベースのファイアウォールのTCP ポート。
FirewallUserプロキシベースのファイアウォールに認証するために使うユーザー名。
FirewallPasswordプロキシベースのファイアウォールへの認証に使われるパスワード。
CData JDBC Driver for Marketo

FirewallType

プロキシベースのファイアウォールで使われるプロトコル。

Possible Values

NONE, TUNNEL, SOCKS4, SOCKS5

データ型

string

デフォルト値

"NONE"

解説

このプロパティは、本製品 がFirewallServer プロキシ経由でトンネルトラフィックを使うためのプロトコルを指定します。デフォルトでは、本製品 はシステムプロキシに接続します。この動作を無効化し次のプロキシタイプのどれかで接続するには、ProxyAutoDetect をfalse に設定します。

タイプ デフォルトポート 説明
TUNNEL 80 これが設定されている場合、本製品 はMarketo への接続を開き、プロキシを経由して通信が行われます。
SOCKS4 1080 これが設定されている場合、本製品 はデータをFirewallServer およびFirewallPort で指定されたSOCS 4 プロキシ経由で送信し、接続リクエストが許容されるかどうかを決定します。
SOCKS5 1080 これが設定されている場合、本製品 はデータをFirewallServer およびFirewallPort で指定されたSOCS 5 プロキシ経由で送信します。プロキシに認証が必要な場合には、FirewallUser およびFirewallPassword をプロキシが認識する認証情報に設定します。

HTTP プロキシへの接続には、ProxyServer およびProxyPort ポートを使ってください。HTTP プロキシへの認証には、ProxyAuthSchemeProxyUser、およびProxyPassword を使ってください。

CData JDBC Driver for Marketo

FirewallServer

プロキシベースのファイアウォールの名前もしくはIP アドレス。

データ型

string

デフォルト値

""

解説

ファイアウォールトラバーサルを許容するために設定するIP アドレス、DNS 名、もしくはプロキシホスト名を指定するプロパティです。プロトコルはFirewallType で指定されます。このプロパティとFirewallServer を使って、SOCKS 経由での接続、もしくはトンネリングが可能です。HTTP プロキシへの接続には、ProxyServer を使用します。

本製品 はデフォルトでシステムプロキシを使うので注意してください。他のプロキシを使う場合には、ProxyAutoDetect をfalse に設定してください。

CData JDBC Driver for Marketo

FirewallPort

プロキシベースのファイアウォールのTCP ポート。

データ型

int

デフォルト値

0

解説

ファイアウォールトラバーサルを許容するために設定するプロキシベースのファイアウォールのTCP ポート。名前もしくはIP アドレスを指定するには、FirewallServer を使います。FirewallType でプロトコルを指定します。

CData JDBC Driver for Marketo

FirewallUser

プロキシベースのファイアウォールに認証するために使うユーザー名。

データ型

string

デフォルト値

""

解説

FirewallUser およびFirewallPassword プロパティは、FirewallType により指定された認証方式に則り、FirewallServer、およびFirewallPort で指定されたプロキシに対しての認証に使われます。

CData JDBC Driver for Marketo

FirewallPassword

プロキシベースのファイアウォールへの認証に使われるパスワード。

データ型

string

デフォルト値

""

解説

このプロパティは、FirewallType により指定された認証メソッドに則り、FirewallServer およびFirewallPort で指定されたプロキシに渡されます。

CData JDBC Driver for Marketo

Proxy

このセクションでは、本プロバイダーの接続文字列で設定可能なProxy プロパティの全リストを提供します。


プロパティ説明
ProxyAutoDetectこの接続プロパティをTrue に設定すると、provider は既存のプロキシサーバー構成についてシステムプロキシ設定をチェックします(プロキシサーバーの詳細を手動で入力する必要はありません)。特定のプロキシサーバーに接続するためにprovider を手動で構成する場合は、False に設定します。
ProxyServerHTTP トラフィックをルートするプロキシサーバーのホストネームもしくはIP アドレス。
ProxyPortプロキシサーバー( ProxyServer 接続プロパティで指定)が起動しているTCP ポート。
ProxyAuthSchemeProxyServer 接続プロパティで指定されたプロキシサーバーに対して認証する際にprovider が使用する認証方法。
ProxyUserProxyServer 接続プロパティで指定されたプロキシサーバーに登録されているユーザーアカウントのユーザー名。
ProxyPasswordProxyUser 接続プロパティで指定されたユーザに紐付けられたパスワード。
ProxySSLTypeProxyServer プロキシへの接続時に使用するSSL タイプ。
ProxyExceptionsProxyServer 経由での接続が免除される宛先ホスト名またはIP のセミコロン区切りのリスト。
CData JDBC Driver for Marketo

ProxyAutoDetect

この接続プロパティをTrue に設定すると、provider は既存のプロキシサーバー構成についてシステムプロキシ設定をチェックします(プロキシサーバーの詳細を手動で入力する必要はありません)。特定のプロキシサーバーに接続するためにprovider を手動で構成する場合は、False に設定します。

データ型

bool

デフォルト値

false

解説

この接続プロパティは他のプロキシ設定よりも優先されるため、カスタムプロキシ設定を使用するにはProxyAutoDetect をFalse に設定する必要があります。

このプロパティがTrue に設定されている場合、使用するプロキシはこれらの場所をこの順番でチェックして決定されます。ある場所でプロキシが決定できない場合、本製品 は次の場所をチェックします。

  1. 本製品 は、JVM のプロパティ(http.proxy、https.proxy、socksProxy など)から検索を行います。
  2. JVM のプロパティが存在しない場合、本製品 はjava.home/lib/net.properties を検索します。
  3. java.net.useSystemProxies がTrue に設定されている場合、本製品 はSystemProxy を検索します。
  4. Windows では、プロキシ設定はレジストリインターネットオプション、具体的にはレジストリキーHKCU\SOFTWARE\Microsoft\Windows\CurrentVersion\Internet Settings\ から読み込まれます。Windows 10以降では、Windows の設定にあるプロキシの設定に対応します。

これらの設定は、マシンの現在のユーザーにのみ適用されることに注意してください。アプリケーションをサービスとして実行している場合、本製品 はユーザー設定を読み込みません。代わりに、本製品 の接続プロパティでプロキシ設定を手動で行う必要があります。

HTTP プロキシへの接続には、ProxyServer を参照してください。SOCKS やトンネリングなどの他のプロキシには、FirewallType を参照してください。

CData JDBC Driver for Marketo

ProxyServer

HTTP トラフィックをルートするプロキシサーバーのホストネームもしくはIP アドレス。

データ型

string

デフォルト値

""

解説

HTTP トラフィックをルートするためのプロキシのホストネームもしくはIP アドレス。HTTP プロキシへの認証には、本製品 はHTTP、Windows(NTLM)、もしくはKerberos 認証タイプを使用することができます。

SOCKS プロキシを経由して接続する、もしくは接続をトンネルするには、FirewallType を参照してください。

デフォルトで、本製品 はシステムプロキシを使います。他のプロキシを使う場合には、ProxyAutoDetect をfalse に設定します。

CData JDBC Driver for Marketo

ProxyPort

プロキシサーバー( ProxyServer 接続プロパティで指定)が起動しているTCP ポート。

データ型

int

デフォルト値

80

解説

HTTP トラフィックをリダイレクトするHTTP プロキシが実行されているポート。ProxyServer でHTTP プロキシを指定します。その他のプロキシタイプについては、FirewallType を参照してください。

CData JDBC Driver for Marketo

ProxyAuthScheme

ProxyServer 接続プロパティで指定されたプロキシサーバーに対して認証する際にprovider が使用する認証方法。

Possible Values

BASIC, DIGEST, NONE, NEGOTIATE, NTLM, PROPRIETARY

データ型

string

デフォルト値

"BASIC"

解説

この値は、ProxyServer およびProxyPort で指定されるHTTP プロキシに認証するために使われる認証タイプを指定します。

認証タイプは、次のどれかになります。

  • BASIC:本製品 はHTTP BASIC 認証を行います。
  • DIGEST:本製品 はHTTP DIGEST 認証を行います。
  • NEGOTIATE:本製品 は認証において有効なプロトコルに応じて、NTLM もしくはKerberos トークンを取得します。
  • PROPRIETARY:本製品 はNTLM もしくはKerberos トークンを発行しません。このトークンを、HTTP リクエストのAuthorization ヘッダーに含める必要があります。

SOCKS 5 認証のような他の認証タイプを使用するには、FirewallType を参照してください。

CData JDBC Driver for Marketo

ProxyUser

ProxyServer 接続プロパティで指定されたプロキシサーバーに登録されているユーザーアカウントのユーザー名。

データ型

string

デフォルト値

""

解説

ProxyUser および ProxyPassword オプションは、ProxyServer で指定されたHTTP プロキシに対して接続および認証するために使用されます。

ProxyAuthScheme で使用可能な認証タイプを選択することができます。HTTP 認証を使う場合、これをHTTP プロキシで識別可能なユーザーのユーザー名に設定します。Windows もしくはKerberos 認証を使用する場合、このプロパティを次の形式のどれかでユーザー名に設定します。

user@domain
domain\user

CData JDBC Driver for Marketo

ProxyPassword

ProxyUser 接続プロパティで指定されたユーザに紐付けられたパスワード。

データ型

string

デフォルト値

""

解説

このプロパティは、NTLM(Windows)、Kerberos、もしくはHTTP 認証をサポートするHTTP プロキシサーバーに認証するために使われます。HTTP プロキシを指定するためには、ProxyServer およびProxyPort を設定します。認証タイプを指定するためにはProxyAuthScheme を設定します。

HTTP 認証を使う場合、さらにProxyUser およびProxyPassword をHTTP プロキシに設定します。

NTLM 認証を使う場合、ProxyUser およびProxyPassword をWindows パスワードに設定します。Kerberos 認証には、これらを入力する必要があります。

SOCKS 5 認証もしくは、トンネリングは、FirewallType を参照してください。

デフォルトで、本製品 はsystem プロキシを使います。他のプロキシに接続する場合には、ProxyAutoDetect をfalse に設定します。

CData JDBC Driver for Marketo

ProxySSLType

ProxyServer プロキシへの接続時に使用するSSL タイプ。

Possible Values

AUTO, ALWAYS, NEVER, TUNNEL

データ型

string

デフォルト値

"AUTO"

解説

このプロパティは、ProxyServer で指定されたHTTP プロキシへの接続にSSL を使用するかどうかを決定します。この値は、AUTO、ALWAYS、NEVER、TUNNEL のいずれかです。有効な値は次のとおりです。

AUTOデフォルト設定。URL がHTTPS URL の場合、本製品 は、TUNNEL オプションを使います。URL がHTTP URL の場合、コンポーネントはNEVER オプションを使います。
ALWAYS接続は、常にSSL 有効となります。
NEVER接続は、SSL 有効になりません。
TUNNEL接続は、トンネリングプロキシを経由します。プロキシサーバーがリモートホストへの接続を開き、プロキシを経由して通信が行われます。

CData JDBC Driver for Marketo

ProxyExceptions

ProxyServer 経由での接続が免除される宛先ホスト名またはIP のセミコロン区切りのリスト。

データ型

string

デフォルト値

""

解説

ProxyServer は、このプロパティで定義されたアドレスを除くすべてのアドレスに使用されます。セミコロンを使用してエントリを区切ります。

本製品 は、追加設定なしにデフォルトでシステムのプロキシ設定を使います。この接続のプロキシ例外を明示的に構成するには、ProxyAutoDetect をfalse に設定して、ProxyServer およびProxyPort を設定する必要があります。認証するには、ProxyAuthScheme を設定し、必要な場合にはProxyUser およびProxyPassword を設定します。

CData JDBC Driver for Marketo

Logging

このセクションでは、本プロバイダーの接続文字列で設定可能なLogging プロパティの全リストを提供します。


プロパティ説明
Logfileログファイルの名前と場所を指定するファイルパス。
Verbosityログファイルの記述をどの程度の詳細さで記載するかを決定するverbosity レベル。
LogModulesログファイルに含めるコアモジュール。
MaxLogFileSizeログファイルの最大バイトサイズ(例えば、10MB)を指定する文字列。
MaxLogFileCountログファイルの最大ファイル数を指定する文字列。
CData JDBC Driver for Marketo

Logfile

ログファイルの名前と場所を指定するファイルパス。

データ型

string

デフォルト値

""

解説

このプロパティを設定すると、認証が実行されたときやクエリが実行されたときなど、さまざまなタスクを実行する際に、本製品 がログファイルを生成します。指定したファイルが存在しない場合は作成されます。

接続文字列およびバージョン情報も記録されますが、機密情報を含む接続プロパティは自動的にマスクされます。

相対ファイルパスが指定された場合、ログファイルの場所は、Location 接続プロパティにあるパスに基づいて解決されます。

ログファイルに記録される内容をより細かく制御するには、Verbosity プロパティを調整してください。

ログ内容はいくつかのモジュールに分類されます。LogModules プロパティを使うことで、個々のモジュールを表示または非表示にすることができます。

新しいログファイルの作成前にログファイル1つの最大サイズを変更する方法については、MaxLogFileSize を参照してください。

生成されるログファイル数に上限を設定したい場合は、MaxLogFileCount を使用してください。

Java のログ出力

Java のログ出力もサポートされています。Java のログ出力を有効化するには、Logfile を次のように設定します:

Logfile=JAVALOG://myloggername

上記の例のように、JAVALOG:// がJava のログを使用するための必須プレフィックスで、独自のロガーで代用することになります。

次に、指定されたロガーのgetLogger メソッドが呼び出され、指定された値を使用してLogger インスタンスが作成されます。ログのインスタンスがすでに存在する場合は、既存のインスタンスを参照します。

Java のログ出力が有効になっている場合、Verbosity は特定のログレベルに対応します。

CData JDBC Driver for Marketo

Verbosity

ログファイルの記述をどの程度の詳細さで記載するかを決定するverbosity レベル。

データ型

string

デフォルト値

"1"

解説

Verbosity レベルは、本製品 がLogfile にどの程度の詳細さで記載するかを決定します。1 から5 までのVerbosity レベルがサポートされています。より詳しい説明は、ログ ページに記載されています。

CData JDBC Driver for Marketo

LogModules

ログファイルに含めるコアモジュール。

データ型

string

デフォルト値

""

解説

指定された(';' で区切られた)モジュールのみがログファイルに含まれます。デフォルトではすべてのモジュールが含まれます。

概要はログ ページを参照してください。

CData JDBC Driver for Marketo

MaxLogFileSize

ログファイルの最大バイトサイズ(例えば、10MB)を指定する文字列。

データ型

string

デフォルト値

"100MB"

解説

サイズリミットを超えると、日付と時刻が末尾に追加された新しいログが同じフォルダ内に作成されます。リミットのデフォルトは100 MB です。100 kB より小さい値を設定した場合、100 kB がリミットとなります。

生成されるログファイルの最大数は、MaxLogFileCount で調整できます。

CData JDBC Driver for Marketo

MaxLogFileCount

ログファイルの最大ファイル数を指定する文字列。

データ型

int

デフォルト値

-1

解説

サイズリミットを超えると、日付と時刻が末尾に追加された新しいログが同じフォルダ内に作成され、最も古いログファイルが削除されます。

サポートされている最小値は2です。0や負の値は、数に制限がないことを示します。

生成されるログファイルの最大サイズは、MaxLogFileSize で調整できます。

CData JDBC Driver for Marketo

Schema

このセクションでは、本プロバイダーの接続文字列で設定可能なSchema プロパティの全リストを提供します。


プロパティ説明
Locationテーブル、ビュー、およびストアドプロシージャを定義するスキーマファイルを格納するディレクトリへのパス。
BrowsableSchemasこのプロパティは、使用可能なスキーマのサブセットにレポートされるスキーマを制限します。例えば、BrowsableSchemas=SchemaA,SchemaB,SchemaC です。
Tablesこのプロパティは、使用可能なテーブルのサブセットにレポートされるテーブルを制限します。例えば、Tables=TableA,TableB,TableC です。
Views使用可能なテーブルのサブセットにレポートされるビューを制限します。例えば、Views=ViewA,ViewB,ViewC です。
CData JDBC Driver for Marketo

Location

テーブル、ビュー、およびストアドプロシージャを定義するスキーマファイルを格納するディレクトリへのパス。

データ型

string

デフォルト値

"%APPDATA%\\CData\\Marketo Data Provider\\Schema"

解説

本製品 のスキーマファイル(テーブルとビューの場合は.rsd ファイル、ストアドプロシージャの場合は.rsb ファイル)を含むディレクトリへのパス。このフォルダの場所は、実行ファイルの場所からの相対パスにすることができます。Location プロパティは、定義をカスタマイズしたり(例えば、カラム名を変更する、カラムを無視するなど)、新しいテーブル、ビュー、またはストアドプロシージャでデータモデルを拡張する場合にのみ必要です。

指定しない場合、デフォルトの場所は"%APPDATA%\\CData\\Marketo Data Provider\\Schema" となり、%APPDATA% はユーザーのコンフィギュレーションディレクトリに設定されます:

Platform %APPDATA%
Windows APPDATA 環境変数の値
Mac ~/Library/Application Support
Linux ~/.config

CData JDBC Driver for Marketo

BrowsableSchemas

このプロパティは、使用可能なスキーマのサブセットにレポートされるスキーマを制限します。例えば、BrowsableSchemas=SchemaA,SchemaB,SchemaC です。

データ型

string

デフォルト値

""

解説

スキーマをデータベースからリストすると、負荷がかかる可能性があります。接続文字列でスキーマのリストを提供すると、 パフォーマンスが向上します。

CData JDBC Driver for Marketo

Tables

このプロパティは、使用可能なテーブルのサブセットにレポートされるテーブルを制限します。例えば、Tables=TableA,TableB,TableC です。

データ型

string

デフォルト値

""

解説

テーブルを複数のデータベースからリストすると、負荷がかかる可能性があります。接続文字列でテーブルのリストを提供すると、本製品 のパフォーマンスが向上します。

このプロパティは、作業したいビューがすでにわかっていて、ビューが多すぎる場合に、ビューを自動的にリストする代わりに使用することもできます。

カンマ区切りのリストで使用したいテーブルを指定します。各テーブルは、角かっこ、二重引用符、またはバッククオートを使用してエスケープされた特殊文字列を含む有効なSQL 識別子である必要があります。 例えば、Tables=TableA,[TableB/WithSlash],WithCatalog.WithSchema.`TableC With Space` です。

複数のスキーマまたはカタログを持つデータソースに接続する場合は、複数のカタログやスキーマに存在するテーブル間の曖昧さを避けるため、最後の例のように、このプロパティにテーブルの完全修飾名を指定する必要があることに注意してください。

CData JDBC Driver for Marketo

Views

使用可能なテーブルのサブセットにレポートされるビューを制限します。例えば、Views=ViewA,ViewB,ViewC です。

データ型

string

デフォルト値

""

解説

ビューを複数のデータベースからリストすると、負荷がかかる可能性があります。接続文字列でビューのリストを提供すると、本製品 のパフォーマンスが向上します。

このプロパティは、作業したいビューがすでにわかっていて、ビューが多すぎる場合に、ビューを自動的にリストする代わりに使用することもできます。

カンマ区切りのリストで使用したいビューを指定します。各ビューは、角かっこ、二重引用符、またはバッククオートを使用してエスケープされた特殊文字列を含む有効なSQL 識別子である必要があります。 例えば、Views=ViewA,[ViewB/WithSlash],WithCatalog.WithSchema.`ViewC With Space` です。

複数のスキーマまたはカタログを持つデータソースに接続する場合は、複数のカタログやスキーマに存在するテーブル間の曖昧さを避けるため、最後の例のように、このプロパティにテーブルの完全修飾名を指定する必要があることに注意してください。

CData JDBC Driver for Marketo

Caching

このセクションでは、本プロバイダーの接続文字列で設定可能なCaching プロパティの全リストを提供します。


プロパティ説明
AutoCacheSELECT クエリの結果を、 CacheLocation 、または CacheConnection と CacheProvider の両方で指定されたキャッシュデータベースに自動的にキャッシュします。
CacheDriverデータのキャッシュに使用されるデータベースドライバー。
CacheConnectionキャッシュデータベースの接続文字列。このプロパティは、常に CacheProvider と一緒に使用します。両プロパティを設定すると、データをキャッシュするための CacheLocation のバリューセットがオーバーライドされます。
CacheLocationキャッシュデータベースへのパスとファイル名を指定します。
CacheToleranceAutoCache 使用時のキャッシュ内の失効データに対する許容範囲の秒数。
Offlineオフラインモードを使用して、ライブソースではなくキャッシュからデータを取得します。
CacheMetadataこのプロパティは、テーブルメタデータをファイルストアにキャッシュするかどうかを決定します。
CData JDBC Driver for Marketo

AutoCache

SELECT クエリの結果を、 CacheLocation 、または CacheConnection と CacheProvider の両方で指定されたキャッシュデータベースに自動的にキャッシュします。

データ型

bool

デフォルト値

false

解説

AutoCache がtrue に設定されていると、本製品 はテーブルデータのキャッシュを選択したデータベースに自動的に保存します。

キャッシュデータベースの設定

AutoCache がtrue の場合、本製品 はシンプルなファイルベースストアにキャッシュします。次のプロパティを使って、場所またはキャッシュを別のデータベースに構成できます。

関連項目

  • CacheMetadata:このプロパティは、Marketo メタデータから取得したテーブルスキーマを永続化することによって、ネットワークを横断するメタデータの量を減らします。メタデータは、すべての接続で取得する必要はなく、一度取得するだけです。
  • 明示的なデータのキャッシュ:このセクションでは、AutoCacheOffline で使用する例をさらに示します。
  • CACHE ステートメント:CACHE ステートメントを使って、SELECT クエリを永続化し、キャッシュを管理(例えば、スキーマのリフレッシュ)ができます。

CData JDBC Driver for Marketo

CacheDriver

データのキャッシュに使用されるデータベースドライバー。

データ型

string

デフォルト値

""

解説

CData JDBC drivers を含むJDBC ドライバーが用意されている任意のデータベースにキャッシュできます。

キャッシュデータベースは、CacheDriver およびCacheConnection プロパティによって決定されます。CacheDriver は、データのキャッシュに使用するJDBC ドライバークラスの名前です。

Note:CacheDriver JAR ファイルをクラスパスに追加する必要があります。

次の例は、いくつかの主要なデータベースにキャッシュする方法を示しています。JDBC URL 構文および一般的な接続プロパティの詳細については、CacheConnection を参照してください。

Derby およびJava DB

Java DB は、Derby のOracle ディストリビューションです。Derby JDBC ドライバーのJAR ファイルはJDK に同梱されています。JAR ファイル、derby.jar は、JDK インストールフォルダのdb サブフォルダに格納されています。classpath にderby.jar を追加した後、以下のようにJava DB データベースにキャッシュすることができます。

jdbc:marketo:CacheDriver=org.apache.derby.jdbc.EmbeddedDriver;CacheConnection='jdbc:derby:sample';URL=https://MyMarketoURL.mktorest.com/;OAuthClientId=MyOAuthClientId;OAuthClientSecret=MyOAuthClientSecret;
インメモリデータベースにキャッシュするには、次のようにJDBC URL を使用します。
jdbc:marketo:CacheDriver=org.apache.derby.jdbc.EmbeddedDriver;CacheConnection='jdbc:derby:memory';URL=https://MyMarketoURL.mktorest.com/;OAuthClientId=MyOAuthClientId;OAuthClientSecret=MyOAuthClientSecret;

SQLite

次はSQLite JDBC ドライバーのJDBC URL です。

jdbc:marketo:CacheDriver=org.sqlite.JDBC;CacheConnection='jdbc:sqlite:C:/Temp/sqlite.db';URL=https://MyMarketoURL.mktorest.com/;OAuthClientId=MyOAuthClientId;OAuthClientSecret=MyOAuthClientSecret;

MySQL

次はCData JDBC Driver for MySQL のJDBC URL です。

  jdbc:marketo:Cache Driver=cdata.jdbc.mysql.MySQLDriver;Cache Connection='jdbc:mysql:Server=localhost;Port=3306;Database=cache;User=root;Password=123456';URL=https://MyMarketoURL.mktorest.com/;OAuthClientId=MyOAuthClientId;OAuthClientSecret=MyOAuthClientSecret;
  

SQL Server

次のJDBC URL はMicrosoft JDBC Driver for SQL Server を使用しています。

jdbc:marketo:Cache Driver=com.microsoft.sqlserver.jdbc.SQLServerDriver;Cache Connection='jdbc:sqlserver://localhost\sqlexpress:7437;user=sa;password=123456;databaseName=Cache';URL=https://MyMarketoURL.mktorest.com/;OAuthClientId=MyOAuthClientId;OAuthClientSecret=MyOAuthClientSecret;

Oracle

次はOracle Thin Client のJDBC URL です。

jdbc:marketo:Cache Driver=oracle.jdbc.OracleDriver;CacheConnection='jdbc:oracle:thin:scott/tiger@localhost:1521:orcldb';URL=https://MyMarketoURL.mktorest.com/;OAuthClientId=MyOAuthClientId;OAuthClientSecret=MyOAuthClientSecret;
NOTE:9i より前のバージョンのOracle を使用している場合は、キャッシュドライバーは代わりにoracle.jdbc.driver.OracleDriver になります。

PostgreSQL

次のJDBC URL は公式のPostgreSQL JDBC ドライバーを使用しています。

jdbc:marketo:CacheDriver=cdata.jdbc.postgresql.PostgreSQLDriver;CacheConnection='jdbc:postgresql:User=postgres;Password=admin;Database=postgres;Server=localhost;Port=5432;';URL=https://MyMarketoURL.mktorest.com/;OAuthClientId=MyOAuthClientId;OAuthClientSecret=MyOAuthClientSecret;

CData JDBC Driver for Marketo

CacheConnection

キャッシュデータベースの接続文字列。このプロパティは、常に CacheProvider と一緒に使用します。両プロパティを設定すると、データをキャッシュするための CacheLocation のバリューセットがオーバーライドされます。

データ型

string

デフォルト値

""

解説

キャッシュデータベースは、CacheDriver およびCacheConnection プロパティに基づいて決定されます。キャッシュデータベースを使用するには、両方のプロパティが必須です。以下に、一般的なキャッシュデータベースの設定例を示します。キャッシュデータベースのドライバーの設定方法についての詳細は、CacheDriver を参照してください。

CacheConnection プロパティで指定された接続文字列は、基底のCacheDriver に直接渡されます。使用可能なプロパティについての詳細は、JDBC driver 固有のドキュメントを参照してください。アプリケーションのクラスパスにJDBC driver を含めてください。

Derby およびJava DB

CacheDriver およびCacheConnection を使用して、Derby への接続を設定します。次はDerby JDBC URL シンタックスです。

jdbc:derby:[subsubprotocol:][databaseName][;attribute=value[;attribute=value] ... ]
例えば、インメモリデータベースにキャッシュするには、次を使用します。
jdbc:derby:memory

SQLite

SQLite へキャッシュするにはSQLite JDBC ドライバーを使用できます。次はJDBC URL の構文です。

jdbc:sqlite:dataSource
  • Data Source:SQLite データベースファイルへのパス。または、:memoryの値を使ってインメモリにキャッシュします。

MySQL

インストールにはCData JDBC Driver for MySQL が含まれています。次にJDBC URL の例を示します。

jdbc:mysql:User=root;Password=root;Server=localhost;Port=3306;Database=cache
次は一般的な接続プロパティです。

  • Server:接続しようとするサーバーのIP アドレス、もしくはドメイン名。
  • Port:サーバーが起動しているポート名。
  • User:データベースへの認証のためのユーザー名。
  • Password:データベースへの認証のためのパスワード。
  • Database:データベース名。

SQL Server

Microsoft JDBC Driver for SQL Server のJDBC URL の構文は次のとおりです。

jdbc:sqlserver://[serverName[\instance][:port]][;database=databaseName][;property=value[;property=value] ... ]
次に例を示します。
jdbc:sqlserver://localhost\sqlexpress:1433;integratedSecurity=true
次は一般的なSQL Server 接続プロパティです。
  • Server:SQL Server を起動しているコンピューターの名前またはネットワークアドレス名。デフォルトインスタンスの代わりに名前付きインスタンスに接続する場合は、このプロパティを使ってホスト名およびインスタンスをバックスラッシュで区切って指定できます。
  • Port:SQL Server が起動しているポート。
  • Database:SQL Server データベース名。
  • Integrated Security:現在のWindows アカウントを認証に使用する場合は、このオプションをtrue に設定します。接続でUser とPassword を設定する場合は、このオプションをfalse に設定します。

    統合セキュリティを使用するには、Windows システムパス上のフォルダにsqljdbc_auth.dll も追加する必要があります。このファイルは、Microsoft JDBC Driver for SQL Server インストールのauth サブフォルダにあります。アセンブリのビット数はJVM のビット数と一致する必要があります。

  • User Id:SQL Server との認証に使われるユーザー名。このプロパティは、統合セキュリティを使用していない場合にのみ必要です。
  • Password:SQL Server との認証に使われるパスワード。このプロパティは、統合セキュリティを使用していない場合にのみ必要です。

Oracle

次はOracle JDBC Thin ドライバーの従来のJDBC URL シンタックスです。

jdbc:oracle:thin:[userId/password]@[//]host[[:port][:sid]]
次に例を示します。
jdbc:oracle:thin:scott/tiger@myhost:1521:orcl
次は一般的な接続プロパティです。
  • Data Source:Oracle データベースを識別する接続記述子。これは、TSN 接続記述子、接続記述子を決定するOracle Net Services 名、またはバージョン11g以降ではEasy Connect ネーミング(任意のポート名およびサービス名を持つOracle サーバーのホスト名)になります。

  • Password:Oracle データベースへの認証のためのパスワード。
  • User Id:Oracle データベースへの認証のためのユーザーId。

PostgreSQL

次は公式のPostgreSQL JDBC ドライバーのJDBC URL 構文です。

jdbc:postgresql:[//[host[:port]]/]database[[?option=value][[&option=value][&option=value] ... ]]
例えば、次の接続文字列はデフォルトホスト(localhost)およびポート(5432)上のデータベースに接続します。
jdbc:postgresql:postgres
一般的な接続プロパティは次のとおりです:
  • Host:PostgreSQL データベースをホストしているサーバーのアドレス。
  • Port:PostgreSQL データベースをホスティングしているサーバーに接続する際のポート。
  • Database:データベース名。
  • User name:PostgreSQL データベースの認証用に提供されたユーザーId。"user" パラメータを使ってJDBC URL に指定できます。
  • Password:PostgreSQL データベースへの認証のためのパスワード。

CData JDBC Driver for Marketo

CacheLocation

キャッシュデータベースへのパスとファイル名を指定します。

データ型

string

デフォルト値

"%APPDATA%\\CData\\Marketo Data Provider"

解説

CacheLocation は単純なファイルベースキャッシュです。本製品 はJava DB、Oracle のDerby データベースのディストリビューションを使用しています。Java DB にキャッシュするには、Java DB JAR ファイルをクラスパスに追加する必要があります。JAR ファイル、derby.jar はJDK に同梱され、JDK インストールの[db]サブフォルダに配置されています。

指定しない場合、デフォルトの場所は"%APPDATA%\\CData\\Marketo Data Provider" となり、%APPDATA%はユーザーのコンフィギュレーションディレクトリに設定されます:

Platform %APPDATA%
Windows APPDATA 環境変数の値
Mac ~/Library/Application Support
Linux ~/.config

関連項目

  • AutoCache:後のオフライン使用のために、暗黙的にキャッシュを作成して維持するように設定します。
  • CacheMetadata:Marketo カタログをCacheLocation に永続化するように設定します。

CData JDBC Driver for Marketo

CacheTolerance

AutoCache 使用時のキャッシュ内の失効データに対する許容範囲の秒数。

データ型

int

デフォルト値

600

解説

キャッシュ内の失効データに対する許容範囲の秒数。これは、AutoCache が使用されている場合のみ有効です。本製品 は、許容インターバルが過ぎると、新しいレコードがないかデータソースをチェックしに行きます。それ以外は、キャッシュから直接データを返します。

CData JDBC Driver for Marketo

Offline

オフラインモードを使用して、ライブソースではなくキャッシュからデータを取得します。

データ型

bool

デフォルト値

false

解説

Offline がtrue に設定されている場合、すべてのクエリは、ライブデータソースではなくキャッシュに対して実行されます。このモードでは、INSERT、UPDATE、DELETE、CACHE などのクエリは許可されません。

CData JDBC Driver for Marketo

CacheMetadata

このプロパティは、テーブルメタデータをファイルストアにキャッシュするかどうかを決定します。

データ型

bool

デフォルト値

false

解説

このプロパティを設定してクエリを実行すると、Marketo カタログのテーブルメタデータが設定されている場合にはCacheLocation で指定されたファイルストアに、設定されていない場合にはホームディレクトリにキャッシュされます。テーブルのメタデータの取得は、テーブルがはじめてクエリされた際に一度だけ行われます。

CacheMetadata を使用するタイミング

本製品 は、はじめてテーブルやビューを発見したときから1時間の間、メタデータをインメモリに自動的に保管します。そのため、CacheMetadata は一般的には必要ありません。CacheMetadata は、大量のメタデータを扱う場合でメタデータオペレーションのコストが高い場合や、短い接続を大量に行う場合などに役立ちます。

CacheMetadata を使用しないタイミング

  • 変化しやすいメタデータを扱う場合:はじめてテーブルをクエリするとき、本製品 はそのメタデータをキャッシュします。このキャッシュはテーブルスキーマの更新を反映するために動的に更新されることはないため、新規、変更、削除されたカラムを取得するには、メタデータキャッシュを削除してリビルドする必要があります。よって、メタデータが頻繁に変更される場合には、インメモリキャッシュを使う方が便利です。
  • データベースにキャッシュする場合CacheMetadataCacheLocation でのみ使用可能です。CacheDriver およびCacheConnection プロパティで他のデータベースへのキャッシュが可能です。黙示的なキャッシュにはAutoCache を使ってください。

CData JDBC Driver for Marketo

Miscellaneous

このセクションでは、本プロバイダーの接続文字列で設定可能なMiscellaneous プロパティの全リストを提供します。


プロパティ説明
BatchSize送信する各バッチ処理の最大サイズ。
BulkLeadsSupportsUpdatedAtIf set to true, the updatedAt filter will be marked as server-side supported.
BulkProgramMembersSupportsUpdatedAtIf set to true, the updatedAt filter will be marked as server-side supported.
ConnectionLifeTime接続の最大有効期間(秒単位)。その時間が経過すると、接続オブジェクトは削除されます。
ConnectOnOpenこのプロパティは、接続が開かれたときにMarketo に接続するかどうかを指定します。
DownloadChunkSizeThe size of chunks (in bytes) when downloading large files.
IsCRMEnabledSet to true to avoid pushing tables that are not available when CRM is enabled in Marketo.
JobPollingIntervalThe maxmimum wait time in milliseconds between each job status poll.
MaxRowsクエリで集計またはGROUP BY を使用しない場合に返される行数を制限します。これはLIMIT 句よりも優先されます。
MaxThreads同時リクエスト数を指定します。
Otherこれらの隠しプロパティは特定のユースケースでのみ使用されます。
PagesizeMarketo から返されるページあたりの結果の最大数。
PoolIdleTimeout接続が閉じられる前に許容されたアイドル時間。
PoolMaxSizeプールの最大接続数。
PoolMinSizeプール内の最小接続数。
PoolWaitTime使用可能な接続を待機する最大秒数。
PseudoColumnsカラムとして公開する擬似カラムのセットを指定します。
Readonlyこのプロパティを使用して、provider からMarketo へのアクセスを読み取り専用に設定できます。
RTKライセンス供与で使用されるランタイムキー。
Timeoutタイムアウトエラーがスローされ、処理をキャンセルするまでの秒数。
UploadChunkSizeThe size of chunks (in bytes) when uploading large files.
UseBulkAPISpecifies whether to use the Marketo Bulk API.
UseConnectionPoolingこのプロパティは、コネクションプーリングを有効にします。
UserDefinedViewsカスタムビューを含むJSON コンフィギュレーションファイルを指すファイルパス。
CData JDBC Driver for Marketo

BatchSize

送信する各バッチ処理の最大サイズ。

データ型

int

デフォルト値

300

解説

BatchSize を0 より大きい値に設定すると、バッチ処理はバッチ全体をBatchSize のバッチに分割します。分割されたバッチは、個別にサーバーに送信されます。これは、サーバーに送信されるリクエストのサイズに制限がある場合に役立ちます。

BatchSize を0 に設定すると、指定されたバッチ全体が送信されます。

CData JDBC Driver for Marketo

BulkLeadsSupportsUpdatedAt

If set to true, the updatedAt filter will be marked as server-side supported.

Possible Values

Auto, True, False

データ型

string

デフォルト値

"Auto"

解説

Only some Marketo instances support the UpdatedAt filter for Leads Bulk Exports. To enable the filter you need to reach out to Marketo support.

True The Leads.UpdatedAt filter will be processed server-side.
False The Leads.UpdatedAt filter will be processed client-side.
Auto The driver will execute a probe query to check if the filter is supported or not.

CData JDBC Driver for Marketo

BulkProgramMembersSupportsUpdatedAt

If set to true, the updatedAt filter will be marked as server-side supported.

Possible Values

Auto, True, False

データ型

string

デフォルト値

"Auto"

解説

Only some Marketo instances support the UpdatedAt filter for ProgramMembers Bulk Exports. To enable the filter you need to reach out to Marketo support.

True The ProgramMembers.UpdatedAt filter will be processed server-side.
False The ProgramMembers.UpdatedAt filter will be processed client-side.
Auto The driver will execute a probe query to check if the filter is supported or not.

CData JDBC Driver for Marketo

ConnectionLifeTime

接続の最大有効期間(秒単位)。その時間が経過すると、接続オブジェクトは削除されます。

データ型

int

デフォルト値

0

解説

接続の最大有効期間(秒単位)。その時間が経過すると、接続オブジェクトは削除されます。デフォルトは0で、接続の有効期間に制限がないことを示します。

CData JDBC Driver for Marketo

ConnectOnOpen

このプロパティは、接続が開かれたときにMarketo に接続するかどうかを指定します。

データ型

bool

デフォルト値

false

解説

true に設定すると、接続が開かれたときにMarketo への接続が作成されます。このプロパティは、さまざまなデータベースツールで[接続のテスト]機能を利用できるようにします。

この機能はNOOP コマンドとして作用します。Marketo に接続できることを確認するために使用され、この初期接続からは何も維持されません。

このプロパティをfalse に設定すると、パフォーマンスが向上する場合があります(接続が開かれる回数に依存します)。

CData JDBC Driver for Marketo

DownloadChunkSize

The size of chunks (in bytes) when downloading large files.

データ型

string

デフォルト値

"3000000"

解説

The size of chunks (in bytes) to use when downloading large files, defaults to 3MB. To download the entire file in one chunk, set this value to -1.

CData JDBC Driver for Marketo

IsCRMEnabled

Set to true to avoid pushing tables that are not available when CRM is enabled in Marketo.

Possible Values

Auto, True, False

データ型

string

デフォルト値

"Auto"

解説

True Tables that are not available when CRM is enabled in Marketo will not be pushed.
False The driver will push all tables normally.
Auto The driver will execute a probe query to check if CRM is enabled or not.

CData JDBC Driver for Marketo

JobPollingInterval

The maxmimum wait time in milliseconds between each job status poll.

データ型

string

デフォルト値

"10000"

解説

Initially the wait time is 5 seconds and doubles until it reaches the given JobPollingInterval.

CData JDBC Driver for Marketo

MaxRows

クエリで集計またはGROUP BY を使用しない場合に返される行数を制限します。これはLIMIT 句よりも優先されます。

データ型

int

デフォルト値

-1

解説

クエリで集計またはGROUP BY を使用しない場合に返される行数を制限します。これはLIMIT 句よりも優先されます。

CData JDBC Driver for Marketo

MaxThreads

同時リクエスト数を指定します。

データ型

string

デフォルト値

"5"

解説

このプロパティを使用すると、複数のリクエストを同時に発行することができパフォーマンスが向上します。

CData JDBC Driver for Marketo

Other

これらの隠しプロパティは特定のユースケースでのみ使用されます。

データ型

string

デフォルト値

""

解説

以下にリストされているプロパティは、特定のユースケースで使用可能です。通常のドライバーのユースケースおよび機能では、これらのプロパティは必要ありません。

複数のプロパティをセミコロン区切りリストで指定します。

キャッシュの設定

CachePartial=Trueクエリで指定可能な一部のカラムのみをキャッシュします。
QueryPassthrough=True本製品 のSQL パーサーを使用する代わりに、指定のクエリをキャッシュデータベースに渡します。

統合およびフォーマット

DefaultColumnSizeデータソースがメタデータにカラムの長さを提供しない場合に、文字列フィールドのデフォルトの長さを設定します。デフォルト値は2000です。
ConvertDateTimeToGMT日時の値を、マシンのローカルタイムではなくGMT グリニッジ標準時に変換するかどうかを決定します。
RecordToFile=filename基底のソケットデータ転送を指定のファイルに記録します。

CData JDBC Driver for Marketo

Pagesize

Marketo から返されるページあたりの結果の最大数。

データ型

int

デフォルト値

300

解説

Pagesize プロパティは、Marketo から返されるページあたりの結果の最大数に影響を与えます。 データソースは、ほとんどのユースケースでデフォルトのページサイズを最適化しますが、クエリを実行する特定のオブジェクトまたはサービスのエンドポイントによっては、この値を調整する必要があることがあります。 ページサイズを大きくするとパフォーマンスの向上が期待できますが、ページあたりのメモリ消費量が増える可能性があります。

CData JDBC Driver for Marketo

PoolIdleTimeout

接続が閉じられる前に許容されたアイドル時間。

データ型

int

デフォルト値

60

解説

接続が閉じられるまで、プール内に残ることができる許容されたアイドル時間。デフォルトは60秒です。

CData JDBC Driver for Marketo

PoolMaxSize

プールの最大接続数。

データ型

int

デフォルト値

100

解説

プールの最大接続数。デフォルトは100です。このプロパティを無効にするには、プロパティ値を0以下に設定します。

CData JDBC Driver for Marketo

PoolMinSize

プール内の最小接続数。

データ型

int

デフォルト値

1

解説

プール内の最小接続数。デフォルトは1です。

CData JDBC Driver for Marketo

PoolWaitTime

使用可能な接続を待機する最大秒数。

データ型

int

デフォルト値

60

解説

接続が利用可能になるまで待機する最大秒数。新しい接続のリクエストが使用可能な接続を待ちこの時間を超過すると、エラーが返されます。デフォルトでは、新規リクエストは使用可能な接続を永久に待機します。

CData JDBC Driver for Marketo

PseudoColumns

カラムとして公開する擬似カラムのセットを指定します。

データ型

string

デフォルト値

""

解説

この接続設定の値は、"Table1=Column1;Table1=Column2;Table2=Column3" の形式です。

"*=*" のように"*" 文字を使用して、すべてのテーブルとすべてのカラムを含めることができます。

CData JDBC Driver for Marketo

Readonly

このプロパティを使用して、provider からMarketo へのアクセスを読み取り専用に設定できます。

データ型

bool

デフォルト値

false

解説

このプロパティがtrue に設定されている場合、本製品 はSELECT クエリのみ許可します。INSERT、UPDATE、DELETE、およびストアドプロシージャクエリではエラーが返されます。

CData JDBC Driver for Marketo

RTK

ライセンス供与で使用されるランタイムキー。

データ型

string

デフォルト値

""

解説

RTK プロパティは、ビルドにライセンスを供与するために使用されます。 このプロパティの設定方法については、付属のライセンスファイルを参照してください。このランタイムキーは、OEM ライセンスを購入した場合にのみ使用できます。

CData JDBC Driver for Marketo

Timeout

タイムアウトエラーがスローされ、処理をキャンセルするまでの秒数。

データ型

int

デフォルト値

300

解説

Timeout が0に設定されている場合は、操作がタイムアウトしません。処理が正常に完了するか、エラー状態になるまで実行されます。

Timeout の有効期限が切れても処理が完了していない場合は、本製品 は例外をスローします。

CData JDBC Driver for Marketo

UploadChunkSize

The size of chunks (in bytes) when uploading large files.

データ型

string

デフォルト値

"10000000"

解説

The size of chunks (in bytes) to use when uploading large files, defaults to 10MB. To upload the entire file in one chunk, set this value to -1.

CData JDBC Driver for Marketo

UseBulkAPI

Specifies whether to use the Marketo Bulk API.

Possible Values

Auto, True, False

データ型

string

デフォルト値

"False"

解説

True The Marketo Bulk API will be used to extract or import data where applicable in SELECT/UPSERT statemnts.
False The driver will not make use of the Bulk API.
Auto The driver will make use of the Bulk API only in cases when the REST API is not sufficient such as when querying more than 100_000 records from the ProgramMembers table.

CData JDBC Driver for Marketo

UseConnectionPooling

このプロパティは、コネクションプーリングを有効にします。

データ型

bool

デフォルト値

false

解説

このプロパティは、コネクションプーリングを有効にします。デフォルトはfalse です。 コネクションプールの使用に関する詳細は、 接続プール を参照してください。

CData JDBC Driver for Marketo

UserDefinedViews

カスタムビューを含むJSON コンフィギュレーションファイルを指すファイルパス。

データ型

string

デフォルト値

""

解説

ユーザー定義ビューは、UserDefinedViews.json というJSON 形式のコンフィギュレーションファイルで定義されています。本製品 は、このファイルで指定されたビューを自動的に検出します。

また、複数のビュー定義を持ち、UserDefinedViews 接続プロパティを使用して制御することも可能です。このプロパティを使用すると、指定されたビューのみが本製品 によって検知されます。

このユーザー定義ビューのコンフィギュレーションファイルは、次のようにフォーマットされています。

  • 各ルートエレメントはビューの名前を定義します。
  • 各ルートエレメントには、query と呼ばれる子エレメントが含まれており、この子エレメントにはビューのカスタムSQL クエリが含まれています。

次に例を示します。

{
	"MyView": {
		"query": "SELECT * FROM Leads WHERE MyColumn = 'value'"
	},
	"MyView2": {
		"query": "SELECT * FROM MyTable WHERE Id IN (1,2,3)"
	}
}
UserDefinedViews 接続プロパティを使用して、JSON コンフィギュレーションファイルの場所を指定します。次に例を示します。
"UserDefinedViews", C:\Users\yourusername\Desktop\tmp\UserDefinedViews.json
指定されたパスは引用符で囲まれていないことに注意してください。

Copyright (c) 2024 CData Software, Inc. - All rights reserved.
Build 24.0.9049