Search in sources :

Example 1 with CliUtils

use of io.confluent.ksql.util.CliUtils in project ksql by confluentinc.

the class Cli method registerTopic.

private void registerTopic(StringBuilder consecutiveStatements, SqlBaseParser.SingleStatementContext statementContext, String statementText) {
    CliUtils cliUtils = new CliUtils();
    Optional<String> avroSchema = cliUtils.getAvroSchemaIfAvroTopic((SqlBaseParser.RegisterTopicContext) statementContext.statement());
    avroSchema.ifPresent(s -> setProperty(DdlConfig.AVRO_SCHEMA, s));
    consecutiveStatements.append(statementText);
}
Also used : CliUtils(io.confluent.ksql.util.CliUtils) SqlBaseParser(io.confluent.ksql.parser.SqlBaseParser)

Aggregations

SqlBaseParser (io.confluent.ksql.parser.SqlBaseParser)1 CliUtils (io.confluent.ksql.util.CliUtils)1