Skip to content

Commit

Permalink
[Feature][Connector-V2][Paimon] Add paimon read IT case
Browse files Browse the repository at this point in the history
  • Loading branch information
TyrantLucifer committed May 17, 2023
1 parent a050b2f commit 66e7b3d
Show file tree
Hide file tree
Showing 2 changed files with 75 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -52,9 +52,11 @@ public class PaimonIT extends TestSuiteBase {
};

@TestTemplate
public void testWriteToPaimon(TestContainer container)
public void testWriteAndReadPaimon(TestContainer container)
throws IOException, InterruptedException {
Container.ExecResult textWriteResult = container.executeJob("/fake_to_paimon.conf");
Assertions.assertEquals(0, textWriteResult.getExitCode());
Container.ExecResult readResult = container.executeJob("/paimon_to_assert.conf");
Assertions.assertEquals(0, readResult.getExitCode());
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,72 @@
#
# Licensed to the Apache Software Foundation (ASF) under one or more
# contributor license agreements. See the NOTICE file distributed with
# this work for additional information regarding copyright ownership.
# The ASF licenses this file to You under the Apache License, Version 2.0
# (the "License"); you may not use this file except in compliance with
# the License. You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
#

env {
execution.parallelism = 1
spark.app.name = "SeaTunnel"
spark.executor.instances = 2
spark.executor.cores = 1
spark.executor.memory = "1g"
spark.master = local
job.mode = "BATCH"
}

source {
Paimon {
warehouse = "/tmp/paimon"
database = "default"
table = "st_test"
result_table_name = paimon_source
}
}

sink {
Console {
source_table_name = paimon_source
}
Assert {
source_table_name = paimon_source
rules {
row_rules = [
{
rule_type = MAX_ROW
rule_value = 5
}
],
field_rules = [
{
field_name = c_string
field_type = string
filed_value = [
{
rule_type = NOT_NULL
}
]
},
{
field_name = c_boolean
field_type = boolean
filed_value = [
{
rule_type = NOT_NULL
}
]
}
]
}
}
}

0 comments on commit 66e7b3d

Please sign in to comment.