Search icon CANCEL
Subscription
0
Cart icon
Your Cart (0 item)
Close icon
You have no products in your basket yet
Save more on your purchases! discount-offer-chevron-icon
Savings automatically calculated. No voucher code required.
Arrow left icon
Explore Products
Best Sellers
New Releases
Books
Videos
Audiobooks
Learning Hub
Free Learning
Arrow right icon
Arrow up icon
GO TO TOP
Business Intelligence with MicroStrategy Cookbook

You're reading from   Business Intelligence with MicroStrategy Cookbook Over 90 practical, hands-on recipes to help you build your MicroStrategy business intelligence project, including more than a 100 screencasts with this book and ebook

Arrow left icon
Product type Paperback
Published in Oct 2013
Publisher Packt
ISBN-13 9781782179757
Length 356 pages
Edition 1st Edition
Arrow right icon
Author (1):
Arrow left icon
Davide Moraschi Davide Moraschi
Author Profile Icon Davide Moraschi
Davide Moraschi
Arrow right icon
View More author details
Toc

Table of Contents (25) Chapters Close

Business Intelligence with MicroStrategy Cookbook
Credits
Foreword
About the Author
About the Reviewers
www.PacktPub.com
Preface
1. Getting Started with MicroStrategy 2. The First Steps in a MicroStrategy Project FREE CHAPTER 3. Schema Objects – Attributes 4. Objects – Facts and Metrics 5. Data Display and Manipulation – Reports 6. Data Analysis and Visualization – Graphs 7. Analysis on the Web – Documents and Dashboards 8. Dynamic Selection with Filters and Prompts 9. Mobile BI for Developers 10. Mobile BI for Users 11. Consolidations, Custom Groups, and Transformations 12. In-Memory Cubes and Visual Insight 13. MicroStrategy Express Solution to Exercises Where to Look for Information Cloudera Hadoop HP Vertica Index

Setting up the AdventureWorks DW sample database


Now that the instance is up and running, we can load the data into it. First, we'll create a database that will be populated with sample data.

Getting ready

You need to have completed the previous recipe to continue, and then unzip the AdventureWorks 2008R2 Data Warehouse.zip file into the folder C:\install\, so that you will end up with a folder named AdventureWorks 2008R2 Data Warehouse containing a series of SQL script files; the main being named instawdwdb.sql.

How to do it...

Before running this script we need to modify it, in order to specify the name of the source folder containing the CSV files and the name of the destination folder that will store the resulting database:

  1. Create a directory named C:\datawarehouse; this will be the location of our database.

  2. Open in Notepad the file instawdwdb.sql and modify lines 36 and 37 so that they look like:

    :setvar SqlSamplesDatabasePath   "C:\datawarehouse\"
    :setvar SqlSamplesSourceDataPath "C:\install\AdventureWorks 2008R2 Data Warehouse\"

    Tip

    The two hyphens at the beginning of the lines (comment marks) have been removed and the path to data folder and source scripts folder have been modified, they both include the trailing backslash.

  3. Save the file and close Notepad.

  4. Open a command prompt and enter the following command:

    sqlcmd -S (localdb)\v11.0 –i "C:\install\AdventureWorks 2008R2 Data Warehouse\instawdwdb.sql"
    

    Tip

    This command must be written all in one line and including the double quotes.

How it works...

The script will create the database and all the needed tables. Then will import the CSV data files into the tables to populate them with data. The script will lastly exit the sqlcmd command interface.

There's more...

In order to check if everything was installed correctly, we will perform a couple of very simple SQL queries on the database:

  1. Open the sqlcmd utility again:

    sqlcmd -S (localdb)\v11.0
    
  2. At the 1> prompt, write the following instructions each on its own line, followed by the Enter key:

    use AdventureWorksDW2008R2
    go
    select count(1) from FactInternetSales
    go
    select count(1) from DimCustomer
    go
    exit
    

The database will respond with the number of rows in the main fact table and the customer dimension table, 60398 and 18484 respectively.

Congratulations, you correctly installed the data warehouse source database!

Note

You can watch a screencast of this operation at:

Exercise 1

From the sqlcmd utility execute the queries to count the number of records in the following tables: FactCurrencyRate, FactResellerSales, DimGeography, DimDate, and DimCurrency. Note down the numbers.

lock icon The rest of the chapter is locked
Register for a free Packt account to unlock a world of extra content!
A free Packt account unlocks extra newsletters, articles, discounted offers, and much more. Start advancing your knowledge today.
Unlock this book and the full library FREE for 7 days
Get unlimited access to 7000+ expert-authored eBooks and videos courses covering every tech area you can think of
Renews at $19.99/month. Cancel anytime
Banner background image