{
  "expectation_type": "expect_column_values_to_be_unique",
  "datasets" : [{
    "data" : {
      "a" : ["2", "2", "2", null],
      "b" : [1, "2", 2, null],
      "c" : [1, 1, 2, null],
      "d" : [1, "1", 2, null],
      "n" : [null, null, 2, null],
      "unique" : [1, 2, 3, null],
      "null": [null, null, null, null],
      "mult_dup": ["1", "1", "2", "2"]
    },
    "schemas": {
      "spark": {
        "a": "StringType",
        "b": "StringType",
        "c": "IntegerType",
        "d": "StringType",
        "n": "IntegerType",
        "unique": "IntegerType",
        "null": "NullType",
        "mult_dup": "StringType"
      }
    },
    "tests" : [
      {
        "title": "basic_positive_test_case",
        "exact_match_out": false,
        "in": {
          "column": "unique"
        },
        "out": {
          "success": true,
          "unexpected_list": [],
          "unexpected_index_list": []
        }
      },{
        "title": "Basic Negative Case, all non-unique character values",
        "exact_match_out": false,
        "in": {
          "column": "a"
        },
        "out": {
          "success": false,
          "unexpected_list": ["2", "2", "2"],
          "unexpected_index_list": [0, 1, 2]
        }
      },{
        "title": "Multi-type column, contains 2 and '2'. Suppressed for SQAlchemy ",
        "exact_match_out": false,
        "suppress_test_for": ["sqlalchemy"],
        "in": {
          "column": "c",
          "mostly": 0.3
        },
        "out": {
          "success": true,
          "unexpected_list": [1, 1],
          "unexpected_index_list": [0, 1]
        }
      },{
        "title": "Positive Case, using Mostly",
        "exact_match_out": false,
        "in": {
          "column": "c",
          "mostly": 0.3
        },
        "out": {
          "success": true,
          "unexpected_list": [1, 1],
          "unexpected_index_list": [0, 1]
        }
      },{
        "title": "Negative Case, using Mostly",
        "exact_match_out": false,
        "in": {
          "column": "c",
          "mostly": 0.4
        },
        "out": {
          "success": false,
          "unexpected_list": [1, 1],
          "unexpected_index_list": [0, 1]
        }
      },{
        "title": "Positive case, multiple null values",
        "exact_match_out": false,
        "in": {
          "column": "n"
        },
        "out": {
          "success": true,
          "unexpected_list": [],
          "unexpected_index_list": []
        }
      },{
        "title": "Negative case, non-unique numeric values",
        "exact_match_out": false,
        "in": {
          "column": "c"
        },
        "out": {
          "success": false,
          "unexpected_list": [1, 1],
          "unexpected_index_list": [0, 1]
        }
      },{
        "title": "Positive case, all null values",
        "exact_match_out": false,
        "in": {
          "column": "null"
        },
        "out": {
          "success": true,
          "unexpected_list": [],
          "unexpected_index_list": []
        }
      },{
        "title": "Negative, Multiple duplicate values",
        "exact_match_out": false,
        "in": {
          "column": "mult_dup"
        },
        "out": {
          "success": false,
          "unexpected_list": ["1", "1", "2", "2"],
          "unexpected_index_list": [0, 1, 2, 3]
        }
      }
    ]
  }]
}