Skip to content

add billing_project parameter for BQ#182

Merged
juanrmn merged 1 commit into
mainfrom
bug/sc-516962/-iag-prd-carto-3-raster-uploader-different
Dec 9, 2025
Merged

add billing_project parameter for BQ#182
juanrmn merged 1 commit into
mainfrom
bug/sc-516962/-iag-prd-carto-3-raster-uploader-different

Conversation

@juanrmn

@juanrmn juanrmn commented Dec 9, 2025

Copy link
Copy Markdown
Member

Issue

Fixes #180

Proposed Changes

Add new --billing_project for BQ. The default value is the previous --project, so it is backward compatible.

Pull Request Checklist

  • I have tested the changes locally with custom billing_project
  • I have tested the changes locally with default value

Additional Information

Updated the usage information:

$ carto bigquery upload --help
Usage: carto bigquery upload [OPTIONS]

  Upload a raster file to Google BigQuery.

Options:
  --file_path TEXT             The path to the raster file.
  --file_url TEXT              The path to the raster file.
  --project TEXT               The name of the Google Cloud project.
                               [required]
  --token TEXT                 An access token to authenticate with.
  --dataset TEXT               The name of the dataset.  [required]
  --table TEXT                 The name of the table.
  --billing_project TEXT       The name of the billing project. Default value
                               is the --project parameter.
  --band INTEGER               Band(s) within raster to upload. Could repeat
                               --band to specify multiple bands.
  --band_name TEXT             Column name(s) used to store band (Default:
                               band_<band_num>). Could repeat --band_name to
                               specify multiple bands column names. List of
                               columns names HAVE to pair --band list with the
                               same order.
  --chunk_size INTEGER         The number of blocks to upload in each chunk.
  --compress                   Compress band data using zlib.
  --overwrite                  Overwrite existing data in the table if it
                               already exists.
  --append                     Append records into a table if it already
                               exists.
  --cleanup-on-failure         Clean up resources if the upload fails. Useful
                               for non-interactive scripts.
  --exact_stats                Compute exact statistics for the raster bands.
  --basic_stats                Compute basic stats and omit quantiles and most
                               frequent values.
  --compression-level INTEGER  Compression level (1-9, higher = better
                               compression but slower)
  --band-valuelabels TEXT      Custom data for valuelabels in JSON format, or
                               'None'. i.e: '{<value_1>: <label_1>, <value_2>:
                               <label_2>, ...}'. Could repeat --band-
                               valuelabels to specify multiple bands data.
                               They will be considered in the order they
                               appear in the file. Note that you can set any
                               value to 'None' to omit valuelabels for that
                               band.
  -h, --help                   Show this message and exit.

@juanrmn juanrmn marked this pull request as ready for review December 9, 2025 10:49
@juanrmn juanrmn merged commit 96e97b6 into main Dec 9, 2025
4 checks passed
@juanrmn juanrmn deleted the bug/sc-516962/-iag-prd-carto-3-raster-uploader-different branch December 9, 2025 13:04
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

BigQuery: Cannot specify a billing/connection project independently of the target table project

2 participants