Importing the Data Model in Data Factory Studio

The Factory Resource Intelligence app relies on Data Factory Studio app, where the data model is imported.

This task shows you how to:

Creating the Source Code File

To import data model, you need to create the code file containing the data.

  1. Open a text editor and copy the following code:

    {
      "indexunit" : {
        "@class" : "IndexUnit",
        "config" : {
          "datamodel" : {
            "classes" : [ {
              "attributes" : [ {
                "name" : "type",
                "type" : {
                  "dataStructure" : "Singleton",
                  "dataType" : "String"
                }
              } ],
              "name" : "OrganizationalResource",
              "parents" : [ "Fri.ResourceComponent" ],
              "pkg" : "Fri"
            }, {
              "attributes" : [ {
                "name" : "currentParent",
                "type" : {
                  "dataStructure" : "Singleton",
                  "dataType" : "Reference",
                  "referenceType" : "Fri.OrganizationalResource"
                }
              }, {
                "name" : "name",
                "type" : {
                  "dataStructure" : "Singleton",
                  "dataType" : "String"
                }
              }, {
                "name" : "description",
                "type" : {
                  "dataStructure" : "Singleton",
                  "dataType" : "String"
                }
              }, {
                "name" : "deploymentDate",
                "type" : {
                  "dataStructure" : "Singleton",
                  "dataType" : "LocalDateTime"
                }
              }, {
                "annotation" : {
                  "defaultValue" : {
                    "value" : "+99999999-12-31T23:59:59"
                  }
                },
                "name" : "obsolescenceDate",
                "type" : {
                  "dataStructure" : "Singleton",
                  "dataType" : "LocalDateTime"
                }
              }, {
                "name" : "imageUrl",
                "type" : {
                  "dataStructure" : "Singleton",
                  "dataType" : "String"
                }
              }, {
                "name" : "refPhysicalId",
                "type" : {
                  "dataStructure" : "Singleton",
                  "dataType" : "String"
                }
              }, {
                "name" : "refName",
                "type" : {
                  "dataStructure" : "Singleton",
                  "dataType" : "String"
                }
              } ],
              "name" : "ResourceComponent",
              "parents" : [ ],
              "pkg" : "Fri"
            }, {
              "attributes" : [ ],
              "name" : "ResourceAsset",
              "parents" : [ "Fri.ResourceComponent" ],
              "pkg" : "Fri"
            }, {
              "attributes" : [ {
                "name" : "name",
                "type" : {
                  "dataStructure" : "Singleton",
                  "dataType" : "String"
                }
              }, {
                "name" : "target",
                "type" : {
                  "dataStructure" : "Singleton",
                  "dataType" : "Float"
                }
              }, {
                "name" : "uom",
                "type" : {
                  "dataStructure" : "Singleton",
                  "dataType" : "String"
                }
              }, {
                "name" : "item",
                "type" : {
                  "dataStructure" : "Singleton",
                  "dataType" : "Reference",
                  "referenceType" : "core.Item"
                }
              } ],
              "name" : "Kpi",
              "parents" : [ ],
              "pkg" : "Common"
            }, {
              "attributes" : [ {
                "name" : "value",
                "type" : {
                  "dataStructure" : "Singleton",
                  "dataType" : "Float"
                }
              }, {
                "name" : "startTimeRange",
                "type" : {
                  "dataStructure" : "Singleton",
                  "dataType" : "LocalDateTime"
                }
              }, {
                "name" : "endTimeRange",
                "type" : {
                  "dataStructure" : "Singleton",
                  "dataType" : "LocalDateTime"
                }
              }, {
                "name" : "kpi",
                "type" : {
                  "dataStructure" : "Singleton",
                  "dataType" : "Reference",
                  "referenceType" : "Common.Kpi"
                }
              }, {
                "name" : "calculationTime",
                "type" : {
                  "dataStructure" : "Singleton",
                  "dataType" : "LocalDateTime"
                }
              } ],
              "name" : "KpiValue",
              "parents" : [ ],
              "pkg" : "Common"
            }, {
              "attributes" : [ {
                "annotation" : {
                  "defaultValue" : {
                    "value" : "-99999999-01-01T00:00:00"
                  }
                },
                "name" : "startDate",
                "type" : {
                  "dataStructure" : "Singleton",
                  "dataType" : "LocalDateTime"
                }
              }, {
                "annotation" : {
                  "defaultValue" : {
                    "value" : "+99999999-12-31T23:59:59"
                  }
                },
                "name" : "endDate",
                "type" : {
                  "dataStructure" : "Singleton",
                  "dataType" : "LocalDateTime"
                }
              }, {
                "name" : "statusCustom",
                "type" : {
                  "dataStructure" : "Singleton",
                  "dataType" : "String"
                }
              }, {
                "name" : "resource",
                "type" : {
                  "dataStructure" : "Singleton",
                  "dataType" : "Reference",
                  "referenceType" : "Fri.ResourceAsset"
                }
              } ],
              "name" : "Productivity",
              "parents" : [ ],
              "pkg" : "Fri"
            }, {
              "attributes" : [ {
                "name" : "standardValue",
                "type" : {
                  "dataStructure" : "Singleton",
                  "dataType" : "String"
                }
              }, {
                "name" : "customerValue",
                "type" : {
                  "dataStructure" : "Singleton",
                  "dataType" : "String"
                }
              }, {
                "name" : "color",
                "type" : {
                  "dataStructure" : "Singleton",
                  "dataType" : "String"
                }
              }, {
                "name" : "track",
                "type" : {
                  "dataStructure" : "Singleton",
                  "dataType" : "Boolean"
                }
              }, {
                "name" : "standardValueIndex",
                "type" : {
                  "dataStructure" : "Singleton",
                  "dataType" : "Integer"
                }
              } ],
              "name" : "ProductivityStatus",
              "parents" : [ ],
              "pkg" : "Fri"
            }, {
              "attributes" : [ {
                "annotation" : {
                  "defaultValue" : {
                    "value" : "-99999999-01-01T00:00:00"
                  }
                },
                "name" : "startDate",
                "type" : {
                  "dataStructure" : "Singleton",
                  "dataType" : "LocalDateTime"
                }
              }, {
                "annotation" : {
                  "defaultValue" : {
                    "value" : "+99999999-12-31T23:59:59"
                  }
                },
                "name" : "endDate",
                "type" : {
                  "dataStructure" : "Singleton",
                  "dataType" : "LocalDateTime"
                }
              }, {
                "name" : "capacityValue",
                "type" : {
                  "dataStructure" : "Singleton",
                  "dataType" : "Float"
                }
              }, {
                "name" : "resource",
                "type" : {
                  "dataStructure" : "Singleton",
                  "dataType" : "Reference",
                  "referenceType" : "Fri.ResourceAsset"
                }
              } ],
              "name" : "IdealCapacity",
              "parents" : [ ],
              "pkg" : "Fri"
            }, {
              "attributes" : [ {
                "name" : "reportedQuantity",
                "type" : {
                  "dataStructure" : "Singleton",
                  "dataType" : "Float"
                }
              }, {
                "name" : "reportedUsageCustom",
                "type" : {
                  "dataStructure" : "Singleton",
                  "dataType" : "String"
                }
              }, {
                "name" : "reportedQualityCustom",
                "type" : {
                  "dataStructure" : "Singleton",
                  "dataType" : "String"
                }
              }, {
                "name" : "resource",
                "type" : {
                  "dataStructure" : "Singleton",
                  "dataType" : "Reference",
                  "referenceType" : "Fri.ResourceAsset"
                }
              }, {
                "name" : "usageDate",
                "type" : {
                  "dataStructure" : "Singleton",
                  "dataType" : "LocalDateTime"
                }
              } ],
              "name" : "ReportedItem",
              "parents" : [ ],
              "pkg" : "Fri"
            }, {
              "attributes" : [ {
                "name" : "standardValue",
                "type" : {
                  "dataStructure" : "Singleton",
                  "dataType" : "String"
                }
              }, {
                "name" : "customerValue",
                "type" : {
                  "dataStructure" : "Singleton",
                  "dataType" : "String"
                }
              }, {
                "name" : "standardValueIndex",
                "type" : {
                  "dataStructure" : "Singleton",
                  "dataType" : "Integer"
                }
              } ],
              "name" : "ItemUsage",
              "parents" : [ ],
              "pkg" : "Fri"
            }, {
              "attributes" : [ {
                "name" : "standardValue",
                "type" : {
                  "dataStructure" : "Singleton",
                  "dataType" : "String"
                }
              }, {
                "name" : "customerValue",
                "type" : {
                  "dataStructure" : "Singleton",
                  "dataType" : "String"
                }
              }, {
                "name" : "standardValueIndex",
                "type" : {
                  "dataStructure" : "Singleton",
                  "dataType" : "Integer"
                }
              } ],
              "name" : "ItemQuality",
              "parents" : [ ],
              "pkg" : "Fri"
            }, {
              "attributes" : [ {
                "annotation" : {
                  "defaultValue" : {
                    "value" : "-99999999-01-01T00:00:00"
                  }
                },
                "name" : "startDate",
                "type" : {
                  "dataStructure" : "Singleton",
                  "dataType" : "LocalDateTime"
                }
              }, {
                "annotation" : {
                  "defaultValue" : {
                    "value" : "+99999999-12-31T23:59:59"
                  }
                },
                "name" : "endDate",
                "type" : {
                  "dataStructure" : "Singleton",
                  "dataType" : "LocalDateTime"
                }
              }, {
                "name" : "reasonCustom",
                "type" : {
                  "dataStructure" : "Singleton",
                  "dataType" : "String"
                }
              }, {
                "name" : "resource",
                "type" : {
                  "dataStructure" : "Singleton",
                  "dataType" : "Reference",
                  "referenceType" : "Fri.ResourceAsset"
                }
              } ],
              "name" : "Breakdown",
              "parents" : [ ],
              "pkg" : "Fri"
            } ]
          }
        },
        "description" : "",
        "name" : "ManufacturingIndex"
      },
      "version" : {
        "value" : "1.1"
      }
    }

  2. Save the file as ManufacturingIndex.json on your local environment.

Importing Data Model

  1. Open Data Factory Studio app.

    Note: The Data Engineer role is needed.

  2. Click Import Storage, and the select the ManufacturingIndex.json from your local environment.
    ManufacturingIndex.json appears in the storage list.
  3. Click Add Storage, and then select the External 3S Bucket stiorage type.
    The storage is created.

Managing Amazon Web Services Credentials

To finalize the data import, you need to enter Amazon Web Services credentials.

  1. From the storage list, click the created storage and then click the Connection tab.
  2. In the Access Key ID box, enter Amazon Web Service S3 credentials.
  3. In the Bucket Name box, enter the S3 Bucket Information.