public class CopyCommand
extends java.lang.Object
implements java.io.Serializable, java.lang.Cloneable
Describes a COPY
command for Amazon Redshift.
Modifier and Type | Field and Description |
---|---|
private java.lang.String |
copyOptions
Optional parameters to use with the Amazon Redshift
COPY
command. |
private java.lang.String |
dataTableColumns
A comma-separated list of column names.
|
private java.lang.String |
dataTableName
The name of the target table.
|
Constructor and Description |
---|
CopyCommand() |
Modifier and Type | Method and Description |
---|---|
CopyCommand |
clone() |
boolean |
equals(java.lang.Object obj) |
java.lang.String |
getCopyOptions()
Optional parameters to use with the Amazon Redshift
COPY
command. |
java.lang.String |
getDataTableColumns()
A comma-separated list of column names.
|
java.lang.String |
getDataTableName()
The name of the target table.
|
int |
hashCode() |
void |
setCopyOptions(java.lang.String copyOptions)
Optional parameters to use with the Amazon Redshift
COPY
command. |
void |
setDataTableColumns(java.lang.String dataTableColumns)
A comma-separated list of column names.
|
void |
setDataTableName(java.lang.String dataTableName)
The name of the target table.
|
java.lang.String |
toString()
Returns a string representation of this object; useful for testing and
debugging.
|
CopyCommand |
withCopyOptions(java.lang.String copyOptions)
Optional parameters to use with the Amazon Redshift
COPY
command. |
CopyCommand |
withDataTableColumns(java.lang.String dataTableColumns)
A comma-separated list of column names.
|
CopyCommand |
withDataTableName(java.lang.String dataTableName)
The name of the target table.
|
private java.lang.String dataTableName
The name of the target table. The table must already exist in the database.
private java.lang.String dataTableColumns
A comma-separated list of column names.
private java.lang.String copyOptions
Optional parameters to use with the Amazon Redshift COPY
command. For more information, see the "Optional Parameters" section of
Amazon
Redshift COPY command. Some possible examples that would apply to
Firehose are as follows.
delimiter '\t' lzop;
- fields are delimited with "\t" (TAB
character) and compressed using lzop.
delimiter '|
- fields are delimited with "|" (this is the
default delimiter).
delimiter '|' escape
- the delimiter should be escaped.
fixedwidth 'venueid:3,venuename:25,venuecity:12,venuestate:2,venueseats:6'
- fields are fixed width in the source, with each width specified after
every column in the table.
JSON 's3://mybucket/jsonpaths.txt'
- data is in JSON format,
and the path specified is the format of the data.
For more examples, see Amazon Redshift COPY command examples.
public void setDataTableName(java.lang.String dataTableName)
The name of the target table. The table must already exist in the database.
dataTableName
- The name of the target table. The table must already exist in the
database.public java.lang.String getDataTableName()
The name of the target table. The table must already exist in the database.
public CopyCommand withDataTableName(java.lang.String dataTableName)
The name of the target table. The table must already exist in the database.
dataTableName
- The name of the target table. The table must already exist in the
database.public void setDataTableColumns(java.lang.String dataTableColumns)
A comma-separated list of column names.
dataTableColumns
- A comma-separated list of column names.public java.lang.String getDataTableColumns()
A comma-separated list of column names.
public CopyCommand withDataTableColumns(java.lang.String dataTableColumns)
A comma-separated list of column names.
dataTableColumns
- A comma-separated list of column names.public void setCopyOptions(java.lang.String copyOptions)
Optional parameters to use with the Amazon Redshift COPY
command. For more information, see the "Optional Parameters" section of
Amazon
Redshift COPY command. Some possible examples that would apply to
Firehose are as follows.
delimiter '\t' lzop;
- fields are delimited with "\t" (TAB
character) and compressed using lzop.
delimiter '|
- fields are delimited with "|" (this is the
default delimiter).
delimiter '|' escape
- the delimiter should be escaped.
fixedwidth 'venueid:3,venuename:25,venuecity:12,venuestate:2,venueseats:6'
- fields are fixed width in the source, with each width specified after
every column in the table.
JSON 's3://mybucket/jsonpaths.txt'
- data is in JSON format,
and the path specified is the format of the data.
For more examples, see Amazon Redshift COPY command examples.
copyOptions
- Optional parameters to use with the Amazon Redshift
COPY
command. For more information, see the
"Optional Parameters" section of Amazon Redshift COPY command. Some possible examples that
would apply to Firehose are as follows.
delimiter '\t' lzop;
- fields are delimited with "\t"
(TAB character) and compressed using lzop.
delimiter '|
- fields are delimited with "|" (this is
the default delimiter).
delimiter '|' escape
- the delimiter should be
escaped.
fixedwidth 'venueid:3,venuename:25,venuecity:12,venuestate:2,venueseats:6'
- fields are fixed width in the source, with each width specified
after every column in the table.
JSON 's3://mybucket/jsonpaths.txt'
- data is in JSON
format, and the path specified is the format of the data.
For more examples, see Amazon Redshift COPY command examples.
public java.lang.String getCopyOptions()
Optional parameters to use with the Amazon Redshift COPY
command. For more information, see the "Optional Parameters" section of
Amazon
Redshift COPY command. Some possible examples that would apply to
Firehose are as follows.
delimiter '\t' lzop;
- fields are delimited with "\t" (TAB
character) and compressed using lzop.
delimiter '|
- fields are delimited with "|" (this is the
default delimiter).
delimiter '|' escape
- the delimiter should be escaped.
fixedwidth 'venueid:3,venuename:25,venuecity:12,venuestate:2,venueseats:6'
- fields are fixed width in the source, with each width specified after
every column in the table.
JSON 's3://mybucket/jsonpaths.txt'
- data is in JSON format,
and the path specified is the format of the data.
For more examples, see Amazon Redshift COPY command examples.
COPY
command. For more information, see the
"Optional Parameters" section of Amazon Redshift COPY command. Some possible examples that
would apply to Firehose are as follows.
delimiter '\t' lzop;
- fields are delimited with
"\t" (TAB character) and compressed using lzop.
delimiter '|
- fields are delimited with "|" (this
is the default delimiter).
delimiter '|' escape
- the delimiter should be
escaped.
fixedwidth 'venueid:3,venuename:25,venuecity:12,venuestate:2,venueseats:6'
- fields are fixed width in the source, with each width specified
after every column in the table.
JSON 's3://mybucket/jsonpaths.txt'
- data is in JSON
format, and the path specified is the format of the data.
For more examples, see Amazon Redshift COPY command examples.
public CopyCommand withCopyOptions(java.lang.String copyOptions)
Optional parameters to use with the Amazon Redshift COPY
command. For more information, see the "Optional Parameters" section of
Amazon
Redshift COPY command. Some possible examples that would apply to
Firehose are as follows.
delimiter '\t' lzop;
- fields are delimited with "\t" (TAB
character) and compressed using lzop.
delimiter '|
- fields are delimited with "|" (this is the
default delimiter).
delimiter '|' escape
- the delimiter should be escaped.
fixedwidth 'venueid:3,venuename:25,venuecity:12,venuestate:2,venueseats:6'
- fields are fixed width in the source, with each width specified after
every column in the table.
JSON 's3://mybucket/jsonpaths.txt'
- data is in JSON format,
and the path specified is the format of the data.
For more examples, see Amazon Redshift COPY command examples.
copyOptions
- Optional parameters to use with the Amazon Redshift
COPY
command. For more information, see the
"Optional Parameters" section of Amazon Redshift COPY command. Some possible examples that
would apply to Firehose are as follows.
delimiter '\t' lzop;
- fields are delimited with "\t"
(TAB character) and compressed using lzop.
delimiter '|
- fields are delimited with "|" (this is
the default delimiter).
delimiter '|' escape
- the delimiter should be
escaped.
fixedwidth 'venueid:3,venuename:25,venuecity:12,venuestate:2,venueseats:6'
- fields are fixed width in the source, with each width specified
after every column in the table.
JSON 's3://mybucket/jsonpaths.txt'
- data is in JSON
format, and the path specified is the format of the data.
For more examples, see Amazon Redshift COPY command examples.
public java.lang.String toString()
toString
in class java.lang.Object
Object.toString()
public boolean equals(java.lang.Object obj)
equals
in class java.lang.Object
public int hashCode()
hashCode
in class java.lang.Object
public CopyCommand clone()
clone
in class java.lang.Object