-
Notifications
You must be signed in to change notification settings - Fork 6
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
Update big query script #155
Conversation
…ab/pooling-analysis into big_query_script
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM in general - fix the typo and merge
args = parser.parse_args() | ||
collect_data(ledgers=args.ledgers, force_query=args.force_query) | ||
from_block = {ledger: get_last_block_collected(ledger) for ledger in args.ledgers} | ||
collect_data(ledgers=args.ledgers, from_block=from_block, to_date=args.to_datey) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
typo "to_datey"
logging.info(f"Querying {ledger}..") | ||
query = (queries[ledger]) | ||
|
||
query = (queries[ledger]).replace("{{block_number}}", str(from_block[ledger]) if from_block[ledger] else "-1").replace("{{timestamp}}", f"'{to_date}'") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think this f"'{to_date}'"
can just be to_date
.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
That's how I had it at first but there was an issue with the lack of quotation marks
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
What issue?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
All Submissions:
Description
Updated block data collection script so that it only fetches new blocks (that don't exist in the local files). Also only fetches blocks before a certain day (today by default).
Also removed --force-query cmd arg as it seems unnecessary now.