[Microsoft-SSIS] int和bigint

Dana Huang
Jan 16, 2021

這周做資料,竟然是被這種格式給打敗,狀況是這樣的…

我有一個產品總金額的欄位,我設定為整數值(int),最近的數字過高,超過2³¹-1,這麼驚人的數字,所以insert不進去資料庫,這讓我才發現還有bigint這樣的資料格式。

因為在SSIS上load資料的advanced editor仍無法讓欄位格式在此順利轉換,我便加上一個data conversion的步驟便讓ETL這段順利改好欄位格式了,另外也有被建議,未來即時要用整數格式的資料,也還是能設定為float或decimal取整數位就好,這樣就不用擔心數字過大導致資料溢位的問題了。

以上在資料庫調整算不難,但是進到SSAS後,等於原始cube這個欄位格式都需要更新,這之中也會有一些眉角,不然也會發生deploy process無法通過的問題喔!詳情我再到下一篇來說說。

資料來源:

https://docs.microsoft.com/zh-tw/sql/t-sql/data-types/int-bigint-smallint-and-tinyint-transact-sql?view=sql-server-ver15

Sign up to discover human stories that deepen your understanding of the world.

Free

Distraction-free reading. No ads.

Organize your knowledge with lists and highlights.

Tell your story. Find your audience.

Membership

Read member-only stories

Support writers you read most

Earn money for your writing

Listen to audio narrations

Read offline with the Medium app

Dana Huang
Dana Huang

Written by Dana Huang

我做數據處理的工作已超過五年,從資料驗證、報表整理到自動化呈現,形形色色的工具真的用不完,突然覺得透過網址寫寫寫心路歷程還不錯!另外也記錄一些生活、工作與理財相關的心情記錄與訊息!

No responses yet

Write a response