Using SAS ACCESS to retrieve and store data in relational database management systems



Similar documents
ODBC Chapter,First Edition

Open Source tools for geospatial tasks

Using Proc SQL and ODBC to Manage Data outside of SAS Jeff Magouirk, National Jewish Medical and Research Center, Denver, Colorado

Accessing a Microsoft SQL Server Database from SAS on Microsoft Windows

SQL Pass-Through and the ODBC Interface

Access to Relational Databases Using SAS. Frederick Pratter, Destiny Corp.

Define ODBC Database Library using Management Console

2015, André Melancia (Andy.PT) 1

Accessing SQL Server Data from Oracle on Linux. for FREE!

Accessing Your Database with JMP 10 JMP Discovery Conference 2012 Brian Corcoran SAS Institute

Sisense. Product Highlights.

Querying Databases Using the DB Query and JDBC Query Nodes

KonyOne Server Installer - Linux Release Notes

HP Vertica Integration with SAP Business Objects: Tips and Techniques. HP Vertica Analytic Database

An Introduction to Open Source Geospatial Tools

Automated distribution of SAS results Jacques Pagé, Les Services Conseils HARDY, Quebec, Qc

Step into the Cloud: Ways to Connect to Amazon Redshift with SAS/ACCESS

Technical Paper. Defining an ODBC Library in SAS 9.2 Management Console Using Microsoft Windows NT Authentication

Using ODBC with MDaemon 6.5

Effective Use of SQL in SAS Programming

OpenScape Business V2

Getting Started with STATISTICA Enterprise Programming

Connect to MySQL or Microsoft SQL Server using R

Oracle Database 11g Comparison Chart

9.1 Supplement for SAS/ACCESS. Microsoft SQL Server. SAS/ACCESS for Relational Databases

OpenGeo Suite for Linux Release 3.0

Seamless Web Data Entry for SAS Applications D.J. Penix, Pinnacle Solutions, Indianapolis, IN

IGEL Universal Management. Installation Guide

System requirements. Java SE Runtime Environment(JRE) 7 (32bit) Java SE Runtime Environment(JRE) 6 (64bit) Java SE Runtime Environment(JRE) 7 (64bit)

Getting Your Data into SAS

General Guide to Installation and Migration for Client/Server BAMS/DSS. Release 6.0

SAS PASSTHRU to Microsoft SQL Server using ODBC Nina L. Werner, Madison, WI

SAS 9.3 Drivers for ODBC

Downloading, Configuring, and Using the Free SAS University Edition Software

Short notes on webpage programming languages

Consolidate by Migrating Your Databases to Oracle Database 11g. Fred Louis Enterprise Architect

Various Load Testing Tools

Turning ClearPath MCP Data into Information with Business Information Server. White Paper

Adam Rauch Partner, LabKey Software Extending LabKey Server Part 1: Retrieving and Presenting Data

Service Desk Intelligence System Requirements

Institute of Computational Modeling SB RAS

Technology Foundations. Conan C. Albrecht, Ph.D.

Basics on Geodatabases

Creating a GIS based learning tool for the Faculty of Forest & Environment at the HNE Eberswalde

Query Builder. The New JMP 12 Tool for Getting Your SQL Data Into JMP WHITE PAPER. By Eric Hill, Software Developer, JMP

Mercury Users Guide Version 1.3 February 14, 2006

Analyzing the Server Log

Accessing Information from your Electronic Health Records applications: Tools and Techniques

NAS Storage needs to be purchased; Will not be offered IAAS - Utility SMTP Per SMTP account Per server

Jet Data Manager 2012 User Guide

ABSTRACT INTRODUCTION OVERVIEW OF POSTGRESQL AND POSTGIS SESUG Paper RI-14

Architecting the Future of Big Data

It s not the Yellow Brick Road but the SAS PC FILES SERVER will take you Down the LIBNAME PATH= to Using the 64-Bit Excel Workbooks.

HP OO 10.X - SiteScope Monitoring Templates

Security and Control Issues within Relational Databases

ODBC Client Driver Help Kepware, Inc.

ODBC (Open Database Connectivity) for MS-Excel Microsoft OLE DB Provider for ODBC Drivers (Legitronic v3.6.2 & Later)

