Importing a project

You can use a Git repository to import a SQL Stream Builder project that was previously created and exported using source control.

  1. Navigate to the Streaming SQL Console.
    1. Go to your cluster in Cloudera Manager.
    2. Select SQL Stream Builder from the list of services.
    3. Click SQLStreamBuilder Console.
      The Streaming SQL Console opens in a new window.
  2. Click Import Project on the Projects page of Streaming SQL Console.
    The Import Project window appears.
  3. Optional: Provide a prefix that overrides the Materialized View table names.
    Providing a prefix to the Materialized View tables names that overrides the default one is an advanced option. The tables are prefix by default with the ID of the projects to avoid collision between projects. This configuration allows setting a custom prefix to the Materialized View tables created in the project.
  4. Provide the Source Settings of the project.
    1. Add a remote Github repository URL to the Clone URL field.
      You can use the following example URLs with or without authentication:
      • To clone without authentication: https://github.com/cloudera/ssb-examples.git
      • To clone and push with HTTP basic authentication (username/password): https://github.com/cloudera/ssb-examples.git

        In case of using basic authentication, the personal access token needs to be provided as password. For more information about creating personal access tokens, see the Github documentation.

      • To clone and push with SSH authentication (SSH private key): git@github.com:cloudera/ssb-examples.git
        In case of using SSH authentication, you need to generate the private key using the following command:
        ssh-keygen -t ecdsa -b 256 -m pem -C "name@example.com"
        As not every SSH private key is supported, you can use the following command to convert your key to the acceptable format:
        ssh-keygen -m pem -p -f [***PATH_TO_PRIVATE_KEY***]
      • To clone and push a local git repository on the filesystem of SSB host: file:///usr/src/ssb-examples/
    2. Provide the branch name or tag of the Github repository to the Branch field. This branch is checked out when pulling or pushing to the Github repository.
  5. Provide the name of the project to the Project field.
  6. Enable or disable Allow deletions on import.
    Enabling the allow deletion upon import allows you to hard-reset your project to its versioned state when there are untracked resources in it. For example, the job is deleted from the project when importing the project from Github if the job does not exist in the repository. In other words, the upstream version overrides the version you have in Streaming SQL Console. If disabled, the project keeps the resources that were not pushed to the Github repository.

    The deletion affects the jobs, data sources, functions, Materialized Views and their API keys.

  7. Enable or disable Authentication for the project.
  8. Click Import.
After you have created the project, you have the following options to manage the project on the Projects page:
  1. Click Open to use the created project and start creating SQL jobs.
  2. Click Switch to open another project than the active one.
  3. Click Delete to remove the project from SSB.