Skip to content

Commit

Permalink
Update Athena example (#1007)
Browse files Browse the repository at this point in the history
Signed-off-by: Kevin Su <[email protected]>
Signed-off-by: Kevin Su <[email protected]>
Co-authored-by: Iaroslav Ciupin <[email protected]>
  • Loading branch information
pingsutw and iaroslav-ciupin authored Jul 6, 2023
1 parent a49ba51 commit 73840e6
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions examples/athena_plugin/athena_plugin/athena.py
Original file line number Diff line number Diff line change
Expand Up @@ -81,9 +81,9 @@ def no_io_wf():
name="sql.athena.w_io",
# Define inputs as well as their types that can be used to customize the query.
inputs=kwtypes(iso_code=str),
task_config=AthenaConfig(database="vaccinations"),
task_config=AthenaConfig(workgroup="primary", catalog="AwsDataCatalog", database="vaccinations"),
query_template="""
SELECT * FROM vaccinations where iso_code like {{ .inputs.iso_code }}
SELECT * FROM vaccinations where iso_code like '{{ .Inputs.iso_code }}'
""",
# While we define a generic schema as the output here, Flyte supports more strongly typed schemas to provide
# better compile-time checks for task compatibility. Refer to :py:class:`flytekit.FlyteSchema` for more details
Expand All @@ -103,7 +103,7 @@ def no_io_wf():
@task
def manipulate_athena_schema(s: FlyteSchema) -> FlyteSchema:
df = s.open().all()
return df[df.total_vaccinations.notnull()]
return df


@workflow
Expand Down

0 comments on commit 73840e6

Please sign in to comment.