# SSIS 流程圖

## 控制流程

![](https://3752877902-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F7DfNl1Cofd06ecmkf5BH%2Fuploads%2FE1SpjZscZbMe1WchcXVj%2Fimage.png?alt=media\&token=803d2741-1de8-48b8-9ad4-d4df3b6c27ae)

## 資料流程

### Get API Chart & Quote

![](https://3752877902-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F7DfNl1Cofd06ecmkf5BH%2Fuploads%2FRwbl1iAnlPAiqVuKJftt%2Fimage.png?alt=media\&token=dd6651dc-0f90-4f3c-a834-114d38233e6f)

### Deserialize JSON & Insert Into Table - Chart

![](https://3752877902-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F7DfNl1Cofd06ecmkf5BH%2Fuploads%2FpOtWgIqL1MgTfv1wAB4q%2Fimage.png?alt=media\&token=477e2f16-7927-46f8-8286-370218690bdc)

### Deserialize JSON & Insert Into Table - Quote

![](https://3752877902-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F7DfNl1Cofd06ecmkf5BH%2Fuploads%2FfmPkhs9Bx6fLqtCEI0Tp%2Fimage.png?alt=media\&token=c09eed59-9b07-4472-b7f8-6208672ad2cb)

## 連接管理員

* Chart\_Backup、Quote\_：Backup檔案連接管理員，用於備份檔案路徑。
* ErrorFile\_Char&#x74;*、*&#x45;rrorFile\_Quote：檔案連接管理員，當反序列化 JSON 或是 Insert Into Table 執行生發錯誤時，將錯誤 JSON 檔案移動至 ErrorFile 資料夾。
* Source File\_Stock Code：自訂股票代號 txt 的檔案路徑。
* Stock\_API：OLE DB 資料庫連線。

![](https://3752877902-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F7DfNl1Cofd06ecmkf5BH%2Fuploads%2F4Tcs0QhgMomRQFgqsDjN%2Fimage.png?alt=media\&token=1f368d9f-87f4-4f1a-936f-a57449027256)

## 事件處理常式

### 可執行檔：Package（OnError）

![](https://3752877902-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F7DfNl1Cofd06ecmkf5BH%2Fuploads%2Fq2ddwtSFJumHaFwLt1WG%2Fimage.png?alt=media\&token=9bf76c65-c434-4017-b59b-667cd12e9198)

### 可執行檔：Deserialize JSON & Insert Into Table - Chart（OnError）

![](https://3752877902-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F7DfNl1Cofd06ecmkf5BH%2Fuploads%2FZd6nqCKN52ZbgnV8lVD2%2Fimage.png?alt=media\&token=3cf322cc-43ba-4f80-a526-e54b55d45f6a)

### 可執行檔：Deserialize JSON & Insert Into Table - Quote（OnError）

![](https://3752877902-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F7DfNl1Cofd06ecmkf5BH%2Fuploads%2FTqK0uHki7rDACEwzT3LM%2Fimage.png?alt=media\&token=aed054e1-5def-4bcc-94a7-e078992941fc)
