当我尝试将数据文件加载到BigQuery时,它给出了MySQL 0000-00-00 00:00:00
的默认时间戳值(至少来自mysqldump)的错误。有没有办法更改我的json文件以允许datetime
字段中的这些值(见下文)?
错误:
gs:// pfam31 / pfamseq_part_04:CSV表遇到太多错误,放弃了。行:11664;错误:1。(错误代码:无效)
gs:// pfam31 / pfamseq_part_04:无法解析00:00:00'作为从位置8743229开始创建的字段的日期时间(位置13)(错误代码:无效)
[
{
"mode": "REQUIRED",
"name": "pfamseq_acc",
"type": "STRING"
},
{
"mode": "REQUIRED",
"name": "pfamseq_id",
"type": "STRING"
},
{
"mode": "REQUIRED",
"name": "seq_version",
"type": "INTEGER"
},
{
"mode": "REQUIRED",
"name": "crc64",
"type": "STRING"
},
{
"mode": "REQUIRED",
"name": "md5",
"type": "STRING"
},
{
"mode": "REQUIRED",
"name": "description",
"type": "STRING"
},
{
"mode": "REQUIRED",
"name": "evidence",
"type": "INTEGER"
},
{
"mode": "REQUIRED",
"name": "length",
"type": "INTEGER"
},
{
"mode": "REQUIRED",
"name": "species",
"type": "STRING"
},
{
"mode": "NULLABLE",
"name": "taxonomy",
"type": "STRING"
},
{
"mode": "NULLABLE",
"name": "is_fragment",
"type": "INTEGER"
},
{
"mode": "REQUIRED",
"name": "sequence",
"type": "STRING"
},
{
"mode": "REQUIRED",
"name": "updated",
"type": "TIMESTAMP"
},
{
"mode": "NULLABLE",
"name": "created",
"type": "DATETIME"
},
{
"mode": "REQUIRED",
"name": "ncbi_taxid",
"type": "INTEGER"
},
{
"mode": "NULLABLE",
"name": "auto_architecture",
"type": "INTEGER"
},
{
"mode": "NULLABLE",
"name": "treefam_acc",
"type": "STRING"
},
{
"mode": "NULLABLE",
"name": "swissprot",
"type": "INTEGER"
}
]
答案 0 :(得分:0)
您无法将年/月/日设置为零.TIMESTAMP的范围为'1970-01-01 00:00:01'UTC到'2038-01-19 03:14:07'UTC。 更多检查here