Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
18 changes: 18 additions & 0 deletions gcloud/bigquery/client.py
Original file line numberDiff line numberDiff line change
Expand Up@@ -18,6 +18,7 @@
from gcloud.client import JSONClient
from gcloud.bigquery.connection import Connection
from gcloud.bigquery.dataset import Dataset
from gcloud.bigquery.job import CopyJob
from gcloud.bigquery.job import LoadTableFromStorageJob


Expand DownExpand Up@@ -115,3 +116,20 @@ def load_table_from_storage(self, name, destination, *source_uris):
"""
return LoadTableFromStorageJob(name, destination, source_uris,
client=self)

def copy_table(self, name, destination, *sources):
"""Construct a job for copying one or more tables into another table.

:type name: string
:param name: Name of the job.

:type destination: :class:`gcloud.bigquery.table.Table`
:param destination: Table into which data is to be copied.

:type sources: sequence of :class:`gcloud.bigquery.table.Table`
:param sources: tables to be copied.

:rtype: :class:`gcloud.bigquery.job.CopyJob`
:returns: a new ``CopyJob`` instance
"""
return CopyJob(name, destination, sources, client=self)
Loading