Nenhuma descrição
Você não pode selecionar mais de 25 tópicos Os tópicos devem começar com uma letra ou um número, podem incluir traços ('-') e podem ter até 35 caracteres.

A_PARTNER_SHOPPE_sync_dim_shop.json 6.6KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175
  1. {
  2. "warehouse_table": "dim_shop",
  3. "business_tables": "A_PARTNER_SHOPPE",
  4. "description": "店铺信息从业务系统同步到数据仓库",
  5. "fields": [
  6. {
  7. "name": "shoppe_id",
  8. "source_name": "SHOPPE_ID",
  9. "type": "VARCHAR(128)",
  10. "description": "店铺唯一标识符",
  11. "is_incremental": false,
  12. "is_accounting": false
  13. },
  14. {
  15. "name": "archive_state",
  16. "source_name": "ARCHIVE_STATE",
  17. "type": "BIGINT",
  18. "description": "归档状态:1-正常,2-归档",
  19. "is_incremental": false,
  20. "is_accounting": true
  21. },
  22. {
  23. "name": "create_date",
  24. "source_name": "CREATE_DATE",
  25. "type": "DATETIME",
  26. "description": "创建时间",
  27. "is_incremental": true,
  28. "is_accounting": false
  29. },
  30. {
  31. "name": "create_userid",
  32. "source_name": "CREATE_USERID",
  33. "type": "VARCHAR(64)",
  34. "description": "创建用户ID",
  35. "is_incremental": false,
  36. "is_accounting": false
  37. },
  38. {
  39. "name": "create_username",
  40. "source_name": "CREATE_USERNAME",
  41. "type": "VARCHAR(64)",
  42. "description": "创建用户名",
  43. "is_incremental": false,
  44. "is_accounting": false
  45. },
  46. {
  47. "name": "depot_id",
  48. "source_name": "DEPOT_ID",
  49. "type": "VARCHAR(128)",
  50. "description": "仓库ID",
  51. "is_incremental": false,
  52. "is_accounting": false
  53. },
  54. {
  55. "name": "remark",
  56. "source_name": "REMARK",
  57. "type": "VARCHAR(512)",
  58. "description": "备注",
  59. "is_incremental": false,
  60. "is_accounting": false
  61. },
  62. {
  63. "name": "shoppe_area",
  64. "source_name": "SHOPPE_AREA",
  65. "type": "DOUBLE",
  66. "description": "店铺面积",
  67. "is_incremental": false,
  68. "is_accounting": false
  69. },
  70. {
  71. "name": "shoppe_contact",
  72. "source_name": "SHOPPE_CONTACT",
  73. "type": "VARCHAR(64)",
  74. "description": "联系人",
  75. "is_incremental": false,
  76. "is_accounting": false
  77. },
  78. {
  79. "name": "shoppe_floor",
  80. "source_name": "SHOPPE_FLOOR",
  81. "type": "VARCHAR(128)",
  82. "description": "所在楼层",
  83. "is_incremental": false,
  84. "is_accounting": false
  85. },
  86. {
  87. "name": "shoppe_helpid",
  88. "source_name": "SHOPPE_HELPID",
  89. "type": "VARCHAR(128)",
  90. "description": "店铺助记码",
  91. "is_incremental": false,
  92. "is_accounting": false
  93. },
  94. {
  95. "name": "shoppe_name",
  96. "source_name": "SHOPPE_NAME",
  97. "type": "VARCHAR(512)",
  98. "description": "店铺名称",
  99. "is_incremental": false,
  100. "is_accounting": false
  101. },
  102. {
  103. "name": "shoppe_tel",
  104. "source_name": "SHOPPE_TEL",
  105. "type": "VARCHAR(128)",
  106. "description": "联系电话",
  107. "is_incremental": false,
  108. "is_accounting": false
  109. },
  110. {
  111. "name": "shoppe_type",
  112. "source_name": "SHOPPE_TYPE",
  113. "type": "VARCHAR(128)",
  114. "description": "店铺类型",
  115. "is_incremental": false,
  116. "is_accounting": false
  117. },
  118. {
  119. "name": "tenant_id",
  120. "source_name": "TENANT_ID",
  121. "type": "VARCHAR(64)",
  122. "description": "租户ID",
  123. "is_incremental": false,
  124. "is_accounting": false
  125. },
  126. {
  127. "name": "device_id",
  128. "source_name": "DEVICE_ID",
  129. "type": "VARCHAR(128)",
  130. "description": "设备ID",
  131. "is_incremental": false,
  132. "is_accounting": false
  133. },
  134. {
  135. "name": "retail_bills_prefix",
  136. "source_name": "RETAIL_BILLS_PREFIX",
  137. "type": "VARCHAR(16)",
  138. "description": "零售单据前缀",
  139. "is_incremental": false,
  140. "is_accounting": false
  141. },
  142. {
  143. "name": "retail_rate",
  144. "source_name": "RETAIL_RATE",
  145. "type": "BIGINT",
  146. "description": "零售费率",
  147. "is_incremental": false,
  148. "is_accounting": false
  149. },
  150. {
  151. "name": "archive_order",
  152. "source_name": "ARCHIVE_ORDER",
  153. "type": "BIGINT",
  154. "description": "归档顺序",
  155. "is_incremental": false,
  156. "is_accounting": false
  157. }
  158. ],
  159. "full_sync_sql": "INSERT INTO dim_shop (shoppe_id, archive_state, create_date, create_userid, create_username, depot_id, remark, shoppe_area, shoppe_contact, shoppe_floor, shoppe_helpid, shoppe_name, shoppe_tel, shoppe_type, tenant_id, device_id, retail_bills_prefix, retail_rate, archive_order)\nSELECT \n SHOPPE_ID as shoppe_id,\n ARCHIVE_STATE as archive_state,\n CREATE_DATE as create_date,\n CREATE_USERID as create_userid,\n CREATE_USERNAME as create_username,\n DEPOT_ID as depot_id,\n REMARK as remark,\n SHOPPE_AREA as shoppe_area,\n SHOPPE_CONTACT as shoppe_contact,\n SHOPPE_FLOOR as shoppe_floor,\n SHOPPE_HELPID as shoppe_helpid,\n SHOPPE_NAME as shoppe_name,\n SHOPPE_TEL as shoppe_tel,\n SHOPPE_TYPE as shoppe_type,\n TENANT_ID as tenant_id,\n DEVICE_ID as device_id,\n RETAIL_BILLS_PREFIX as retail_bills_prefix,\n RETAIL_RATE as retail_rate,\n ARCHIVE_ORDER as archive_order\nFROM A_PARTNER_SHOPPE\nWHERE ARCHIVE_STATE = 1\nORDER BY SHOPPE_ID\nLIMIT :page_size OFFSET :offset;",
  160. "incremental_sync_sql": "INSERT INTO dim_shop (shoppe_id, archive_state, create_date, create_userid, create_username, depot_id, remark, shoppe_area, shoppe_contact, shoppe_floor, shoppe_helpid, shoppe_name, shoppe_tel, shoppe_type, tenant_id, device_id, retail_bills_prefix, retail_rate, archive_order)\nSELECT \n SHOPPE_ID as shoppe_id,\n ARCHIVE_STATE as archive_state,\n CREATE_DATE as create_date,\n CREATE_USERID as create_userid,\n CREATE_USERNAME as create_username,\n DEPOT_ID as depot_id,\n REMARK as remark,\n SHOPPE_AREA as shoppe_area,\n SHOPPE_CONTACT as shoppe_contact,\n SHOPPE_FLOOR as shoppe_floor,\n SHOPPE_HELPID as shoppe_helpid,\n SHOPPE_NAME as shoppe_name,\n SHOPPE_TEL as shoppe_tel,\n SHOPPE_TYPE as shoppe_type,\n TENANT_ID as tenant_id,\n DEVICE_ID as device_id,\n RETAIL_BILLS_PREFIX as retail_bills_prefix,\n RETAIL_RATE as retail_rate,\n ARCHIVE_ORDER as archive_order\nFROM A_PARTNER_SHOPPE\nWHERE ARCHIVE_STATE = 1\n AND CREATE_DATE > :sync_last_time\nORDER BY CREATE_DATE ASC, SHOPPE_ID\nLIMIT :page_size OFFSET :offset;",
  161. "count_sql": {
  162. "full_count": "SELECT COUNT(*) as total_count FROM A_PARTNER_SHOPPE WHERE ARCHIVE_STATE = 1;",
  163. "incremental_count": "SELECT COUNT(*) as incremental_count FROM A_PARTNER_SHOPPE WHERE ARCHIVE_STATE = 1 AND CREATE_DATE > :sync_last_time;"
  164. },
  165. "parameters": {
  166. "incremental_param": "sync_last_time",
  167. "page_size_param": "page_size",
  168. "offset_param": "offset"
  169. },
  170. "config": {
  171. "accounting_field": "ARCHIVE_STATE",
  172. "accounting_condition": "= 1",
  173. "incremental_field": "CREATE_DATE"
  174. }
  175. }