Chapter 2: Working with Data in a Project

Slides:



Advertisements
Similar presentations
Database Basics. What is Access? Database management system Computer-based equivalent of a manual database Makes it easy to organize and update information.
Advertisements

MS-Access XP Lesson 1. Introduction to MS-Access Database Management System Software (DBMS) Store data in databases Database is a collection of table.
Lesson 12 Getting Started with Excel Essentials
3-dimensional formula A formula that refers to cells in other worksheets.
EXCEL Spreadsheet Basics
1 Appendix A: Writing and Submitting SAS ® Programs A.1 Writing and Submitting SAS Programs.
Microsoft Excel 2003 Illustrated Complete A Worksheet Formatting.
Microsoft Office 2010 Access Chapter 1 Creating and Using a Database.
Access - Project 1 l What Is a Database? –A Collection of Data –Organized in a manner to allow: »Access »Retrieval »Use of That Data.
Microsoft Excel 2010 Chapter 7
Chapter 1 Databases and Database Objects: An Introduction
XP New Perspectives on Microsoft Office Access 2003, Second Edition- Tutorial 2 1 Microsoft Office Access 2003 Tutorial 2 – Creating And Maintaining A.
Copyright 2003, Paradigm Publishing Inc. CHAPTER 6 BACKNEXTEND 6-1 LINKS TO OBJECTIVES Create and Rename a Folder Create and Rename a Folder Delete Workbooks.
Creating And Maintaining A Database. 2 Learn the guidelines for designing databases When designing a database, first try to think of all the fields of.
FIRST COURSE Access Tutorial 2 Building a Database and Defining Table Relationships.
1 Chapter 3: Getting Started with Tasks 3.1 Introduction to Tasks and Wizards 3.2 Creating a Frequency Report 3.3 Generating HTML, PDF, and RTF Output.
FIRST COURSE Excel Lecture. XP 2 Introducing Excel Microsoft Office Excel 2007 (or Excel) is a computer program used to enter, analyze, and present quantitative.
1 Chapter Overview Creating User and Computer Objects Maintaining User Accounts Creating User Profiles.
Chapter 9 Macros, Navigation Forms, PivotTables, and PivotCharts
Chapter 2 Querying a Database
Chapter 3 Maintaining a Database
Excel 2007 Part (2) Dr. Susan Al Naqshbandi
11 Chapter 3: Getting Started with Tasks 3.1 Introduction to Tasks and Wizards 3.2 Creating a Frequency Report 3.3 Generating HTML, PDF, and RTF Output.
11 Chapter 2: Working with Data in a Project 2.1 Introduction to Tabular Data 2.2 Accessing Local Data 2.3 Importing Text Files 2.4 Editing Tables in the.
Access Lesson 2 Creating a Database
Introduction to Access By Mary Ann Chaney and Alicia Harkleroad.
Microsoft Office 2003 Illustrated Introductory with Programs, Files, and Folders Working.
1 Chapter 5: Creating Summarized Output 5.1 Generating Summary Statistics 5.2 Creating a Summary Report with the Summary Tables Task 5.3 Creating and Applying.
Chapter 2 Querying a Database MICROSOFT ACCESS 2010.
© 2008 The McGraw-Hill Companies, Inc. All rights reserved. WORD 2007 M I C R O S O F T ® THE PROFESSIONAL APPROACH S E R I E S Lesson 22 Macros.
1 Chapter 4: Creating Simple Queries 4.1 Introduction to Querying Data 4.2 Filtering and Sorting Data 4.3 Creating New Columns with an Expression 4.4 Grouping.
Access Tutorial 2 Building a Database and Defining Table Relationships
Chapter 1 Databases and Database Objects: An Introduction
XP New Perspectives on Microsoft Office FrontPage 2003 Tutorial 4 1 Microsoft Office FrontPage 2003 Tutorial 4 – Using Shared Borders and Themes.
Creating a Web Site to Gather Data and Conduct Research.
® Microsoft Office 2013 Access Building a Database and Defining Table Relationships.
Chapter 6 Generating Form Letters, Mailing Labels, and a Directory
® Microsoft Access 2010 Tutorial 1 Creating a Database.
XP New Perspectives on Integrating Microsoft Office XP Tutorial 2 1 Integrating Microsoft Office XP Tutorial 2 – Integrating Word, Excel, and Access.
Chapter 6 SAS ® OLAP Cube Studio. Section 6.1 SAS OLAP Cube Studio Architecture.
McGraw-Hill/Irwin ©2009 The McGraw-Hill Companies, All Rights Reserved Business Driven Information Systems 2e Plug-In T6: Basic Skills and Tools Using.
Office 2003 Advanced Concepts and Techniques M i c r o s o f t Access Project 6 Switchboards, PivotTables, and PivotCharts.
Microsoft Access 2000 Presentation 2 Creating Databases Part I (Creating Tables)
XP New Perspectives on Microsoft Office Access 2003, Second Edition- Tutorial 2 1 Microsoft Office Access 2003 Tutorial 2 – Creating And Maintaining A.
Key Applications Module Lesson 21 — Access Essentials
® Microsoft Access 2010 Tutorial 2 Building a Database and Defining Table Relationships.
® Microsoft Office 2010 Building a Database and Defining Table Relationships.
Lesson 11: Looking at Files and Folders what a file or folder is on the computer how to recognize a file or folder on the desktop how to recognize the.
1 Chapter 2: Working with Data in a Project 2.1 Introduction to Tabular Data 2.2 Accessing Local Data 2.3 Accessing Remote Data 2.4 Importing Text Files.
Microsoft Access 2010 Chapter 10 Administering a Database System.
XP Chapter 2 Succeeding in Business with Microsoft Office Access 2003: A Problem-Solving Approach 1 Building The Database Chapter 2 “It is only the farmer.
A Skills Approach Access 2010 Working with Tables © 2012 The McGraw-Hill Companies, Inc. All rights reserved Chapter 2.
1 Chapter 6: Using Prompts in Tasks and Queries 6.1 Prompting in Projects 6.2 Creating and Using Prompts in Tasks 6.3 Creating and Using Prompts in Queries.
1 Chapter 7: Customizing and Organizing Project Results 7.1 Combining Results 7.2 Updating Results 7.3 Customizing the Output Style (Self-Study)
XP New Perspectives on Microsoft Office FrontPage 2003 Tutorial 7 1 Microsoft Office FrontPage 2003 Tutorial 8 – Integrating a Database with a FrontPage.
Lesson 6 Formatting Cells and Ranges. Objectives:  Insert and delete cells  Manually format cell contents  Copy cell formatting with the Format Painter.
INTRODUCTION TO ACCESS. OBJECTIVES  Define the terms field, record, table, relational database, primary key, and foreign key  Create a blank database.
Pasewark & Pasewark 1 Access Lesson 2 Creating a Database Microsoft Office 2007: Introductory.
Modify Tables and FieldsModify Tables and Fields Lesson 4 © 2014, John Wiley & Sons, Inc.Microsoft Official Academic Course, Microsoft Word Microsoft.
Microsoft Office 2013 Try It! Chapter 4 Storing Data in Access.
COMPUTER SKILLS MS-ACCESS. Introduction Access is a piece of software known as a database management system. At its most basic level, it can be used to.
Chapter 7 Creating Templates, Importing Data, and Working with SmartArt, Images, and Screen Shots Microsoft Excel 2013.
Chapter 3: Getting Started with Tasks
Access Tutorial 2 Building a Database and Defining Table Relationships
Formatting a Worksheet
GO! with Microsoft Access 2016
Exploring Microsoft® Access® 2016 Series Editor Mary Anne Poatsy
CIS16 Application Programming with Visual Basic
Access Tutorial 2 Building a Database and Defining Table Relationships
Access Tutorial 2 Building a Database and Defining Table Relationships
Presentation transcript:

