Sources
Sources are the database tables your app expects as input. They are defined in YAML files (a simple, human-readable text format for configuration) in the sources/ directory. Filenames do not matter. Separate sources into as many or few files as you like. You can assign a schema to a source, which tells Insight Cloud the expected structure of the table.
Bundled sources (SBT 1.0.7+)
Mark a source with is_bundled: true and its data ships with the app. Subscribing organizations do not map anything at install time. This replaces the earlier flow where Insight Cloud guided each subscriber through mapping sources to tables in their environment.
Non-bundled sources
Non-bundled sources resolve against tables in the subscriber's environment. Those tables need specific Snowflake permissions before installs succeed; see Prerequisites for App Installs.
Row-level security parameters (SBT 1.0.7+)
RLS (row-level security) parameters control which slices of data. For example, which brands. An installing organization can see. Declare an RLS parameter on a model variable and Insight Cloud applies the restriction automatically; the values are set when the app is installed.
Before SBT 1.0.7 this required manually creating and maintaining mapping tables. RLS parameters replace that flow entirely. The feature works the same in every SBT version from 1.0.7 on.
YAML structure
sources:
- name: retail_sales
description: "Weekly retail sales tables"
database: YOUR_DATABASE
tables:
- name: daily_channel_store_item
- name: daily_store_item
- name: daily_item
- name: store_list
- name: distribution_centers
- name: daily_region_dc_item
- name: store_list_custom
target_schema: sample_target_schema
- name: item_list_custom