c3r-cli-spark/src/main/java/com/amazonaws/c3r/spark/io/schema/TemplateSchemaGenerator.java [200:220]:
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
    public void run() {
        final var schemaContent = new JsonObject();
        if (headers != null) {
            schemaContent.addProperty("headerRow", true);
            schemaContent.add("columns", generateTemplateColumnSchemasFromSourceHeaders());
        } else {
            schemaContent.addProperty("headerRow", false);
            schemaContent.add("columns", generateTemplateColumnSchemasFromColumnCount());
        }

        try (BufferedWriter writer = Files.newBufferedWriter(Path.of(targetJsonFile), StandardCharsets.UTF_8)) {
            writer.write(GsonUtil.toJson(schemaContent));
        } catch (IOException e) {
            throw new C3rRuntimeException("Could not write to target schema file.", e);
        }
        log.info("Template schema written to {}.", targetJsonFile);
        log.info("Schema requires manual modification before use:");
        log.info("  * Types for each column must be selected.");
        log.info("  * Pad entry must be modified for each sealed column and removed for other column types.");
        log.info("Resulting schema must be valid JSON (e.g., final entries in objects have no trailing comma, etc).");
    }
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -



c3r-cli/src/main/java/com/amazonaws/c3r/io/schema/TemplateSchemaGenerator.java [199:219]:
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
    public void run() {
        final var schemaContent = new JsonObject();
        if (headers != null) {
            schemaContent.addProperty("headerRow", true);
            schemaContent.add("columns", generateTemplateColumnSchemasFromSourceHeaders());
        } else {
            schemaContent.addProperty("headerRow", false);
            schemaContent.add("columns", generateTemplateColumnSchemasFromColumnCount());
        }

        try (BufferedWriter writer = Files.newBufferedWriter(Path.of(targetJsonFile), StandardCharsets.UTF_8)) {
            writer.write(GsonUtil.toJson(schemaContent));
        } catch (IOException e) {
            throw new C3rRuntimeException("Could not write to target schema file.", e);
        }
        log.info("Template schema written to {}.", targetJsonFile);
        log.info("Schema requires manual modification before use:");
        log.info("  * Types for each column must be selected.");
        log.info("  * Pad entry must be modified for each sealed column and removed for other column types.");
        log.info("Resulting schema must be valid JSON (e.g., final entries in objects have no trailing comma, etc).");
    }
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -



