Skip to content

Commit

Permalink
add aws_token to unload function (#41)
Browse files Browse the repository at this point in the history
  • Loading branch information
rynmccrmck authored Jul 7, 2021
1 parent fdf604f commit 89dfc5d
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 0 deletions.
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -98,6 +98,7 @@ Macro signature:
iam_role=None|String,
aws_key=None|String,
aws_secret=None|String,
aws_token=None|String,
aws_region=None|String,
manifest=Boolean,
header=Boolean,
Expand Down
4 changes: 4 additions & 0 deletions macros/unload.sql
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,7 @@ where option is
aws_key=None,
aws_secret=None,
aws_region=None,
aws_token=None,
manifest=False,
header=False,
format=None,
Expand All @@ -56,6 +57,9 @@ where option is
{% elif aws_key and aws_secret %}
ACCESS_KEY_ID '{{ aws_key }}'
SECRET_ACCESS_KEY '{{ aws_secret }}'
{% if aws_token %}
SESSION_TOKEN '{{ aws_token }}'
{% endif %}
{% else %}
-- Raise an error if authorization args are not present
{{ exceptions.raise_compiler_error("You must provide AWS authorization parameters via 'iam_role' or 'aws_key' and 'aws_secret'.") }}
Expand Down

0 comments on commit 89dfc5d

Please sign in to comment.