Managing Datasets

From OSF Wiki
Jump to: navigation, search

Introduction

Screencast Tutorial

0.jpg

A dataset is a set of data records (or a set of entities in Drupal parlance) that define access permissions to the data it indexes. Every time you create, read, update or delete an entity, you are creating it, reading it, updating it or deleting it from a dataset where you have the CRUD permissions to perform these actions.

This section shows you how you can manage the datasets on Drupal.

Creating a Dataset

There are two ways to create a dataset:

  1. Importing a dataset using a file where it got serialized
  2. Creating a new, empty, dataset

This section shows you how these two methods can be used on Drupal.

Importing a Dataset

Click on the top Configuration menu item. Then, you have to click the Configure OSF for Drupal modules.

OSF for Drupal configurations

To import a dataset, you simply have to click the + Import Dataset link on the DATASETS & NETWORKS tab.

Import a new dataset

The Import Dataset page will let you import a dataset serialized in one of the following formats:

What you have to specify to import a new dataset is:

  • Dataset file to import
    • Select the RDF file you want to import from your local computer
  • Content type
    • Select the type of RDF file you are trying to import
  • Dataset name
    • Define the name of the Dataset you are importing
  • Dataset description (Optional)
    • Optionally define the description of that dataset
  • Custom Dataset URI (Optional)
    • Define the URI of the dataset. If you don't provide any URI, then OSF for Drupal will create one for you
  • Save dataset on this network
    • Choose on which OSF Web Services endpoint you want to import that dataset
  • Which role should have full permissions on this dataset
Note: you may be limited in term of the size of the dataset file you may want to import. If you want to use the Datasets Management Tool if you want to import bigger datasets into the system.


Then you only have to click the Import button to start the dataset importation process.

Form for importing a new dataset

At this point, the dataset got created into the OSF instance. All the content of the dataset file you imported as been indexed in that newly created dataset.

Once the dataset is imported, you will get redirected to a new page. If you checked the Check attributes and types existence option, then you would be seeing the possible warnings on that page. If you didn't, then the user interface is asking you to click the Expose Imported Dataset button. The only thing you have to do is to click on that button to get redirected to the form you have to fill to expose the dataset to Drupal.

Exposing the newly imported dataset in Drupal

The last step is to expose the dataset you just imported into the OSF instance to Drupal. If you skip this step, then the dataset will be on the OSF instance, but it won't be usable to any OSF for Drupal module.

  • Administrative title
    • This is the name you want to give to this dataset. This name is local to this Drupal instance. It will be used to refer to the dataset within the user interface of this Drupal portal
  • Dataset is searchable
    • This specifies if you want to have this dataset searchable by the OSF SearchAPI module. If this option is unchecked then the content of this dataset won't participate into the seaches performed by the OSF SearchAPI module

Once you are done, you simply have to click the Save button to expose this newly imported dataset to Drupal.

Form for exposing the new dataset

Now you can see the newly imported dataset in the list of accessible datasets.

The new dataset appears into the list of available datasets

Creating a New Empty Dataset

Click on the top Configuration menu item. Then, you have to click the Configure OSF for Drupal modules.

OSF for Drupal configurations

To create a new empty dataset, you have to click the + Create New Dataset link from the Dataset & Networks tab.

Creating a new empty dataset

Then you have to specify some important information to create that new dataset:

  • Administrative title
    • This is the title of the dataset that you will use in the OSF instance, and locally on Drupal
  • URI
    • This is the URI that you want to use to identify this new dataset
  • Endpoint
    • This is the OSF Web Services endpoint where you want to create that new dataset. Note that this list of endpoints come from the list of registered OSF Web Services endpoints
  • Role access
  • Dataset is searchable
    • This specifies if you want to have this dataset searchable by the OSF SearchAPI module. If this option is unchecked then the content of this dataset won't participate into the seaches performed by the OSF SearchAPI module

Then once you are done, click the Save button to create the new dataset.

Creating a new empty dataset

Once you created this new empty dataset, it will be created in the OSF Web Services endpoint you selected. It will also be automatically exposed in Drupal. However, it will be completely empty.

The next step would probably be to start creating new entities into this dataset.

Exposing a Dataset

When you register a new OSF Web Service endpoint to the Drupal instance, you should see appearing a list of new datasets in the list of datasets accessible to that Drupal instance. However, it is not because you registered the new endpoint that all the datasets become automatically usable by Drupal.

What you have to do once you registered a new endpoint, is to expose the datasets to Drupal. Once a dataset is exposed to Drupal, it then become available to all the OSF for Drupal modules.

To expose a dataset to Drupal, you first have to click on the top Configuration menu item. Then, you have to click the Configure OSF for Drupal modules.

OSF for Drupal configurations

Then you will get to the page that list all the exposed/unexposed datasets coming from all the registered endpoints. A dataset that is available on a registered endpoint, but that is not exposed, looks like the dataset below:

Available, unexposed dataset

If a dataset is available, you will see "Available:" in front of its title. Then, you have some more information such as its URI, the type which is Disabled and you also know from which Endpoint this dataset is coming from.

If you want to expose that dataset, you have to click on the Add link.

You will get to the page that will ask you to specify some more configuration options for this dataset that you are about to expose to Drupal:

  • Administrative title
    • This is the name you want to give to this dataset. This name is local to this Drupal instance. It will be used to refer to the dataset within the user interface of this Drupal portal
  • Dataset is searchable
    • This specifies if you want to have this dataset searchable by the OSF SearchAPI module. If this option is unchecked then the content of this dataset won't participate into the seaches performed by the OSF SearchAPI module

Once you are done, you simply have to click the Save button to expose the dataset to Drupal.

Form for exposing the dataset

Now you can see the newly imported dataset in the list of accessible datasets.

Exposed dataset

Exporting a Dataset

Screencast Tutorial

0.jpg

Click on the top Configuration menu item. Then, you have to click the Configure OSF for Drupal modules.

OSF for Drupal configurations

To export a dataset, look for a dataset to export. Then, click the down arrow at the left of the Edit link. Once the panel of possible operations extends, click the Export link.

Dataset export.PNG

Then you will be redirected to the OSF Export module. What you have to do is to specify the export options:

  • Export format
    • Specify the format you want to use to export the dataset
  • Dataset to export
    • Select the dataset you want to export using the tool
  • Number of records per slice (1-1000)
    • It is not possible to export datasets that have more than 1000 records, in one shot, using this tool. The maximum number of records you can export in one click using this tool is 1000. Here you can specify if you want a smaller number of records per slice
  • Slice number to export
    • If you have more records than the number of records per slice you specified, then you can specify which slice of X number of records you want to export in this operation.
If you want to use more powerful OSF export features, then take a look at the Datasets Management Tool command-line tool.


Finally click the Export button to export the data you requested.

Exporting dataset.PNG

Changing Permissions of a Dataset

This section only focus on changing the permissions of a dataset. You can read more about the dataset permissions on the Manage Permissions page that explains everything related to these dataset permissions.

Click on the top Configuration menu item. Then, you have to click the Configure OSF for Drupal modules.

OSF for Drupal configurations

Now to access the page to change the permissions of that dataset, you have to click the down arrow at the left of the Edit link. Then you have to click on the Permissions link.

Changing dataset permissions.png

To change the permissions of the dataset, you have to check the checkboxes to enable the CRUD permissions for different Drupal Roles.

Finally you have to scroll down that permissions page, and click the Save button to save the newly configured permissions.

Changing the role permissions for that dataset