env {
  execution.parallelism = 1
  job.mode = "BATCH"
  #checkpoint.interval = 2000
  #execution.checkpoint.interval = 10000
  #execution.checkpoint.data-uri = "hdfs://localhost:9000/checkpoint"
}

source {
  FakeSource {
    parallelism = 1
    result_table_name = "fake"
    row.num = 10
    schema = {
      fields {
        name = "string"
        age = "int"
		date="date"

      }
    }
  }
  FakeSource {
    parallelism = 1
    result_table_name = "fake1"
    row.num = 10
    schema = {
      fields {
        t_name = "string"
		t_age="int"
		t_score="int"

      }
    }
  }
}

transform {
    RowStack {
     source_table_name = ["fake","fake1"]
     result_table_name = "fake2"
	 fields=["name","age","date","t_score"]
	 field_types=["STRING","INT","DATE","INT"]
	 field_config=[
			{
			 "sourceTable":"fake",
			 "list":[
				{
				"column":"name",
				"mainColumn":"name"
				},
				{
				"column":"age",
				"mainColumn":"age"
				},
				{
				"column":"date",
				"mainColumn":"date"
				}
			 ]
			},
			{
			 "sourceTable":"fake1",
			 "list":[
				{
				"column":"t_name",
				"mainColumn":"name"
				},
				{
				"column":"t_age",
				"mainColumn":"age"
				},
				{
				"column":"t_score",
				"mainColumn":"t_score"
				}
			 ]
			}

	 ]

   }
}


sink {
  console {
    source_table_name=["fake2"]
  }
}
