Changing the schema to a different table or view | Community
Skip to main content
Level 2
March 16, 2022
Solved

Changing the schema to a different table or view

  • March 16, 2022
  • 1 reply
  • 1351 views

Is it possible to change the custom Adobe Schema (like abcd:test) to point to a different physical table or view then when it was originally created? This is under assumption that new table/view would have the same structure as original one.

So, in this example we created the schema with name space abcd pointing to AC Database table called test.

If we created a new table called test1 in AC database with the same structure as test - can we keep the original schema (abcd:test) and point it to new table test1?

 

 

This post is no longer active and is closed to new replies. Need help? Start a new post to ask your question.
Best answer by isahore

Thank you but I don't see that attribute in Adobe Campaign Classic. 

In our case the schema looks like:

<srcSchema _cs=".." created="2019-08-28 17:24:35.885Z" createdBy-id="0"
entitySchema="xtk:srcSchema" img="xtk:schema.png" label="..."
lastModified="2020-02-05 01:12:23.348Z" mappingType="sql" md5="..."
modifiedBy-id="0" name="..." namespace="..." xtkschema="xtk:srcSchema">
<element autopk="true" label="..." name="...">
<key name="...">
<keyfield xpath="@..."/>
</key>
<attribute ... sqlname="..." ...>

...

<sysFilter name="readAccess">
<condition enabledIf="..." expr="FALSE" internalId="..."/>
</sysFilter>
</element>
<createdBy _cs="..."/>
<modifiedBy _cs="..."/>
</srcSchema>

 

Any idea where would that attribute be?


Hi @radandric,

 

Have a look into the preview tab of the concerned schema. This is located in the left bottom section of the schema window. You can find this attribute there. Copy and place it in the “edit” tab of the schema and assign the desired table name as its value.

 

Kind regards,

Ishan

1 reply

isahore
Community Advisor
Community Advisor
March 17, 2022

Hi @radandric,

Can you also put some light on your use case? Do you want such a change to reflect on the physical schema itself as a permanent change? Or do you want such a change to happen inside a workflow on run time?

 

Thanks,

Ishan

RadAndricAuthor
Level 2
March 17, 2022

I am looking for change in the physical schema - not on workflow level. So - logical scheme would stay the same (like abcd:test in my example above) but physical table name would change from test to test1 for example. This schema is read only (populated via external ETL) in Adobe Campaign database. 

isahore
Community Advisor
Community Advisor
March 18, 2022

Hi @radandric,

You can do so by changing the name of the linked database table in this attribute in the main element of the schema.

sqltable="<<name of your database table>>"

 

Thanks,

Ishan