Skip to content
This repository has been archived by the owner on Sep 27, 2023. It is now read-only.

Commit

Permalink
refactor(samples): updates params and comments (#543)
Browse files Browse the repository at this point in the history
  • Loading branch information
Praful Makani committed Nov 30, 2020
1 parent 69a2965 commit a9e8e97
Show file tree
Hide file tree
Showing 6 changed files with 7 additions and 10 deletions.
Expand Up @@ -36,7 +36,8 @@ public static void main(String[] args) throws IOException {
final String projectId = "MY_PROJECT_ID";
String datasetId = "MY_DATASET_ID";
String bucket = "gs://cloud-sample-data";
String networkCode = "MY_NETWORK_CODE";
// the network_code can only be digits with length 1 to 15
String networkCode = "12345678";
Map<String, Value> params = new HashMap<>();
params.put("bucket", Value.newBuilder().setStringValue(bucket).build());
params.put("network_code", Value.newBuilder().setStringValue(networkCode).build());
Expand All @@ -46,7 +47,6 @@ public static void main(String[] args) throws IOException {
.setDisplayName("Your Ad Manager Config Name")
.setDataSourceId("dfp_dt")
.setParams(Struct.newBuilder().putAllFields(params).build())
.setSchedule("every 24 hours")
.build();
createAdManagerTransfer(projectId, transferConfig);
}
Expand Down
Expand Up @@ -35,8 +35,9 @@ public static void main(String[] args) throws IOException {
// TODO(developer): Replace these variables before running the sample.
final String projectId = "MY_PROJECT_ID";
String datasetId = "MY_DATASET_ID";
String customerId = "MY_CUSTOMER_ID";
String refreshWindow = "MY_REFRESH_WINDOW";
// the customer_id only allows digits and hyphen ('-').
String customerId = "012-345-6789";
String refreshWindow = "100";
Map<String, Value> params = new HashMap<>();
params.put("customer_id", Value.newBuilder().setStringValue(customerId).build());
params.put("refreshWindow", Value.newBuilder().setStringValue(refreshWindow).build());
Expand All @@ -46,7 +47,6 @@ public static void main(String[] args) throws IOException {
.setDisplayName("Your Ads Transfer Config Name")
.setDataSourceId("adwords")
.setParams(Struct.newBuilder().putAllFields(params).build())
.setSchedule("every 24 hours")
.build();
createAdsTransfer(projectId, transferConfig);
}
Expand Down
Expand Up @@ -36,7 +36,8 @@ public static void main(String[] args) throws IOException {
final String projectId = "MY_PROJECT_ID";
String datasetId = "MY_DATASET_ID";
String bucket = "gs://cloud-sample-data";
String networkId = "MY_DOUBLE_CLICK_ID";
// the network_id only allows digits
String networkId = "7878";
String fileNamePrefix = "test_";
Map<String, Value> params = new HashMap<>();
params.put("bucket", Value.newBuilder().setStringValue(bucket).build());
Expand All @@ -48,7 +49,6 @@ public static void main(String[] args) throws IOException {
.setDisplayName("Your Campaignmanager Config Name")
.setDataSourceId("dcm_dt")
.setParams(Struct.newBuilder().putAllFields(params).build())
.setSchedule("every 24 hours")
.build();
createCampaignmanagerTransfer(projectId, transferConfig);
}
Expand Down
Expand Up @@ -46,7 +46,6 @@ public static void main(String[] args) throws IOException {
.setDisplayName("Your Play Config Name")
.setDataSourceId("play")
.setParams(Struct.newBuilder().putAllFields(params).build())
.setSchedule("every 24 hours")
.build();
createPlayTransfer(projectId, transferConfig);
}
Expand Down
Expand Up @@ -44,7 +44,6 @@ public static void main(String[] args) throws IOException {
.setDisplayName("Your Youtube Channel Config Name")
.setDataSourceId("youtube_channel")
.setParams(Struct.newBuilder().putAllFields(params).build())
.setSchedule("every 24 hours")
.build();
createYoutubeChannelTransfer(projectId, transferConfig);
}
Expand Down
Expand Up @@ -46,7 +46,6 @@ public static void main(String[] args) throws IOException {
.setDisplayName("Your Youtube Owner Channel Config Name")
.setDataSourceId("youtube_content_owner")
.setParams(Struct.newBuilder().putAllFields(params).build())
.setSchedule("every 24 hours")
.build();
createYoutubeContentOwnerTransfer(projectId, transferConfig);
}
Expand Down

0 comments on commit a9e8e97

Please sign in to comment.