Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Commit f8d91a4

Browse filesBrowse files
jimktrainsJon Wayne Parrott
authored andcommitted
Adds option to set the file format for export jobs (GoogleCloudPlatform#405)
1 parent a1f2903 commit f8d91a4
Copy full SHA for f8d91a4

File tree

Expand file treeCollapse file tree

1 file changed

+6
-0
lines changed
Filter options
Expand file treeCollapse file tree

1 file changed

+6
-0
lines changed

‎bigquery/api/export_data_to_cloud_storage.py

Copy file name to clipboardExpand all lines: bigquery/api/export_data_to_cloud_storage.py
+6Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -154,6 +154,11 @@ def main(cloud_storage_path, project_id, dataset_id, table_id,
154154
help='compress resultset with gzip',
155155
action='store_true',
156156
default=False)
157+
parser.add_argument(
158+
'-f', '--format',
159+
help='output file format',
160+
choices=['CSV', 'NEWLINE_DELIMITED_JSON', 'AVRO'],
161+
default='CSV')
157162

158163
args = parser.parse_args()
159164

@@ -164,5 +169,6 @@ def main(cloud_storage_path, project_id, dataset_id, table_id,
164169
args.table_id,
165170
args.num_retries,
166171
args.poll_interval,
172+
export_format=args.format,
167173
compression="GZIP" if args.gzip else "NONE")
168174
# [END main]

0 commit comments

Comments
0 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.