code: public static boolean isLegalTableName(String table) {
          return table != null &&
                  table.length() > 0 && table.length() <= 255 &&
                  !(table.charAt(0) == '_' && !table.startsWith("__")) &&
                  !(table.charAt(0) == '.' && (".".equals(table) || "..".equals(table))) &&
                  TABLE_NAME_ALLOWED.matchesAllOf(table);
      }
docs: Table names must be lowercase ASCII strings. between 1 and 255 characters in length.  Whitespace, ISO control
  characters and certain punctuation characters that aren't generally allowed in file names or in elasticsearch
  index names are excluded (elasticsearch appears to allow: !$%&()+-.:;=@[]^_`{}~).  Table names may not begin
  with a single underscore to allow URL space for extensions such as "/_table/...".  Table names may not look
  like relative paths, ie. "." or "..".