Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix RedshiftDataOperator and update doc #22157

Merged
merged 3 commits into from
Mar 11, 2022
Merged

Conversation

vincbeck
Copy link
Contributor

While testing RedshiftDataOperator operator as part of #22063 verification process I found out some bugs. The bugs are, for all optional parameters as part of RedshiftDataOperator, they should not be passed down to the boto3 client if no value is specified. Otherwise, such error message are thrown

Invalid type for parameter Parameters, value: None, type: <class 'NoneType'>, valid types: <class 'list'>, <class 'tuple'>.

I also updated the doc and sample dag for RedshiftDataOperator

@github-actions github-actions bot added the okay to merge It's ok to merge this PR as it does not require more tests label Mar 10, 2022
@github-actions
Copy link

The PR is likely OK to be merged with just subset of tests for default Python and Database versions without running the full matrix of tests, because it does not modify the core of Airflow. If the committers decide that the full tests matrix is needed, they will add the label 'full tests needed'. Then you should rebase to the latest main or amend the last commit of the PR, and push it with --force-with-lease.

Comment on lines -44 to -51
@dag(
dag_id='example_redshift_data',
schedule_interval=None,
start_date=datetime(2021, 1, 1),
dagrun_timeout=timedelta(minutes=60),
tags=['example'],
catchup=False,
)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why update away from the @dag decorator? More curiosity than a suggestion.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good question. We (AWS) are trying to be consistent across the Amazon providers package and decided to go with this format

@vincbeck vincbeck force-pushed the redshift-data-fix branch from 009e8a5 to 8cd5098 Compare March 10, 2022 19:34
@potiuk potiuk merged commit 46a120d into apache:main Mar 11, 2022
@vincbeck vincbeck deleted the redshift-data-fix branch March 14, 2022 21:34
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area:providers kind:documentation okay to merge It's ok to merge this PR as it does not require more tests provider:amazon AWS/Amazon - related issues
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants