79631850

Date: 2025-05-21 11:17:18
Score: 1
Natty:
Report link

Use json.dumps() to log a proper JSON object: import logging import json

import logging
import json
dict1 = {"abc": "123", "cdf": "345"} 
LOGGER.info(json.dumps(dict1))
# ✅ logs as valid JSON for Snowflake VARIANT

This ensures the log is stored as a JSON object in Snowflake, not a plain string.

Reasons:
  • Low length (0.5):
  • Has code block (-0.5):
  • Low reputation (1):
Posted by: shani