Skip to content

Commit

Permalink
change task because of data missing
Browse files Browse the repository at this point in the history
  • Loading branch information
xuxiangwen committed Jan 15, 2019
1 parent 2a5d13e commit e8ef6ff
Show file tree
Hide file tree
Showing 3 changed files with 225 additions and 49 deletions.
93 changes: 47 additions & 46 deletions init_table_mapping.sh
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ cat << EOF > $script_path/json/${task_id}_table.json
}
EOF

task_id=full-cdc-customer-service-prod
task_id=full-cdc-csswechat
cat << EOF > $script_path/json/${task_id}_table.json
{
"rules": [
Expand Down Expand Up @@ -83,19 +83,11 @@ cat << EOF > $script_path/json/${task_id}_table.json
"table-name": "system_account"
},
"rule-action": "include"
}
]
}
EOF

task_id=full-cdc-asc-weixin-mp
cat << EOF > $script_path/json/${task_id}_table.json
{
"rules": [
},
{
"rule-type": "selection",
"rule-id": "1",
"rule-name": "1",
"rule-id": "50",
"rule-name": "50",
"object-locator": {
"schema-name": "asc_weixin_mp",
"table-name": "satisfaction_survey"
Expand All @@ -104,8 +96,8 @@ cat << EOF > $script_path/json/${task_id}_table.json
},
{
"rule-type": "selection",
"rule-id": "2",
"rule-name": "2",
"rule-id": "51",
"rule-name": "51",
"object-locator": {
"schema-name": "asc_weixin_mp",
"table-name": "customer"
Expand All @@ -114,8 +106,8 @@ cat << EOF > $script_path/json/${task_id}_table.json
},
{
"rule-type": "selection",
"rule-id": "3",
"rule-name": "3",
"rule-id": "52",
"rule-name": "52",
"object-locator": {
"schema-name": "asc_weixin_mp",
"table-name": "alias_desc"
Expand All @@ -124,52 +116,61 @@ cat << EOF > $script_path/json/${task_id}_table.json
},
{
"rule-type": "selection",
"rule-id": "4",
"rule-name": "4",
"rule-id": "54",
"rule-name": "54",
"object-locator": {
"schema-name": "asc_weixin_mp",
"table-name": "customer_product"
},
"rule-action": "include"
}
]
}
EOF

task_id=cdc-customer-service-prod-messages-history
cat << EOF > $script_path/json/${task_id}_table.json
{
"rules": [
},
{
"rule-type": "selection",
"rule-id": "1",
"rule-name": "1",
"rule-id": "101",
"rule-name": "101",
"object-locator": {
"schema-name": "customer_service_prod",
"table-name": "messages_history"
"schema-name": "asc_weixin_mp",
"table-name": "menu_click_his"
},
"rule-action": "include"
}
]
}
EOF

task_id=cdc-asc-weixin-mp-menu-click-his
cat << EOF > $script_path/json/${task_id}_table.json
{
"rules": [
"rule-action": "include",
"filters": [
{
"filter-type": "source",
"column-name": "id",
"filter-conditions": [
{
"filter-operator": "gte",
"value": "20113835"
}
]
}
]
},
{
"rule-type": "selection",
"rule-id": "1",
"rule-name": "1",
"rule-id": "102",
"rule-name": "102",
"object-locator": {
"schema-name": "asc_weixin_mp",
"table-name": "menu_click_his"
"schema-name": "customer_service_prod",
"table-name": "messages_history"
},
"rule-action": "include"
"rule-action": "include",
"filters": [
{
"filter-type": "source",
"column-name": "MSG_ID",
"filter-conditions": [
{
"filter-operator": "gte",
"value": "37756171"
}
]
}
]
}
]
}
EOF


ls -l $script_path/json
175 changes: 175 additions & 0 deletions init_table_mapping.sh.0115
Original file line number Diff line number Diff line change
@@ -0,0 +1,175 @@
# !/bin/bash
script=$(readlink -f "$0")
script_path=$(dirname "$script")

mkdir -p $script_path/json

