public static List<String> fetchSqlFromConfig(Map<String, String> config) {
    List<String> sql;
    if (config.containsKey(SamzaSqlApplicationConfig.CFG_SQL_STMT) &&
        StringUtils.isNotBlank(config.get(SamzaSqlApplicationConfig.CFG_SQL_STMT))) {
      String sqlValue = config.get(SamzaSqlApplicationConfig.CFG_SQL_STMT);
      sql = Collections.singletonList(sqlValue);
    } else if (config.containsKey(SamzaSqlApplicationConfig.CFG_SQL_STMTS_JSON) &&
        StringUtils.isNotBlank(config.get(SamzaSqlApplicationConfig.CFG_SQL_STMTS_JSON))) {
      sql = SamzaSqlApplicationConfig.deserializeSqlStmts(config.get(SamzaSqlApplicationConfig.CFG_SQL_STMTS_JSON));
    } else if (config.containsKey(SamzaSqlApplicationConfig.CFG_SQL_FILE)) {
      String sqlFile = config.get(SamzaSqlApplicationConfig.CFG_SQL_FILE);
      sql = SqlFileParser.parseSqlFile(sqlFile);
    } else {
      String msg = "Config doesn't contain the SQL that needs to be executed.";
      LOG.error(msg);
      throw new SamzaException(msg);
    }

    return sql;
  }
Get list of sql statements based on the property set in the config.
@param config config
@return list of Sql statements
samza-sql/src/main/java/org/apache/samza/sql/dsl/SamzaSqlDslConverter.java