Hi, When we promote our application from one environment to another,

Hi,

When we promote our application from one environment to another, the Data Store gets created successfully. But the Data Source is not set automatically, though the data source name is same across environments. This also caused the following error message during import:

Problems (1):
dataStore _a-0000d8bc-879d-8000-effe-010000010000_2257 218 "Sales_DataStore": The import of dataStore [id=218 uuid=_a-0000d8ab-879c-8000-affe-010000010000_2257] could not be finalized: The data store “Sales_DataStore” [id=218] was saved but cannot be published: The data source schema does not match the type mappings: Missing table: salescustomerinfo (APNX-1-4178-000) (APNX-1-4071-009)

We had to then manually set the Data Source for the DataStore by choosing from the dropdown.

Is this an issue? How can this be prevented?...

OriginalPostID-104327

OriginalPostID-104327

  Discussion posts and replies are publicly visible

  • This is the relevant message: "The data source schema does not match the type mappings: Missing table: salescustomerinfo" this means that the target environment doesn't have a table called salescustomerinfo, therefore it's required that you do a validate of the data store so you can instruct Appian whether you want it to create the table automatically or if you are going to create it on your own.

    Another possibility is if the name of the data source (NOT data STORE but SOURCE) is not the same on both environments, in this case the message will be different and there's a need to map to the corresponding data source in the target environment after importing.
  • Eduardo, just few more points:

    1) The Data Source name in both environments were same (jdbc/BusinessDS).
    2) In the lower environment, we didn't create the tables manually by running a DDL. We only published the Data Store and created tables automatically (including the table mentioned in the error message above).
    3) So, we were expecting the application import to automatically publish the Data Store and thereby create the tables.

    This being the case, is this error expected?
  • Then your observation #2 and #3 is the relevant one. By design Appian cannot deliberately create tables in a target environment, it would be too risky to allow to do this by a simple import. Appian imports and saves the data store in draft mode so you, as the owner of the environment, can validate whether the table should be created or not.

    Imagine what would happen if there's a typo or misconfiguration in the XSD and Appian ends up updating your table or creating it with that typo. With this mechanism the person doing the import is alerted so he can check whether it can simply instruct Appian to create the tables in this environment too or if there's something to fix in the XSD to match to the existing table.
  • That clarifies! That you for the detailed explanation Eduardo!