{
    "$schema": "http://json-schema.org/draft-04/schema#",
    "definitions": {
        "Main": {
            "properties": {
                "ABI3": {
                    "$ref": "#/definitions/ABI3"
                },
                "Object": {
                    "$ref": "#/definitions/Object"
                },
                "Connections": {
                    "$ref": "#/definitions/Connections"
                }
            },
            "type": "object"
        },
        "ABI3": {
            "properties": {
                "Template": {
                    "$ref": "#/definitions/Template"
                },
                "Metadata": {
                    "$ref": "#/definitions/Metadata"
                }
            },
            "type": "object"
        },
        "Template": {
            "properties": {
                "Phase": {
                    "enum": [
                        "extract"
                    ]
                },
                "Pattern": {
                    "enum": [
                        "full"
                    ]
                },
                "Source": {
                    "enum": [
                        "viw",
                        "xsl",
                        "qry",
                        "csv"
                    ]
                },
                "Implementation": {
                    "enum": [
                        "single",
                        "loop",
                        "parallel"
                    ]
                },
                "Version": {
                    "enum": [
                        1
                    ]
                }
            },
            "type": "object"
        },
        "Metadata": {
            "properties": {
                "Version": {
                    "enum": [
                        1
                    ]
                }
            },
            "type": "object"
        },
        "Object": {
            "properties": {
                "SourceObject": {
                    "$ref": "#/definitions/SourceObject"
                },
                "DestinationTable": {
                    "$ref": "#/definitions/DestinationTable"
                },
                "PrimaryKeyColumns": {
                    "type": "array"
                }
            },
            "type": "object"
        },
        "SourceObject": {
            "properties": {
                "Schema": {
                    "type": "string"
                },
                "Name": {
                    "type": "string"
                },
                "FullName": {
                    "type": "string"
                }
            },
            "type": "object"
        },
        "DestinationTable": {
            "type": "object",
            "properties": {
                "Schema": {
                    "type": "string"
                },
                "Name": {
                    "type": "string"
                },
                "FullName": {
                    "type": "string"
                },
                "CreatePrimaryKey": {
                    "type": "number"
                },
                "Columns": {
                    "type": "array",
                    "items": {
                        "oneOf": [
                            {
                                "$ref": "#/definitions/Column"
                            }
                        ]
                    }
                }
            }
        },
        "Column": {
            "type": "object",
            "properties": {
                "Name": {
                    "type": "string"
                },
                "DataType": {
                    "type": "string"
                }
            }
        },
        "Connections": {
            "properties": {
                "Metadata": {
                    "$ref": "#/definitions/Connection"
                },
                "Log": {
                    "$ref": "#/definitions/Connection"
                },
                "Staging": {
                    "$ref": "#/definitions/Connection"
                },
                "Configuration": {
                    "$ref": "#/definitions/Connection"
                },
                "Helpers": {
                    "type": "array",
                    "items": {
                        "oneOf": [
                            {
                                "$ref": "#/definitions/Connection"
                            }
                        ]
                    }
                }
            },
            "type": "object"
        },
        "Connection": {
            "properties": {
                "Name": {
                    "type": "string"
                },
                "Database": {
                    "type": "string"
                },
                "ConnectionString": {
                    "type": "string"
                }
            },
            "type": "object"
        }
    },
    "allOf": [
        {
            "$ref": "#/definitions/Main"
        }
    ],
    "type": "object"
}