BookmarkSubscribeRSS Feed
🔒 This topic is solved and locked. Need further help from the community? Please sign in and ask a new question.
EinarRoed
Pyrite | Level 9

I need to read a CSV-file into a DI Studio job. I've registered it as an External File object, and controlled that all the columns and values look fine when I select "Open as a table" in DI Studio. The File Reader transformation causes problems, however. If I *only* map the character columns, File Reader works perfectly, but once I include any of the numeric columns it fails.

Here's the column settings from the File Reader (mapped directly from the External File object):

Once I've run the File Reader and try to open the output table, the column "1980" produces the following errors:

The values for "1980" in the CSV-file are ordinary numbers, and I've sorted them to check that there's no whitespace/blank values. Example:

Can anyone please help me understand the cause of the errors?

1 ACCEPTED SOLUTION

Accepted Solutions
LinusH
Tourmaline | Level 20

First, add informat and format to your numerical column.

And, since your column doesn't comply with SAS naming conventions, you need either map to another name, or have SAS using the n literal, it's a tick option in DIS.

Data never sleeps

View solution in original post

2 REPLIES 2
LinusH
Tourmaline | Level 20

First, add informat and format to your numerical column.

And, since your column doesn't comply with SAS naming conventions, you need either map to another name, or have SAS using the n literal, it's a tick option in DIS.

Data never sleeps
EinarRoed
Pyrite | Level 9

Thank you very much for the advice. Smiley Happy

SAS Innovate 2025: Register Now

Registration is now open for SAS Innovate 2025 , our biggest and most exciting global event of the year! Join us in Orlando, FL, May 6-9.
Sign up by Dec. 31 to get the 2024 rate of just $495.
Register now!

How to connect to databases in SAS Viya

Need to connect to databases in SAS Viya? SAS’ David Ghan shows you two methods – via SAS/ACCESS LIBNAME and SAS Data Connector SASLIBS – in this video.

Find more tutorials on the SAS Users YouTube channel.

Discussion stats
  • 2 replies
  • 1937 views
  • 0 likes
  • 2 in conversation