Skip to content

Add query execution links to exporter results - #1364

Merged
kgopal492 merged 3 commits into
pinterest:masterfrom
kgopal492:kgopal/add-export-link
Nov 9, 2023
Merged

kgopal492 merged 3 commits into
pinterest:masterfrom
kgopal492:kgopal/add-export-link

Conversation

@kgopal492

Copy link
Copy Markdown
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

@kgopal492
kgopal492 requested a review from jczhong84 November 7, 2023 18:18
statement_execution_id
)
query_execution_id = statement_execution.query_execution_id
return f"{QuerybookSettings.PUBLIC_URL}/query_execution/{query_execution_id}"

Copy link
Copy Markdown
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
Copy Markdown
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
Copy Markdown
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
Copy Markdown
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
@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.

2 participants