How to resolve Database naming convention issues ?

Hi Community,

I am using Microsoft SQL Server for my Application Application. In my CDT (Say Employee) I have an array field (Say Skills) to store checkbox values but the problem is that when i go to data store to verify it and publish. It asks for Employee_Skills table. if i define it as EmployeeSkills then it throws an error saying table not found. Also by default it generates weird column names in the new table. How can i control naming convention of my foreign key table and choose friendly column name ?

I checked everywhere in CDT's XSD file also but i couldn't find any way to change table/column name.

  Discussion posts and replies are publicly visible

Parents
  • 0
    Certified Lead Developer

     , The below snippet would help you. Please modify accordingly in your .xsd file.

    <xsd:complexType name="Emplyee">
    <xsd:annotation>
    <xsd:appinfo source="appian.jpa">
    @Table(name="Emplyee_dbtable")
    </xsd:appinfo>
    </xsd:annotation>
    <xsd:sequence>
    
    ----------------
    
    ----------------
    
    ---------------------

  • Hi  and  Here is my CDT and XSD. It asks for CCCDetails_NodesAffected and CCCDetails_ToolsAffected tables when i try to publish my CDT to Data Store. How can i overwrote table and column names ? I can't find CCCDetails_NodesAffected and CCCDetails_ToolsAffected table names in my CDT. Please help me to resolve this. I want name to be without underscore i.e. CCCDetailsNodesAffected and CCCDetailsToolsAffected and similarly i want to overwrite the column names as well. I have two fields as Array and i do not want to create Nested CDTs.

    <xsd:schema xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:tns="urn:com:appian:types:CCCD" targetNamespace="urn:com:appian:types:CCCD">
      <xsd:complexType name="CCCDetails">
        <xsd:annotation>
          <xsd:documentation><![CDATA[Information about CCC in the CCC Application]]></xsd:documentation>
        </xsd:annotation>
        <xsd:sequence>
          <xsd:element name="CCCNumber" nillable="true" type="xsd:int">
            <xsd:annotation>
              <xsd:appinfo source="appian.jpa">@Id @GeneratedValue</xsd:appinfo>
            </xsd:annotation>
          </xsd:element>
          <xsd:element name="Approved" nillable="true" type="xsd:string">
            <xsd:annotation>
              <xsd:appinfo source="appian.jpa">@Column(length=255)</xsd:appinfo>
            </xsd:annotation>
          </xsd:element>
          <xsd:element name="ApprovalDate" nillable="true" type="xsd:date" />
          <xsd:element name="PRNumber" nillable="true" type="xsd:string">
            <xsd:annotation>
              <xsd:appinfo source="appian.jpa">@Column(length=255)</xsd:appinfo>
            </xsd:annotation>
          </xsd:element>
          <xsd:element name="ECR" nillable="true" type="xsd:string">
            <xsd:annotation>
              <xsd:appinfo source="appian.jpa">@Column(length=255)</xsd:appinfo>
            </xsd:annotation>
          </xsd:element>
          <xsd:element name="Description" nillable="true" type="xsd:string">
            <xsd:annotation>
              <xsd:appinfo source="appian.jpa">@Column(length=200)</xsd:appinfo>
            </xsd:annotation>
          </xsd:element>
          <xsd:element name="Class" nillable="true" type="xsd:string">
            <xsd:annotation>
              <xsd:appinfo source="appian.jpa">@Column(length=5)</xsd:appinfo>
            </xsd:annotation>
          </xsd:element>
          <xsd:element name="Reclass" nillable="true" type="xsd:string">
            <xsd:annotation>
              <xsd:appinfo source="appian.jpa">@Column(length=5)</xsd:appinfo>
            </xsd:annotation>
          </xsd:element>
          <xsd:element name="SixMonthsMaterialRequired" nillable="true" type="xsd:string">
            <xsd:annotation>
              <xsd:appinfo source="appian.jpa">@Column(length=5)</xsd:appinfo>
            </xsd:annotation>
          </xsd:element>
          <xsd:element name="ChangeType" nillable="true" type="xsd:string">
            <xsd:annotation>
              <xsd:appinfo source="appian.jpa">@Column(length=255)</xsd:appinfo>
            </xsd:annotation>
          </xsd:element>
          <xsd:element name="NotificationDate" nillable="true" type="xsd:date" />
          <xsd:element name="CCCPresenter" nillable="true" type="xsd:string">
            <xsd:annotation>
              <xsd:appinfo source="appian.jpa">@Column(length=255)</xsd:appinfo>
            </xsd:annotation>
          </xsd:element>
          <xsd:element name="InEccos" nillable="true" type="xsd:string">
            <xsd:annotation>
              <xsd:appinfo source="appian.jpa">@Column(length=5)</xsd:appinfo>
            </xsd:annotation>
          </xsd:element>
          <xsd:element name="DateAddedToEccos" nillable="true" type="xsd:date" />
          <xsd:element name="CEOldBomPN" nillable="true" type="xsd:string" />
          <xsd:element name="OldRevision" nillable="true" type="xsd:string" />
          <xsd:element name="CENewBomPN" nillable="true" type="xsd:string" />
          <xsd:element name="NewRevision" nillable="true" type="xsd:string" />
          <xsd:element name="ProductGroupAffected" nillable="true" type="xsd:string">
            <xsd:annotation>
              <xsd:appinfo source="appian.jpa">@Column(length=255)</xsd:appinfo>
            </xsd:annotation>
          </xsd:element>
          <xsd:element maxOccurs="unbounded" minOccurs="0" name="ToolsAffected" nillable="true" type="xsd:string" />
          <xsd:element maxOccurs="unbounded" minOccurs="0" name="NodesAffected" nillable="true" type="xsd:string" />
          <xsd:element name="ApprovedBy" nillable="true" type="xsd:string">
            <xsd:annotation>
              <xsd:appinfo source="appian.jpa">@Column(length=100)</xsd:appinfo>
            </xsd:annotation>
          </xsd:element>
          <xsd:element name="Spared" nillable="true" type="xsd:string">
            <xsd:annotation>
              <xsd:appinfo source="appian.jpa">@Column(length=5)</xsd:appinfo>
            </xsd:annotation>
          </xsd:element>
          <xsd:element name="Sbom" nillable="true" type="xsd:string">
            <xsd:annotation>
              <xsd:appinfo source="appian.jpa">@Column(length=5)</xsd:appinfo>
            </xsd:annotation>
          </xsd:element>
          <xsd:element name="BetaRequired" nillable="true" type="xsd:string">
            <xsd:annotation>
              <xsd:appinfo source="appian.jpa">@Column(length=5)</xsd:appinfo>
            </xsd:annotation>
          </xsd:element>
          <xsd:element name="BetaRequested" nillable="true" type="xsd:string">
            <xsd:annotation>
              <xsd:appinfo source="appian.jpa">@Column(length=5)</xsd:appinfo>
            </xsd:annotation>
          </xsd:element>
          <xsd:element name="Bundled" nillable="true" type="xsd:string">
            <xsd:annotation>
              <xsd:appinfo source="appian.jpa">@Column(length=5)</xsd:appinfo>
            </xsd:annotation>
          </xsd:element>
          <xsd:element name="BundleQtr" nillable="true" type="xsd:int" />
          <xsd:element name="BundlePresentDate" nillable="true" type="xsd:date" />
          <xsd:element name="QualStatus" nillable="true" type="xsd:string">
            <xsd:annotation>
              <xsd:appinfo source="appian.jpa">@Column(length=255)</xsd:appinfo>
            </xsd:annotation>
          </xsd:element>
          <xsd:element name="QualPartsDate" nillable="true" type="xsd:date" />
          <xsd:element name="QualApprovalDate" nillable="true" type="xsd:date" />
          <xsd:element name="Comments" nillable="true" type="xsd:string" />
          <xsd:element name="CreatedBy" nillable="true" type="xsd:string">
            <xsd:annotation>
              <xsd:appinfo source="appian.jpa">@Column(length=100)</xsd:appinfo>
            </xsd:annotation>
          </xsd:element>
          <xsd:element name="CreatedOn" nillable="true" type="xsd:dateTime" />
          <xsd:element name="UpdatedBy" nillable="true" type="xsd:string">
            <xsd:annotation>
              <xsd:appinfo source="appian.jpa">@Column(length=100)</xsd:appinfo>
            </xsd:annotation>
          </xsd:element>
          <xsd:element name="UpdatedOn" nillable="true" type="xsd:dateTime" />
        </xsd:sequence>
      </xsd:complexType>
    </xsd:schema>

  • Hi Sorry to disturb you again. Can you give your expert advice on this one also if possible. I am finding it difficult to maintain naming convention in MS SQL Server ?
Reply Children