Skip to content

Commit

Permalink
Merge pull request #4003 from duckdb/jsonarray
Browse files Browse the repository at this point in the history
Clarify JSON type in JSON export
  • Loading branch information
szarnyasg authored Nov 1, 2024
2 parents d0a32ae + 78194a2 commit 9da292f
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions docs/guides/file_formats/json_export.md
Original file line number Diff line number Diff line change
Expand Up @@ -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 %}).

0 comments on commit 9da292f

Please sign in to comment.