Skip to content
  • There are no suggestions because the search field is empty.

Source

Applies to
Platform: Microsoft SQL Server · Snowflake · Snowflake dbt · Databricks · Databricks dbt · Fabric Lakehouse · Fabric Warehouse · Oracle
Architecture: Stage · Data Store · Data Vault · Dimensional

A Source describes an object of a source system, such as a table, view or file, with its terms and data types. Use it as the input of a Stage, which reads the source object and loads it into the Stage layer. A Source generates no database objects of its own.

Data Mart projects have no Sources; they read linked objects of other projects.

Create a Source

A Source has no dataflow and no relationships. To create a Stage from it, open the menu of the Source, choose Automate and then Create Stage.

Properties

A Source has properties only in the Stage generators that read files or use OpenQuery:

A Source that you create from a Discovery of files gets the column delimiter that the Discovery detected.

Default Terms

A Source has no Default Terms. The Stage that reads it adds them, for example BG_LoadTimestamp.

Generated objects

The generator creates no object for a Source. The source view of the Stage reads the source object directly. On Microsoft SQL Server Stage Files, the Stage first loads the file into a raw-data table.

Example

The Source CUSTOMER describes the table CUSTOMER of a source system. On Microsoft SQL Server, the Stage customer reads it in this view, shown with its two Default Terms and four of the ten source terms:

CREATE VIEW [stg].[STG_ST_customer_Source]
AS
SELECT
     CAST(NULL AS DATETIMEOFFSET) AS [BG_LoadTimestamp]
    ,CAST(NULL AS NVARCHAR(255)) COLLATE DATABASE_DEFAULT
        AS [BG_SourceSystem]
    ,[s1].[CUSTOMER_ID] AS [CUSTOMER_ID]
    ,[s1].[CUSTOMER] COLLATE DATABASE_DEFAULT AS [CUSTOMER]
    ,[s1].[CUSTOMER_TYPE] COLLATE DATABASE_DEFAULT AS [CUSTOMER_TYPE]
    ,[s1].[CUSTOMER_SINCE] AS [CUSTOMER_SINCE]
FROM [<source database name>].[<source schema name>].[CUSTOMER] AS [s1]

<source database name> and <source schema name> are the placeholder values of the source system that you set before deployment. stg is the Stage schema of the example. The Stage loader fills BG_LoadTimestamp with the load timestamp. BG_SourceSystem stays empty, because it is not mapped in this Stage.

Related articles