Unique key violations - Intergraph Smart Reference Data - 2020 10.0 - Customization & Programming - Hexagon

Intergraph Smart Reference Data Integration (2020)

Language
English
Product
Intergraph Smart Reference Data
Search by Category
Customization & Programming
Smart Materials/Smart Reference Data Version
2020 (10.0)

Unique key violations raise a fatal error.

Progress Display

Looking at the progress display, you find that the error raised at stage Fill Interface Tables:

27

And, the error is the following:

28

Logfile

If you look at the end of the logfile, you see mainly the same information:

  • The unique key number 1 defined on Integration->Smart 3D->Smart 3D Configurations->Data Table Configurations was violated.

    1.UK check statement against job data issued

    Error: 1. userdefined UK violated on ejd_id 84704

  • The attributes that are required to be unique are the commodity code and the first schedule.

This UK contains the columns IndustryCommodityCode

  • The values that raised the exception are listed (together with their physical attributes) and ordered in the same way as in the attribute list above. "PPPABQPEACRAAGZ" is the IndustryCommodityCode,. The row with these values was rejected because there is already one row on the exported data tables with the same commodity code.

    Tried to insert following UK values on physical columns:

    AC0060_015 : PPPABQPEACRAAGZ

    MAR-44002 Non-unique IndustryCommodityCode on data table PipeStock within the export job data

    MAR-44002 Non-unique IndustryCommodityCode on data table PipeStock within the export job data

    Error filling data table <PipeStock> with stnd method

    Error fetching attribute values for data table PipeStock

    Export finished with errors

    The error MAR-44002 means that there is more than one row with the same commodity code and first schedule in the data that is going to be written to the PipeStock data table, but the user-defined unique key does not allow duplicate entries on those attributes.

End of the logfile.

Solution(s)

Open Integration->Smart 3D->Smart 3D Configurations->Data Table Configurations, go to the PipeStock data table configuration, and query for all attributes that are part of unique key number 1. You can find the columns listed in the error message:

29

This configuration is incorrect because the unique key does not contain enough columns. Of course, a PipeStock will contain multiple rows with the same commodity code. So you should include more columns in the unique key. The error disappears on the next run. Here is the correct unique key configuration, which must include the sizes and units:

30