Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-02-2024 01:00 PM
Hi,
You can try :
# Function to extract schema and catalog from query history
def extract_schema_catalog(query_history):
for query in query_history.get("res", []):
query_id = query.get("query_id")
query_text = query.get("query_text")
catalog = query.get("metadata", {}).get("details", {}).get("catalog")
schema = query.get("metadata", {}).get("details", {}).get("schema")
print(f"Query ID: {query_id}")
print(f"Query Text: {query_text}")
print(f"Catalog: {catalog}")
print(f"Schema: {schema}")
Best regards,
Mehdi Tajmouati
mehdi.tajmouati@wytasoft.com
06 68 23 18 42
www.wytasoft.com
Mehdi Tajmouati
mehdi.tajmouati@wytasoft.com
06 68 23 18 42
www.wytasoft.com