Amazon Athena Reader Parameters
Connection
Specifies the region to use when connecting to Amazon Web Services, and dictates where tables are read from.
Note: Athena tables are region-dependent, so selecting an incorrect region will prevent your table from appearing in the table list.
Specifies the Web Connection to use for authentication. If you're creating a new connection, selecting Embed Access Key auto populates the Access Key ID and Secret Access Key parameters with the provided credentials.
Web connections provide a convenient and secure way to store and reuse web connection parameters. For general information about web connections, please see Using Web Connections.
Allows the web connection credentials to be manually specified.
If Embed Access Key is selected, but credentials have not yet been provided, the reader will search for the credentials in various places, as defined below (see http://docs.aws.amazon.com).
Access Key ID
The AWS Access Key ID of the user who will access the database.
The user must exist in the database, and have appropriate permissions. If this entry is not found, the access key ID will be searched for in various places. These are, in order:
- a file called AwsCredentials.properties on the Java classpath
- aws.accessKeyId in the Java system properties
- the environment variable AWS_ACCESS_KEY_ID
Once a pair of credentials is found, the search will stop.
Secret Access Key
The secret access key associated with the user accessing the database.
If this parameter is not found, the secret key will be searched for in various places. These are, in order:
- a file called AwsCredentials.properties on the Java classpath
- aws.secretKey in the Java system properties
- the environment variable AWS_SECRET_KEY
The search will stop after a pair of credentials is found.
The Amazon S3 location to which your query output is written.
This should not be the same location that the Athena table source data lives, or the results of subsequent queries will be contaminated by the staging files.
Example: s3://mybucket/myfolder/
Note: This output is not deleted when the query completes. You should either use a location with default Object Expiration, or manually delete the output.
This parameter defines the time, in seconds, after which a query will be terminated if it has not yet returned a result.
If set to zero, there is no timeout. The default is 30.
Note: If this value is not set high enough, then the query will return the error Provider Error - Timeout Expired.
Constraints
After you have specified the database connection, click the Browse button to select tables for import. A connection window appears while the system compiles a table from the database.
Once the table list appears, you can select one or more tables, and then click OK to dismiss the window. The table name(s) will appear in the Table List field in the parameter box.
Schema Attributes
Use this parameter to expose Format Attributes in Workbench when you create a workspace:
- In a dynamic scenario, it means these attributes can be passed to the output dataset at runtime.
- In a non-dynamic scenario, you can use this parameter to expose additional attributes on multiple feature types.
Advanced
This parameter allows for the execution of SQL statements before opening a table for reading. For example, it may be necessary to create a temporary view before attempting to read from it.
For detailed information about SQL functions, click the corresponding menu item in the
.Available menu options depend on the format.
Multiple SQL commands can be delimited by a character specified using the FME_SQL_DELIMITER
directive, embedded at the beginning of the SQL block. The single character following this directive will be used to split the SQL block into SQL statements, which will then be sent to the database for execution. Note: Include a space before the character.
For example:
FME_SQL_DELIMITER ; DELETE FROM instructors ; DELETE FROM people WHERE LastName='Doe' AND FirstName='John'
Multiple delimiters are not allowed and the delimiter character will be stripped before being sent to the database.
Any errors occurring during the execution of these SQL statements will normally terminate the reader or writer (depending on where the SQL statement is executed) with an error. If the specified statement is preceded by a hyphen (“-”), such errors are ignored.
This parameter allows for the execution of SQL statements after a set of tables has been read. For example, it may be necessary to clean up a temporary view after creating it.
For detailed information about SQL functions, click the corresponding menu item in the
.Available menu options depend on the format.
Multiple SQL commands can be delimited by a character specified using the FME_SQL_DELIMITER
directive, embedded at the beginning of the SQL block. The single character following this directive will be used to split the SQL block into SQL statements, which will then be sent to the database for execution. Note: Include a space before the character.
For example:
FME_SQL_DELIMITER ; DELETE FROM instructors ; DELETE FROM people WHERE LastName='Doe' AND FirstName='John'
Multiple delimiters are not allowed and the delimiter character will be stripped before being sent to the database.
Any errors occurring during the execution of these SQL statements will normally terminate the reader or writer (depending on where the SQL statement is executed) with an error. If the specified statement is preceded by a hyphen (“-”), such errors are ignored.