APISonar


org.apache.flink.table.descriptors.Json.Json

> org > apache > flink > table > descriptors > Json > Json
org APIs apache APIs flink APIs table APIs descriptors APIs Json APIs Json APIs

Example 1
public void testJsonSchema() {
		final Map<String, String> properties = toMap(
			new Json()
				.jsonSchema(JSON_SCHEMA)
				.failOnMissingField(true));

		testJsonSchemaSerializationSchema(properties);

		testJsonSchemaDeserializationSchema(properties);
	}
Example 2
public void testTableSourceDerivedSchema() {
		testTableSource(
			new Json()
				.deriveSchema()
				.failOnMissingField(true)
		);
	}
Example 3
public void testSchemaDerivation() {
		final Map<String, String> properties = toMap(
			new Schema()
				.field("field1", Types.BOOLEAN())
				.field("field2", Types.INT())
				.field("proctime", Types.SQL_TIMESTAMP()).proctime(),
			new Json()
				.deriveSchema());

		testSchemaSerializationSchema(properties);

		testSchemaDeserializationSchema(properties);
	}