Loading

Error: "insert or update on table "users" violates foreign key constraint" When Importing Tableau Cloud Site to On-Premises Tableau Server

Дата публикации: Dec 26, 2025
Описание

When importing Tableau Cloud site to on-premises Tableau Server, the following error is received: "insert or update on table "users" violates foreign key constraint"

Messages similar to the following will be logged in the tabadmin.log

2018-04-09 10:08:02.168 -0700_FATAL_<IP_Address>:<HOST_NAME>_:_pid=5332_0x1b7a52dd__user=__request=__ org.springframework.orm.jpa.JpaSystemException: org.hibernate.TransactionException: commit failed; nested exception is javax.persistence.PersistenceException: org.hibernate.TransactionException: commit failed
2018-04-09 10:08:02.168 -0700_DEBUG_<IP_Address>:<HOST_NAME>_:_pid=5332_0x1b7a52dd__user=__request=__ NativeException: org.springframework.orm.jpa.JpaSystemException: org.hibernate.TransactionException: commit failed; nested exception is javax.persistence.PersistenceException: org.hibernate.TransactionException: commit failed

 

A message similar to the following will be logged in the tabsvc - tabadmin -java.log file

Caused by: org.postgresql.util.PSQLException: ERROR: insert or update on table "users" violates foreign key constraint "users_system_user_id_fkey"
Detail: Key (system_user_id)=(-39840) is not present in table "system_users".

Cause

Users exist in Tableau Cloud source site, that do not exist in the Target Site's Active Directory, causing the "insert or update on table "users" violates foreign key constraint" error.

Решение
Enable access to the Tableau Server repository on the target instance and connect to the Tableau Server (PostgreSQL ) Repository using Tableau Desktop. For more information see Collect Data with the Tableau Server Repository.
      
Once connected to the Tableau Server Repository, follow these steps:
  1. Drag the "system_users" table into the data pane.
  2. Click the "add" button to add an additional data source.
  3. Add a connection to the User Mapping file from the source Tableau Cloud site.
  4. Create a left join between "Target Name" in the mapping file to "Name" (in Postgres)
  5. Click on "Sheet 1" and drag "Name" and "Target Name" into Rows
  6. Look for "Null" values in the Left Column (Name)
  7. These users do not exist in Active Directory

1. If possible, map the extra Tableau Cloud users to existing active directory accounts or create temporary Active Directory accounts for mapping purposes.
  • After the import, the content can be reassigned and the accounts removed.
2. Remove the extra users from the Tableau Cloud site and request an additional site export.
Дополнительные ресурсы




Номер статьи базы знаний

001471452

 
Загрузка
Salesforce Help | Article