diff --git a/docs/guides/file_formats/json_export.md b/docs/guides/file_formats/json_export.md index e017210bd00..370e1251f57 100644 --- a/docs/guides/file_formats/json_export.md +++ b/docs/guides/file_formats/json_export.md @@ -17,4 +17,10 @@ The result of queries can also be directly exported to a JSON file: COPY (SELECT * FROM tbl) TO 'output.json'; ``` +The JSON export writes JSON lines by default. The `ARRAY` option can be used to write a JSON array instead. + +```sql +COPY tbl TO 'output.json' (ARRAY); +``` + For additional options, see the [`COPY` statement documentation]({% link docs/sql/statements/copy.md %}).