Materialize Documentation
s
Join the Community github/materialize

COPY TO

COPY TO sends rows using the Postgres COPY protocol.

Syntax

COPY ( query ) TO STDOUT WITH ( field val , )
Field Use
query The SELECT or TAIL query to send
field The name of the option you want to set.
val The value for the option.

WITH options

Name Value type Default value Description
FORMAT TEXT,BINARY TEXT Sets the output formatting method.

Example

Copying a view

COPY (SELECT * FROM some_view) TO STDOUT;

Tailing a view with binary output

COPY (TAIL some_view) TO STDOUT WITH (FORMAT binary);
Did this info help?
Yes No