private static ArrayList<String> getSourcesFromSelectQuery(SqlSelect sqlSelect) {
    ArrayList<String> sources = new ArrayList<>();
    getSource(sqlSelect.getFrom(), sources);
    if (sources.size() < 1) {
      throw new SamzaException("Unsupported query " + sqlSelect);
    }

    return sources;
  }
Utility class that is used to parse the Samza sql query to figure out the sources, sink etc..
samza-sql/src/main/java/org/apache/samza/sql/util/SamzaSqlQueryParser.java