How can I make sure that a table and csv file can merge in an azure databricks query

Kohdai Kurihara 40 評価のポイント
2025-03-08T14:40:41.74+00:00

I am currently trying to copy data from a csv file into my table in azure databricks and am getting the following error.

[DELTA FAILED TO MERGE FIELDS] Failed to merge fields ‘transfer_month’ and ‘transfer_month’

I am unable to solve the error. I can confirm that the number, order and name of columns are matching so I’m guessing it’s something to do with the data type.

my query is formatted as shown below

CREATE TABLE catalogB.schemaB.tableB(
  transfer_month    STRING,
  value             DOUBLE
);



COPY INTO catalogB.schemaB.tables
FROM '/Volumes/catalogA/schemaA/data.csv'
FILEFORMAT = CSV
FORMAT_OPTIONS(
  ‘header’ = ‘true’,
  ‘ignoreCorruptFiles’ = ‘true’
);
コミュニティ センター | 監視されない

お客様の回答

質問作成者は回答に "承認済み"、モデレーターは "推奨" とマークできます。これにより、ユーザーは作成者の問題が回答によって解決したことを把握できます。