Skip to content

dbt (Fabric) snapshot permissions/not exist error #232

Open

Description

dbt-core version is 1.8.5
dbt-fabric version is 1.8.7

When running dbt snapshot against a Fabric warehouse, we are seeing the following error:
('42000', '[42000] [Microsoft][ODBC Driver 18 for SQL Server][SQL Server]The specified schema name "common_snp" either does not exist or you do not have permission to use it. (2760) (SQLExecDirectW)')

According to logs, it is during this operation:

EXEC('DROP VIEW IF EXISTS "common_snp"."STG__common_snp__customer_snapshot_staging_temp_view";');
EXEC('create view "common_snp"."STG__common_snp__customer_snapshot_staging_temp_view" as 
SELECT
    [CustomerID]
    ,[NameStyle]
    ,[Title]
    ,[FirstName]
    ,[MiddleName]
    ,[LastName]
    ,[Suffix]
    ,[CompanyName]
    ,[SalesPerson]
    ,[EmailAddress]
    ,[Phone]
    ,[PasswordHash]
    ,[PasswordSalt]
    ,[rowguid]
    ,[ModifiedDate]
FROM
    "WH_00_STG_Bronze"."dbo"."STG__common__customer"
;');

When running this command using the same user manually, it succeeds.

Attached is the dbt project with a seed file, along with screen captures of permissions of the user.

BakerTilly_dbtsnapshot_perms_issue.zip

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions