Error running dlt pipeline to send loaded table query result to s3!
Traceback (most recent call last):
  File "/usr/local/lib/python3.12/site-packages/sqlalchemy/engine/base.py", line 1971, in _exec_single_context
    self.dialect.do_execute(
  File "/usr/local/lib/python3.12/site-packages/sqlalchemy/engine/default.py", line 919, in do_execute
    cursor.execute(statement, parameters)
psycopg2.errors.UndefinedFunction: function to_char(numeric) does not exist
LINE 1: select TO_CHAR(c.charge_item_id) as charge_item_id from char...
               ^
HINT:  No function matches the given name and argument types. You might need to add explicit type casts.


The above exception was the direct cause of the following exception:

Traceback (most recent call last):
  File "/usr/local/lib/python3.12/concurrent/futures/thread.py", line 59, in run
    result = self.fn(*self.args, **self.kwargs)
             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.12/site-packages/dlt/extract/utils.py", line 235, in _parallel_gen
    return next(gen)  # type: ignore[call-overload]
           ^^^^^^^^^
  File "/worker/shared/task_handlers/run_pipeline/dlt_sources.py", line 131, in query_resource
    query_result = conn.execute(text(query), bind_params)
                   ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.12/site-packages/sqlalchemy/engine/base.py", line 1422, in execute
    return meth(
           ^^^^^
  File "/usr/local/lib/python3.12/site-packages/sqlalchemy/sql/elements.py", line 514, in _execute_on_connection
    return connection._execute_clauseelement(
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.12/site-packages/sqlalchemy/engine/base.py", line 1644, in _execute_clauseelement
    ret = self._execute_context(
          ^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.12/site-packages/sqlalchemy/engine/base.py", line 1850, in _execute_context
    return self._exec_single_context(
           ^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.12/site-packages/sqlalchemy/engine/base.py", line 1990, in _exec_single_context
    self._handle_dbapi_exception(
  File "/usr/local/lib/python3.12/site-packages/sqlalchemy/engine/base.py", line 2357, in _handle_dbapi_exception
    raise sqlalchemy_exception.with_traceback(exc_info[2]) from e
  File "/usr/local/lib/python3.12/site-packages/sqlalchemy/engine/base.py", line 1971, in _exec_single_context
    self.dialect.do_execute(
  File "/usr/local/lib/python3.12/site-packages/sqlalchemy/engine/default.py", line 919, in do_execute
    cursor.execute(statement, parameters)
sqlalchemy.exc.ProgrammingError: (psycopg2.errors.UndefinedFunction) function to_char(numeric) does not exist
LINE 1: select TO_CHAR(c.charge_item_id) as charge_item_id from char...
               ^
HINT:  No function matches the given name and argument types. You might need to add explicit type casts.

[SQL: select TO_CHAR(c.charge_item_id) as charge_item_id from charge c where c.charge_item_id < 1010]
(Background on this error at: https://sqlalche.me/e/20/f405)

The above exception was the direct cause of the following exception:

Traceback (most recent call last):
  File "/worker/shared/task_handlers/run_pipeline/pipeline.py", line 2291, in run_pipeline
    metadata, dlt_source = get_metadata(dlt_source)
                           ^^^^^^^^^^^^^^^^^^^^^^^^
  File "/worker/shared/logging/ps_logging.py", line 58, in wrapper
    result = func(*args, **kwargs)
             ^^^^^^^^^^^^^^^^^^^^^
  File "/worker/shared/pipelines/pipeline_utils.py", line 1027, in get_metadata
    table = next(iter(obj))
            ^^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.12/site-packages/dlt/common/utils.py", line 146, in flatten_list_or_items
    for items in _iter:
                 ^^^^^
dlt.extract.exceptions.ResourceExtractionError: In processing pipe help: extraction of resource help in future <Future at 0x7e84fec31100 state=finished raised ProgrammingError> caused an exception: (psycopg2.errors.UndefinedFunction) function to_char(numeric) does not exist
LINE 1: select TO_CHAR(c.charge_item_id) as charge_item_id from char...
               ^
HINT:  No function matches the given name and argument types. You might need to add explicit type casts.

[SQL: select TO_CHAR(c.charge_item_id) as charge_item_id from charge c where c.charge_item_id < 1010]
(Background on this error at: https://sqlalche.me/e/20/f405)