Working With Data Part 2

In this tutorial, you will:

  • Define more named items and create a notes view
  • Create a page including the notes view and use it to create notes

To follow this tutorial, you should have completed the previous tutorials Creating and Editing Pages and Working With Data Part 1. When you have completed this tutorial, you will have all the basic skills you need to manage data content using Soda.

Read about Lacibus Virtual Data Lakes for more information on how the data is represented and organised.

Define More Named Items and Create a Notes View

1. The notes view uses named items to represent the verbs:

  • noteHasTimestamp: whose subject is a note and whose object is the time that the note was created
  • noteHasCategory: whose subject is a note and whose object is the category of the note
  • noteHasText: whose subject is a note and whose object is the text of the note.

2. Navigate to your home source items page and define these verbs in the same way as you defined the notecategoryHasName verb in the previous tutorial.

3. Navigate to the views workspace in your home source and create a new view called notes, just as you created the categories view in the previous tutorial.

4. Go to the notes view and click its page edit button.

5. Add the description "Notes with timestamps and categories."

6. Add the unknowns shown below.

  • Unknown NOTE has type ItemId, like the unknown CATEGORY of the categories view.
  • Unknown TIME has type timestamp. Its value is set automatically as the system time (milliseconds since the epoch) when the note was created.
  • Unknown CATEGORY has type home/views/categories. This is a special item type. It is defined by the categories view. The items that are key values of that view are the members of the type, and they are identified by their CATEGORYNAME values in that view.
  • Unknown TEXT has type Text Area. This type allows formatted text that you create with a content editor.

7. Add the constraints shown below.

8. Add the columns shown.

9. Set the characteristics as shown.

Create a Page Including the Notes View and Use it to Create Notes

1. Navigate to the pages workspace of your home source and create a notes page, just as you previously created the categories page.

2. Go to that page and edit it.

3. Create a block with header "Notes" followed by the notes view, just as you created the block with header "Categories" and the categories view on the categories page. Make sure that the notes view has user write level home:admin.

4. Click the view page button to view the page.

5. Add some notes!