DBX. SQL database extension for Splunk. Siegfried Puchbauer

Database Extension 1.5 ez Publish Extension Manual

UQC103S1 UFCE Systems Development. uqc103s/ufce PHP-mySQL 1

CHAPTER 1 Overview of SAS/ACCESS Interface to Relational Databases

AWS Schema Conversion Tool. User Guide Version 1.0

LDAP and Integrated Technologies: A Simple Primer Brian Kowalczyk, Kowal Computer Solutions Inc., IL Richard Kerwin, R.K. Consulting Inc.

SQL Databases Course. by Applied Technology Research Center. This course provides training for MySQL, Oracle, SQL Server and PostgreSQL databases.

Connecting LISTSERV to an Existing Database Management System (DBMS)

UNIX Operating Environment

Supported Platforms. HP Vertica Analytic Database. Software Version: 7.1.x

LISTE DES DOCUMENTS ORACLE

Supported Platforms. HP Vertica Analytic Database. Software Version: 7.0.x

Introduction. Introduction: Database management system. Introduction: DBS concepts & architecture. Introduction: DBS versus File system

EVALUATION OF SERVER-SIDE TECHNOLOGY FOR WEB DEPLOYMENT

Informatica Data Replication FAQs

Programming Languages

ODBC Driver Version 4 Manual

EXAM - A SAS Certified BI Content Developer for SAS 9. Buy Full Product.

Installation and Control in Linux

AWS Schema Conversion Tool. User Guide Version 1.0

Architecting the Future of Big Data

Data Reporting and Presentation using Advanced Excel ( 30 Hrs)

Guide to the MySQL Workbench Migration Wizard: From Microsoft SQL Server to MySQL

Introduction: Database management system

Nortel Networks Symposium Call Center Server Symposium Database Integration User s Guide

TO SQL DB. Manual. Page 1 of 7. Manual. Tel & Fax: info@altiliagroup.com Web:

This guide specifies the required and supported system elements for the application.

FileMaker 13. ODBC and JDBC Guide

Database migration using Wizard, Studio and Commander. Based on migration from Oracle to PostgreSQL (Greenplum)

DATA BASE.

Introducing Ingres. HP OpenVMS Technical Update Days. Darren Horler. Manager, Engineering. October 2011

Quick start. A project with SpagoBI 3.x

LAMP Server A Brief Overview

Pennsylvania Geospatial Data Sharing Standards (PGDSS) V 2.5

GIS Databases With focused on ArcSDE

Connecting to a Database Using PHP. Prof. Jim Whitehead CMPS 183, Spring 2006 May 15, 2006

ArcGIS. Server. A Complete and Integrated Server GIS

Transcription:

Using SAS ACCESS to retrieve and store data in relational database management systems Department of Biology Dalhousie University SHRUG meeting, February 23rd 2007

Disclaimer Background SAS is the only proprietary software that I use I use SAS to fit models, and for nothing else I use SAS for Unix running on a variety of Unices My computing toolkit Linux OS (Ubuntu and CentOS) PostgreSQL with postgis unixodbc The R software environment for statistics and graphics The Generic Mapping Tools (GMT) The usual suspects (Emacs, Perl, shell scripts)

Background What I do Fisheries research Models of fish population dynamics to determine past, present and future abundance and biomass. The catch rate is used to estimate abundance and biomass. Counting fish in the ocean is like counting trees in the forest, except that you can t see them and they move.

Background What I do Fisheries research Models of fish population dynamics to determine past, present and future abundance and biomass. The catch rate is used to estimate abundance and biomass. Counting fish in the ocean is like counting trees in the forest, except that you can t see them and they move.

Background What I do Fisheries research Models of fish population dynamics to determine past, present and future abundance and biomass. The catch rate is used to estimate abundance and biomass. Counting fish in the ocean is like counting trees in the forest, except that you can t see them and they move.

Background Relational Database Management System (RDBMS) What? Structured Query Language (SQL) Create tables and load data Access data through SQL queries Oracle, DB2, MS Access, PostgreSQL, mysql,... Why? Indexing of data and optimisation of queries to perform retrievals Provides a neutral layer that can be used by most analytical software through database bindings OpenGIS Simple Features Specification for SQL - to define geospatial data and perform queries with spatial operators

