Course Hero Logo

ISOM835_Lab 2_Data Importation and Query Building.pdf - Lab...

Course Hero uses AI to attempt to automatically extract content from documents to surface to you and others so you can study better, e.g., in search results, to enrich docs, and more. This preview shows page 1 - 8 out of 21 pages.

1Lab 2: Data Importation and Query BuildingISOM 835 Predictive AnalyticsSawyer Business SchoolDr. Kate LiISOMThis lab consists of two portions:1.SAS Enterprise Guide Demonstration: data importation and query building (50 pts)2.Questions 1-4 (50 pts)While you work through each lab, please take notes of things that you don’t understand and/or arenot sure about. I will give you time to ask questions during the following class.
2SAS Enterprise Guide DemonstrationOpen a SAS Dataset and Examine Variable Properties1.Open SAS Enterprise Guide. Create and save a new project named“ISOM835_Lab2_your initials”on yourOneDriveorH: Drive.2.From theFilemenu, open the SAS data file named “orion_profit.sas7bdat” which is saved in theISOM835 Data Files folderondata (\\ssomfs1)(X:) Drive.Whenever you select a file, check fileextension to make sure that you select the correct file.3.In order to view the property of the data set, right clickorion_profit.sas7bdatin the Project Treewindow, and selectProperties.
34.In the popup window of “Properties for orion_profit”, clickColumns, and you will get a summary ofproperties of the variables in theorion_profitdata set.Import an Excel FileOrion Star maintains a list of products in a Microsoft Excel file namedproducts.xlsx. To use this data inSAS Enterprise Guide, it must be imported into a SAS data set first.1.From theFilemenu, selectImport Data…SelectMy Computerðdata (\\ssomfs1)(X:)ISOM835 Data Files folderð“products.xlsx”.2.In Step 1: Specify data, specify that the output file will be saved in theSASApp – SASDATALibraryon theSASApp server, and named “products_your initials”. ClickNext>ð.
43.In Step 2: Select Data Source, select the worksheetProductList(notice thatproducts.xlsxcontainstwo worksheets:ProductListandProdformat). Make sure that “First row of range contains fieldnames” is checked if it is the case. ClickNext>.
5The “Rename columns to comply with SAS naming conventions” option can convert column namesaccording to the following rules:Names must begin with a letter or an underscore. Subsequent characters can be letters,numeric digits, or underscores.Names cannot contain blanks.Names cannot contain special characters except for the underscore.4.In Step 3: Define Field Attributes, we can modify variable attributes if needed. The variable,Supplier_ID, is currently stored as numeric values, i.e., numbers. To change it to string, click on“Number” in theTypefield ofSupplier_ID, and select “String” in the drop-down list.
65.In the “Numeric Value as String” dialog box, keep the default selection (i.e., “Scan all values in thecolumn”) and clickOKto close it. ClickNext>.6.In Step 4: Advanced Options, click “Finish”. A new SAS dataset should appear in the Process Flowwindow.
7

Upload your study docs or become a

Course Hero member to access this document

Upload your study docs or become a

Course Hero member to access this document

End of preview. Want to read all 21 pages?

Upload your study docs or become a

Course Hero member to access this document

Term
Spring
Professor
N/A
Tags
Column

Newly uploaded documents

Show More

Newly uploaded documents

Show More

  • Left Quote Icon

    Student Picture

  • Left Quote Icon

    Student Picture

  • Left Quote Icon

    Student Picture