Chapter 2: Working with Data in a Project 2.1 Understanding SAS Data Structure 2.2 Importing Data Files Other Than SAS Files 2.3 Accessing Data via SAS Libraries

Chapter 2: Working with Data in a Project 2.1 Understanding SAS Data Structure 2.2 Importing Data Files Other Than SAS Files 2.3 Accessing Data via SAS Libraries

Objectives State the definition of a SAS data set. State how data is stored in a SAS data set.

Common Data Formats SAS Enterprise Guide can read and use data from a variety of different formats including the following: SAS data sets Microsoft Excel and Access DBMS tables Text files JMP HTML SPSS

2.01 Multiple Answer Poll Which types of data do you work with? Microsoft Excel Microsoft Access DBMS tables (such as Oracle or DB2) SAS data sets Text files (delimited files) Other Type answer here

SAS Data Set A SAS data set (or table) is a rectangular table of rows and columns. Rows (observations) Columns (variables)

Names can be 1 to 32 characters long. SAS Data Set All columns must have a name, type, and length. It is recommended that column names also start with a letter or underscore include only letters, underscores, and numbers. Names can be 1 to 32 characters long.

Character values are 1 to 32,767 characters (bytes) long. SAS Data Set A column’s type is either character (string) or numeric. The type plays a role in determining the length. Character values are 1 to 32,767 characters (bytes) long. Numeric values are 8 bytes of floating point storage: Numeric Currency Date (days from 01JAN1960) Time (seconds from midnight)

SAS Data Set A format is used to control how values are displayed. Formats do not affect how values are stored. Format: DOLLAR Width: 10 Decimal Places: 2 Stored value: 234.60 Format: DATE Width: 9 Stored value: 16497

