Managing project files

Project files store the files that your jobs and data sources need at run time, such as TLS certificates and configuration folders. You reference them from SQL and from resource properties.

Project files are stored with the project, and are displayed under the Files node in the Explorer. You can upload certificates, Hive or Iceberg configuration folders, and other files that jobs and resources read at run time.

You can create folders only at the root of Files. Nested folders are not supported. A file and a folder at the root cannot have the same name.

Project files are not exported when you push the project to Git.

Creating a folder

  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 Explorer, open the menu of Files, and click Create Folder.

    The Create Folder window opens.

  3. Enter a Folder Name.

    The name cannot contain slashes.

  4. Click Create.

    The folder is displayed under Files.

Uploading files

  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 Explorer, open the menu of Files or of a folder under it, and click Upload Files.

    The Upload Files window opens.

  3. Optional: In Folder, select Root or a folder.

    When you start from a folder, that folder is selected.

  4. Click Add Files, and select one or more files.
  5. Click Upload.

    The files are displayed under Files, or in the folder that you selected.

Deleting files and folders

  1. In the Explorer, open the menu of a file or folder under Files, and click Delete.
  2. Confirm the deletion.

    Deleting a folder deletes the files in it.

Referencing project files

Some connector and catalog properties accept a project file instead of a path on the Flink image. Use one of the following references:

Table 1. Project file references
To reference Use
A file at the root ${ssb.project-file:[***FILENAME***]}
A file in a folder ${ssb.project-file:[***FOLDERNAME***]/[***FILENAME***]}
A folder, such as a Hive configuration folder ${ssb.project-file:[***FOLDERNAME***]}

When a job starts, Cloudera SQL Stream Builder (SSB) replaces the reference with the path of the file in the Flink job.

In CREATE TABLE, CREATE VIEW, and catalog statements, write the reference as a string literal, '${ssb.project-file:[***PATH***]}'. You can also use these references in the Flink job configuration properties that accept a path.

The following example creates a Kafka table that uses a truststore uploaded to the root of Files:

CREATE TABLE kafka_ssl (
  id STRING,
  payload STRING
) WITH (
  'connector' = 'kafka',
  'topic' = 'events',
  'properties.bootstrap.servers' = '<broker-host>:<port>',
  'properties.security.protocol' = 'SSL',
  'properties.ssl.truststore.location' = '${ssb.project-file:client.truststore.jks}',
  'format' = 'json'
);

The following example registers an Iceberg catalog that uses a Hive configuration folder uploaded as hive-conf:

CREATE CATALOG iceberg_hive WITH (
  'type' = 'iceberg',
  'catalog-type' = 'hive',
  'hive-conf-dir' = '${ssb.project-file:hive-conf}'
);

Selecting project files in the Streaming SQL Console

Some path fields in the Streaming SQL Console accept either a project file or a path on the Flink image, but not both. Select an uploaded file from the list, or enter the full path of a file that is already on the Flink image.

For example, a Kafka data source with custom truststore settings has the Kafka TrustStore and Kafka KeyStore (Optional) fields. See Adding a Kafka data source.