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-2024.png

Don't miss out on SAS Innovate - Register now for the FREE Livestream!

Can't make it to Vegas? No problem! Watch our general sessions LIVE or on-demand starting April 17th. Hear from SAS execs, best-selling author Adam Grant, Hot Ones host Sean Evans, top tech journalist Kara Swisher, AI expert Cassie Kozyrkov, and the mind-blowing dance crew iLuminate! Plus, get access to over 20 breakout sessions.

 

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
  • 1687 views
  • 0 likes
  • 2 in conversation