Formats

2.02 Multiple Choice Poll Which of the following variable attributes is not required? Name Type Length Format Type answer here

2.02 Multiple Choice Poll – Correct Answer Which of the following variable attributes is not required? Name Type Length Format Type answer here

SAS Data Set Properties Viewing a data set’s properties enables you to examine the data set and column attributes.

2.03 Multiple Choice Poll Open the employee_organization data set. Click the Properties button on the toolbar and select Columns. What is the length of the variable Job_Title? 8 9 25 40 Type answer here

2.03 Multiple Choice Poll – Correct Answer Open the employee_organization data set. Click the Properties button on the toolbar and select Columns. What is the length of the variable Job_Title? 8 9 25 40 Type answer here

Missing Values If a data value is not present for a column in a particular row, it is considered missing. A missing character value is displayed as a blank. A missing numeric value is displayed as a period or dot. .

Chapter 2: Working with Data in a Project 2.1 Understanding SAS Data Structure 2.2 Importing Data Files Other Than SAS Files 2.3 Accessing Data via SAS Libraries

Objectives Import a Microsoft Excel spreadsheet and create a SAS data set. Import a fixed-width text file and create a SAS data set. View the properties of the data.

Business Scenario Orion maintains a Microsoft Excel file named products and a fixed-width text file named orders. To use these data sources in SAS Enterprise Guide, they must be imported into SAS data sets.

Adding Data to a Project When a SAS data set is added to a project, SAS Enterprise Guide is able to read and open the data immediately. A shortcut to the data is added to the project.

2.04 Quiz Select File  Open  Data… and navigate to the location of the course data if necessary. What happens when you open the products Excel file? Type answer here

2.04 Quiz – Correct Answer Select File  Open  Data… and navigate to the location of the course data if necessary. What happens when you open the products Excel file? The Import Data task automatically opens. Type answer here

Importing Data Not in a SAS Data Set The Import Data wizard can be used to read text, HTML, or PC-based data files (including Microsoft Excel and Microsoft Access) and to create SAS data sets.

Step 1: Specify Data The first step is to confirm the source data and designate the output SAS data set name and storage location. Verify the file to be imported. Change the name and storage location for the output SAS data set.

Step 2: Select Data Source When you read from structured data such as Microsoft Excel or Access, choose the data to be read and indicate whether the first row contains field names.

Step 2: Select Data Source When you read from non-structured data such as a text file, choose the text format and indicate how the columns should be split.

2.05 Multiple Answer Poll If the Rename columns to comply with SAS naming conventions. option is selected, which column headings would be modified in the imported data set? Product_Category Product Name Discount% Supplier-Country Type answer here

2.05 Multiple Answer Poll – Correct Answers If the Rename columns to comply with SAS naming conventions. option is selected, which column headings would be modified in the imported data set? Product_Category Product Name Discount% Supplier-Country Spaces and special symbols are replaced with an underscore. Type answer here

Step 3: Define Field Attributes Set column attributes for columns included in the imported SAS data set.

Step 4: Advanced Options Select any applicable advanced options.

Import Data Results The new SAS data set is created and accessible via the Project Tree or Process Flow window. It is important to point out that data sources referenced in an EG project are not actually stored within the project. The small arrow in the lower left-hand side of the icon is meant to remind the user that any data source, whether added to a project or created within the project, is stored external to the project. The icon merely represents a pointer to the data source. On the other hand, objects such as reports are stored as part of the EG project.

Updating Results The Import Data wizard can be rerun or modified from the Output Data tab. Use the button to refresh the output data set. Use Modify Task to reopen the Import Data wizard and make changes.

Using the Import Data Task This demonstration illustrates how import a Microsoft Excel and fixed-width text file to create SAS data sets.

Setup for the Quiz (Live Web Only) Import the Products Excel file and create a SAS data set: Create a new project. Add the Products Excel file. (Select File  Open  Data….) In step 1, verify that the output SAS data set is Products. In step 2, verify that the ProductList worksheet is highlighted and that First row of range contains field names is selected. Accept the default settings in step 3 and 4. Select Finish to create the new SAS data set.

2.06 Quiz What do you select to make a change in the Import Data task, such as change the name of the first variable? Type answer here

2.06 Quiz – Correct Answer What do you select to make a change in the Import Data task, such as change the name of the first variable? Modify Task Type answer here

Using the Import Data Task (continued) This demonstration illustrates how import a Microsoft Excel and fixed-width text file to create SAS data sets.

Exercise This exercise reinforces the concepts discussed previously.

Would like a review of the exercises? Please answer with your Yes or No seat indicator.

