Skip to content

CopyCommand

Source code in docs_src/capo_firehose/types/copy_command.py
class CopyCommand(TypedDict, closed=True):
    data_table_name: "capo_firehose.types.data_table_name.DataTableName"
    """<p>The name of the target table. The table must already exist in the database.</p>"""
    data_table_columns: NotRequired[
        "capo_firehose.types.data_table_columns.DataTableColumns"
    ]
    """<p>A comma-separated list of column names.</p>"""
    copy_options: NotRequired["capo_firehose.types.copy_options.CopyOptions"]
    r"""<p>Optional parameters to use with the Amazon Redshift <code>COPY</code> command. For more information, see the "Optional Parameters" section of <a href="https://docs.aws.amazon.com/redshift/latest/dg/r_COPY.html">Amazon Redshift COPY command</a>. Some possible examples that would apply to Firehose are as follows:</p> <p> <code>delimiter '\t' lzop;</code> - fields are delimited with "\t" (TAB character) and compressed using lzop.</p> <p> <code>delimiter '|'</code> - fields are delimited with "|" (this is the default delimiter).</p> <p> <code>delimiter '|' escape</code> - the delimiter should be escaped.</p> <p> <code>fixedwidth 'venueid:3,venuename:25,venuecity:12,venuestate:2,venueseats:6'</code> - fields are fixed width in the source, with each width specified after every column in the table.</p> <p> <code>JSON 's3://mybucket/jsonpaths.txt'</code> - data is in JSON format, and the path specified is the format of the data.</p> <p>For more examples, see <a href="https://docs.aws.amazon.com/redshift/latest/dg/r_COPY_command_examples.html">Amazon Redshift COPY command examples</a>.</p>"""

copy_options instance-attribute

copy_options: NotRequired[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.

data_table_columns instance-attribute

data_table_columns: NotRequired[DataTableColumns]

A comma-separated list of column names.

data_table_name instance-attribute

data_table_name: DataTableName

The name of the target table. The table must already exist in the database.