code: private Set<String> filterByExistingColumns(String namespace, String... columnsToCheck) {
          // Collect existing columns here.
          Set<String> columnsForTable = new HashSet<>();
          // Check table metadata for presence of columns.
          Connection connection = null;
          try {
              connection = GTFSGraphQL.getConnection();
              ResultSet columns = connection
                  .getMetaData()
                  .getColumns(null, namespace, tableName, null);
              while (columns.next()) {
                  // Column name is in the 4th index
                  String column = columns.getString(4);
                  columnsForTable.add(column);
              }
          } catch (SQLException e) {
              e.printStackTrace();
          } finally {
              DbUtils.closeQuietly(connection);
          }
          // Filter available columns in table by search columns.
          columnsForTable.retainAll(Arrays.asList(columnsToCheck));
          return columnsForTable;
      }
docs: Check for the existence of the specified columns in the table. Note: this query seems to take
  between 10 and 30 milliseconds to get column names. This seems acceptable to avoid errors on,
  e.g., where conditions that include columns which don't exist.
  @param namespace         table namespace/feed ID
  @param columnsToCheck    columns to verify existence in table
  @return                  filtered set of columns verified to exist in table