Skip to content

Commit

Permalink
Use connection to get extra
Browse files Browse the repository at this point in the history
  • Loading branch information
sunank200 committed Feb 17, 2023
1 parent f9c8749 commit b6dcf51
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion python-sdk/src/astro/databases/base.py
Original file line number Diff line number Diff line change
Expand Up @@ -426,7 +426,8 @@ def fetch_all_rows(self, table: BaseTable, row_limit: int = -1) -> list:
def check_for_minio_connection(input_file: File) -> bool:
"""Returns True if minio is passed in extras in connections."""
if input_file.location.location_type == FileLocation.S3:
return True if input_file.location.hook.extra_args.get("minio") is not None else False
conn = input_file.location.hook.get_connection(input_file.conn_id)
return True if conn.extra_dejson.get("minio") is not None else False
return False

def load_file_to_table(
Expand Down

0 comments on commit b6dcf51

Please sign in to comment.