Exemplo n.º 1
0
    def write_batch(self, stream_buffer):
        # WARNING: Using mutability here as there's no simple way to copy the necessary data over
        nullable_stream_buffer = stream_buffer
        nullable_stream_buffer.schema = _make_schema_nullable(
            stream_buffer.schema)

        return PostgresTarget.write_batch(self, nullable_stream_buffer)
Exemplo n.º 2
0
    def write_batch(self, stream_buffer):
        # WARNING: Using mutability here as there's no simple way to copy the necessary data over
        self.LOGGER.info('write_batch: Schema before nullability: {}'.format(stream_buffer.schema))
        nullable_stream_buffer = stream_buffer
        nullable_stream_buffer.schema = _make_schema_nullable(stream_buffer.schema)

        self.LOGGER.info('write_batch: Schema after nullability: {}'.format(stream_buffer.schema))

        return PostgresTarget.write_batch(self, nullable_stream_buffer)