Hi tristanr13398296,
Keeping your requirement in mind we performed a simple test and here are our findings.
- Our local campaign instance is using PostgreSQL as database and the FDA is SQL Server with the version as SQL Server 2012.
- We attached a test database on SQL Server, the very famous AdventureWorks DB.
- For our test, we chose the table Person.Address. It has following columns.
![FDA table.png FDA table.png](/t5/image/serverpage/image-id/5642i4A6C1A7BF873A06B/image-size/large?v=v2&px=999)
- Created a View on top of it and named it dbo.vAddress. Its structure looks like as shown here:
![FDA View.png FDA View.png](/t5/image/serverpage/image-id/5644iB8798A6AF9F8CFC0/image-size/large?v=v2&px=999)
- As you can see we have picked a subset of columns for our purpose.
- Using the FDA connection inside Adobe Campaign, we deployed a new schema based on the new view just created.
![FDA Schema.png FDA Schema.png](/t5/image/serverpage/image-id/5645i0E90AE741E7953B3/image-size/large?v=v2&px=999)
- Now, if we take a look at the structure tab it shows only the columns we had in the database view.
![View structure.png View structure.png](/t5/image/serverpage/image-id/5646iCAF7C1986FB6BF32/image-size/large?v=v2&px=999)
- As soon as we switch to Data tab to see if the data is being extracted or not we get the following error.
![error.png error.png](/t5/image/serverpage/image-id/5647i368E84449C792BCC/image-size/large?v=v2&px=999)
The reason for this error is that Campaign assumes a view to being a table and hence it is requesting for a Primary key to be defined on it. Inside SQL Server, a view is not supposed to have a PK. - To resolve this issue, we will perform a small hack. We will make campaign believe that there is a PK involved. To do so, in our view we have a column rowguid that is the primary key and hence inside schema we will make it be primary key of this view. Please mind, that we will make modification only on the campaign schema and not on the actual database view.
![hack.png hack.png](/t5/image/serverpage/image-id/5648i7383DEDFF07B8E5E/image-size/large?v=v2&px=999)
- Logout from the instance and log back in. This time if you preview the data the problem will be resolved.
![data.png data.png](/t5/image/serverpage/image-id/5649iCA016AED30A149C6/image-size/large?v=v2&px=999)
Hope this answers your query.
Regards,
Vipul