in dbeam-core/src/main/java/com/spotify/dbeam/avro/JdbcAvroSchema.java [92:113]
public static Schema createAvroSchema(
final ResultSet resultSet,
final String avroSchemaNamespace,
final String connectionUrl,
final Optional<String> maybeSchemaName,
final String avroDoc,
final boolean useLogicalTypes)
throws SQLException {
final ResultSetMetaData meta = resultSet.getMetaData();
final String tableName = getDatabaseTableName(meta);
final String schemaName = maybeSchemaName.orElse(tableName);
final SchemaBuilder.FieldAssembler<Schema> builder =
SchemaBuilder.record(schemaName)
.namespace(avroSchemaNamespace)
.doc(avroDoc)
.prop("tableName", tableName)
.prop("connectionUrl", connectionUrl)
.fields();
return createAvroFields(resultSet, builder, useLogicalTypes).endRecord();
}