class_docstr: Copy data from Oracle to Google Cloud Storage in JSON, CSV or Parquet format.
  
  .. seealso::
      For more information on how to use this operator, take a look at the guide:
      :ref:`howto/operator:OracleToGCSOperator`
  
  :param oracle_conn_id: Reference to a specific
      :ref:`Oracle hook <howto/connection:oracle>`.
  :param ensure_utc: Ensure TIMESTAMP columns exported as UTC. If set to
      `False`, TIMESTAMP columns will be exported using the Oracle server's
      default timezone.
docstr: Take a value from Oracle db and convert it to a value safe for JSON/Google Cloud Storage/BigQuery.
  
  * Datetimes are converted to UTC seconds.
  * Decimals are converted to floats.
  * Dates are converted to ISO formatted string if given schema_type is
    DATE, or UTC seconds otherwise.
  * Binary type fields are converted to integer if given schema_type is
    INTEGER, or encoded with base64 otherwise. Imported BYTES data must
    be base64-encoded according to BigQuery documentation:
    https://cloud.google.com/bigquery/data-types
  
  :param value: Oracle db column value
  :param schema_type: BigQuery data type
docstr_tok: ["Take","a","value","from","Oracle","db","and","convert","it","to","a","value","safe","for","JSON\/Google","Cloud","Storage\/BigQuery",".","*","Datetimes","are","converted","to","UTC","seconds",".","*","Decimals","are","converted","to","floats",".","*","Dates","are","converted","to","ISO","formatted","string","if","given","schema_type","is","DATE",",","or","UTC","seconds","otherwise",".","*","Binary","type","fields","are","converted","to","integer","if","given","schema_type","is","INTEGER",",","or","encoded","with","base64","otherwise",".","Imported","BYTES","data","must","be","base64-encoded","according","to","BigQuery","documentation",":","https",":","\/\/cloud.google.com\/bigquery\/data-types",":","param","value",":","Oracle","db","column","value",":","param","schema_type",":","BigQuery","data","type"]
code: def convert_type(self, value, schema_type, **kwargs):
      """
      Take a value from Oracle db and convert it to a value safe for JSON/Google Cloud Storage/BigQuery.
  
      * Datetimes are converted to UTC seconds.
      * Decimals are converted to floats.
      * Dates are converted to ISO formatted string if given schema_type is
        DATE, or UTC seconds otherwise.
      * Binary type fields are converted to integer if given schema_type is
        INTEGER, or encoded with base64 otherwise. Imported BYTES data must
        be base64-encoded according to BigQuery documentation:
        https://cloud.google.com/bigquery/data-types
  
      :param value: Oracle db column value
      :param schema_type: BigQuery data type
      """
      if value is None:
          return value
      if isinstance(value, datetime):
          value = calendar.timegm(value.timetuple())
      elif isinstance(value, timedelta):
          value = value.total_seconds()
      elif isinstance(value, Decimal):
          value = float(value)
      elif isinstance(value, date):
          if schema_type == "DATE":
              value = value.isoformat()
          else:
              value = calendar.timegm(value.timetuple())
      elif isinstance(value, bytes):
          if schema_type == "INTEGER":
              value = int.from_bytes(value, "big")
          else:
              value = base64.standard_b64encode(value).decode("ascii")
      return value
  
file_path: airflow/airflow/providers/google/cloud/transfers/oracle_to_gcs.py
imports: from __future__ import annotations
  import base64
  import calendar
  from datetime import date, datetime, timedelta
  from decimal import Decimal
  import oracledb
  from airflow.providers.google.cloud.transfers.sql_to_gcs import BaseSQLToGCSOperator
  from airflow.providers.oracle.hooks.oracle import OracleHook
label_desc: Use image node_id 4 for calling the OracleToGCSOperator obj's underlying member method code with example usage: obj.convert_type(value, schema_type) and returns: value, value