diff --git a/ecs/crm-datafetch/.gitignore b/ecs/crm-datafetch/.gitignore new file mode 100644 index 00000000..bbfbbcbe --- /dev/null +++ b/ecs/crm-datafetch/.gitignore @@ -0,0 +1,20 @@ +# Node.jsで実装されたLambdaの管理対象外ファイル群 +package-lock.json +node_modules/ +# ローカル確認用環境変数ファイル +.env +# Pythonの仮想環境ファイル +.venv +# pythonのキャッシュファイル +__pycache__/ + +# StepFunctionsステートメント定義変換後のフォルダ +stepfunctions/*/build +**/.vscode/settings.json + +# python test +.coverage +.report/ + +# log +.log \ No newline at end of file diff --git a/lambda/NoticeToSlack/index.js b/lambda/NoticeToSlack/index.js new file mode 100644 index 00000000..5c0a7226 --- /dev/null +++ b/lambda/NoticeToSlack/index.js @@ -0,0 +1,37 @@ +"use-strict"; + +const request = require("request-promise"); +exports.handler = (event, context, callback) => { + const attaches = event.Records.map(evt => { + return { + "fallback":`Notification from mbj-newdwh2021 AWS: ${evt.EventSubscriptionArn}`, + "pretext":`Notification from mbj-newdwh2021 AWS: ${evt.EventSubscriptionArn}`, + "color":"#0000D0", + "fields":[ + { + "title": `${evt.Sns.Subject}`, + "value": `${evt.Sns.Timestamp}: ${evt.Sns.Message} (MessageId: ${evt.Sns.MessageId})`, + "short": false + } + ] + }; + }); + request({ + method: "POST", + url: process.env.webhookurl, + body: { + attachments: attaches + + }, + json: true + }).then((body => { + callback(null, `Request succeed. ${body}`); + })).catch((err) => { + callback("failed to request to slack.", { + result: "ERROR", + event: event, + cause: `request failed. ${err}.` + }); + }) + +}; diff --git a/lambda/NoticeToSlack/mbj-newdwh2021-staging-NoticeToSlack.zip b/lambda/NoticeToSlack/mbj-newdwh2021-staging-NoticeToSlack.zip new file mode 100644 index 00000000..53f0c160 Binary files /dev/null and b/lambda/NoticeToSlack/mbj-newdwh2021-staging-NoticeToSlack.zip differ diff --git a/lambda/NoticeToSlack/package.json b/lambda/NoticeToSlack/package.json new file mode 100644 index 00000000..1495f188 --- /dev/null +++ b/lambda/NoticeToSlack/package.json @@ -0,0 +1,15 @@ +{ + "name": "mbj-newdwh2021-staging-noticetoslack", + "version": "1.0.0", + "description": "", + "main": "index.js", + "scripts": { + "test": "echo \"Error: no test specified\" && exit 1" + }, + "author": "", + "license": "ISC", + "dependencies": { + "request": "^2.88.2", + "request-promise": "^4.2.6" + } +} diff --git a/lambda/PublishFromLog/index.js b/lambda/PublishFromLog/index.js new file mode 100644 index 00000000..f0b608f8 --- /dev/null +++ b/lambda/PublishFromLog/index.js @@ -0,0 +1,30 @@ +const zlib = require("zlib"); +const aws = require("aws-sdk"); +const sns = new aws.SNS({ + apiVersion: "2010-03-31", + region: 'ap-northeast-1' +}); + +exports.handler = function(input, context) { + var payload = new Buffer.from(input.awslogs.data, 'base64'); + zlib.gunzip(payload, function(e, result) { + if (e) { + context.fail(e); + } else { + result = JSON.parse(result.toString('UTF-8')); + const publishMessage = { + Subject: `Detect Error(or Warning) in ${result.logGroup}`, + Message: result.logEvents.map((l) => l.message).join('\n'), + TopicArn: process.env.topicArn + }; + console.log(publishMessage); + + sns.publish(publishMessage, (err, data) => { + console.log(err, data); + if(err){ + context.fail(err); + } + }); + } + }); +}; \ No newline at end of file diff --git a/lambda/PublishFromLog/mbj-newdwh2021-staging-PublishFromLog.zip b/lambda/PublishFromLog/mbj-newdwh2021-staging-PublishFromLog.zip new file mode 100644 index 00000000..6a8526bc Binary files /dev/null and b/lambda/PublishFromLog/mbj-newdwh2021-staging-PublishFromLog.zip differ diff --git a/lambda/PublishFromLog/package.json b/lambda/PublishFromLog/package.json new file mode 100644 index 00000000..1e0d12e7 --- /dev/null +++ b/lambda/PublishFromLog/package.json @@ -0,0 +1,15 @@ +{ + "name": "mbj-newdwh2021-staging-publishfromlog", + "version": "1.0.0", + "description": "", + "main": "index.js", + "scripts": { + "test": "echo \"Error: no test specified\" && exit 1" + }, + "author": "", + "license": "ISC", + "dependencies": { + "aws-sdk": "^2.1011.0", + "zlib": "^1.0.5" + } +} diff --git a/rds_mysql/stored_procedure/crm_data_sync.sql b/rds_mysql/stored_procedure/crm_data_sync.sql new file mode 100644 index 00000000..bb3f3354 --- /dev/null +++ b/rds_mysql/stored_procedure/crm_data_sync.sql @@ -0,0 +1,48 @@ +-- A5M2で実行時に[SQL] - [スラッシュ(/)のみの行でSQLを区切る]に変えてから実行する +-- $$から始まる文字は後からREPLACEする文字を示す独自ルール +-- crm_data_syncストアドプロシージャは、同一セッション内での並列処理を実行することができない +-- 実行者の権限でストアドプロシージャを実行するために、「SQL SECURITY INVOKER」を付与している +CREATE PROCEDURE src02.crm_data_sync(target_table VARCHAR(255), target_table_all VARCHAR(255), target_column VARCHAR(255)) +SQL SECURITY INVOKER +BEGIN + -- 例外処理 + -- エラーが発生した場合に一時テーブルの削除を実施 + DECLARE EXIT HANDLER FOR SQLEXCEPTION + BEGIN + GET DIAGNOSTICS CONDITION 1 + @error_state = RETURNED_SQLSTATE, @error_msg = MESSAGE_TEXT; + ROLLBACK; + SIGNAL SQLSTATE '45000' + SET MYSQL_ERRNO = @error_state, MESSAGE_TEXT = @error_msg; + END; + + SET @error_state = NULL, @error_msg = NULL; + START TRANSACTION; + + -- ①-1 Salesforce側で物理削除されたデータを検出し更新する + SET @update_end_datetime = ' + UPDATE $$target_table$$ tt + SET + tt.end_datetime = CURRENT_TIMESTAMP () + , tt.upd_user = CURRENT_USER () + , tt.upd_date = CURRENT_TIMESTAMP () + WHERE + tt.end_datetime = "9999-12-31 00:00:00" + AND NOT EXISTS ( + SELECT + tta.Id + FROM + $$target_table_all$$ tta + WHERE + tt.Id = tta.Id + AND tt.$$target_column$$ = tta.$$target_column$$ + ) + '; + SET @update_end_datetime = REPLACE(@update_end_datetime, "$$target_table$$", target_table); + SET @update_end_datetime = REPLACE(@update_end_datetime, "$$target_table_all$$", target_table_all); + SET @update_end_datetime = REPLACE(@update_end_datetime, "$$target_column$$", target_column); + PREPARE update_end_datetime_stmt from @update_end_datetime; + EXECUTE update_end_datetime_stmt; + + COMMIT; +END diff --git a/rds_mysql/stored_procedure/crm_history.sql b/rds_mysql/stored_procedure/crm_history.sql new file mode 100644 index 00000000..cc94bbfb --- /dev/null +++ b/rds_mysql/stored_procedure/crm_history.sql @@ -0,0 +1,95 @@ +-- A5M2で実行時に[SQL] - [スラッシュ(/)のみの行でSQLを区切る]に変えてから実行する +-- $$から始まり$$で終わる文字は後からREPLACEする文字を示す独自ルール +-- crm_historyストアドプロシージャは、同一セッション内での並列処理を実行することができない +-- 実行者の権限でストアドプロシージャを実行するために、「SQL SECURITY INVOKER」を付与している +CREATE PROCEDURE src02.crm_history(target_table VARCHAR(255), target_column VARCHAR(255)) +SQL SECURITY INVOKER +BEGIN + -- 例外処理 + -- エラーが発生した場合に一時テーブルの削除を実施 + DECLARE EXIT HANDLER FOR SQLEXCEPTION + BEGIN + GET DIAGNOSTICS CONDITION 1 + @error_state = RETURNED_SQLSTATE, @error_msg = MESSAGE_TEXT; + EXECUTE drop_tmp_table_stmt; + DEALLOCATE PREPARE drop_tmp_table_stmt; + ROLLBACK; + SIGNAL SQLSTATE '45000' + SET MYSQL_ERRNO = @error_state, MESSAGE_TEXT = @error_msg; + END; + + SET @error_state = NULL, @error_msg = NULL; + START TRANSACTION; + + -- ②-3で利用する一時テーブル削除のSQLを準備 + -- 例外処理でも利用するため先に記述 + SET @drop_tmp_table = ' + DROP TEMPORARY TABLE IF EXISTS $$target_table$$_make_history_tmp + '; + SET @drop_tmp_table = REPLACE(@drop_tmp_table, "$$target_table$$", target_table); + PREPARE drop_tmp_table_stmt from @drop_tmp_table; + + -- ①-1 Salesforce側で更新されたデータの適用開始日時と適用終了日時を設定する + SET @new_history_save = ' + UPDATE $$target_table$$ + SET + start_datetime = $$target_column$$ + , end_datetime = "9999-12-31 00:00:00" + , upd_user = CURRENT_USER() + , upd_date = CURRENT_TIMESTAMP() + WHERE + start_datetime IS NULL + AND end_datetime IS NULL + '; + SET @new_history_save = REPLACE(@new_history_save, "$$target_table$$", target_table); + SET @new_history_save = REPLACE(@new_history_save, "$$target_column$$", target_column); + PREPARE new_history_save_stmt from @new_history_save; + EXECUTE new_history_save_stmt; + DEALLOCATE PREPARE new_history_save_stmt; + + -- ②-1 Salesforce側で更新されたデータを検出用一時テーブルの作成 + SET @make_history_tmp_create = ' + CREATE TEMPORARY TABLE $$target_table$$_make_history_tmp + SELECT + Id + , MIN($$target_column$$) AS min_start_datetime + , MAX(start_datetime) AS max_start_datetime + FROM + $$target_table$$ + WHERE + end_datetime = "9999-12-31 00:00:00" + GROUP BY + Id + HAVING + count(Id) = 2 + '; + SET @make_history_tmp_create = REPLACE(@make_history_tmp_create, "$$target_table$$", target_table); + SET @make_history_tmp_create = REPLACE(@make_history_tmp_create, "$$target_column$$", target_column); + PREPARE make_history_tmp_create_stmt from @make_history_tmp_create; + EXECUTE make_history_tmp_create_stmt; + DEALLOCATE PREPARE make_history_tmp_create_stmt; + + -- ②-2 「②-1」で取得した全件に更新処理を行う + SET @update_end_datetime = ' + UPDATE $$target_table$$ tt + INNER JOIN $$target_table$$_make_history_tmp mht + ON tt.Id = mht.Id + AND tt.start_datetime = mht.min_start_datetime + SET + end_datetime = mht.max_start_datetime - INTERVAL 1 SECOND + , upd_user = CURRENT_USER() + , upd_date = CURRENT_TIMESTAMP() + '; + SET @update_end_datetime = REPLACE(@update_end_datetime, "$$target_table$$", target_table); + SET @update_end_datetime = REPLACE(@update_end_datetime, "$$target_column$$", target_column); + PREPARE update_end_datetime_stmt from @update_end_datetime; + EXECUTE update_end_datetime_stmt; + DEALLOCATE PREPARE update_end_datetime_stmt; + + -- ②-3 「②-1」で作成した一時テーブルを削除する + EXECUTE drop_tmp_table_stmt; + DEALLOCATE PREPARE drop_tmp_table_stmt; + + COMMIT; + +END diff --git a/s3/config/crm/last_fetch_datetime/Medical_Event_vod__c.json b/s3/config/crm/last_fetch_datetime/Directory_vod__c.json similarity index 100% rename from s3/config/crm/last_fetch_datetime/Medical_Event_vod__c.json rename to s3/config/crm/last_fetch_datetime/Directory_vod__c.json diff --git a/s3/config/crm/last_fetch_datetime/ProcessDefinition.json b/s3/config/crm/last_fetch_datetime/ProcessDefinition.json new file mode 100644 index 00000000..7453dc17 --- /dev/null +++ b/s3/config/crm/last_fetch_datetime/ProcessDefinition.json @@ -0,0 +1,4 @@ +{ + "last_fetch_datetime_from": "1900-01-01T00:00:00.000Z", + "last_fetch_datetime_to": "" +} diff --git a/s3/config/crm/last_fetch_datetime/ProcessDefinition_ALL.json b/s3/config/crm/last_fetch_datetime/ProcessDefinition_ALL.json new file mode 100644 index 00000000..7453dc17 --- /dev/null +++ b/s3/config/crm/last_fetch_datetime/ProcessDefinition_ALL.json @@ -0,0 +1,4 @@ +{ + "last_fetch_datetime_from": "1900-01-01T00:00:00.000Z", + "last_fetch_datetime_to": "" +} diff --git a/s3/config/crm/last_fetch_datetime/ProcessInstance.json b/s3/config/crm/last_fetch_datetime/ProcessInstance.json new file mode 100644 index 00000000..7453dc17 --- /dev/null +++ b/s3/config/crm/last_fetch_datetime/ProcessInstance.json @@ -0,0 +1,4 @@ +{ + "last_fetch_datetime_from": "1900-01-01T00:00:00.000Z", + "last_fetch_datetime_to": "" +} diff --git a/s3/config/crm/last_fetch_datetime/ProcessInstanceNode.json b/s3/config/crm/last_fetch_datetime/ProcessInstanceNode.json new file mode 100644 index 00000000..7453dc17 --- /dev/null +++ b/s3/config/crm/last_fetch_datetime/ProcessInstanceNode.json @@ -0,0 +1,4 @@ +{ + "last_fetch_datetime_from": "1900-01-01T00:00:00.000Z", + "last_fetch_datetime_to": "" +} diff --git a/s3/config/crm/last_fetch_datetime/ProcessInstanceStep.json b/s3/config/crm/last_fetch_datetime/ProcessInstanceStep.json new file mode 100644 index 00000000..7453dc17 --- /dev/null +++ b/s3/config/crm/last_fetch_datetime/ProcessInstanceStep.json @@ -0,0 +1,4 @@ +{ + "last_fetch_datetime_from": "1900-01-01T00:00:00.000Z", + "last_fetch_datetime_to": "" +} diff --git a/s3/config/crm/last_fetch_datetime/ProcessInstanceStep_ALL.json b/s3/config/crm/last_fetch_datetime/ProcessInstanceStep_ALL.json new file mode 100644 index 00000000..7453dc17 --- /dev/null +++ b/s3/config/crm/last_fetch_datetime/ProcessInstanceStep_ALL.json @@ -0,0 +1,4 @@ +{ + "last_fetch_datetime_from": "1900-01-01T00:00:00.000Z", + "last_fetch_datetime_to": "" +} diff --git a/s3/config/crm/last_fetch_datetime/ProcessInstanceWorkitem.json b/s3/config/crm/last_fetch_datetime/ProcessInstanceWorkitem.json new file mode 100644 index 00000000..7453dc17 --- /dev/null +++ b/s3/config/crm/last_fetch_datetime/ProcessInstanceWorkitem.json @@ -0,0 +1,4 @@ +{ + "last_fetch_datetime_from": "1900-01-01T00:00:00.000Z", + "last_fetch_datetime_to": "" +} diff --git a/s3/config/crm/last_fetch_datetime/ProcessNode.json b/s3/config/crm/last_fetch_datetime/ProcessNode.json new file mode 100644 index 00000000..7453dc17 --- /dev/null +++ b/s3/config/crm/last_fetch_datetime/ProcessNode.json @@ -0,0 +1,4 @@ +{ + "last_fetch_datetime_from": "1900-01-01T00:00:00.000Z", + "last_fetch_datetime_to": "" +} diff --git a/s3/config/crm/last_fetch_datetime/ProcessNode_ALL.json b/s3/config/crm/last_fetch_datetime/ProcessNode_ALL.json new file mode 100644 index 00000000..7453dc17 --- /dev/null +++ b/s3/config/crm/last_fetch_datetime/ProcessNode_ALL.json @@ -0,0 +1,4 @@ +{ + "last_fetch_datetime_from": "1900-01-01T00:00:00.000Z", + "last_fetch_datetime_to": "" +} diff --git a/s3/data/crm/settings/CRM_Directory_vod__c.txt b/s3/data/crm/settings/CRM_Directory_vod__c.txt new file mode 100644 index 00000000..3db7cc48 --- /dev/null +++ b/s3/data/crm/settings/CRM_Directory_vod__c.txt @@ -0,0 +1,13 @@ +CRM +, +utf-8 +" +CRLF +1 +18 +Id,OwnerId,IsDeleted,Name,RecordTypeId,CreatedDate,CreatedById,LastModifiedDate,LastModifiedById,SystemModstamp,MayEdit,IsLocked,LastViewedDate,LastReferencedDate,Display_Order_vod__c,External_ID_vod__c,Level_vod__c,Parent_Directory_vod__c +Id,OwnerId,IsDeleted,Name,RecordTypeId,CreatedDate,CreatedById,LastModifiedDate,LastModifiedById,SystemModstamp,MayEdit,IsLocked,LastViewedDate,LastReferencedDate,Display_Order_vod__c,External_ID_vod__c,Level_vod__c,Parent_Directory_vod__c +src02.crm_Directory_vod__c +org02.crm_Directory_vod__c + + diff --git a/s3/data/crm/settings/CRM_ProcessDefinition.txt b/s3/data/crm/settings/CRM_ProcessDefinition.txt new file mode 100644 index 00000000..90d56974 --- /dev/null +++ b/s3/data/crm/settings/CRM_ProcessDefinition.txt @@ -0,0 +1,13 @@ +CRM +, +utf-8 +" +CRLF +1 +13 +Id,Name,DeveloperName,Type,Description,TableEnumOrId,LockType,State,CreatedDate,CreatedById,LastModifiedDate,LastModifiedById,SystemModstamp +Id,Name,DeveloperName,Type,Description,TableEnumOrId,LockType,State,CreatedDate,CreatedById,LastModifiedDate,LastModifiedById,SystemModstamp +src02.crm_ProcessDefinition +org02.crm_ProcessDefinition +CRM_ProcessDefinition_ex.sql + diff --git a/s3/data/crm/settings/CRM_ProcessDefinition_ALL.txt b/s3/data/crm/settings/CRM_ProcessDefinition_ALL.txt new file mode 100644 index 00000000..ac6f851b --- /dev/null +++ b/s3/data/crm/settings/CRM_ProcessDefinition_ALL.txt @@ -0,0 +1,14 @@ +CRM +, +utf-8 +" +CRLF +1 +13 +Id,Name,DeveloperName,Type,Description,TableEnumOrId,LockType,State,CreatedDate,CreatedById,LastModifiedDate,LastModifiedById,SystemModstamp +Id,Name,DeveloperName,Type,Description,TableEnumOrId,LockType,State,CreatedDate,CreatedById,LastModifiedDate,LastModifiedById,SystemModstamp +src02.crm_ProcessDefinition_all +org02.crm_ProcessDefinition_all +CRM_ProcessDefinition_ALL_ex.sql + +truncate_src_table:src02.crm_ProcessDefinition_all diff --git a/s3/data/crm/settings/CRM_ProcessDefinition_ALL_ex.sql b/s3/data/crm/settings/CRM_ProcessDefinition_ALL_ex.sql new file mode 100644 index 00000000..3b81f574 --- /dev/null +++ b/s3/data/crm/settings/CRM_ProcessDefinition_ALL_ex.sql @@ -0,0 +1 @@ +CALL internal02.crm_data_sync('src02.crm_ProcessDefinition', 'src02.crm_ProcessDefinition_all', 'SystemModstamp'); diff --git a/s3/data/crm/settings/CRM_ProcessDefinition_ex.sql b/s3/data/crm/settings/CRM_ProcessDefinition_ex.sql new file mode 100644 index 00000000..af83cf28 --- /dev/null +++ b/s3/data/crm/settings/CRM_ProcessDefinition_ex.sql @@ -0,0 +1 @@ +CALL internal02.crm_history('src02.crm_ProcessDefinition', 'SystemModstamp'); diff --git a/s3/data/crm/settings/CRM_ProcessInstance.txt b/s3/data/crm/settings/CRM_ProcessInstance.txt new file mode 100644 index 00000000..b3f9cd76 --- /dev/null +++ b/s3/data/crm/settings/CRM_ProcessInstance.txt @@ -0,0 +1,13 @@ +CRM +, +utf-8 +" +CRLF +1 +16 +Id,ProcessDefinitionId,TargetObjectId,Status,CompletedDate,LastActorId,ElapsedTimeInDays,ElapsedTimeInHours,ElapsedTimeInMinutes,SubmittedById,IsDeleted,CreatedDate,CreatedById,LastModifiedDate,LastModifiedById,SystemModstamp +Id,ProcessDefinitionId,TargetObjectId,Status,CompletedDate,LastActorId,ElapsedTimeInDays,ElapsedTimeInHours,ElapsedTimeInMinutes,SubmittedById,IsDeleted,CreatedDate,CreatedById,LastModifiedDate,LastModifiedById,SystemModstamp +src02.crm_ProcessInstance +org02.crm_ProcessInstance + + diff --git a/s3/data/crm/settings/CRM_ProcessInstanceNode.txt b/s3/data/crm/settings/CRM_ProcessInstanceNode.txt new file mode 100644 index 00000000..3c6e3063 --- /dev/null +++ b/s3/data/crm/settings/CRM_ProcessInstanceNode.txt @@ -0,0 +1,13 @@ +CRM +, +utf-8 +" +CRLF +1 +16 +Id,IsDeleted,CreatedDate,CreatedById,LastModifiedDate,LastModifiedById,SystemModstamp,ProcessInstanceId,ProcessNodeId,NodeStatus,CompletedDate,LastActorId,ProcessNodeName,ElapsedTimeInDays,ElapsedTimeInHours,ElapsedTimeInMinutes +Id,IsDeleted,CreatedDate,CreatedById,LastModifiedDate,LastModifiedById,SystemModstamp,ProcessInstanceId,ProcessNodeId,NodeStatus,CompletedDate,LastActorId,ProcessNodeName,ElapsedTimeInDays,ElapsedTimeInHours,ElapsedTimeInMinutes +src02.crm_ProcessInstanceNode +org02.crm_ProcessInstanceNode + + diff --git a/s3/data/crm/settings/CRM_ProcessInstanceStep.txt b/s3/data/crm/settings/CRM_ProcessInstanceStep.txt new file mode 100644 index 00000000..735ee3f4 --- /dev/null +++ b/s3/data/crm/settings/CRM_ProcessInstanceStep.txt @@ -0,0 +1,13 @@ +CRM +, +utf-8 +" +CRLF +1 +13 +Id,ProcessInstanceId,StepStatus,OriginalActorId,ActorId,Comments,StepNodeId,ElapsedTimeInDays,ElapsedTimeInHours,ElapsedTimeInMinutes,CreatedDate,CreatedById,SystemModstamp +Id,ProcessInstanceId,StepStatus,OriginalActorId,ActorId,Comments,StepNodeId,ElapsedTimeInDays,ElapsedTimeInHours,ElapsedTimeInMinutes,CreatedDate,CreatedById,SystemModstamp +src02.crm_ProcessInstanceStep +org02.crm_ProcessInstanceStep +CRM_ProcessInstanceStep_ex.sql + diff --git a/s3/data/crm/settings/CRM_ProcessInstanceStep_ALL.txt b/s3/data/crm/settings/CRM_ProcessInstanceStep_ALL.txt new file mode 100644 index 00000000..a1ea6a4f --- /dev/null +++ b/s3/data/crm/settings/CRM_ProcessInstanceStep_ALL.txt @@ -0,0 +1,14 @@ +CRM +, +utf-8 +" +CRLF +1 +13 +Id,ProcessInstanceId,StepStatus,OriginalActorId,ActorId,Comments,StepNodeId,ElapsedTimeInDays,ElapsedTimeInHours,ElapsedTimeInMinutes,CreatedDate,CreatedById,SystemModstamp +Id,ProcessInstanceId,StepStatus,OriginalActorId,ActorId,Comments,StepNodeId,ElapsedTimeInDays,ElapsedTimeInHours,ElapsedTimeInMinutes,CreatedDate,CreatedById,SystemModstamp +src02.crm_ProcessInstanceStep_all +org02.crm_ProcessInstanceStep_all +CRM_ProcessInstanceStep_ALL_ex.sql + +truncate_src_table:src02.crm_ProcessInstanceStep_all diff --git a/s3/data/crm/settings/CRM_ProcessInstanceStep_ALL_ex.sql b/s3/data/crm/settings/CRM_ProcessInstanceStep_ALL_ex.sql new file mode 100644 index 00000000..abb06152 --- /dev/null +++ b/s3/data/crm/settings/CRM_ProcessInstanceStep_ALL_ex.sql @@ -0,0 +1 @@ +CALL internal02.crm_data_sync('src02.crm_ProcessInstanceStep', 'src02.crm_ProcessInstanceStep_all', 'SystemModstamp'); diff --git a/s3/data/crm/settings/CRM_ProcessInstanceStep_ex.sql b/s3/data/crm/settings/CRM_ProcessInstanceStep_ex.sql new file mode 100644 index 00000000..39f0af64 --- /dev/null +++ b/s3/data/crm/settings/CRM_ProcessInstanceStep_ex.sql @@ -0,0 +1 @@ +CALL internal02.crm_history('src02.crm_ProcessInstanceStep', 'SystemModstamp'); diff --git a/s3/data/crm/settings/CRM_ProcessInstanceWorkitem.txt b/s3/data/crm/settings/CRM_ProcessInstanceWorkitem.txt new file mode 100644 index 00000000..7db5dc2a --- /dev/null +++ b/s3/data/crm/settings/CRM_ProcessInstanceWorkitem.txt @@ -0,0 +1,13 @@ +CRM +, +utf-8 +" +CRLF +1 +11 +Id,ProcessInstanceId,OriginalActorId,ActorId,ElapsedTimeInDays,ElapsedTimeInHours,ElapsedTimeInMinutes,IsDeleted,CreatedDate,CreatedById,SystemModstamp +Id,ProcessInstanceId,OriginalActorId,ActorId,ElapsedTimeInDays,ElapsedTimeInHours,ElapsedTimeInMinutes,IsDeleted,CreatedDate,CreatedById,SystemModstamp +src02.crm_ProcessInstanceWorkitem +org02.crm_ProcessInstanceWorkitem + + diff --git a/s3/data/crm/settings/CRM_ProcessNode.txt b/s3/data/crm/settings/CRM_ProcessNode.txt new file mode 100644 index 00000000..ab97d394 --- /dev/null +++ b/s3/data/crm/settings/CRM_ProcessNode.txt @@ -0,0 +1,13 @@ +CRM +, +utf-8 +" +CRLF +1 +6 +Id,Name,DeveloperName,ProcessDefinitionId,Description,SystemModstamp +Id,Name,DeveloperName,ProcessDefinitionId,Description,SystemModstamp +src02.crm_ProcessNode +org02.crm_ProcessNode +CRM_ProcessNode_ex.sql + diff --git a/s3/data/crm/settings/CRM_ProcessNode_ALL.txt b/s3/data/crm/settings/CRM_ProcessNode_ALL.txt new file mode 100644 index 00000000..6aea379d --- /dev/null +++ b/s3/data/crm/settings/CRM_ProcessNode_ALL.txt @@ -0,0 +1,14 @@ +CRM +, +utf-8 +" +CRLF +1 +6 +Id,Name,DeveloperName,ProcessDefinitionId,Description,SystemModstamp +Id,Name,DeveloperName,ProcessDefinitionId,Description,SystemModstamp +src02.crm_ProcessNode_all +org02.crm_ProcessNode_all +CRM_ProcessNode_ALL_ex.sql + +truncate_src_table:src02.crm_ProcessNode_all diff --git a/s3/data/crm/settings/CRM_ProcessNode_ALL_ex.sql b/s3/data/crm/settings/CRM_ProcessNode_ALL_ex.sql new file mode 100644 index 00000000..b81a5836 --- /dev/null +++ b/s3/data/crm/settings/CRM_ProcessNode_ALL_ex.sql @@ -0,0 +1 @@ +CALL internal02.crm_data_sync('src02.crm_ProcessNode', 'src02.crm_ProcessNode_all', 'SystemModstamp'); diff --git a/s3/data/crm/settings/CRM_ProcessNode_ex.sql b/s3/data/crm/settings/CRM_ProcessNode_ex.sql new file mode 100644 index 00000000..1d8d6918 --- /dev/null +++ b/s3/data/crm/settings/CRM_ProcessNode_ex.sql @@ -0,0 +1 @@ +CALL internal02.crm_history('src02.crm_ProcessNode', 'SystemModstamp');