I am confused to why I got this quiz question incorrect (I chose "a" but the correct answer is "b"):
9. What does this code do?
proc import datafile="d:/collect817/bird_count.csv"
dbms=csv out=bird817 replace;
run;
| a. It creates a SAS data set named bird817 in the work library from the CSV file bird_count and replaces bird817 whenever the CSV file is updated. |
| b. It creates a SAS data set named bird817 in the work library from the CSV file bird_count. |
| c. It uses the CSV engine to directly read the data file bird_count.csv. |
@AJS1 wrote:
I am confused to why I got this quiz question incorrect (I chose "a" but the correct answer is "b"):
9. What does this code do?
proc import datafile="d:/collect817/bird_count.csv" dbms=csv out=bird817 replace; run;
a. It creates a SAS data set named bird817 in the work library from the CSV file bird_count and replaces bird817 whenever the CSV file is updated. b. It creates a SAS data set named bird817 in the work library from the CSV file bird_count. c. It uses the CSV engine to directly read the data file bird_count.csv.
The key different in this case is the clause "whenever the CSV file is updated.". Since the Proc Import would need to be rerun when the CSV file is updated then that makes A incorrect.
HI @AJS1 The tricky part is "whenever the CSV file is updated."
Proc import doesn't have the artificial intelligence to know when a CSV file is updated however when and everytime it is executed, it creates a file as named. So B is straight to the point. ![]()
Plus the replace is merely overwrite feature.
Thank you!
@AJS1 wrote:
I am confused to why I got this quiz question incorrect (I chose "a" but the correct answer is "b"):
9. What does this code do?
proc import datafile="d:/collect817/bird_count.csv" dbms=csv out=bird817 replace; run;
a. It creates a SAS data set named bird817 in the work library from the CSV file bird_count and replaces bird817 whenever the CSV file is updated. b. It creates a SAS data set named bird817 in the work library from the CSV file bird_count. c. It uses the CSV engine to directly read the data file bird_count.csv.
The key different in this case is the clause "whenever the CSV file is updated.". Since the Proc Import would need to be rerun when the CSV file is updated then that makes A incorrect.
April 27 – 30 | Gaylord Texan | Grapevine, Texas
Walk in ready to learn. Walk out ready to deliver. This is the data and AI conference you can't afford to miss.
Register now and lock in 2025 pricing—just $495!
SAS' Charu Shankar shares her PROC SQL expertise by showing you how to master the WHERE clause using real winter weather data.
Find more tutorials on the SAS Users YouTube channel.