Expand my Community achievements bar.

We are excited to introduce our latest innovation to enhance the Adobe Campaign user experience — the Adobe Campaign v8 Web User Interface!
SOLVED

About write record to a database and remove usless schema database

Avatar

Level 3

Hi :

I create a new schema and updated database . and I meet the follow problems:

(1) When I write a record by the inner form, the Client console tell me the follow error happend.

     But my attribute is quite simple and I did not define a key atttribute.

      Would you like to tech me how to resovle it? 

---------------------------
Adobe Campaign - Client console
---------------------------
Key values missing (document of type 'bfwechat:wechatFan', from path 'wechatFan').
XSV-350023 Unable to save document of type 'bfwechat:wechatFan'.
---------------------------
 

My Schema:

<srcSchema _created="2017-05-04 08:44:00.751Z" _createdBy-id="0" _cs="wechatFan (bfwechat)"
           _lastModified="2017-05-04 08:46:07.951Z" _modifiedBy-id="0" created="2017-05-04 08:52:18.480Z"
           createdBy-id="0" entitySchema="xtk:srcSchema" img="xtk:schema.png" label="wechatFan"
           labelSingular="wechatFan" lastModified="2017-05-04 08:53:04.767Z" mappingType="sql"
           md5="2D8E02C52BC03D69672C9883225747DC" modifiedBy-id="0" name="wechatFan"
           namespace="bfwechat" xtkschema="xtk:srcSchema">


  <element label="wechatFans" labelSingular="wechatFan" name="wechatFan">
    <attribute label="Open Id" name="openId" type="string"/>
  </element>

  <createdBy _cs="lizhigang (zhigang.li@bluefocus.com)"/>
  <modifiedBy _cs="lizhigang (zhigang.li@bluefocus.com)"/>
</srcSchema>

 

(2) When I delete a schema  and update database structure, I can't find the schema name to drop it.

     How can I do that?

Best regards.

1 Accepted Solution

Avatar

Correct answer by
Employee Advisor

Hi,

(1) You have not defined a primary key column for your schema. You can either define it explicitly or use the automated column generated via autopk="true"

Please refer to link https://docs.campaign.adobe.com/doc/AC6.1/en/CFG_Schema_Reference_Elements_and_attributes.html

(2) The campaign allows you to delete a schema but it will not delete the underlying table. If you wish to delete it, fire the SQL directly from backend, or use the SQL code activity in a workflow (Be cautious not to delete something else)

Regards,

Vipul

View solution in original post

6 Replies

Avatar

Employee Advisor

Hi,

(1) You have not defined a primary key column for your schema. You can either define it explicitly or use the automated column generated via autopk="true"

Please refer to link https://docs.campaign.adobe.com/doc/AC6.1/en/CFG_Schema_Reference_Elements_and_attributes.html

(2) The campaign allows you to delete a schema but it will not delete the underlying table. If you wish to delete it, fire the SQL directly from backend, or use the SQL code activity in a workflow (Be cautious not to delete something else)

Regards,

Vipul

Avatar

Correct answer by
Employee Advisor

Hi,

(1) You have not defined a primary key column for your schema. You can either define it explicitly or use the automated column generated via autopk="true"

Please refer to link https://docs.campaign.adobe.com/doc/AC6.1/en/CFG_Schema_Reference_Elements_and_attributes.html

(2) The campaign allows you to delete a schema but it will not delete the underlying table. If you wish to delete it, fire the SQL directly from backend, or use the SQL code activity in a workflow (Be cautious not to delete something else)

Regards,

Vipul

Avatar

Level 3

Hi Vipul:

Thank you. It is helpful to me.

Avatar

Level 2

A note on the physical delete of the table - if your solution is hosted by Adobe and not on-premise, then you don't have access to the database to delete the table.  You'll need to open a ticket with support to delete the table.  They will in turn open an internal ticket with tech-ops to do the actual delete.  Quite a pain to get things deleted for hosted customers!

Avatar

Employee Advisor

Hi Blair,

Thank you for highlighting an important point.

It is indeed a little difficult to get the physical table deleted when the intent is actually to delete it.

The reason for not building the physical delete of SQL table at the delete of schema is because we usually see one case per week where a user deleted the schema by mistake. In such scenario, just importing it from another environment helps him recover the data back again.

If the feature was developed the way you @tumuzhuanjia wanted it to be, we would have to restore last days backup on the current database.

However, based on customer's feedback we do have an Enhancement Request in the pipeline for this feature. 

Hopefully, we will have a special feature in one of the future builds. As of now, the current build 8797 doesn't have it.

Regards,

Vipul

Avatar

Level 2

I think the client U/I is used by folks that aren't savvy with databases, so I understand you point there.  However, there isn't any good reason why you couldn't expose database functions like delete table to the data API, which isn't used by folks who accidentally delete tables.

Glad to hear that you're thinking about addressing this in some way.  Look forward to it.  Thanks.