MCPcopy
hub / github.com/apache/superset / get_query

Function get_query

superset/sql_lab.py:131–136  ·  view source on GitHub ↗

attempts to get the query and retry if it cannot

(query_id: int, session: Session)

Source from the content-addressed store, hash-verified

129 max_tries=5,
130)
131def get_query(query_id: int, session: Session) -> Query:
132 """attempts to get the query and retry if it cannot"""
133 try:
134 return session.query(Query).filter_by(id=query_id).one()
135 except Exception as ex:
136 raise SqlLabException("Failed at getting query") from ex
137
138
139@celery_app.task(

Callers 2

get_sql_resultsFunction · 0.85
execute_sql_statementsFunction · 0.85

Calls 2

SqlLabExceptionClass · 0.70
queryMethod · 0.45

Tested by

no test coverage detected