[[["易于理解","easyToUnderstand","thumb-up"],["解决了我的问题","solvedMyProblem","thumb-up"],["其他","otherUp","thumb-up"]],[["很难理解","hardToUnderstand","thumb-down"],["信息或示例代码不正确","incorrectInformationOrSampleCode","thumb-down"],["没有我需要的信息/示例","missingTheInformationSamplesINeed","thumb-down"],["翻译问题","translationIssue","thumb-down"],["其他","otherDown","thumb-down"]],["最后更新时间 (UTC):2025-08-17。"],[[["\u003cp\u003eRuntime parameters allow for the parameterization of URIs/data paths and destination tables in Cloud Storage, Azure Blob Storage, and Amazon S3 transfers, enabling the loading of data from date-organized buckets.\u003c/p\u003e\n"],["\u003cp\u003eThe \u003ccode\u003erun_time\u003c/code\u003e and \u003ccode\u003erun_date\u003c/code\u003e parameters can be used to specify how to partition the destination table and retrieve files that match a particular date, with \u003ccode\u003erun_date\u003c/code\u003e providing a date string in \u003ccode\u003eYYYYMMDD\u003c/code\u003e format.\u003c/p\u003e\n"],["\u003cp\u003eThe templating syntax \u003ccode\u003e{run_date}\u003c/code\u003e and \u003ccode\u003e{run_time[+\\-offset]|"time_format"}\u003c/code\u003e are supported for destination table names, with \u003ccode\u003erun_time\u003c/code\u003e allowing time offsets and custom formatting.\u003c/p\u003e\n"],["\u003cp\u003ePartitioned tables can be ingestion-time partitioned (based on transfer run time) or column-partitioned (based on a \u003ccode\u003eTIMESTAMP\u003c/code\u003e or \u003ccode\u003eDATE\u003c/code\u003e column), but minutes cannot be specified for partitioning.\u003c/p\u003e\n"],["\u003cp\u003eWildcards in the source URI or data path can be used in conjunction with destination table parameters to transfer data, making it flexible for transferring data into non-partitioned or partitioned tables.\u003c/p\u003e\n"]]],[],null,["# Runtime parameters in Cloud Storage transfers\n=============================================\n\nWhen you set up a data transfer in Cloud Storage, Azure Blob Storage, or\nAmazon Simple Storage Service (Amazon S3), you can parameterize the URI (or data path) and the destination\ntable. Parameterizing lets you load data from buckets that are organized by\ndate. These parameters are referred to as *runtime parameters* to distinguish\nthem from query parameters.\n\nWhen you use runtime parameters in a transfer, you can do the following:\n\n- Specify how you want to partition the destination table\n- Retrieve files that match a particular date\n\nAvailable runtime parameters\n----------------------------\n\nWhen you set up the Cloud Storage, Blob Storage, or\nAmazon S3 transfer, you can specify how you want to partition the\ndestination table by using runtime parameters.\n\nTemplating system\n-----------------\n\nCloud Storage, Blob Storage, and Amazon S3 transfers\nsupport runtime parameters in the destination table name by using a templating\nsyntax.\n\n#### Parameter templating syntax\n\nThe templating syntax supports basic string templating and time offsetting. Parameters are\nreferenced in the following formats:\n\n- `{run_date}`\n- `{run_time[+\\-offset]|\"time_format\"}`\n\n**Usage notes:**\n\n- No whitespace is allowed between run_time, offset, and time format.\n- To include literal curly braces in the string, you can escape them as `'\\{' and '\\}'`.\n- To include literal quotes or a vertical bar in the time_format, such as `\"YYYY|MM|DD\"`, you can escape them in the format string as: `'\\\"'` or `'\\|'`.\n\n#### Parameter templating examples\n\nThese examples demonstrate specifying destination table names with different time formats, and offsetting the run time.\n\nPartitioning options\n--------------------\n\nThere are two types of partitioned tables in BigQuery:\n\n- **Tables that are partitioned by ingestion time.** For Cloud Storage, Blob Storage, and Amazon S3 transfers, the ingestion time is the transfer's run time.\n- **Tables that are partitioned based on a column.** The column type must be a [`TIMESTAMP`](/bigquery/docs/reference/standard-sql/data-types#timestamp_type) or [`DATE`](/bigquery/docs/reference/standard-sql/data-types#date_type) column.\n\nIf the destination table is partitioned on a column, you identify the\npartitioning column when you create the destination table and specify its\nschema. Learn more about creating column-based partitioned tables in\n[Creating and using partitioned tables](/bigquery/docs/creating-column-partitions).\n| **Note:** Minutes cannot be specified when partitioning a table.\n\n### Partitioning examples\n\n- Table with no partitioning\n - Destination table: `mytable`\n- [Ingestion-time partitioned table](/bigquery/docs/partitioned-tables#ingestion_time)\n - Destination table: `mytable`\u003cvar translate=\"no\"\u003e$YYYYMMDD\u003c/var\u003e\n - Note that minutes cannot be specified.\n- [Column-partitioned table](/bigquery/docs/partitioned-tables#date_timestamp_partitioned_tables)\n - Destination table: `mytable`\n - Specify the partitioning column as a `TIMESTAMP` or `DATE` column when you create the table's schema.\n\nNotes on parameter usage\n------------------------\n\n- If you partition your data based on your local timezone, you need to manually calculate the hour offset from UTC by using the offsetting mechanism in the [templating syntax](#templating_system).\n- Minutes cannot be specified in parameters.\n- Using wildcards for the URI or data path in combination with parameters on the destination table name is allowed.\n\nRuntime parameter examples\n--------------------------\n\nThe following examples show ways to combine the wildcard character and\nparameters for common use cases. Assume the table's name is `mytable` and\nthe `run_time` is `2018-02-15 00:00:00` (UTC) for all examples.\n\n### Transfer data to a non-partitioned table\n\nThis use case applies to loading new files from a Cloud Storage,\nBlob Storage, or Amazon S3 bucket into a non-partitioned\ntable. This example uses a wildcard in the URI or data path and uses an ad hoc\nrefresh transfer to pick up new files.\n\n### Load a snapshot of all data into an ingestion-time partitioned table\n\nIn this case, all data in the specified URI or data path is transferred to a\ntable partitioned by today's date. In a refresh transfer, this configuration\npicks up files added since the last load and adds them to a particular\npartition.\n\nThis use case transfers today's data into a table partitioned on today's date.\nThis example also applies to a refresh transfer that retrieves newly added files\nthat match a certain date and loads the data into the corresponding partition.\n\nWhat's next\n-----------\n\n- Learn about [setting up a Cloud Storage transfer](/bigquery/docs/cloud-storage-transfer).\n- Learn more about the [BigQuery Data Transfer Service](/bigquery/docs/dts-introduction)."]]