This repository was archived by the owner on Sep 27, 2023. It is now read-only.
File tree Expand file tree Collapse file tree 6 files changed +7
-10
lines changed
samples/snippets/src/main/java/com/example/bigquerydatatransfer Expand file tree Collapse file tree 6 files changed +7
-10
lines changed Original file line number Diff line number Diff line change @@ -36,7 +36,8 @@ public static void main(String[] args) throws IOException {
36
36
final String projectId = "MY_PROJECT_ID" ;
37
37
String datasetId = "MY_DATASET_ID" ;
38
38
String bucket = "gs://cloud-sample-data" ;
39
- String networkCode = "MY_NETWORK_CODE" ;
39
+ // the network_code can only be digits with length 1 to 15
40
+ String networkCode = "12345678" ;
40
41
Map <String , Value > params = new HashMap <>();
41
42
params .put ("bucket" , Value .newBuilder ().setStringValue (bucket ).build ());
42
43
params .put ("network_code" , Value .newBuilder ().setStringValue (networkCode ).build ());
@@ -46,7 +47,6 @@ public static void main(String[] args) throws IOException {
46
47
.setDisplayName ("Your Ad Manager Config Name" )
47
48
.setDataSourceId ("dfp_dt" )
48
49
.setParams (Struct .newBuilder ().putAllFields (params ).build ())
49
- .setSchedule ("every 24 hours" )
50
50
.build ();
51
51
createAdManagerTransfer (projectId , transferConfig );
52
52
}
Original file line number Diff line number Diff line change @@ -35,8 +35,9 @@ public static void main(String[] args) throws IOException {
35
35
// TODO(developer): Replace these variables before running the sample.
36
36
final String projectId = "MY_PROJECT_ID" ;
37
37
String datasetId = "MY_DATASET_ID" ;
38
- String customerId = "MY_CUSTOMER_ID" ;
39
- String refreshWindow = "MY_REFRESH_WINDOW" ;
38
+ // the customer_id only allows digits and hyphen ('-').
39
+ String customerId = "012-345-6789" ;
40
+ String refreshWindow = "100" ;
40
41
Map <String , Value > params = new HashMap <>();
41
42
params .put ("customer_id" , Value .newBuilder ().setStringValue (customerId ).build ());
42
43
params .put ("refreshWindow" , Value .newBuilder ().setStringValue (refreshWindow ).build ());
@@ -46,7 +47,6 @@ public static void main(String[] args) throws IOException {
46
47
.setDisplayName ("Your Ads Transfer Config Name" )
47
48
.setDataSourceId ("adwords" )
48
49
.setParams (Struct .newBuilder ().putAllFields (params ).build ())
49
- .setSchedule ("every 24 hours" )
50
50
.build ();
51
51
createAdsTransfer (projectId , transferConfig );
52
52
}
Original file line number Diff line number Diff line change @@ -36,7 +36,8 @@ public static void main(String[] args) throws IOException {
36
36
final String projectId = "MY_PROJECT_ID" ;
37
37
String datasetId = "MY_DATASET_ID" ;
38
38
String bucket = "gs://cloud-sample-data" ;
39
- String networkId = "MY_DOUBLE_CLICK_ID" ;
39
+ // the network_id only allows digits
40
+ String networkId = "7878" ;
40
41
String fileNamePrefix = "test_" ;
41
42
Map <String , Value > params = new HashMap <>();
42
43
params .put ("bucket" , Value .newBuilder ().setStringValue (bucket ).build ());
@@ -48,7 +49,6 @@ public static void main(String[] args) throws IOException {
48
49
.setDisplayName ("Your Campaignmanager Config Name" )
49
50
.setDataSourceId ("dcm_dt" )
50
51
.setParams (Struct .newBuilder ().putAllFields (params ).build ())
51
- .setSchedule ("every 24 hours" )
52
52
.build ();
53
53
createCampaignmanagerTransfer (projectId , transferConfig );
54
54
}
Original file line number Diff line number Diff line change @@ -46,7 +46,6 @@ public static void main(String[] args) throws IOException {
46
46
.setDisplayName ("Your Play Config Name" )
47
47
.setDataSourceId ("play" )
48
48
.setParams (Struct .newBuilder ().putAllFields (params ).build ())
49
- .setSchedule ("every 24 hours" )
50
49
.build ();
51
50
createPlayTransfer (projectId , transferConfig );
52
51
}
Original file line number Diff line number Diff line change @@ -44,7 +44,6 @@ public static void main(String[] args) throws IOException {
44
44
.setDisplayName ("Your Youtube Channel Config Name" )
45
45
.setDataSourceId ("youtube_channel" )
46
46
.setParams (Struct .newBuilder ().putAllFields (params ).build ())
47
- .setSchedule ("every 24 hours" )
48
47
.build ();
49
48
createYoutubeChannelTransfer (projectId , transferConfig );
50
49
}
Original file line number Diff line number Diff line change @@ -46,7 +46,6 @@ public static void main(String[] args) throws IOException {
46
46
.setDisplayName ("Your Youtube Owner Channel Config Name" )
47
47
.setDataSourceId ("youtube_content_owner" )
48
48
.setParams (Struct .newBuilder ().putAllFields (params ).build ())
49
- .setSchedule ("every 24 hours" )
50
49
.build ();
51
50
createYoutubeContentOwnerTransfer (projectId , transferConfig );
52
51
}
You can’t perform that action at this time.
0 commit comments