turbaszek commented on a change in pull request #13847:
URL: https://github.com/apache/airflow/pull/13847#discussion_r563264362
##########
File path: airflow/providers/exasol/hooks/exasol.py
##########
@@ -108,6 +108,37 @@ def get_first(self, sql: Union[str, list], parameters:
Optional[dict] = None) ->
with closing(conn.execute(sql, parameters)) as cur:
return cur.fetchone()
+ def export_to_file(
+ self,
+ filename: str,
+ query_or_table: str,
+ query_params: Optional[Dict] = None,
+ export_params: Optional[Dict] = None,
+ ) -> None:
+ """
+ Exports data to a file.
+
+ :param filename: Path to the file to which the data has to be exported
+ :type filename: str
+ :param query_or_table: the sql statement to be executed or table name
to export
+ :type query_or_table: str
+ :param query_params: Query parameters passed to underlying
``export_to_file``
+ method of ``ExaConnection``.
+ :type query_params: dict
+ :param export_params: Extra parameters passed to underlying
``export_to_file``
+ method of ``ExaConnection``.
+ :type export_params: dict
+ """
+ self.log.info("Getting data from exasol")
Review comment:
@XD-DENG I thought about it - however I'm not sure if having an SQL in
logs will be wise
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
[email protected]