{
  "version" : "6.0.0",
  "timestamp" : 1588893942199,
  "path" : "query-validation-tests/partition-by.json",
  "schemas" : {
    "CSAS_OUTPUT_0.KsqlTopic.Source" : {
      "schema" : "`ID` INTEGER KEY, `NAME` STRING, `AGE` INTEGER",
      "serdeOptions" : [ ]
    },
    "CSAS_OUTPUT_0.OUTPUT" : {
      "schema" : "`NAME` STRING KEY, `ID` INTEGER, `AGE` INTEGER",
      "serdeOptions" : [ ]
    }
  },
  "testCase" : {
    "name" : "single column - with alias",
    "inputs" : [ {
      "topic" : "input",
      "key" : 10,
      "value" : {
        "NAME" : "bob",
        "AGE" : 22
      }
    } ],
    "outputs" : [ {
      "topic" : "OUTPUT",
      "key" : "bob",
      "value" : {
        "ID" : 10,
        "AGE" : 22
      }
    } ],
    "topics" : [ {
      "name" : "input",
      "replicas" : 1,
      "numPartitions" : 4
    }, {
      "name" : "OUTPUT",
      "replicas" : 1,
      "numPartitions" : 4
    } ],
    "statements" : [ "CREATE STREAM INPUT (ID INT KEY, NAME STRING, AGE INT) with (kafka_topic='input', value_format='JSON');", "CREATE STREAM OUTPUT AS select NAME AS NEW_KEY, ID, AGE from INPUT partition by NAME;" ],
    "post" : {
      "sources" : [ {
        "name" : "INPUT",
        "type" : "STREAM",
        "schema" : "`ID` INTEGER KEY, `NAME` STRING, `AGE` INTEGER",
        "keyFormat" : {
          "format" : "KAFKA"
        },
        "serdeOptions" : [ ]
      }, {
        "name" : "OUTPUT",
        "type" : "STREAM",
        "schema" : "`NEW_KEY` STRING KEY, `ID` INTEGER, `AGE` INTEGER",
        "keyFormat" : {
          "format" : "KAFKA"
        },
        "serdeOptions" : [ ]
      } ],
      "topics" : {
        "topics" : [ {
          "name" : "input",
          "keyFormat" : {
            "formatInfo" : {
              "format" : "KAFKA"
            }
          },
          "valueFormat" : {
            "format" : "JSON"
          },
          "partitions" : 4
        }, {
          "name" : "OUTPUT",
          "keyFormat" : {
            "formatInfo" : {
              "format" : "KAFKA"
            }
          },
          "valueFormat" : {
            "format" : "JSON"
          },
          "partitions" : 4
        } ],
        "blackList" : ".*-repartition"
      }
    }
  }
}