{
    "additionalProperties": false,
    "description": "Snowplow Google BigQuery storage configuration",
    "properties": {
        "badRows": {
            "description": "Google PubSub topic name to sink rows that were couldn't be transformed to TableRow",
            "maxLength": 255,
            "minLength": 3,
            "type": "string"
        },
        "datasetId": {
            "description": "BigQuery dataset id",
            "type": "string"
        },
        "failedInserts": {
            "description": "Google PubSub topic name to sink rows that were couldn't be inserted into BigQuery (due not existing column or service outage)",
            "maxLength": 255,
            "minLength": 3,
            "type": "string"
        },
        "id": {
            "_format": "uuid",
            "description": "Machine-readable unique identifier",
            "type": "string"
        },
        "input": {
            "description": "Google PubSub subscription name with enriched TSV data",
            "maxLength": 255,
            "minLength": 3,
            "type": "string"
        },
        "load": {
            "description": "Loading mode and associated settings",
            "oneOf": [
                {
                    "properties": {
                        "mode": {
                            "enum": [
                                "STREAMING_INSERTS"
                            ]
                        },
                        "retry": {
                            "description": "Whether transient failures should be retried or sent straight to failedInserts topic",
                            "type": "boolean"
                        }
                    },
                    "required": [
                        "retry"
                    ]
                },
                {
                    "properties": {
                        "frequency": {
                            "description": "Frequency of load jobs, in seconds",
                            "maximum": 86400,
                            "minimum": 100,
                            "type": "integer"
                        },
                        "mode": {
                            "enum": [
                                "FILE_LOADS"
                            ]
                        }
                    },
                    "required": [
                        "frequency"
                    ]
                }
            ],
            "required": [
                "mode"
            ],
            "type": "object"
        },
        "name": {
            "description": "Human-readable storage target name, used only for logging",
            "type": "string"
        },
        "projectId": {
            "description": "GCP project id",
            "type": "string"
        },
        "purpose": {
            "enum": [
                "ENRICHED_EVENTS"
            ],
            "type": "string"
        },
        "tableId": {
            "description": "BigQuery table id",
            "type": "string"
        },
        "typesSubscription": {
            "description": "Google PubSub subscription name where Mutator gets observed types",
            "maxLength": 255,
            "minLength": 3,
            "type": "string"
        },
        "typesTopic": {
            "description": "Google PubSub topic name for sending observed types",
            "type": "string"
        }
    },
    "required": [
        "name",
        "id",
        "projectId",
        "input",
        "datasetId",
        "tableId",
        "load",
        "typesTopic",
        "badRows",
        "failedInserts",
        "typesSubscription",
        "purpose"
    ],
    "self": {
        "format": "jsonschema",
        "name": "bigquery_config",
        "vendor": "com.snowplowanalytics.snowplow.storage",
        "version": "1-0-0"
    },
    "type": "object"
}