Skip to main content
Announcements
UPGRADE ADVISORY for Qlik Replicate 2024.5: Read More
cancel
Showing results for 
Search instead for 
Did you mean: 
amitw
Contributor III

Create Primary Key on target SQL server

Hi ,

We have developed a full + CDC replicate task with SAP ODP endpoint as source and SQL server as target.

We want the keys defined on the CDS views on Replicate task to be defined as primary keys on the target tables on SQL server.

Currently the keys defined on replicate tasks are coming as NOT NULL on target SQL server .

is there any feature that will allow replicate to define primary keys on the SQL server target?

Thanks,

Amit

Labels (3)
3 Replies
john_wang
Support

Hello @amitw ,

I guess I did not understand the doubt accurately. By default Qlik Replicate creates Primary Key with NOT NULL constraints in SQL Server target tables. For example:

CREATE TABLE [SCOTT].[KIT](
[ID] [numeric](10, 0) NOT NULL,
[NAME] [varchar](20) NULL,
CONSTRAINT [KIT_KIT_KIT_PK] PRIMARY KEY CLUSTERED
(
[ID] ASC
));

Where "ID" is the Primary Key in source side table. The above table was created by Qlik Replicate in SQL Server target database.

Would you please elaborate the question.

Thanks,

John.

Help users find answers! Do not forget to mark a solution that worked for you! If already marked, give it a thumbs up!
amitw
Contributor III
Author

hello @john_wang ,

In our case , Replicate did not create the primary key constraint in the target database ( SQL server ).

It created the SQL server table with key column defined as NOT NULL.

The source is S4 HANA ( SAP ODP endpoint). 

Thanks,

Amit

SachinB
Support

Hello @amitw ,

Could you please check in advance endpoint settings what you have selected under 'ABAP Core Data Services (CDS) views? : ABAP Core Data Services (CDS) views

We would also request please create a support case to check this further.

Regards,

Sachin B