Chapter 2: Working with Data in a Project 2.1 Understanding SAS Data Structure 2.2 Importing Data Files Other Than SAS Files 2.3 Accessing Data via SAS Libraries

Objectives Identify remote data sources. Access a remote server. Add remote data to a project.

Business Scenario Orion Star wants to use SAS Enterprise Guide to access a DBMS table on a remote server. The table includes information about customer orders.

Transparent Access to Remote Data UNIX Local User z/OS Mainframe Windows Server

SAS Libraries A SAS library is a collection of files that are defined, recognized, and accessible by SAS. Libraries can be used to access SAS or DBMS data. Example: The ORION library can be defined to reference all SAS data sets in s:\workshop.

Opening Files from a SAS Server or Folder The Open Data dialog box enables you to access files from servers where SAS is installed and configured to run with SAS Enterprise Guide. The Libraries icon enables access to predefined folders containing SAS or DBMS data sources. The Files icon enables access to the directories available on the server.

Accessing Data via SAS Servers The Resources pane provides another method to view and access all of your available files and data sources. SAS Folders are used in the platform for SAS Business Analytics.

2.07 Quiz Select View  Server List or click the Server List icon in the Resources pane below the Project Tree. Expand Servers  your server name  Libraries. What libraries are listed? Type answer here

2.07 Quiz – Correct Answer Select View  Server List or click the Server List icon in the Resources pane below the Project Tree. Expand Servers  your server name  Libraries. What libraries are listed? Possible answers: Work , Sashelp, Sasuser, EGTASK, MAPS Type answer here

2.08 Quiz In the Server List window, expand the Files icon. What is listed? Type answer here

2.08 Quiz – Correct Answer In the Server List window, expand the Files icon. What is listed? The file structure of the server Type answer here

Defining SAS Libraries SAS libraries are typically set up by your SAS administrator. However, the Assign Project Library wizard can be used to define libraries to SAS or DBMS data sources for which you have Read permission.

Accessing Remote Data After you add a data source to a project, by default it automatically opens in the data grid.

Adding a Data Set via a SAS Library This demonstration illustrates how to define a project library and add a data set to the project via the library definition.

Setup for the Poll Use the Assign Project Library task to create the ORION library and point to the location of the course data. (Select Tools  Assign Project Library….) Include the ACCESS=READONLY option in step 3 of the task. View the ORION library in the Server List. If you do not see the library or the data sets, right-click Servers and select Refresh. Right-click on the travel_expenses table in the Server List and select Copy. Right-click on the Work library and select Paste. Double-click the travel_expenses table in the Work library to add it to the project.

2.09 Poll Right-click travel_expenses in the Process Flow or Project Tree window and select Delete. Is the table deleted from the library?  Yes  No Type answer here

2.09 Poll – Correct Answer Right-click travel_expenses in the Process Flow or Project Tree window and select Delete. Is the table deleted from the library?  Yes  No Only the shortcut is removed from the project, but the table remains in the library. Type answer here

2.10 Poll Right-click travel_expenses under the Work library in the Server List and select Delete. Are you able to delete the table?  Yes  No Type answer here

2.10 Poll – Correct Answer Right-click travel_expenses under the Work library in the Server List and select Delete. Are you able to delete the table?  Yes  No If you have Write access to a library and the data sets within, you can move, copy, and delete files in the Server List. These actions cannot be undone, so be careful! Type answer here

2.11 Poll Right-click travel_expenses under the ORION library in the Server List and select Delete. Are you able to delete the table?  Yes  No Type answer here

2.11 Poll – Correct Answer Right-click travel_expenses under the ORION library in the Server List and select Delete. Are you able to delete the table?  Yes  No Because you used the ACCESS=READONLY option when you defined the ORION library, you cannot make changes to the contents. Type answer here

Chapter Review What are the two types of columns in a SAS data set? What happens to a date? How is it stored?   What SAS item is used to control the way that a data value is displayed in a report?

Chapter Review Answers What are the two types of columns in a SAS data set? What happens to a date? How is it stored?   What SAS item is used to control the way that a data value is displayed in a report? The two types are character and numeric. A date is stored as an integer representing the number of days between January 1, 1960 and a specific date. A SAS format is used to control how a data value is displayed. For example, the DOLLARw.d format displays a numeric value with dollar signs, commas, and the specified number of decimals.

Chapter Review True or False: When you access data via the Import Data task, a new SAS data set is created. True or False: When you add a data source to a project by selecting File  Open  Data, the data is saved in the project. What type of files can you import with the Import Data task?

Chapter Review Answers True or False: When you access data via the Import Data task, a new SAS data set is created. True   True or False: When you add a data source to a project by selecting File  Open  Data, the data is saved in the project. What type of files can you import with the Import Data task? False: A pointer to the data source is saved in the project. You can import Microsoft Excel and Access data as well as text files.