Skip to content

Commit

Permalink
more fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
aspeddro committed Jan 28, 2025
1 parent 9f5e5a1 commit 1fe4c32
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 7 deletions.
6 changes: 2 additions & 4 deletions pipelines/datasets/cross_update/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -74,8 +74,7 @@ def find_closed_tables(backend: Backend):
}
}"""

response = backend._execute_query(query=query)
response = backend._simplify_response(response)["allCoverage"]
response = backend._execute_query(query=query)["allCoverage"]["items"]
data = json_normalize(response)
open_tables = data["table._id"].tolist()

Expand Down Expand Up @@ -104,8 +103,7 @@ def find_closed_tables(backend: Backend):
}
}"""

response = backend._execute_query(query=query)
response = backend._simplify_response(response)["allCoverage"]
response = backend._execute_query(query=query)["allCoverage"]["items"]
data = json_normalize(response)
closed_tables = data["table._id"].tolist()

Expand Down
6 changes: 3 additions & 3 deletions pipelines/utils/dump_to_gcs/tasks.py
Original file line number Diff line number Diff line change
Expand Up @@ -115,11 +115,11 @@ def download_data_to_gcs( # pylint: disable=R0912,R0913,R0914,R0915
"""
log(query)
data = b._execute_query(query_graphql, {'table_id' : table_id})
nodes = data['allTable']['edges']
if nodes == []:
nodes = data['allTable']['items']
if len(nodes) == 0:
return None

num_bytes = nodes[0]['node']['uncompressedFileSize']
num_bytes = nodes[0]['uncompressedFileSize']

url_path = get_credentials_from_secret('url_download_data')
secret_path_url_free = url_path['URL_DOWNLOAD_OPEN']
Expand Down

0 comments on commit 1fe4c32

Please sign in to comment.