Adding data to a project
After you create a project, the next step is to add data assets to it so that you can work with data. All the collaborators in the project are automatically authorized to access the data in the project.
Assets can have duplicate names, however, you can't add the same asset multiple times with the same name.
You can add these types of data assets to projects:
- Local files
- Gallery data sets
- Database connections
- Data from a connection
- Assets from metadata imports
- Folder assets from a file system
- Catalog assets
- Files from object storage
Add local files
You can add a file as a data asset from your local system to your project. You must have the Editor or Admin role in the project. The maximum size for files that you can load with the Watson Studio UI is 5 GB. You can load larger files to a project with APIs.
Important You can't add executable files to a project. All other types files that you add to a project are not checked for malicious code. You must ensure that your files do not contain malware or other types of malicious software that other collaborators might download.
To add data files to a project:
-
From your project's Assets page, click the Upload asset to project icon (
). You can also click the Find and add data icon (
) from within a notebook or canvas.
-
In the Data pane that opens, browse for the files or drag them onto the pane. You must stay on the page until the load is complete. You can cancel an ongoing load process if you want to stop loading a file.
The files are saved in the object storage that is associated with your project and are listed as data assets on the Assets page of your project.
When you click the data asset name, you can see this information about data assets from files:
- The asset name and description
- The tags for the asset
- The name of the person who created the asset
- The size of the data
- The date when the asset was added to the project
- The date when the asset was last modified
- A preview of the data, for CSV, Avro, Parquet, TSV, Microsoft Excel, PDF, text, JSON, and image files
- A profile of the data, for CSV, Avro, Parquet, Microsoft Word, PDF, text, and HTML files
You can update the contents of a data asset from a file by adding a file with the same name and format to the project and then choosing to replace the existing data asset.
You can remove the data asset by choosing the Remove option from the action menu next to the asset name. Choose the Refine option to refine the data with Data Refinery.
Add Gallery data sets
You can add data sets from the Gallery to your project:
- In the Gallery, find the card for the data set that you want to add.
- Click the Add to Project icon from the action bar, select the project, and click Add.
Watch this short video to see how to load and analyze public data sets.
This video provides a visual method as an alternative to following the written steps in this documentation.
-
Time Transcript 00:00 This video shows you how to access public data sets in the Cloud Pak for Data as a Service Gallery. 00:06 Start in the Gallery and use the filters to see just the data sets. 00:13 Here, you'll find some rich data sets for you to use in your analysis. 00:17 For example, you can search for "economy" or "population" or "weather" or "jobs". 00:28 This looks like an interesting data set. 00:30 Open it and preview the data. 00:34 From here, you can share the data set on social media, get a direct link to the data set, or download the data set. 00:45 You can also copy the data set into a specific project. 00:52 Now, navigate to that project. 00:55 And on the "Assets" tab, you'll see the data set was added to the data assets section. 01:01 Next, add a new notebook. 01:05 The title for this notebook will be "Unemployment rates". 01:09 Select a runtime environment and a language. 01:14 When you're ready, create the notebook. 01:20 When the notebook loads, access the data sources and locate the unemployment file. 01:27 Click "Insert to code" and choose how you want to insert the data. 01:33 The choices in this drop-down box are dependent upon the language used in this notebook. 01:38 Notice that the inserted code includes the credentials you'll need to read the data file from the Object Storage instance. 01:45 When you run the code, the first five rows display. 01:50 Now, you're ready to start analyzing any of the rich data sets in the Gallery. 01:56 Find more videos in the Cloud Pak for Data as a Service documentation.
Add files from the project storage
The storage for the project contains the files you uploaded to the project, but it can also contain other files. For example, you can save a DataFrame in a notebook in the project storage. You can add those files as data assets to your project.
To add data assets from the project storage:
- From the Assets tab of your project, click Add asset.
- Select the asset and click Add.