Sources
Declaring the tables your app reads in sources yaml, bundled vs non-bundled, and changing mappings after install.
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.
Changing a mapping after install
You can change a source mapping at any time after install. Two things to know:
The run uses the new mapping immediately, but the permission sync lags about a minute behind. So the first run after a re-map may fail with "does not exist or not authorized" — and the second run succeeds. Wait a minute and run again. (Tracked as CRE-764.)
Mappings survive version upgrades — you set them once per organization.
Row-level security parameters (SBT 1.0.7+)
RLS parameters control which slices of data (for example, which brands) an installing organization can see. They replace the old manually maintained mapping tables. Full recipe, subscriber experience, and troubleshooting: RLS Parameters.
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_customRelated articles
⏭️ Next: Schemas