IBM Support

How to import entire data set directory under the Analytics Project assets folder.

How To


Summary

Some cases user want to import entire directory of files into project assets. UI only allows users to import one file at a time instead the entire directory. The following steps will help users, on how to import the entire directory under the project.

Objective

To import entire data set directory under the Analytics Project assets folder

Environment

OpenShift 3.11, 4.3, 4.5
Cloud Pak for Data 2.5, 3.0.1

Steps

1. Start the jupyter notebook in your Analytics Project
2. Find the jupyter notebook pods and copy the assets directory under  it
  oc get pods | grep jupyter-py36    oc rsh <jupyter-pod>    df -h    cd /project_data/data_asset    mkdir mynewdata    scp <user@remoteserver:/directory>  .    # example  scp <user@remoteserver:/directory/newcars.csv>  .
3. Read the files under newly created directory using the panda frame.
  import pandas as pd    df_data_1 = pd.read_csv('/project_data/data_asset/mynewdata/newcars.csv')  df_data_1.head()
4. Sample output
image 6469

Document Location

Worldwide

[{"Line of Business":{"code":"LOB10","label":"Data and AI"},"Business Unit":{"code":"BU059","label":"IBM Software w\/o TPS"},"Product":{"code":"SSABD6","label":"Expertise Connect for Cloud Pak for Data Platform"},"ARM Category":[],"Platform":[{"code":"PF025","label":"Platform Independent"}],"Version":"All Version(s)"}]

Document Information

Modified date:
02 October 2020

UID

ibm16340705