@Generated public enum Format extends Enum<Format>
When specifying `format=JSON_ARRAY`, result data will be formatted as an array of arrays of values, where each value is either the *string representation* of a value, or `null`. For example, the output of `SELECT concat('id-', id) AS strCol, id AS intCol, null AS nullCol FROM range(3)` would look like this:
``` [ [ "id-1", "1", null ], [ "id-2", "2", null ], [ "id-3", "3", null ], ] ```
`JSON_ARRAY` is supported with `INLINE` and `EXTERNAL_LINKS` dispositions.
`INLINE` `JSON_ARRAY` data can be found at the path `StatementResponse.result.data_array`.
For `EXTERNAL_LINKS` `JSON_ARRAY` results, each URL points to a file in cloud storage that contains compact JSON with no indentation or extra whitespace.
When specifying `format=ARROW_STREAM`, each chunk in the result will be formatted as Apache Arrow Stream. See the [Apache Arrow streaming format].
IMPORTANT: The format `ARROW_STREAM` is supported only with `EXTERNAL_LINKS` disposition.
When specifying `format=CSV`, each chunk in the result will be a CSV according to [RFC 4180] standard. All the columns values will have *string representation* similar to the `JSON_ARRAY` format, and `null` values will be encoded as “null”. Only the first chunk in the result would contain a header row with column names. For example, the output of `SELECT concat('id-', id) AS strCol, id AS intCol, null as nullCol FROM range(3)` would look like this:
``` strCol,intCol,nullCol id-1,1,null id-2,2,null id-3,3,null ```
IMPORTANT: The format `CSV` is supported only with `EXTERNAL_LINKS` disposition.
[Apache Arrow streaming format]: https://arrow.apache.org/docs/format/Columnar.html#ipc-streaming-format [RFC 4180]: https://www.rfc-editor.org/rfc/rfc4180
| Enum Constant and Description |
|---|
ARROW_STREAM |
CSV |
JSON_ARRAY |
| Modifier and Type | Method and Description |
|---|---|
static Format |
valueOf(String name)
Returns the enum constant of this type with the specified name.
|
static Format[] |
values()
Returns an array containing the constants of this enum type, in
the order they are declared.
|
public static final Format ARROW_STREAM
public static final Format CSV
public static final Format JSON_ARRAY
public static Format[] values()
for (Format c : Format.values()) System.out.println(c);
public static Format valueOf(String name)
name - the name of the enum constant to be returned.IllegalArgumentException - if this enum type has no constant with the specified nameNullPointerException - if the argument is nullCopyright © 2023. All rights reserved.