task_id=full-customer-service-prod-messages-history
cat << EOF > $script_path/json/${task_id}_table.json
{
"rules": [
{
"rule-type": "selection",
"rule-id": "1",
"rule-name": "1",
"object-locator": {
"schema-name": "customer_service_prod",
"table-name": "messages_history"
},
"rule-action": "include"
}
]
}
EOF

task_id=full-asc-weixin-mp-menu-click-his
cat << EOF > $script_path/json/${task_id}_table.json
{
"rules": [
{
"rule-type": "selection",
"rule-id": "1",
"rule-name": "1",
"object-locator": {
"schema-name": "asc_weixin_mp",
"table-name": "menu_click_his"
},
"rule-action": "include"
}
]
}
EOF

task_id=full-cdc-customer-service-prod
cat << EOF > $script_path/json/${task_id}_table.json
{
"rules": [
{
"rule-type": "selection",
"rule-id": "1",
"rule-name": "1",
"object-locator": {
"schema-name": "customer_service_prod",
"table-name": "customer_service_worker"
},
"rule-action": "include"
},
{
"rule-type": "selection",
"rule-id": "2",
"rule-name": "2",
"object-locator": {
"schema-name": "customer_service_prod",
"table-name": "caseinfo"
},
"rule-action": "include"
},
{
"rule-type": "selection",
"rule-id": "3",
"rule-name": "3",
"object-locator": {
"schema-name": "customer_service_prod",
"table-name": "sessiontime"
},
"rule-action": "include"
},
{
"rule-type": "selection",
"rule-id": "4",
"rule-name": "4",
"object-locator": {
"schema-name": "customer_service_prod",
"table-name": "system_account"
},
"rule-action": "include"
}
]
}
EOF

task_id=full-cdc-asc-weixin-mp
cat << EOF > $script_path/json/${task_id}_table.json
{
"rules": [
{
"rule-type": "selection",
"rule-id": "1",
"rule-name": "1",
"object-locator": {
"schema-name": "asc_weixin_mp",
"table-name": "satisfaction_survey"
},
"rule-action": "include"
},
{
"rule-type": "selection",
"rule-id": "2",
"rule-name": "2",
"object-locator": {
"schema-name": "asc_weixin_mp",
"table-name": "customer"
},
"rule-action": "include"
},
{
"rule-type": "selection",
"rule-id": "3",
"rule-name": "3",
"object-locator": {
"schema-name": "asc_weixin_mp",
"table-name": "alias_desc"
},
"rule-action": "include"
},
{
"rule-type": "selection",
"rule-id": "4",
"rule-name": "4",
"object-locator": {
"schema-name": "asc_weixin_mp",
"table-name": "customer_product"
},
"rule-action": "include"
}
]
}
EOF

task_id=cdc-customer-service-prod-messages-history
cat << EOF > $script_path/json/${task_id}_table.json
{
"rules": [
{
"rule-type": "selection",
"rule-id": "1",
"rule-name": "1",
"object-locator": {
"schema-name": "customer_service_prod",
"table-name": "messages_history"
},
"rule-action": "include"
}
]
}
EOF

task_id=cdc-asc-weixin-mp-menu-click-his
cat << EOF > $script_path/json/${task_id}_table.json
{
"rules": [
{
"rule-type": "selection",
"rule-id": "1",
"rule-name": "1",
"object-locator": {
"schema-name": "asc_weixin_mp",
"table-name": "menu_click_his"
},
"rule-action": "include"
}
]
}
EOF

ls -l $script_path/json
6 changes: 3 additions & 3 deletions init_task_setting.sh
Original file line number Diff line number Diff line change
Expand Up @@ -80,9 +80,9 @@ cat << EOF > $script_path/json/${task_id}_task.json
"historyTimeslotInMinutes": 5,
"ControlSchema": "",
"HistoryTimeslotInMinutes": 5,
"HistoryTableEnabled": false,
"SuspendedTablesTableEnabled": false,
"StatusTableEnabled": false
"HistoryTableEnabled": true,
"SuspendedTablesTableEnabled": true,
"StatusTableEnabled": true
},
"StreamBufferSettings": {
"StreamBufferCount": 3,
Expand Down

0 comments on commit e8ef6ff

Please sign in to comment.