skipLeadingRows = 1 в определении внешней таблицы - PullRequest
0 голосов
/ 28 февраля 2019

В приведенном ниже примере, как я могу установить параметр пропустить передний ряд?

bq --location=US query --external_table_definition=sales::Region:STRING,Quarter:STRING,Total_sales:INTEGER@CSV=gs://mybucket/sales.csv 'SELECT Region,Total_sales FROM sales;'

Regards, Sreekanth

1 Ответ

0 голосов
/ 03 марта 2019

Параметры флагов можно найти в домашней папке установки (я отметил полужирный под флагом, который вы ищете)

/ google-cloud-sdk / platform / bq / bq.py:



--[no]allow_jagged_rows: Whether to allow missing trailing optional columns in
    CSV import data.
  --[no]allow_quoted_newlines: Whether to allow quoted newlines in CSV import
    data.
  -E,--encoding: : The character encoding used by the input
    file. Options include:
    ISO-8859-1 (also known as Latin-1)
    UTF-8
  -F,--field_delimiter: The character that indicates the boundary between
    columns in the input file. "\t" and "tab" are accepted names for tab.
  --[no]ignore_unknown_values: Whether to allow and ignore extra, unrecognized
    values in CSV or JSON import data.
  --max_bad_records: Maximum number of bad records allowed before the entire job
    fails.
    (default: '0')
    (an integer)
  --quote: Quote character to use to enclose records. Default is ". To indicate
    no quote character at all, use an empty string.
  --[no]replace: If true erase existing contents before loading new data.
    (default: 'false')
  --schema: Either a filename or a comma-separated list of fields in the form
    name[:type].
  <b>--skip_leading_rows</b>: The number of rows at the beginning of the source file to
    skip.
    (an integer)
  --source_format: : Format of
    source data. Options include:
    CSV
    NEWLINE_DELIMITED_JSON
    DATASTORE_BACKUP

Добро пожаловать на сайт PullRequest, где вы можете задавать вопросы и получать ответы от других членов сообщества.
...