Help Center > > Developer Guide> Data Import> Running the COPY FROM STDIN Statement to Import Data> Introduction to the CopyManager Class

Introduction to the CopyManager Class

Updated at: Jul 15, 2020 GMT+08:00

CopyManager is an API interface class provided by the JDBC driver in DWS. It is used to import data to DWS in batches.

Inheritance Relationship of CopyManager

The CopyManager class is in the org.postgresql.copy package class and is inherited from the java.lang.Object class. The declaration of the class is as follows:

public class CopyManager
extends Object

Constructor Method

public CopyManager(BaseConnection connection)

throws SQLException

Basic Methods

Table 1 Basic methods of CopyManager

Return Value

Method

Description

Throws

CopyIn

copyIn(String sql)

-

SQLException

long

copyIn(String sql, InputStream from)

Uses COPY FROM STDIN to quickly import data to tables in a database from InputStream.

SQLException,IOException

long

copyIn(String sql, InputStream from, int bufferSize)

Uses COPY FROM STDIN to quickly import data to tables in a database from InputStream.

SQLException,IOException

long

copyIn(String sql, Reader from)

Uses COPY FROM STDIN to quickly import data to tables in a database from Reader.

SQLException,IOException

long

copyIn(String sql, Reader from, int bufferSize)

Uses COPY FROM STDIN to quickly import data to tables in a database from Reader.

SQLException,IOException

CopyOut

copyOut(String sql)

-

SQLException

long

copyOut(String sql, OutputStream to)

Sends the result set of COPY TO STDOUT from a database to the OutputStream class.

SQLException,IOException

long

copyOut(String sql, Writer to)

Sends the result set of COPY TO STDOUT from a database to the Writer class.

SQLException,IOException

Did you find this page helpful?

Submit successfully!

Thank you for your feedback. Your feedback helps make our documentation better.

Failed to submit the feedback. Please try again later.

Which of the following issues have you encountered?







Please complete at least one feedback item.

Content most length 200 character

Content is empty.

OK Cancel