Masking information before using source control
When exporting projects from SQL Stream Builder, possible sensitive parameters in CREATE TABLE statements, data sources, or the SQL job will not be redacted. To conceal sensitive information, environment variables can be used.
-
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.
-
Open a project from the Projects page of Streaming SQL
Console.
- Select an already existing project from the list by clicking the Open button or Switch button.
- Create a new project by clicking the New Project button.
- Import a project by clicking the Import button.
You are redirected to the Explorer view of the project. - Click Environments from the Project Manager.
- Click New Environment.
-
Provide a Name for the environment.
For example, you can name it
Dev
. -
Add keys and values as needed.
For example, you can add
psql_password
as key, and provide the password as value. - Click Activate to apply the specified information for the project.
-
When creating the table, reference the environment variable as shown in the
following example:
CREATE TABLE `postgres_cdc_table_1682585103` ( `order_id` INT, `city` VARCHAR(2147483647), `street_address` VARCHAR(2147483647), `amount` INT, `order_time` TIMESTAMP(3), `order_status` VARCHAR(2147483647) ) WITH ( 'connector' = 'postgres-cdc', 'password' = '${ssb.env.psql_password}' 'username' = '...' );