{
    "additionalProperties": false,
    "description": "Snowplow Snowflake storage configuration",
    "properties": {
        "account": {
            "description": "Snowflake account name. Must be obtained from Snowflake",
            "type": "string"
        },
        "auth": {
            "description": "Authentication method for Snowflake Load",
            "oneOf": [
                {
                    "description": "Static AWS credentials",
                    "properties": {
                        "accessKeyId": {
                            "description": "accessKeyId of static AWS credentials",
                            "type": "string"
                        },
                        "secretAccessKey": {
                            "description": "secretAccessKey of static AWS credentials",
                            "type": "string"
                        }
                    },
                    "required": [
                        "accessKeyId",
                        "secretAccessKey"
                    ],
                    "type": "object"
                },
                {
                    "description": "Temporary credentials",
                    "properties": {
                        "roleArn": {
                            "description": "roleArn of temporary credentials",
                            "minLength": 20,
                            "type": [
                                "string",
                                "null"
                            ]
                        },
                        "sessionDuration": {
                            "description": "sessionDuration of temporary credentials",
                            "minimum": 900,
                            "type": "integer"
                        }
                    },
                    "required": [
                        "roleArn",
                        "sessionDuration"
                    ],
                    "type": "object"
                },
                {
                    "type": "null"
                }
            ]
        },
        "awsRegion": {
            "description": "AWS Region used by Transformer to access S3 and DynamoDB",
            "type": "string"
        },
        "badOutputUrl": {
            "_format": "uri",
            "description": "URL for bad rows e.g. s3://com-acme-snowplow/snowflake/badrow",
            "type": "string"
        },
        "database": {
            "description": "Snowflake Database name. Database must be created manually e.g. acme-snowplow",
            "type": "string"
        },
        "id": {
            "_format": "uuid",
            "description": "Optional machine-readable configuration id",
            "type": "string"
        },
        "input": {
            "_format": "uri",
            "description": "S3 URL to Snowplow enriched events archive e.g. s3://com-acme-snowplow/archive/enriched/",
            "type": "string"
        },
        "jdbcHost": {
            "description": "An optional host for the JDBC driver that has priority over automatically derived hosts",
            "type": "string"
        },
        "manifest": {
            "description": "AWS DynamoDB table name with processing manifest. Needs to be created manually e.g. snowflake-event-manifest",
            "type": "string"
        },
        "maxError": {
            "description": "Optional Snowflake setting - a table copy statement will skip an input file when the number of errors in it exceeds the specified number",
            "type": "integer"
        },
        "name": {
            "description": "Human-readable configuration name",
            "type": "string"
        },
        "password": {
            "description": "Password which can be passed in two forms: plain string or ec2ParameterStore",
            "properties": {
                "ec2ParameterStore": {
                    "description": "ec2ParameterStore object as password. Password will be safely stored in EC2 Parameter store and not exposed",
                    "properties": {
                        "parameterName": {
                            "type": "string"
                        }
                    },
                    "required": [
                        "parameterName"
                    ],
                    "type": "object"
                }
            },
            "required": [
                "ec2ParameterStore"
            ],
            "type": [
                "string",
                "object"
            ]
        },
        "purpose": {
            "enum": [
                "ENRICHED_EVENTS"
            ],
            "type": "string"
        },
        "schema": {
            "description": "Snowflake DB schema. Schema automatically created during setup step e.g. atomic",
            "type": "string"
        },
        "snowflakeRegion": {
            "description": "AWS Region used by Snowflake to access its endpoint. Recommended to use same as $AWS_REGION if possible",
            "type": "string"
        },
        "stage": {
            "description": "Arbitrary name for Snowflake Stage. Stage created automatically during setup step e.g. snowplow_stage",
            "type": "string"
        },
        "stageUrl": {
            "_format": "uri",
            "description": "URL for Transformer-processed data e.g. s3://com-acme-snowplow/snowflake/stage/",
            "type": "string"
        },
        "username": {
            "description": "Snowflake username. Must be obtained from Snowflake",
            "type": "string"
        },
        "warehouse": {
            "description": "Snowflake Warehouse. Warehouse automatically created during setup step e.g. snowplow_wh",
            "type": "string"
        }
    },
    "required": [
        "name",
        "auth",
        "awsRegion",
        "manifest",
        "snowflakeRegion",
        "database",
        "account",
        "warehouse",
        "input",
        "stage",
        "stageUrl",
        "username",
        "password",
        "purpose"
    ],
    "self": {
        "format": "jsonschema",
        "name": "snowflake_config",
        "vendor": "com.snowplowanalytics.snowplow.storage",
        "version": "1-0-2"
    },
    "type": "object"
}