| import ns ${{BASIC_PROJECT_NAME}}.model.entities.Currency |
| import ns ${{BASIC_PROJECT_NAME}}.model.entities.CurrencyDay |
| import ns ${{BASIC_PROJECT_NAME}}.model.entities.CurrencyNames |
| import ns ${{BASIC_PROJECT_NAME}}.model.entities.CurrencyNamesStream |
| import ns ${{BASIC_PROJECT_NAME}}.model.entities.CurrencyStream |
| import ns ${{BASIC_PROJECT_NAME}}.model.entities.Customer |
| import ns ${{BASIC_PROJECT_NAME}}.model.entities.Department |
| import ns ${{BASIC_PROJECT_NAME}}.model.entities.EDIOrderCustomer |
| import ns ${{BASIC_PROJECT_NAME}}.model.entities.EDIOrderHeader |
| import ns ${{BASIC_PROJECT_NAME}}.model.entities.EDIOrderItem |
| import ns ${{BASIC_PROJECT_NAME}}.model.entities.EDIOrders |
| import ns ${{BASIC_PROJECT_NAME}}.model.entities.Employee |
| import ns ${{BASIC_PROJECT_NAME}}.model.entities.Position |
| import ns ${{BASIC_PROJECT_NAME}}.model.entities.Product |
| import ns ${{BASIC_PROJECT_NAME}}.model.entities.ProductClass |
| import ns ${{BASIC_PROJECT_NAME}}.model.entities.Promotion |
| import ns ${{BASIC_PROJECT_NAME}}.model.entities.Region |
| import ns ${{BASIC_PROJECT_NAME}}.model.entities.Store |
| import ns ${{BASIC_PROJECT_NAME}}.model.entities.Supplier |
| import ns ${{BASIC_PROJECT_NAME}}.model.entities.Warehouse |
| import ns ${{BASIC_PROJECT_NAME}}.model.entities.WarehouseClass |
| |
| package ${{MODEL_PROJECT_PACKAGE_NAME}} title "DataInterchange" { |
| |
| interchange Currencies describedBy "european central bank currency exchange rates based on euro" persist elementSize 50 file |
| XML "file://${{PROJECT_LOC}}/models/smooksresources/eurofxref-daily.xml" |
| //XML "http://www.ecb.europa.eu/stats/eurofxref/eurofxref-daily.xml" |
| |
| path { |
| entity CurrencyStream createOn "/Envelope/Cube" latestImport latest expression { |
| assign importDate with NowDate as Date |
| } |
| entity CurrencyDay createOn "/Envelope/Cube/Cube" format { |
| for ratingDate coding "yyyy-MM-dd" |
| } |
| mapping { |
| map ratingDate to "time" |
| } |
| entity Currency createOn "/Envelope/Cube/Cube/Cube" expression { |
| copy currencyDate from CurrencyDay property ratingDate |
| } |
| lookup { |
| for currencyName on CurrencyNames createOn "/Envelope/Cube/Cube/Cube" with isoCode cacheSize 300 mapTo "currency" |
| markerPath { |
| markerEntity CurrencyNamesStream markedBy latest |
| } |
| } |
| mapping { |
| map conversionRatio to "rate" |
| } |
| } |
| |
| interchange CurrencyNames persist file |
| CSV "file://${{PROJECT_LOC}}/models/smooksresources/ISOCurrencyCodes081507.csv" delimiter ";" skipLines 1 |
| path { |
| entity CurrencyNamesStream latestImport latest expression { |
| assign importDate with NowDate as Date |
| } |
| entity CurrencyNames |
| } |
| |
| interchange EDIOrders describedBy "edi orders" persist elementSize 50 file |
| EDI "file://${{PROJECT_LOC}}/models/smooksresources/orders.edi" locale "en-US" mappingModel "file://${{PROJECT_LOC}}/models/smooksmappings/edi-order-mapping.xml" validate |
| path { |
| entity EDIOrders createOn "Order" latestImport latest expression { |
| assign importDate with NowDate as Date |
| } |
| entity EDIOrderHeader createOn "/Order/header" format { |
| for hdrDate coding "EEE MMM dd HH:mm:ss zzz yyyy" |
| } |
| mapping { |
| map orderId to "order-id" |
| map statusCode to "status-code" |
| map netAmount to "net-amount" |
| map totalAmount to "total-amount" |
| map taxAmount to "tax" |
| map hdrDate to "date" |
| } |
| entity EDIOrderCustomer createOn "/Order/customer-details" mapping { |
| map country to "state" |
| map firstName to "name/firstName" |
| map lastName to "name/lastName" |
| map userName to "userName" |
| } |
| entity EDIOrderItem createOn "/Order/order-item" mapping { |
| map position to "position" |
| map quantity to "quantity" |
| map sku to "product-id" |
| map ^title to "title" |
| map price to "price" |
| } |
| } |
| |
| interchange Stores merge vectorName "stores" elementSize 83 file |
| XML "file://${{PROJECT_LOC}}/models/smooksresources/stores.xml" locale "de_DE" |
| path { |
| entity Region |
| entity Store format { |
| for firstOpenedDate coding "dd.MM.yyyy" |
| for lastRemodelDate coding "dd.MM.yyyy" |
| for frozenSqft coding "####,#####################" |
| for meatSqft coding "####,#####################" |
| } |
| entity Warehouse |
| } |
| |
| interchange Warehouses merge elementSize 80 file |
| XML "file://${{PROJECT_LOC}}/models/smooksresources/warehouses.xml" |
| path { |
| entity WarehouseClass |
| entity Warehouse |
| } |
| |
| interchange Products merge elementSize 80 file |
| XML "file://${{PROJECT_LOC}}/models/smooksresources/products.xml"locale "de_DE" |
| path { |
| entity ProductClass |
| entity Product format { |
| for srp coding "####,#####################" |
| for grossWeight coding "####,#####################" |
| for netWeight coding "####,#####################" |
| for shelfWidth coding "####,#####################" |
| for shelfHeight coding "####,#####################" |
| for shelfDepth coding "####,#####################" |
| } |
| } |
| |
| interchange EmployeesPosition merge elementSize 80 file |
| XML "file://${{PROJECT_LOC}}/models/smooksresources/employeesposition.xml" locale "de_DE" |
| path { |
| entity Position |
| entity Employee format { |
| for birthDate coding "dd.MM.yyyy" |
| for hireDate coding "dd.MM.yyyy" |
| for endDate coding "dd.MM.yyyy" |
| } |
| } |
| |
| interchange EmployeesDepartment merge elementSize 80 file |
| XML "file://${{PROJECT_LOC}}/models/smooksresources/employeesdepartment.xml" |
| path { |
| entity Department |
| } |
| |
| interchange Customer merge elementSize 80 file |
| XML "file://${{PROJECT_LOC}}/models/smooksresources/customer.xml" |
| path { |
| entity Customer format { |
| for birthdate coding "dd.MM.yyyy" |
| for dateAccntOpened coding "yyyy-MM-dd" |
| } |
| } |
| |
| interchange Promotion merge elementSize 80 file |
| XML "file://${{PROJECT_LOC}}/models/smooksresources/promotion.xml" locale "de_DE" |
| path { |
| entity Promotion format { |
| for startDate coding "dd.MM.yyyy" |
| for endDate coding "dd.MM.yyyy" |
| for cost coding "####,#####################" |
| } |
| } |
| |
| interchange Suppliers merge elementSize 50 file |
| XML "file://${{PROJECT_LOC}}/models/smooksresources/suppliers.xml" |
| path { |
| entity Supplier format { |
| for firstContract coding "yyyy-MM-dd" |
| for lastOrder coding "yyyy-MM-dd" |
| } |
| } |
| } |