ExamGecko
Question list
Search
Search

List of questions

Search

Question 18 - DEA-C01 discussion

Report
Export

Mohan, Data engineer works with ALTUSO Company, wants to programmatically check the status of the query. He needs query id to identify each query executed by Snowflake & using Snowflake Connector for Python to execute a query, how he will be able to meet this requirements. Select the best options you will suggest?

A.
He can access the query ID through the sfqid attribute in the Cursor object.
Answers
A.
He can access the query ID through the sfqid attribute in the Cursor object.
B.
cur = con.cursor()
Answers
B.
cur = con.cursor()
C.
cur.execute("SELECT * FROM snowtable")
Answers
C.
cur.execute("SELECT * FROM snowtable")
D.
print(cur.sfqid)
Answers
D.
print(cur.sfqid)
E.
When he used the Snowflake Connector for Python to execute a query, he can access the query ID through the pyqueryid attribute in the Cursor object.
Answers
E.
When he used the Snowflake Connector for Python to execute a query, he can access the query ID through the pyqueryid attribute in the Cursor object.
F.
He needs to query history views to get the queryID as best practices.
Answers
F.
He needs to query history views to get the queryID as best practices.
G.
Using python connector, snowflake does not support queryID retrieval for both syn-chronous & asynchronous query.
Answers
G.
Using python connector, snowflake does not support queryID retrieval for both syn-chronous & asynchronous query.
Suggested answer: A

Explanation:

Retrieving the Snowflake Query ID

A query ID identifies each query executed by Snowflake. When you use the Snowflake Connector for Python to execute a query, you can access the query ID through the sfqid attribute in the Cursor object:

1. # Retrieving a Snowflake Query ID

2. cur = con.cursor()

3. cur.execute("SELECT * FROM testtable")

4. print(cur.sfqid)

asked 23/09/2024
David Murinda
42 questions
User
Your answer:
0 comments
Sorted by

Leave a comment first