Background Relational Database Management System (RDBMS) What? Structured Query Language (SQL) Create tables and load data Access data through SQL queries Oracle, DB2, MS Access, PostgreSQL, mysql,... Why? Indexing of data and optimisation of queries to perform retrievals Provides a neutral layer that can be used by most analytical software through database bindings OpenGIS Simple Features Specification for SQL - to define geospatial data and perform queries with spatial operators

SAS ACCESS Background Database connectivity to Oracle, DB2 and ODBC PROC SQL with pass-through facility PostGIS runs on PostgreSQL No support for PostgreSQL or mysql However, Open Source RDBMS all come with ODBC drivers SAS/ACCESS(R) 9.1.3 for Relational Databases: Reference, Second Edition

ODBC Background Open Database Connectivity (ODBC) provides a standard software API method for using database management systems

Background Getting data from a RDBMS into SAS Assuming that you have an ODBC Data Source Name (DSN) called DSNentry, the following code will allow you to define the RDBMS as a SAS libref. libname myrdbmslib odbc USER= username DATASRC= DSNentry SCHEMA= public ;

Background Getting data from a RDBMS into SAS (cont.) Assuming that you have an ODBC DSN called DSNentry, the following code using PROC SQL pass-through facility will allow you to get data directly from the RDBMS. proc sql; connect to odbc (user=username datasrc=dsnentry); create table mydata as select * from connection to odbc ( SQL QUERY GOES HERE ); disconnect from odbc; quit;

Background Moving data out of SAS and into a RDBMS libname gfsdb odbc USER= postgres DATASRC= gfsdb SCHEMA= public ; PROC GENMOD data=mydata; ods output ParameterEstimates = myestimates;... RUN; PROC SQL; CREATE TABLE gfsdb.isoest AS SELECT * FROM myestimates; QUIT;

Background Pitfalls or why I had to call the SAS helpline PROC SQL; CREATE TABLE gfsdb.isoest(dbtype= (Label= varchar(30) Estimate= numeric(12,5) StdErr= numeric(12,5) LowerCL= numeric(12,5) UpperCL= numeric(12,5) ChiSq= numeric(12,5) ProbChiSq= numeric(12,5) ) ) AS SELECT * FROM myestimates; QUIT;

Doing the same in R Background Using the RODBC package, the same can be accomplished in R. # R code require(rodbc) chan <- odbcconnect(dsn="gfsdb", uid = "postgres", case= postgresql,believenrows=false) qu <- paste("sql QUERY GOES HERE ") mydata <- sqlquery(chan, qu, errors= TRUE)

Summary RDBMS are unmatched for storing and retrieving data, spreadsheets can only go so far SAS, like all other statistical software, provides tools to access a variety of RDBMS and to invoke SQL queries to obtain data Once a query is developed, it can be used from a variety of software, hence facilitating collaborations with other scientists RDBMS can be configured to be accessible on the Internet, hence a powerful tool for sharing data

Summary RDBMS are unmatched for storing and retrieving data, spreadsheets can only go so far SAS, like all other statistical software, provides tools to access a variety of RDBMS and to invoke SQL queries to obtain data Once a query is developed, it can be used from a variety of software, hence facilitating collaborations with other scientists RDBMS can be configured to be accessible on the Internet, hence a powerful tool for sharing data

Summary RDBMS are unmatched for storing and retrieving data, spreadsheets can only go so far SAS, like all other statistical software, provides tools to access a variety of RDBMS and to invoke SQL queries to obtain data Once a query is developed, it can be used from a variety of software, hence facilitating collaborations with other scientists RDBMS can be configured to be accessible on the Internet, hence a powerful tool for sharing data

Summary RDBMS are unmatched for storing and retrieving data, spreadsheets can only go so far SAS, like all other statistical software, provides tools to access a variety of RDBMS and to invoke SQL queries to obtain data Once a query is developed, it can be used from a variety of software, hence facilitating collaborations with other scientists RDBMS can be configured to be accessible on the Internet, hence a powerful tool for sharing data

Questions and comments