### Description

#27647 has introduced filtering for invalid schemas in Hive hook based on the characters `;` and `!`. I'm wondering if a more generic filtering could be introduced, e.g. one that adheres to the regex `[^a-z0-9_]`, since Hive schemas (and table names) can only contain alphanumeric characters and the character `_`.

Note: since the Hive metastore [stores schemas and tables in lowercase](https://stackoverflow.com/questions/57181316/how-to-keep-column-names-in-camel-case-in-hive/57183048#57183048), checking against `[^a-z0-9_]` is probably better than `[^a-zA-Z0-9_]`.

### Use case/motivation

Ensure that Hive schemas used in `apache-airflow-providers-apache-hive` hooks contain no invalid characters.

### Related issues

_No response_

### Are you willing to submit a PR?

- [X] Yes I am willing to submit a PR!

### Code of Conduct

- [X] I agree to follow this project's [Code of Conduct](https://github.com/apache/airflow/blob/main/CODE_OF_CONDUCT.md)

self.log.debug("Cursor description is %s", header)
                    writer.writerow([c[0] for c in header])
                for i, row in enumerate(results_iter, 1):
                    writer.writerow(row)
                    if i % fetch_size == 0:
                        self.log.info("Written %s rows so far.", i)
            except ValueError as exception:
                message = str(exception)
        if message:
            
            os.remove(csv_filepath)
            raise ValueError(message)
        self.log.info("Done. Loaded a total of %s rows.", i)
    def get_records(
        self, sql: str | list[str], parameters: Iterable | Mapping | None = None, **kwargs
    ) -> Any:
        """
        Get a set of records from a Hive query. You can optionally pass 'schema' kwarg
        which specifies target schema and default to 'default'.
        :param sql: hql to be executed.
        :param parameters: optional configuration passed to get_results
        :return: result of hive execution
        >>> hh = HiveServer2Hook()
        >>> sql = "SELECT * FROM airflow.static_babynames LIMIT 100"
        >>> len(hh.get_records(sql))
        100
        """
        schema = kwargs["schema"] if "schema" in kwargs else "default"
        return self.get_results(sql, schema=schema, hive_conf=parameters)["data"]
    def get_pandas_df(