Skip to content
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

Add query execution links to exporter results #1364

Merged
merged 3 commits into from Nov 9, 2023

Conversation

kgopal492
Copy link
Contributor

Google sheets export:

  • Add the query execution link to the Google sheet url
  • Add the Google sheet url to the statement_execution's meta_info

Python export:

  • Add the query execution link as a comment to the python file

statement_execution_id
)
query_execution_id = statement_execution.query_execution_id
return f"{QuerybookSettings.PUBLIC_URL}/query_execution/{query_execution_id}"
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think there is an env in the url. e.g. querybook.pinadmin.com/data/query_execution

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

thanks, good catch

def _save_sheet_to_statement_meta(self, sheet_url: str, statement_id: int):
statement_execution = get_statement_execution_by_id(statement_id)
meta_info = (
statement_execution.meta_info or ""
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

does statement_execution.meta_info end with \n?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

looks like we add a \n at the end of every line for meta_info in querybook

jczhong84
jczhong84 previously approved these changes Nov 8, 2023
@kgopal492 kgopal492 merged commit 206c856 into pinterest:master Nov 9, 2023
3 checks passed
@kgopal492 kgopal492 deleted the kgopal/add-export-link branch November 9, 2023 00:09
aidenprice pushed a commit to arrowtail-precision/querybook that referenced this pull request Jan 3, 2024
* Add query execution links to exporter results

* fix pr comments

* update python version in lint workflow
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants