Using source control with projects

Source control connects a project to a Git repository and branch, so that you can push and import versions of the project. Use it to track changes, keep a backup, and move projects between deployments.

You set the repository and branch of a project when you create or import it, or later in the source settings of the project. After that, you push the project to Git and import it from Git in the Source panel.

A push carries the jobs, tables, data sources and catalogs, and user-defined functions of the project. Environments and project files are not pushed.

Opening the source control settings

  1. In the Streaming SQL Console, click Projects in the left navigation pane, and click the name of your project.

    The project opens, with the Explorer panel on the left. To open the Streaming SQL Console, see Accessing Cloudera SQL Stream Builder.

  2. In the workspace, click Source.

    The Source panel opens, with the Import, Push, and Source Settings tabs.

Pushing a project

  1. In the Source panel, click the Push tab.
  2. Enter a Commit Message, or keep the default message, Changes to project.
  3. Click Push.

    Cloudera SQL Stream Builder (SSB) clones the repository, writes the resources of the project to a folder named after the project, commits them with your message, and pushes the commit to the branch.

If the project contains sensitive values, SSB does not push it and lists the resources that contain them. See Masking sensitive values in source control.

Importing a version of a project

  1. In the Source panel, click the Import tab.
  2. Click Import.

    SSB clones the repository, checks out the branch, and imports the resources from the folder of the project. What changed is displayed in the import results tree.

If Allow deletions on import is on, an import deletes the jobs, tables, data sources, and user-defined functions of the project that are not in the repository. A job that is running is not deleted.

Changing the source settings

  1. In the Source panel, click the Source Settings tab.
  2. Change the Clone URL, the Branch, Allow deletions on import, or the Authentication settings.
  3. Click Apply Changes.

To disconnect the project from the repository, click Delete Source.