日韩性视频-久久久蜜桃-www中文字幕-在线中文字幕av-亚洲欧美一区二区三区四区-撸久久-香蕉视频一区-久久无码精品丰满人妻-国产高潮av-激情福利社-日韩av网址大全-国产精品久久999-日本五十路在线-性欧美在线-久久99精品波多结衣一区-男女午夜免费视频-黑人极品ⅴideos精品欧美棵-人人妻人人澡人人爽精品欧美一区-日韩一区在线看-欧美a级在线免费观看

歡迎訪問 生活随笔!

生活随笔

當前位置: 首頁 > 编程资源 > 编程问答 >内容正文

编程问答

Extra Data after Last Expected Column:hawq建外表load数据报错

發布時間:2025/3/15 编程问答 28 豆豆
生活随笔 收集整理的這篇文章主要介紹了 Extra Data after Last Expected Column:hawq建外表load数据报错 小編覺得挺不錯的,現在分享給大家,幫大家做個參考.

背景:使用sqoop import 才oracle抽數據入HDFS后,通過pxf建立hawq外表,查詢數據報錯

解決思路:1、從報錯上看應該是數據源分割后字段數比目標表字段多,且pgadmin3里報錯還出現源數據異常的一條記錄,去源頭oracle查看對應的記錄,發現地段內部包含分隔符。

? ?2、重新執行sqoop import 并用 " \t "分隔,問題解決。

Loading Data from a Flat File "ERROR: Extra Data after Last Expected Column"

Chloe Jackson

March 23, 2017 16:26

Environment

?Product?Version
?Pivotal Greenplum?4.2.x
?OS?All Supported OS

Symptom

Loading data from flat files result in the following error message:

ERROR: extra data after last expected column

Cause

You will encounter this error if your source data has more columns than the target table.

Resolution

You must ensure that the source data and table columns align.

Example:

-- Target table

ddata=# \d empTable "public.emp" Column " Type " Modifiers --------+---------+----------- id " integer " dept " integer " role " integer " Distributed by: (id)

-- Source data file

$ cat /tmp/load.dat 1"2"3"4 1"2"3"4 1"2"3"4 1"2"3"4 1"2"3"4 1"2"3"4

--Error?

ddata=# copy emp from '/tmp/load.dat' with delimiter as '"'; ERROR: extra data after last expected column (seg0 sdw1:55001 pid=12476) CONTEXT: COPY emp, line 1: "1"2"3"4"

As can be seen from the example above, the source data file has one more column than the target table, resulting in the error described above.


官方給出的解決方案如下:


總結

以上是生活随笔為你收集整理的Extra Data after Last Expected Column:hawq建外表load数据报错的全部內容,希望文章能夠幫你解決所遇到的問題。

如果覺得生活随笔網站內容還不錯,歡迎將生活随笔推薦給好友。