code: public static void configureBigQueryInput(
        Configuration config,
        String projectId,
        String datasetId,
        String tableId)
        throws IOException {
      // Check preconditions.
      Preconditions.checkArgument(
          !Strings.isNullOrEmpty(datasetId), "datasetId must not be null or empty.");
      Preconditions.checkArgument(
          !Strings.isNullOrEmpty(tableId), "tableId must not be null or empty.");
  
      // Project is optional, if not set use default project.
      if (!Strings.isNullOrEmpty(projectId)) {
        logger.atInfo().log("Using specified project-id '%s' for input", projectId);
        config.set(INPUT_PROJECT_ID_KEY, projectId);
  
        // For user-friendliness, we'll helpfully backfill the input-specific projectId into the
        // "global" projectId for now.
        // TODO(user): Maybe don't try to be user-friendly here.
        if (Strings.isNullOrEmpty(config.get(PROJECT_ID_KEY))) {
          logger.atWarning().log(
              "No job-level projectId specified in '%s', using '%s' for it.",
              PROJECT_ID_KEY, projectId);
          config.set(PROJECT_ID_KEY, projectId);
        }
      } else {
        String defaultProjectId = ConfigurationUtil.getMandatoryConfig(config, PROJECT_ID_KEY);
        logger.atInfo().log(
            "Using default project-id '%s' since none specified for input.", defaultProjectId);
        config.set(INPUT_PROJECT_ID_KEY, defaultProjectId);
      }
      config.set(INPUT_DATASET_ID_KEY, datasetId);
      config.set(INPUT_TABLE_ID_KEY, tableId);
    }
docs: Sets the Bigquery access related fields in the JobConf for input connector.
  
  @param config the job configuration.
  @param projectId the project containing the table to read the intermediate results to.
  @param datasetId the dataset to write the intermediate results to.
  @param tableId the table to write the intermediate results to.