| 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" averageElementSize 50 progressBarStyle normal file |
| XML "file://${{PROJECT_LOC}}/models/smooksresources/eurofxref-daily.xml" |
| //XML "http://www.ecb.europa.eu/stats/eurofxref/eurofxref-daily.xml" |
| |
| beans { |
| entity CurrencyStream createOn "/Envelope/Cube" marker 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 file |
| CSV "file://${{PROJECT_LOC}}/models/smooksresources/ISOCurrencyCodes081507.csv" delimiter ";" skipLines 1 |
| beans { |
| entity CurrencyNamesStream marker latest expression { |
| assign importDate with NowDate as Date |
| } |
| entity CurrencyNames recordElement |
| } |
| interchange EDIOrders describedBy "edi orders" averageElementSize 50 progressBarStyle important file |
| EDI "file://${{PROJECT_LOC}}/models/smooksresources/orders.edi" mappingModel "file://${{PROJECT_LOC}}/models/smooksmappings/edi-order-mapping.xml" validate |
| beans { |
| entity EDIOrders createOn "Order" marker 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" locale "en_US" |
| } |
| 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 averageElementSize 83 file |
| XML "file://${{PROJECT_LOC}}/models/smooksresources/stores.xml" |
| beans { |
| entity Region recordList |
| entity Store format { |
| for firstOpenedDate coding "dd.MM.yyyy" locale "de_DE" |
| for lastRemodelDate coding "dd.MM.yyyy" locale "de_DE" |
| for frozenSqft coding "####,#####################" locale "de_DE" |
| for meatSqft coding "####,#####################" locale "de_DE" |
| } |
| entity Warehouse |
| } |
| interchange Warehouses averageElementSize 80 file |
| XML "file://${{PROJECT_LOC}}/models/smooksresources/warehouses.xml" |
| beans { |
| entity WarehouseClass recordList |
| entity Warehouse |
| } |
| interchange Products averageElementSize 80 file |
| XML "file://${{PROJECT_LOC}}/models/smooksresources/products.xml" |
| beans { |
| entity ProductClass recordList |
| entity Product format { |
| for srp coding "####,#####################" locale "de_DE" |
| for grossWeight coding "####,#####################" locale "de_DE" |
| for netWeight coding "####,#####################" locale "de_DE" |
| for shelfWidth coding "####,#####################" locale "de_DE" |
| for shelfHeight coding "####,#####################" locale "de_DE" |
| for shelfDepth coding "####,#####################" locale "de_DE" |
| } |
| } |
| interchange EmployeesPosition averageElementSize 80 file |
| XML "file://${{PROJECT_LOC}}/models/smooksresources/employeesposition.xml" |
| beans { |
| entity Position recordList |
| entity Employee format { |
| for birthDate coding "dd.MM.yyyy" locale "de_DE" |
| for hireDate coding "dd.MM.yyyy" locale "de_DE" |
| for endDate coding "dd.MM.yyyy" locale "de_DE" |
| } |
| } |
| interchange EmployeesDepartment averageElementSize 80 file |
| XML "file://${{PROJECT_LOC}}/models/smooksresources/employeesdepartment.xml" |
| beans { |
| entity Department recordList |
| } |
| interchange Customer averageElementSize 80 file |
| XML "file://${{PROJECT_LOC}}/models/smooksresources/customer.xml" |
| beans { |
| entity Customer recordList format { |
| for birthdate coding "dd.MM.yyyy" locale "de_DE" |
| for dateAccntOpened coding "yyyy-MM-dd" |
| } |
| } |
| interchange Promotion averageElementSize 80 file |
| XML "file://${{PROJECT_LOC}}/models/smooksresources/promotion.xml" |
| beans { |
| entity Promotion recordList format { |
| for startDate coding "dd.MM.yyyy" locale "de_DE" |
| for endDate coding "dd.MM.yyyy" locale "de_DE" |
| for cost coding "####,#####################" locale "de_DE" |
| } |
| } |
| interchange Suppliers averageElementSize 50 |
| file XML "file://${{PROJECT_LOC}}/models/smooksresources/suppliers.xml" |
| beans { |
| entity Supplier recordList |
| format { |
| for firstContract coding "yyyy-MM-dd" |
| for lastOrder coding "yyyy-MM-dd" |
| } |
| } |
| } |