/** * Sets a mapping from schema fields to fields of the JSON schema. * * <p>A field mapping is required if the fields of produced tables should be named different than * the fields of the JSON records. * The key of the provided Map refers to the field of the table schema, * the value to the field in the JSON schema.</p> * * @param tableToJsonMapping A mapping from table schema fields to JSON schema fields. * @return The builder. * @deprecated Use table descriptors instead of implementation-specific builders. */ @Deprecated public B withTableToJsonMapping(Map<String, String> tableToJsonMapping) { this.fieldMapping = tableToJsonMapping; return builder(); }
/** * Returns the configured JSON schema. If no JSON schema was configured, the table schema * is returned. * * @return The JSON schema for the TableSource. * @deprecated Use table descriptors instead of implementation-specific builders. */ @Deprecated protected TableSchema getJsonSchema() { if (jsonSchema != null) { return this.jsonSchema; } else { return getTableSchema(); } }
/** * Builds and configures a {@link Kafka011JsonTableSource}. * * @return A configured {@link Kafka011JsonTableSource}. * @deprecated Use table descriptors instead of implementation-specific builders. */ @Deprecated @Override public Kafka011JsonTableSource build() { Kafka011JsonTableSource tableSource = new Kafka011JsonTableSource( getTopic(), getKafkaProps(), getTableSchema(), getJsonSchema()); super.configureTableSource(tableSource); return tableSource; } }
/** * Builds and configures a {@link Kafka09JsonTableSource}. * * @return A configured {@link Kafka09JsonTableSource}. * @deprecated Use table descriptors instead of implementation-specific builders. */ @Deprecated @Override public Kafka09JsonTableSource build() { Kafka09JsonTableSource tableSource = new Kafka09JsonTableSource( getTopic(), getKafkaProps(), getTableSchema(), getJsonSchema()); super.configureTableSource(tableSource); return tableSource; } }
/** * Builds and configures a {@link Kafka011JsonTableSource}. * * @return A configured {@link Kafka011JsonTableSource}. * @deprecated Use table descriptors instead of implementation-specific builders. */ @Deprecated @Override public Kafka011JsonTableSource build() { Kafka011JsonTableSource tableSource = new Kafka011JsonTableSource( getTopic(), getKafkaProps(), getTableSchema(), getJsonSchema()); super.configureTableSource(tableSource); return tableSource; } }
/** * Builds and configures a {@link Kafka08JsonTableSource}. * * @return A configured {@link Kafka08JsonTableSource}. * @deprecated Use table descriptors instead of implementation-specific builders. */ @Deprecated @Override public Kafka08JsonTableSource build() { Kafka08JsonTableSource tableSource = new Kafka08JsonTableSource( getTopic(), getKafkaProps(), getTableSchema(), getJsonSchema()); super.configureTableSource(tableSource); return tableSource; } }
/** * Builds and configures a {@link Kafka011JsonTableSource}. * * @return A configured {@link Kafka011JsonTableSource}. * @deprecated Use table descriptors instead of implementation-specific builders. */ @Deprecated @Override public Kafka011JsonTableSource build() { Kafka011JsonTableSource tableSource = new Kafka011JsonTableSource( getTopic(), getKafkaProps(), getTableSchema(), getJsonSchema()); super.configureTableSource(tableSource); return tableSource; } }
/** * Builds and configures a {@link Kafka08JsonTableSource}. * * @return A configured {@link Kafka08JsonTableSource}. * @deprecated Use table descriptors instead of implementation-specific builders. */ @Deprecated @Override public Kafka08JsonTableSource build() { Kafka08JsonTableSource tableSource = new Kafka08JsonTableSource( getTopic(), getKafkaProps(), getTableSchema(), getJsonSchema()); super.configureTableSource(tableSource); return tableSource; } }
/** * Builds and configures a {@link Kafka010JsonTableSource}. * * @return A configured {@link Kafka010JsonTableSource}. * @deprecated Use table descriptors instead of implementation-specific builders. */ @Override public Kafka010JsonTableSource build() { Kafka010JsonTableSource tableSource = new Kafka010JsonTableSource( getTopic(), getKafkaProps(), getTableSchema(), getJsonSchema()); super.configureTableSource(tableSource); return tableSource; } }
/** * Builds and configures a {@link Kafka09JsonTableSource}. * * @return A configured {@link Kafka09JsonTableSource}. * @deprecated Use table descriptors instead of implementation-specific builders. */ @Deprecated @Override public Kafka09JsonTableSource build() { Kafka09JsonTableSource tableSource = new Kafka09JsonTableSource( getTopic(), getKafkaProps(), getTableSchema(), getJsonSchema()); super.configureTableSource(tableSource); return tableSource; } }
/** * Sets a mapping from schema fields to fields of the JSON schema. * * <p>A field mapping is required if the fields of produced tables should be named different than * the fields of the JSON records. * The key of the provided Map refers to the field of the table schema, * the value to the field in the JSON schema.</p> * * @param tableToJsonMapping A mapping from table schema fields to JSON schema fields. * @return The builder. * @deprecated Use table descriptors instead of implementation-specific builders. */ @Deprecated public B withTableToJsonMapping(Map<String, String> tableToJsonMapping) { this.fieldMapping = tableToJsonMapping; return builder(); }
/** * Sets flag whether to fail if a field is missing or not. * * @param failOnMissingField If set to true, the TableSource fails if there is a missing * field. * If set to false, a missing field is set to null. * @return The builder. * @deprecated Use table descriptors instead of implementation-specific builders. */ @Deprecated public B failOnMissingField(boolean failOnMissingField) { this.failOnMissingField = failOnMissingField; return builder(); }
/** * Returns the configured JSON schema. If no JSON schema was configured, the table schema * is returned. * * @return The JSON schema for the TableSource. * @deprecated Use table descriptors instead of implementation-specific builders. */ @Deprecated protected TableSchema getJsonSchema() { if (jsonSchema != null) { return this.jsonSchema; } else { return getTableSchema(); } }
/** * Sets flag whether to fail if a field is missing or not. * * @param failOnMissingField If set to true, the TableSource fails if there is a missing * field. * If set to false, a missing field is set to null. * @return The builder. * @deprecated Use table descriptors instead of implementation-specific builders. */ @Deprecated public B failOnMissingField(boolean failOnMissingField) { this.failOnMissingField = failOnMissingField; return builder(); }
/** * Builds and configures a {@link Kafka010JsonTableSource}. * * @return A configured {@link Kafka010JsonTableSource}. * @deprecated Use table descriptors instead of implementation-specific builders. */ @Override public Kafka010JsonTableSource build() { Kafka010JsonTableSource tableSource = new Kafka010JsonTableSource( getTopic(), getKafkaProps(), getTableSchema(), getJsonSchema()); super.configureTableSource(tableSource); return tableSource; } }
/** * Sets the schema of the JSON-encoded Kafka messages. * If not set, the JSON messages are decoded with the table schema. * * @param jsonSchema The schema of the JSON-encoded Kafka messages. * @return The builder. * @deprecated Use table descriptors instead of implementation-specific builders. */ @Deprecated public B forJsonSchema(TableSchema jsonSchema) { this.jsonSchema = jsonSchema; return builder(); }
/** * Sets the schema of the JSON-encoded Kafka messages. * If not set, the JSON messages are decoded with the table schema. * * @param jsonSchema The schema of the JSON-encoded Kafka messages. * @return The builder. * @deprecated Use table descriptors instead of implementation-specific builders. */ @Deprecated public B forJsonSchema(TableSchema jsonSchema) { this.jsonSchema = jsonSchema; return builder(); }