bulk insert formatFile格式記錄

來源:互聯網
上載者:User

自己對一個典型的formatFile格式進行了注釋,方便以後查看。

<?xml version="1.0"?>
<BCPFORMAT xmlns="http://schemas.microsoft.com/sqlserver/2004/bulkload/format" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
  <!--This node is used for SSIS to locate records in bulk files, the sequences and ids of the fields here should exactly the same with data's physical position in files.-->
  <RECORD xmlns="">
    <FIELD ID="1" xsi:type="NativeFixed" LENGTH="4" />
    <FIELD ID="2" xsi:type="NativeFixed" LENGTH="8" />
    <FIELD ID="3" xsi:type="NativeFixed" LENGTH="8" />
    <FIELD ID="4" xsi:type="NativeFixed" LENGTH="2" />
    <FIELD ID="5" xsi:type="NativeFixed" LENGTH="1" />
    <FIELD ID="6" xsi:type="NativeFixed" LENGTH="8" />
    <FIELD ID="7" xsi:type="NativeFixed" LENGTH="8" />
    <FIELD ID="8" xsi:type="NativeFixed" LENGTH="8" />
    <FIELD ID="9" xsi:type="NativeFixed" LENGTH="8" />
    <FIELD ID="10" xsi:type="NativeFixed" LENGTH="2" />
  </RECORD>
  <!--This node is used for describing the target table. The field ‘SOURCE’ is used to map with the RECORD/FIELD[ID], And the sequence of the COLUMN is used to do the data output, which should exactly the same sequence with the schema of the target table.-->
  <ROW xmlns="">
<COLUMN SOURCE="1" NAME="ProfileID" xsi:type="SQLINT" />
    <!--It tells us, “I am the 10th field in file, but the 2nd Column in table”-->
    <COLUMN SOURCE="10" NAME="LeafBitmap" xsi:type="SQLSMALLINT" />
    <COLUMN SOURCE="2" NAME="SegmentID" xsi:type="SQLBIGINT" />   
    <COLUMN SOURCE="4" NAME="Date" xsi:type="SQLSMALLINT" />
    <COLUMN SOURCE="5" NAME="ItemCategoryID" xsi:type="SQLTINYINT" />
    <COLUMN SOURCE="6" NAME="ItemID" xsi:type="SQLBIGINT" />
    <COLUMN SOURCE="7" NAME="ActivityTotal" xsi:type="SQLBIGINT" />
    <COLUMN SOURCE="8" NAME="SessionTotal" xsi:type="SQLBIGINT" />
    <COLUMN SOURCE="9" NAME="SessionCarryTotal" xsi:type="SQLBIGINT" />
    <COLUMN SOURCE="3" NAME="ParentItemId" xsi:type="SQLBIGINT" />  
  </ROW>
</BCPFORMAT>

聯繫我們

該頁面正文內容均來源於網絡整理,並不代表阿里雲官方的觀點,該頁面所提到的產品和服務也與阿里云無關,如果該頁面內容對您造成了困擾,歡迎寫郵件給我們,收到郵件我們將在5個工作日內處理。

如果您發現本社區中有涉嫌抄襲的內容,歡迎發送郵件至: info-contact@alibabacloud.com 進行舉報並提供相關證據,工作人員會在 5 個工作天內聯絡您,一經查實,本站將立刻刪除涉嫌侵權內容。

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.