static DatasetDestination fromPb(String destinationPb) { Matcher matcher = PATTERN.matcher(destinationPb); if (!matcher.matches()) { throw new IllegalArgumentException(destinationPb + " is not a valid sink destination"); } return new DatasetDestination(matcher.group(1), matcher.group(2)); } }
static DatasetDestination fromPb(String destinationPb) { Matcher matcher = PATTERN.matcher(destinationPb); if (!matcher.matches()) { throw new IllegalArgumentException(destinationPb + " is not a valid sink destination"); } return new DatasetDestination(matcher.group(1), matcher.group(2)); } }
/** * Creates a {@code DatasetDestination} object given the name of the dataset to be used as * sink destination. Dataset is assumed to reside in the default project. */ public static DatasetDestination of(String dataset) { return new DatasetDestination(null, dataset); }
/** * Creates a {@code DatasetDestination} object given the name of the project and dataset to be * used as sink destination. */ public static DatasetDestination of(String project, String dataset) { return new DatasetDestination(project, dataset); }
/** * Creates a {@code DatasetDestination} object given the name of the dataset to be used as * sink destination. Dataset is assumed to reside in the default project. */ public static DatasetDestination of(String dataset) { return new DatasetDestination(null, dataset); }
/** * Creates a {@code DatasetDestination} object given the name of the project and dataset to be * used as sink destination. */ public static DatasetDestination of(String project, String dataset) { return new DatasetDestination(project, dataset); }