0

我無法在google bigquery加載作業中啓用屬性「允許引用換行符」。不能在使用python的bigquery中設置允許引用換行符屬性?

configuration = { 
     'load': { 
      'createDisposition': create_disposition, 
      'destinationTable': { 
       'projectId': destination_project, 
       'datasetId': destination_dataset, 
       'tableId': destination_table, 
      }, 
      'schema': { 
       'fields': schema_fields 
      }, 
      'sourceFormat': source_format, 
      'sourceUris': source_uris, 
      'writeDisposition': write_disposition, 
      'allowJaggedRows': True, 
      'allowQuotedNewlines': True, 
      'ignoreUnknownValues': True 
     } 
    } 

    if source_format == 'CSV': 
     configuration['load']['skipLeadingRows'] = skip_leading_rows 
     configuration['load']['fieldDelimiter'] = field_delimiter 
     configuration['load']['encoding'] = 'UTF-8' 
     configuration['load']['quote'] = '' 

jobs = self.service.jobs() 
     job_data = { 
      'configuration': configuration 
     } 
query_reply = jobs \ 
      .insert(projectId=self.project_id, body=job_data) \ 
      .execute() 
     job_id = query_reply['jobReference']['jobId'] 
     job = jobs.get(projectId=self.project_id, jobId=job_id).execute() 

但財產'allowQuotedNewlines':真不工作。當我使用bigquery UI(網絡視圖)進行檢查時,不檢查此屬性。

enter image description here

我錯過了什麼?有什麼問題?

回答

0

嘗試刪除該行 配置[「負荷」] [「報價」] =「」

如果你想允許引用換行,你必須指定一個非空的報價字符。

相關問題