Skip to content

SNOW-1559272: Document differences b/w query result APIs #2055

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

Merged
merged 1 commit into from
Sep 12, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 4 additions & 1 deletion src/snowflake/connector/cursor.py
Original file line number Diff line number Diff line change
Expand Up @@ -1238,6 +1238,7 @@ def check_can_use_pandas(self) -> None:
)

def query_result(self, qid: str) -> SnowflakeCursor:
"""Query the result of a previously executed query."""
url = f"/queries/{qid}/result"
ret = self._connection.rest.request(url=url, method="get")
self._sfqid = (
Expand Down Expand Up @@ -1631,7 +1632,9 @@ def __exit__(
self.close()

def get_results_from_sfqid(self, sfqid: str) -> None:
"""Gets the results from previously ran query."""
"""Gets the results from previously ran query. This methods differs from ``SnowflakeCursor.query_result``
in that it monitors the ``sfqid`` until it is no longer running, and then retrieves the results.
"""

def wait_until_ready() -> None:
"""Makes sure query has finished executing and once it has retrieves results."""
Expand Down
Loading