Skip to content

bq_update_dataset_expiration sample#1783

Merged
stephaniewang526 merged 3 commits into
GoogleCloudPlatform:masterfrom
stephaniewang526:bq__update_dataset_expiration
Dec 4, 2019
Merged

bq_update_dataset_expiration sample#1783
stephaniewang526 merged 3 commits into
GoogleCloudPlatform:masterfrom
stephaniewang526:bq__update_dataset_expiration

Conversation

@stephaniewang526

Copy link
Copy Markdown
Contributor

No description provided.

@stephaniewang526 stephaniewang526 requested a review from a team December 4, 2019 01:14
@googlebot googlebot added the cla: yes This human has signed the Contributor License Agreement. label Dec 4, 2019
updateDatasetExpiration(datasetName, newExpiration);
}

public static void updateDatasetExpiration(String datasetName, Long newExpiration) {

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please inline newExpiration - doesn't look like it's required for testing (see Function Structure)

public static void runUpdateDatasetExpiration() {
// TODO(developer): Replace these variables before running the sample.
String datasetName = "my-dataset-name";
Long newExpiration = 24 * 60 * 60 * 1000L; // one day in milliseconds

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Use java.time - see Time.

TimeUnit.MILLISECONDS.convert(1, TimeUnit.DAYS);

@stephaniewang526 stephaniewang526 merged commit baf20c4 into GoogleCloudPlatform:master Dec 4, 2019
@stephaniewang526 stephaniewang526 deleted the bq__update_dataset_expiration branch December 4, 2019 16:14
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

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