Six Stars

column name issues for metadata

Hi All,

  • I am facing issue after imported excel file for metadata
  • Excel file column name like given below screenshots

Screenshot (85).png

  •  After imported Excel file,column name changed like given below screenshots

Screenshot (86).png

  •  How to solve this issue?
2 REPLIES
Six Stars

Re: column name issues for metadata

Hi,

 

From the labels you're getting, the highlighted cells in your spreadsheet column must be dates, which are stored as integer numbers by Excel, but displayed in your local date/time format in the sheet.

 

Column names in Talend must be valid Java variables, which can only begin with a letter, underscore or dollar sign, but not a numeric digit.

 

Therefore the Talend Excel metadata wizard has to convert the column names it is reading from the spreadsheet (which are integer numbers) into something which is valid, and in this case it's taking the last four digits of the integer representing the date, and adding an underscore to make this a valid Java variable name.

 

If you want to see the integer values for each column, then simply copy the cells in Excel, and use "Paste Special" to paste the values somewhere. You'll see that these are indeed integer numbers, and the last four digits of each will correspond to the column names you're seeing in Talend.

 

Your only options are to either change the columns in your spreadsheet, or in the metadata wizard.

 

Regards,

 

 

Chris

Six Stars

Re: column name issues for metadata

For what it's worth, even if the date values in the columns were being stored and read in by the wizard as strings, they'd still be invalid for variable/Column names, as these can't include dashes/minus signs, and again they can't begin with a numeric digit. The dashes would have to be replaced by underscores, and the whole thing prefixed with another underscore.