Before you Begin

Learn how to use a GIT repository with your semantic model. Using a Git repository provides version control and multiple user development of semantic models.

This tutorial shows you how to open the Semantic Model Markup Language (SMML) editor to review and make changes to a semantic model.

Background

This tutorial describes how to build governed semantic models using the Semantic Modeler.

You can use Git repositories with Oracle Analytics to enable concurrent semantic modeler development.

A semantic model is comprised of a set of JavaScript Object Notation (JSON) files. When you create and develop a semantic model locally, the model's JSON files are stored in Oracle Cloud. To make the semantic model's JSON files available for other development team members, the semantic model's owner creates a Git repository, initializes it with HTTPS or SSH, and uploads the semantic model's JSON files to the repository. Each developer creates a semantic model and uses HTTPS or SSH to connect to and clone the semantic model's JSON files to their Git repository.

You can use the SMML editor to view and change the JSON SMML schema file of an object in your semantic model. If you are viewing or editing an invalid file, syntax and semantic errors are marked on the relevant line of text.

This is the fifth tutorial in the Create a Semantic Model series. Do the tutorials in the order listed:

What Do You Need?

  • Access to Oracle Analytics Cloud
  • Access to DV Content Author, BI Data Model Author, or a BI Service Administrator role
  • Access to the Sample Sales Semantic Model
  • Access to a Git Repository using your Github account

Examine the Semantic Model Markup Language

This section shows you how to review JSON objects in a semantic model. You can makes changes to the object definitions using the Semantic Model Markup Language (SMML) editor.

Begin with step 3 if you're continuing this tutorial directly after completing the steps in Test, Deploy, and Validate a Semantic Model tutorial.

  1. If you closed your semantic model, sign in to Oracle Analytics Cloud using one of DV Content Author, BI Data Model Author or service administrator credentials. On the Home page, click the Navigator Navigator icon, and then click Semantic Models.
  2. In the Semantic Models page, select Sample Sales, click Actions menu Actions menu icon, and then select Open.
  3. In the Sample Sales semantic model, click the Physical Layer Physical Layer icon. Expand MySampleSalesDatabase and expand BISAMPLE.
  4. Right-click SAMP_PRODUCTS_D, and select Open in SMML Editor.


    Description of smml_editor_samp_prods.png follows
    Description of the illustration smml_editor_samp_prods.png

Open Your Git Repository

In this section, you use your Git repository to store your semantic model. You must use the personal access token you generated in Github to access your Git repository from Oracle Analytics Cloud Semantic Modeler.

  1. Sign in to GitHub using the URL to your repository.
  2. Click Repositories and open the repository to use with your semantic model.

Back Up Your Semantic Model

In this section, you create an archive of your semantic model as a backup.

  1. If you closed your semantic model, sign in to Oracle Analytics Cloud with your BI Data Model Author application role or service administrator credentials. On the Home page, click the Navigator Navigator icon, and then click Semantic Models.
  2. In the Semantic Models page, select Sample Sales, click Actions menu Actions menu icon, and then select Open.
  3. In the Sample Sales semantic model, click the Page Menu Page menu icon, and select Export.
  4. In Export, keep Sample Sales as the archive name, select Archive File (.zip), and then click Export.
  5. In Opening Sample Sales.zip, click Save and click OK.
  6. Use the default download location or selection another location, and click Save.

Initialize Git Integration

In this section, you specify your profile name, Git user name, and your personal access token in the Semantic Modeler to initialize Git.

  1. In the Sample Sales semantic model, click Toggle Git Panel Git icon, and then click Start.
  2. In Initialize Git, paste your Git repository URL in to Git Repository URL, and then click Continue.
  3. Select your Git profile, or select New Profile. Enter a Profile Name, your Git user name, and your personal access token in Password.
  4. Click Initialize Git.


    Initialize adds the semantic model files to your Git repository.

    Description of initialize_adds_sm_2repo.png follows
    Description of the illustration initialize_adds_sm_2repo.png

Review the Git Integration

In this section, you look at the semantic modeler content added to your Git repository.

  1. In your Git repository, click the repository name, and then click View code.
  2. Click the physical folder, click the MySampleSalesDatabaseDatabase folder, and then click the BISAMPLE schema folder to view the contents.


    The BISAMPLE folder contains the JSON definitions for the physical layer's tables.

    Description of bisample_folder_contents.png follows
    Description of the illustration bisample_folder_contents.png
  3. Click the SAMP_PRODUCTS_D.json object to see the definition of the object in the semantic model.


    Description of samp_prods_json.png follows
    Description of the illustration samp_prods_json.png

Change the Semantic Model

In this section, you add a description in SAMP_PRODUCTS_D to demonstrate changes to the semantic model and how those changes are tracked in Git.

  1. In the Physical Layer Physical Layer icon, double-click SAMP_PRODUCTS_D. Click the General tab.
  2. In Description, enter Test product description to show semantic model changes and Git. Click Save Save icon.


    The Git panel shows the status of the changes in the semantic model.

    Description of git_status.png follows
    Description of the illustration git_status.png
  3. In the Git panel, right-click SAMP_PRODUCTS_D and select View Diffs.


    Description of view_diffs.png follows
    Description of the illustration view_diffs.png
  4. Close the Diff Editor.
  5. In the Git panel, click Stage All in Unstaged Changes. In the commit description field, enter a description of the changes and click Commit.
  6. In the Git panel, click Push Push icon, and then click Push.


    The message, "Push successful" appears when the changes are added to your Git repository.

  7. In your Git repository, click the Physical folder, click MySampleSalesDatabase, click BISAMPLE, and then click SAMP_PRODUCTS_D.json to view the changes made in the semantic model.


    Description of changes_in_git.png follows
    Description of the illustration changes_in_git.png

Next Steps

Manage Logical Table Sources

Learn More