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.
- Created a View on top of it and named it dbo.vAddress. Its structure looks like as shown here:
- 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.
- Now, if we take a look at the structure tab it shows only the columns we had in the database view.
- As soon as we switch to Data tab to see if the data is being extracted or not we get the following error.
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.
- Logout from the instance and log back in. This time if you preview the data the problem will be resolved.
Hope this answers your query.
Regards,
Vipul