Published on :
ETL CREATION_INTERNE

Customer Table Creation

This code is also available in: Deutsch Español Français
Awaiting validation
This program uses a DATA step to generate the 'customer' table. It reads raw data provided directly in the input stream (instream data) via the datalines4 statement. Fields are separated by the pipe '|' character and include customer IDs, postal codes, cities, incomes, credit scores, and associated values.
Data Analysis

Type : CREATION_INTERNE


Data is hardcoded in the script using the datalines4 statement.

1 Code Block
DATA STEP Data
Explanation :
Creation of the 'customer' table by reading data separated by '|' directly from the source code. Numeric variables are read with format 8. and the City variable as a character string of length 25.
Copied!
1DATA customer;
2 INFILE DATALINES dlm="|";
3 INPUT CustomerID: 8. Zip: 8. City:$25. Income: 8. CreditScore: 8. Value 8.;
4 datalines4;
51928446490 |55901 |Rochester |6833.58 |596 | 67.04
61900730536 |07010 |Cliffside Park |. |746 | 6.02
71960231260 |07203 |Roselle |64183.78 |585 | 59.12
81995545096 |07087 |Union City |65974.21 |662 | .38
91943535328 |01850 |Lowell |. |657 | .26
101989152037 |01752 |Marlborough |63857.83 |660 | 11.2
111989638715 |31901 |Columbus |. |682 | 4.78
121953531885 |30042 |Lawrenceville |47999.48 |711 | 31.82
131908378591 |60502 |Aurora |58486 |695 | 41.11
141944290137 |01850 |Lowell |. |689 | .79
151908316871 |52627 |Fort Madison |72123.43 |644 | .2333
161987648131 |47701 |Evansville |. |667 | 1.8
171941732136 |47801 |Terre Haute |59351.19 |. | 61.1
181993690772 |71291 |West Monroe |. |616 | 3.7888
191963535911 |07101 |Newark |52353.55 |676 | 25.062
20;;;;
21RUN;
This material is provided "as is" by We Are Cas. There are no warranties, expressed or implied, as to merchantability or fitness for a particular purpose regarding the materials or code contained herein. We Are Cas is not responsible for errors in this material as it now exists or will exist, nor does We Are Cas provide technical support for it.