Skip to content

Conversation

@stephenplusplus
Copy link
Contributor

Fixes #2278

This adds a method on a Table object, copyFrom:

table.copyFrom([
  dataset.table('source-table-1'),
  dataset.table('source-table-2')
], function(err, job) {});

@stephenplusplus stephenplusplus added the api: bigquery Issues related to the BigQuery API. label May 5, 2017
@googlebot googlebot added the cla: yes This human has signed the Contributor License Agreement. label May 5, 2017
@coveralls
Copy link

Coverage Status

Coverage decreased (-14.7%) to 85.312% when pulling f7dec92 on stephenplusplus:spp--2278 into 0362106 on GoogleCloudPlatform:master.

@stephenplusplus
Copy link
Contributor Author

Just a thought, would it be better to merge this functionality into import?

table.import([
  sourceTable1,
  sourceTable2
], ...

@callmehiphop
Copy link
Contributor

Just a thought, would it be better to merge this functionality into import?

Personally I like this! We'd definitely want to document very clearly what supplying a string would do for that method though.

@stephenplusplus stephenplusplus merged commit c85c433 into googleapis:master May 8, 2017
@stephenplusplus
Copy link
Contributor Author

For any users familiar with the BQ concepts of copying as opposed to importing, the separation might be appreciated. And like you pointed out, import already has a couple ways of being used, so adding another might add more confusion. For those reasons, let's see if copyFrom is good enough and always keep the door open for refactoring and reconsideration in the future.

sofisl pushed a commit that referenced this pull request Feb 3, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

api: bigquery Issues related to the BigQuery API. cla: yes This human has signed the Contributor License Agreement.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants