You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+10-6Lines changed: 10 additions & 6 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -15,7 +15,7 @@ _export:
15
15
repositories:
16
16
- https://jitpack.io
17
17
dependencies:
18
-
- pro.civitaspo:digdag-operator-athena:0.3.2
18
+
- pro.civitaspo:digdag-operator-athena:0.4.0
19
19
athena:
20
20
auth_method: profile
21
21
@@ -26,10 +26,9 @@ _export:
26
26
echo>: ${athena.last_query}
27
27
28
28
+stap3:
29
-
athena.ctas>:
30
-
select_query: template.sql
29
+
athena.ctas>: template.sql
31
30
table: hoge
32
-
output: s3://mybucket/prefix/
31
+
location: s3://mybucket/prefix/
33
32
```
34
33
35
34
See [examples](./example/example.dig) for more cases.
@@ -51,7 +50,10 @@ Define the below options on properties (which is indicated by `-c`, `--config`).
51
50
- **athena.allow_auth_method_instance**: Indicates whether users can use **auth_method** `"instance"` (boolean, default: `false`)
52
51
- **athena.allow_auth_method_profile**: Indicates whether users can use **auth_method** `"profile"` (boolean, default: `false`)
53
52
- **athena.allow_auth_method_properties**: Indicates whether users can use **auth_method** `"properties"` (boolean, default: `false`)
53
+
- **athena.allow_auth_method_web_identity_token**: Indicates whether users can use **auth_method** `"web_identity_token"` (boolean, default: `false`)
54
54
- **athena.assume_role_timeout_duration**: Maximum duration which server administer allows when users assume **role_arn**. (`DurationParam`, default: `1h`)
55
+
- **athena.default_web_identity_token_file**: Path to a web identity token file. (string, optional)
56
+
- **athena.default_web_identity_role_arn**: AWS Role when using a web identity token. (string, optional)
55
57
56
58
### Secrets
57
59
@@ -78,6 +80,9 @@ Define the below options on properties (which is indicated by `-c`, `--config`).
78
80
- `"properties"`: uses aws.accessKeyId and aws.secretKey Java system properties.
79
81
- `"anonymous"`: uses anonymous access. This auth method can access only public files.
80
82
- `"session"`: uses temporary-generated access_key_id, secret_access_key and session_token.
83
+
- `"web_identity_token"`: uses web identity token.
84
+
- **web_identity_token_file**: path to a web identity token file. (string, default: given by **athena.default_web_identity_token_file**)
85
+
- **web_identity_role_arn**: aws role arn when using a web identity token. (string, default: given by **athena.default_web_identity_role_arn**)
81
86
- **use_http_proxy**: Indicate whether using when accessing AWS via http proxy. (boolean, default: `false`)
82
87
- **region**: The AWS region to use for Athena service. (string, optional)
83
88
- **endpoint**: The Amazon Athena endpoint address to use. (string, optional)
@@ -171,7 +176,7 @@ Nothing
171
176
- **database**: The name of the database. (string, optional)
172
177
- **workgroup**: The name of the workgroup in which the query is being started. (string, optional)
- **preview**: Call `athena.preview>` operator after run `athena.query>`. (boolean, default: `true`)
179
+
- **preview**: Call `athena.preview>` operator after run `athena.query>`. (boolean, default: `false`)
175
180
176
181
### Output Parameters
177
182
@@ -218,7 +223,6 @@ Nothing
218
223
- **database**: The database name for query execution context. (string, optional)
219
224
- **table**: The table name for the new table (string, default: `digdag_athena_ctas_${session_uuid.replaceAll("-", "")}_${random}`)
220
225
- **workgroup**: The name of the workgroup in which the query is being started. (string, optional)
221
-
- **output**: [**Deprecated**] Use **location** option instead.
222
226
- **location**: Output location for data created by CTAS (string, default: `"s3://aws-athena-query-results-${AWS_ACCOUNT_ID}-<AWS_REGION>/Unsaved/${YEAR}/${MONTH}/${DAY}/${athena_query_id}/"`)
223
227
- **format**: The data format for the CTAS query results, such as `"orc"`, `"parquet"`, `"avro"`, `"json"`, or `"textfile"`. (string, default: `"parquet"`)
224
228
- **compression**: The compression type to use for `"orc"` or `"parquet"`. (string, default: `"snappy"`)
s"""auth_method: "${conf.authMethod}" is not supported. available `auth_method`s are "basic", "env", "instance", "profile", "properties", "anonymous", or "session"."""
91
92
)
@@ -151,6 +152,18 @@ case class Aws(conf: AwsConf)
if (!conf.isAllowedAuthMethodWebIdentityToken) thrownewConfigException(s"""auth_method: "${conf.authMethod}" is not allowed.""")
158
+
if (!conf.webIdentityTokenFile.or(conf.defaultWebIdentityTokenFile).isPresent) thrownewConfigException(s"""`web_identity_token_file` or `athena.allow_auth_method_web_identity_token` (system) must be set when `auth_method` is "${conf.authMethod}".""")
159
+
if (!conf.webIdentityRoleArn.or(conf.defaultWebIdentityRoleArn).isPresent) thrownewConfigException(s"""`web_identity_role_arn` or `athena.allow_auth_method_web_identity_role_arn` (system) must be set when `auth_method` is "${conf.authMethod}".""")
0 commit comments