Ready to get started?

Learn more about the CData JDBC Driver for Amazon Athena or download a free trial:

Download Now

FileMaker Pro からAthena Data への双方向連携

JDBC ドライバーのMySQL Remoting 機能を使用して、Mac またはWindows 用のFilemaker Pro にAthena data を連携します。

ここでは、CData JDBC Driver for Athena を使用してFileMaker Pro の外部SQL ソース(ESS)機能と連携する方法を説明します。これにより、FileMaker Pro のレコードを他の運用データストアの関連レコードとリンクできます。

リモートのMySQL データベースとしてAthena にアクセスするには、MySQL Remoting 機能を使用します。CData JDBC Driver for Athena は、MySQL のような従来のデータベースへの接続をサポートするが一般的なJDBC 接続はサポートしないFileMaker Pro のようなアプリケーションと連携するためにJDBC とMySQL の両方の規格を実装します。

FileMaker Pro のモードについて

There are two data access modes in FileMaker Pro:

  • Data Import: Athena data is copied into a FileMaker Pro database and can be refreshed on demand.To streamline this solution, use the CData ODBC driver, as FileMaker Pro supports ODBC natively, but it does not support JDBC.

    To use this approach, see ODBC Athena Integration in FileMaker Pro.

  • ESS:Instead of working with a local copy of the data, you can use the JDBC driver to create an external SQL source.The remote data can be modified in FileMaker Pro and tables can be used in the relationships graph like standard FileMaker Pro tables.

ESS 設定の概要

The JDBC driver is part of a data access chain.Compared to a native ODBC integration, FileMaker Pro integrations that use MySQL remoting have several additional components.This article shows how to link each of the following components with FileMaker Pro:

  1. The CData JDBC driver.
  2. The CData MySQL Remoting daemon (included with the driver).
  3. An ODBC driver for MySQL.

    On Windows, FileMaker Pro requires the official MySQL driver, the MySQL Connector\ODBC.

    On macOS, FileMaker Pro requires the Actual Technologies Open Databases ODBC driver.

  4. An ODBC driver manager.

    On Windows, the driver manager is built in.On macOS, you will need to install a driver manager before installing the ODBC driver; install the iODBC driver manager.

Remoting Daemon を起動

Follow the steps below to enable the MySQL Remoting feature:

  1. Open Terminal and change to the lib subfolder in the installation folder.

    $ cd "/Applications/CData/CData JDBC Driver for Athena/lib"
  2. Start the MySQL daemon by specifying the configuration file or settings on the command line.The example below uses the included sample configuration file.

    $ java -jar cdata.jdbc.amazonathena.jar -f "cdata.jdbc.amazonathena.remoting.ini"

    Authenticating to Amazon Athena

    To authorize Amazon Athena requests, provide the credentials for an administrator account or for an IAM user with custom permissions: Set AccessKey to the access key Id. Set SecretKey to the secret access key.

    Note: Though you can connect as the AWS account administrator, it is recommended to use IAM user credentials to access AWS services.

    Obtaining the Access Key

    To obtain the credentials for an IAM user, follow the steps below:

    1. Sign into the IAM console.
    2. In the navigation pane, select Users.
    3. To create or manage the access keys for a user, select the user and then select the Security Credentials tab.

    To obtain the credentials for your AWS root account, follow the steps below:

    1. Sign into the AWS Management console with the credentials for your root account.
    2. Select your account name or number and select My Security Credentials in the menu that is displayed.
    3. Click Continue to Security Credentials and expand the Access Keys section to manage or create root account access keys.

    Authenticating from an EC2 Instance

    If you are using the CData Data Provider for Amazon Athena 2018 from an EC2 Instance and have an IAM Role assigned to the instance, you can use the IAM Role to authenticate. To do so, set UseEC2Roles to true and leave AccessKey and SecretKey empty. The CData Data Provider for Amazon Athena 2018 will automatically obtain your IAM Role credentials and authenticate with them.

    Authenticating as an AWS Role

    In many situations it may be preferable to use an IAM role for authentication instead of the direct security credentials of an AWS root user. An AWS role may be used instead by specifying the RoleARN. This will cause the CData Data Provider for Amazon Athena 2018 to attempt to retrieve credentials for the specified role. If you are connecting to AWS (instead of already being connected such as on an EC2 instance), you must additionally specify the AccessKey and SecretKey of an IAM user to assume the role for. Roles may not be used when specifying the AccessKey and SecretKey of an AWS root user.

    Authenticating with MFA

    For users and roles that require Multi-factor Authentication, specify the MFASerialNumber and MFAToken connection properties. This will cause the CData Data Provider for Amazon Athena 2018 to submit the MFA credentials in a request to retrieve temporary authentication credentials. Note that the duration of the temporary credentials may be controlled via the TemporaryTokenDuration (default 3600 seconds).

    Connecting to Amazon Athena

    In addition to the AccessKey and SecretKey properties, specify Database, S3StagingDirectory and Region. Set Region to the region where your Amazon Athena data is hosted. Set S3StagingDirectory to a folder in S3 where you would like to store the results of queries.

    If Database is not set in the connection, the data provider connects to the default database set in Amazon Athena.

    See the help documentation for more information about the available connection properties and other configuration options for remoting.

DSN の作成

After connecting successfully to Athena and starting the MySQL daemon, create a MySQL ODBC data source. When working with ODBC data sources, you specify connection properties in a DSN (data source name).

If you have not already obtained an ODBC driver and driver manager, refer to "Outlining the ESS Setup" to determine the components supported for your platform.

macOS

Follow the steps below to use the iODBC graphical administrator tool:

  1. Open iODBC by searching in the launchpad.
  2. On the System DSN tab, click Add and select Actual Open Source Databases.
  3. Provide the following information to complete the wizard:
    • Name:Enter the DSN.
    • Server:Enter 127.0.0.1 or the address of the machine where the MySQL daemon is running.
    • Port:Enter the port that the daemon is listening on.For example, 3306.
    • Database:Enter the name of a database specified in the config file for the daemon.For example, AmazonAthena.
  4. Click Test Connection and enter your credentials in the dialog.

Windows

You can use the built-in Microsoft ODBC Data Source Administrator to create the ODBC DSN.

  1. From the Control Panel, select Set Up Data Sources (ODBC).The ODBC Data Source Administrator is displayed.
  2. On the System DSN tab, click Add and select the MySQL ODBC driver.
  3. Provide the following information to complete the wizard:
    • Name:Enter the DSN.
    • Server:Enter 127.0.0.1 or the address of the machine where the MySQL daemon is running.
    • Port:Enter the port that the daemon is listening on.For example, 3306.
    • Database:Enter the name of a database specified in the config file for the daemon.For example, AmazonAthena.
  4. Click Test Connection and enter your credentials in the dialog.

Athena シャドウテーブルの作成

Shadow tables exist in an external SQL source but can be used in much the same way as other tables in your FileMaker database; you can add them in the relationships graph, browse data, and create layouts on them.

  1. Click File -> Manage -> Database.
  2. On the Relationships tab of the resulting dialog, click the Add a Table button in the Table/Relationships section.
  3. In the Data Source menu, select Add ODBC Data Source and then select the DSN you created in the previous section.

After specifying the username and password for the DSN, you can add Athena tables to the relationships graph. You can now scroll through, sort, edit, and summarize Athena data by clicking View -> Browse Mode, just as you would a remote MySQL database.

 
 
ダウンロード