Creating a project
Before you can use Streaming SQL Console, you need to create a project where you can submit your SQL jobs and manage your project resources.
-
Navigate to the Streaming SQL Console.
- Go to your cluster in Cloudera Manager.
- Select SQL Stream Builder from the list of services.
-
Click SQLStreamBuilder Console.
The Streaming SQL Console opens in a new window.
-
Click New Project on the Projects
page of Streaming SQL Console.
The Create Project window appears.
- Provide a Name to the project.
- Optional: Provide a Description to the project.
-
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.
-
Optional: Provide the Source Settings of the
project.
-
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:
As not every SSH private key is supported, you can use the following command to convert your key to the acceptable format:ssh-keygen -t ecdsa -b 256 -m pem -C "name@example.com"
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/
- To clone without authentication:
- 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.
-
Add a remote Github repository URL to the Clone
URL field.
-
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.
- Enable or disable Authentication for the project.
- Click Open to use the created project and start creating SQL jobs.
- Click Switch to open another project than the active one.
- Click Delete to remove the project from SSB.