Skip to main content
Level 2
Apr 24, 2023 12:18 PM UTC
Solved

Hi i am creating a schema and getting this error , i have created schemas before but did not encountered this error, it would very helpful if anybody can help me out thank you

This post is no longer active and is closed to new replies. Need help? Start a new post to ask your question.
david--garcia
david--garciaAccepted solution
Level 10
Apr 24, 2023 1:05 PM UTC

You almost got it, here it is

 

<srcSchema _cs="Intersets (aks)" created="2023-04-24 12:34:44.410Z" createdBy-id="0" entitySchema="xtk:srcSchema" img="xtk:schema.png" label="Intersets" labelSingular="Interest" lastModified="2023-04-24 12:35:39.963Z" mappingType="sql" md5="1920390063D80ACF0C51EA5D183AE180" modifiedBy-id="0" name="interest" namespace="aks" xtkschema="xtk:srcSchema"> <createdBy _cs="Hote.user1526 (Hote.User1526)"/> <modifiedBy _cs="Hote.user1526 (Hote.User1526)"/> <element autopk="true" label="Intersets" labelSingular="Interest" name="interest"> <key internal="true" name="productBrands"> <keyfield xpath="@productBrands"/> </key> <attribute label="Product Categories" length="80" name="productCategories" type="string"/> <attribute label="Product Brands" length="80" name="productBrands" type="string"/> <attribute label="Product Sizes" length="40" name="productSizes" type="long"/> <attribute label="Gender" length="40" name="gender" type="string"/> <attribute label="Intersets" labelSingular="Interest" name="interest"/> <attribute label="Product Categories" length="80" name="productCategories" type="string"/> </element> </srcSchema>
https://www.linkedin.com/in/david-garcia-uk/ | https://martech.network

9 replies

david--garcia
Level 10
Apr 24, 2023 12:42 PM UTC

The error is clear

 

 

Translate
https://www.linkedin.com/in/david-garcia-uk/ | https://martech.network
Akash_SMAuthor
Level 2
Apr 24, 2023 12:46 PM UTC

I am getting different error after doing it 

Translate
david--garcia
Level 10
Apr 24, 2023 12:52 PM UTC

Remove the first line called Element and just copy the attribute, in the schema structure you can only have one wrapper called element with all the attributes inside of it.

 

Here is the schema structure documentation https://experienceleague.adobe.com/docs/campaign-classic/using/configuring-campaign-classic/schema-reference/schema-structure.html?lang=en

 

<srcSchema> <enumeration> ... //definition of enumerations </enumeration> <element> //definition of the root <element> (mandatory) <compute-string/> //definition of a compute-string <dbindex> ... //definition of indexes </dbindex> <key> ... //definition of keys </key> <sysFilter> ... //definition of filters </sysFilter> <attribute> ... //definition of fields </attribute> <element> //definition of sub-<element> <attribute> //(collection, links or XML) ... //and additional fields </attribute> ... </element> </element> <methods> //definition of SOAP methods <method> ... </method> ... </methods> </srcSchema>

 

Translate
https://www.linkedin.com/in/david-garcia-uk/ | https://martech.network
Akash_SMAuthor
Level 2
Apr 24, 2023 12:54 PM UTC

means not use element tag and use them as attributes?

Translate
david--garcia
Level 10
Apr 24, 2023 12:56 PM UTC

Copy and paste your code here after making the changes I mentioned and I'll amend the code.

Translate
https://www.linkedin.com/in/david-garcia-uk/ | https://martech.network
Akash_SMAuthor
Level 2
Apr 24, 2023 12:57 PM UTC

<srcSchema _cs="Intersets (aks)" created="2023-04-24 12:34:44.410Z" createdBy-id="0"
entitySchema="xtk:srcSchema" img="xtk:schema.png" label="Intersets" labelSingular="Interest"
lastModified="2023-04-24 12:35:39.963Z" mappingType="sql" md5="1920390063D80ACF0C51EA5D183AE180"
modifiedBy-id="0" name="interest" namespace="aks" xtkschema="xtk:srcSchema">
<createdBy _cs="Hote.user1526 (Hote.User1526)"/>
<modifiedBy _cs="Hote.user1526 (Hote.User1526)"/>
<element label="Intersets" labelSingular="Interest" name="interest">

<attribute label="Product Categories" length="80" name="productCategories" type="string"/>
<attribute label="Product Brands" length="80" name="productBrands" type="string"/>
<key internal="true" name="productBrands">
<keyfield xpath="@productBrands"/>
</key>
<attribute label="Product Sizes" length="40" name="productSizes" type="long"/>
<attribute label="Gender" length="40" name="gender" type="string"/>
<attribute label="Intersets" labelSingular="Interest" name="interest"/>

<attribute label="Product Categories" length="80" name="productCategories" type="string"/>
</element>

</srcSchema>

Translate
david--garcia
david--garciaAccepted solution
Level 10
Apr 24, 2023 1:05 PM UTC

You almost got it, here it is

 

<srcSchema _cs="Intersets (aks)" created="2023-04-24 12:34:44.410Z" createdBy-id="0" entitySchema="xtk:srcSchema" img="xtk:schema.png" label="Intersets" labelSingular="Interest" lastModified="2023-04-24 12:35:39.963Z" mappingType="sql" md5="1920390063D80ACF0C51EA5D183AE180" modifiedBy-id="0" name="interest" namespace="aks" xtkschema="xtk:srcSchema"> <createdBy _cs="Hote.user1526 (Hote.User1526)"/> <modifiedBy _cs="Hote.user1526 (Hote.User1526)"/> <element autopk="true" label="Intersets" labelSingular="Interest" name="interest"> <key internal="true" name="productBrands"> <keyfield xpath="@productBrands"/> </key> <attribute label="Product Categories" length="80" name="productCategories" type="string"/> <attribute label="Product Brands" length="80" name="productBrands" type="string"/> <attribute label="Product Sizes" length="40" name="productSizes" type="long"/> <attribute label="Gender" length="40" name="gender" type="string"/> <attribute label="Intersets" labelSingular="Interest" name="interest"/> <attribute label="Product Categories" length="80" name="productCategories" type="string"/> </element> </srcSchema>
Translate
https://www.linkedin.com/in/david-garcia-uk/ | https://martech.network
AkshayAnand
Community Advisor
Community Advisor
Apr 24, 2023 12:58 PM UTC

Hi @akash_sm 

 

Could try once moving the defined key at the beginning of attributes or after the definition of attributes.

 

Regards

A

Translate
AkshayAnand
Community Advisor
Community Advisor
Apr 24, 2023 1:06 PM UTC

Something like below

<element label="interest" name="Intersets"> <!-- Begining the defination of attributes <key internal="true" name="productBrands"> <keyfield xpath="@productBrands"/> </key> --> <attribute label="Product Categories" length="80" name="productCategories" type="string"/> <attribute label="Product Brands" length="80" name="productBrands" type="string"/> <attribute label="Product Sizes" length="40" name="productSizes" type="long"/> <attribute label="Gender" length="40" name="gender" type="string"/> <attribute label="Intersets" name="interest"/> <attribute label="Product Categories" length="80" name="productCategories" type="string"/> <!-- After the defination of attributes <key internal="true" name="productBrands"> <keyfield xpath="@productBrands"/> </key> --> </element>

 

Translate