{
    "$id": "https://example.com/data-health-schema.json",
    "$schema": "http://json-schema.org/draft-07/schema#",
    "description": "data health config schema",
    "type": "array",
    "items": {
        "type": "object",
        "required": [
            "data_type",
            "dsp",
            "days_offset",
            "queries"
        ],
        "properties": {
            "data_type": {
                "type": "string",
                "enum": [
                    "ads_data",
                    "data_completeness",
                    "spotify_charts",
                    "apple_charts",
                    "amazon_charts"
                ]
            },
            "dsp": {
                "type": "string",
                "enum": [
                    "google",
                    "facebook",
                    "linkfire",
                    "amazon",
                    "tiktok",
                    "spotify",
                    "youtube",
                    "apple"
                ]
            },
            "volatile_days": {
                "type": "integer"
            },
            "days_offset": {
                "type": "integer"
            },
            "queries": {
                "type": "array",
                "items": {
                    "type": "object",
                    "required": [
                        "query",
                        "query_params",
                        "db_type",
                        "db_secret_key"
                    ],
                    "properties": {
                        "query": {
                            "type": "string"
                        },
                        "query_params": {
                            "type": "array",
                            "items": {
                                "type": "string"
                            }
                        },
                        "db_type": {
                            "type": "string",
                            "enum": [
                                "snowflake",
                                "postgresql"
                            ]
                        },
                        "db_secret_key": {
                            "type": "string"
                        },
                        "propagate_result": {
                            "type": "boolean"
                        }
                    }
                }
            }
        }
    }
}
