Skip to content

Commit

Permalink
Extract list of strings
Browse files Browse the repository at this point in the history
  • Loading branch information
mielvds committed Aug 23, 2024
1 parent a545b99 commit ccfdb85
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion flows/main_flow.py
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,7 @@ def get_postgres_connection(postgres_credentials: DatabaseCredentials):

@task
def get_indexes_list(db_credentials: DatabaseCredentials):
logger = get_run_logger()
# Connect to Postgres
db_conn = get_postgres_connection(db_credentials)

Expand All @@ -42,7 +43,7 @@ def get_indexes_list(db_credentials: DatabaseCredentials):
# Run query
cursor.execute("SELECT DISTINCT(index) FROM graph._index_intellectual_entity;")

return map(lambda i: i[0], cursor.fetchall())
return [row[0] for row in list(cursor.fetchall())]


@task
Expand Down

0 comments on commit ccfdb85

Please sign in to comment.