Skip to content
This repository was archived by the owner on Jul 22, 2024. It is now read-only.

Commit 8810e1a

Browse files
authored
Merge pull request #3 from IBM/initial
added git clone step and fixed numbering
2 parents 113baf3 + 52485b4 commit 8810e1a

File tree

2 files changed

+27
-23
lines changed

2 files changed

+27
-23
lines changed

README.md

Lines changed: 27 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -25,17 +25,25 @@ In this code pattern, we will be using energy price and Australian weather stati
2525

2626
## Steps
2727

28-
1. [Create a new project in CP4D](#1-create-a-new-project-in-cp4d)
29-
1. [Add connection to Netezza server](#2-add-connection-to-netezza-server)
30-
1. [Load notebook to your project](#3-load-notebook-to-your-project)
31-
1. [Install NZPY](#4-install-NZPY)
32-
1. [Configure NPS connection in notebook](#5-configure-NPS-connection-in-notebook)
33-
1. [Loading or Unloading data from external source](#6-loading-or-unloading-data-from-external-source)
34-
1. [Load data from other data sources](#7-load-data-from-other-data-sources)
35-
1. [Load data from object Store](#8-load-data-from-object-store)
36-
1. [Loading and analyzing Australian weather station data](#9-loading-and-analyzing-australian-weather-station-data)
37-
38-
### 1. Create a new project in CP4D
28+
1. [Clone the repo](#1-clone-the-repo)
29+
1. [Create a new project in CP4D](#2-create-a-new-project-in-cp4d)
30+
1. [Add connection to Netezza server](#3-add-connection-to-netezza-server)
31+
1. [Load notebook to your project](#4-load-notebook-to-your-project)
32+
1. [Install NZPY](#5-install-NZPY)
33+
1. [Configure NPS connection in notebook](#6-configure-NPS-connection-in-notebook)
34+
1. [Loading or Unloading data from external source](#7-loading-or-unloading-data-from-external-source)
35+
1. [Load data from other data sources](#8-load-data-from-other-data-sources)
36+
1. [Load data from object Store](#9-load-data-from-object-store)
37+
1. [Loading and analyzing Australian weather station data](#10-loading-and-analyzing-australian-weather-station-data)
38+
39+
### 1. Clone the repo
40+
41+
```bash
42+
git clone https://github.com/IBM/loading-accessing-data-from-nps.git
43+
44+
```
45+
46+
### 2. Create a new project in CP4D
3947

4048
* Log into IBM Cloud Pak for Data and create a new project, by selecting `Projects` from hamburger menu and clicking `New Project +`.
4149

@@ -50,11 +58,7 @@ Then, choose `Analytics project`, and select `Create empty project`, provide the
5058
![Project created](doc/source/images/project-created.png)
5159

5260

53-
### 2. Add connection to Netezza server
54-
55-
There are two ways you can add connection to the notebook. Use one of the ways to add connection to NPS.
56-
57-
#### Adding connection using CPD
61+
### 3. Add connection to Netezza server
5862

5963
* From the project page select, `Add to project +`, choose `Connection`
6064

@@ -74,7 +78,7 @@ There are two ways you can add connection to the notebook. Use one of the ways
7478

7579
>NOTE: Save the name of the connection for later use.
7680
77-
### 3. Load notebook to your project
81+
### 4. Load notebook to your project
7882

7983
* From the project page, click `Add to project +`, and select `notebook` from the options:
8084

@@ -86,14 +90,14 @@ There are two ways you can add connection to the notebook. Use one of the ways
8690
https://raw.githubusercontent.com/IBM/loading-accessing-data-from-nps/main/doc/source/notebooks/Netezza-dml-ddl.ipynb
8791
```
8892

89-
### 4. Install NZPY
93+
### 5. Install NZPY
9094

9195
Run the cell that contains `pip install nzpy` which is the only pre-requisite for this notebook. `nzpy` lets us connect to the server and allow us to run DDL and DML SQLs.
9296

9397
![add notebook](doc/source/images/install-prereq.png)
9498

9599

96-
### 5. Configure NPS connection in notebook
100+
### 6. Configure NPS connection in notebook
97101

98102
* Open the notebook in edit mode, and in the cell with title `Connecting to the database`, provide the name of the connection that you created earlier in step 2.
99103

@@ -120,7 +124,7 @@ database="system"
120124

121125
![add notebook](doc/source/images/configure-connection.png)
122126

123-
### 6. Loading or Unloading data from external source
127+
### 7. Loading or Unloading data from external source
124128

125129
> NOTE: Before loading or unloading the data, upload `orders.tbl` from the cloned repository folder by going to `doc/source/data`. In the project home page, on the `Assets` tab, click the data icon, and browse to upload the file. You will have to unzip the data locally first before you upload.
126130
@@ -156,7 +160,7 @@ pd.read_csv('/tmp/orders.csv', delimiter='|')
156160

157161
```
158162

159-
### 7. Load data from other data sources
163+
### 8. Load data from other data sources
160164

161165
Data sources, like external servers, github etc. can be used by streaming data from the source through the python data pipeline. The python code is using nzpy which read data from external sources and connect that directly to `nzpy` pipe via a named pipe.
162166

@@ -213,7 +217,7 @@ with con.cursor() as cursor:
213217
streamer.join()
214218
```
215219

216-
### 8. Load data from Object Store
220+
### 9. Load data from Object Store
217221

218222
NPS can load and unload data from object stores like Amazon S3 and IBM Cloud object store. This works by using Netezza External Tables to read from and write to object store.
219223

@@ -276,7 +280,7 @@ df.head()
276280
![Covid Cases Visualize](doc/source/images/covid-visualize.png)
277281

278282

279-
### 9. Loading and analyzing Australian weather station data
283+
### 10. Loading and analyzing Australian weather station data
280284

281285
In this section, we will use Python and Netezza Performance Server, to load and analyze the data on `Australian temperatures and rainfall` published publically.
282286

doc/source/images/architecture.png

-4.54 KB
Loading

0 commit comments

Comments
 (0)