giraffez/load.py
def put(self, items, panic=True):
        """
        Load a single row into the target table.

        :param list items: A list of values in the row corresponding to the
            fields specified by :code:`self.columns`
        :param bool panic: If :code:`True`, when an error is encountered it will be
            raised. Otherwise, the error will be logged and :code:`self.error_count`
            is incremented.
        :raises `giraffez.errors.GiraffeEncodeError`: if :code:`panic` is :code:`True` and there
            are format errors in the row values.
        :raises `giraffez.errors.GiraffeError`: if table name is not set.
        :raises `giraffez.TeradataPTError`: if there is a problem
            connecting to Teradata.
        """
        if not self.initiated:
            self._initiate()
        try:
            row_status = self.mload.put_row(self.preprocessor(items))
            self.applied_count += 1
        except (TeradataPTError, EncoderError) as error:
            self.error_count += 1
            if panic:
                raise error
            log.info("BulkLoad", error)
def put(self, items, panic=True):
        if not self.initiated:
            self._initiate()
        try:
            row_status = self.mload.put_row(self.preprocessor(items))
            self.applied_count += 1
        except (TeradataPTError, EncoderError) as error:
            self.error_count += 1
            if panic:
                raise error
            log.info("BulkLoad", error)
def put ( self , items , panic = True ) : if not self . initiated : self . _initiate ( ) try : row_status = self . mload . put_row ( self . preprocessor ( items ) ) self . applied_count += 1 except ( TeradataPTError , EncoderError ) as error : self . error_count += 1 if panic : raise error log . info ( "BulkLoad" , error )
Load a single row into the target table.

        :param list items: A list of values in the row corresponding to the
            fields specified by :code:`self.columns`
        :param bool panic: If :code:`True`, when an error is encountered it will be
            raised. Otherwise, the error will be logged and :code:`self.error_count`
            is incremented.
        :raises `giraffez.errors.GiraffeEncodeError`: if :code:`panic` is :code:`True` and there
            are format errors in the row values.
        :raises `giraffez.errors.GiraffeError`: if table name is not set.
        :raises `giraffez.TeradataPTError`: if there is a problem
            connecting to Teradata.
Load a single row into the target table .