列舉 | |
---|---|
COLUMN_DATA_TYPE_UNSPECIFIED |
預設列舉值,對型別沒有影響。請勿使用。 |
COLUMN_DATA_TYPE_STRING |
關聯資料欄應視為字串 (如果檔案是 CSV 格式,則編碼方式應與輸入檔案相同)。如果系統自動將資料欄偵測為數值,這項功能就非常實用。 |
COLUMN_DATA_TYPE_NUMERIC |
關聯資料欄應視為數值 (適用於沒有資料的資料欄,這類資料欄預設會變成字串)。 |
COLUMN_DATA_TYPE_LONG |
相關聯的資料欄應視為 long。 |
ColumnDataType
除非另有註明,否則本頁面中的內容是採用創用 CC 姓名標示 4.0 授權,程式碼範例則為阿帕契 2.0 授權。詳情請參閱《Google Developers 網站政策》。Java 是 Oracle 和/或其關聯企業的註冊商標。
上次更新時間:2025-07-26 (世界標準時間)。
[null,null,["上次更新時間:2025-07-26 (世界標準時間)。"],[[["\u003cp\u003eEnums specify the data type of a column in a dataset.\u003c/p\u003e\n"],["\u003cp\u003e\u003ccode\u003eCOLUMN_DATA_TYPE_STRING\u003c/code\u003e, \u003ccode\u003eCOLUMN_DATA_TYPE_NUMERIC\u003c/code\u003e, and \u003ccode\u003eCOLUMN_DATA_TYPE_LONG\u003c/code\u003e enums enforce specific data type interpretations for columns.\u003c/p\u003e\n"],["\u003cp\u003e\u003ccode\u003eCOLUMN_DATA_TYPE_UNSPECIFIED\u003c/code\u003e is a default value and should not be used.\u003c/p\u003e\n"],["\u003cp\u003eThese enums are particularly helpful when a column's data type is auto-detected incorrectly or when dealing with empty columns.\u003c/p\u003e\n"]]],[],null,["# ColumnDataType\n\n| Enums ||\n|--------------------------------|---------------------------------------------------------------------------------------------------------------------------------------------------------------------|\n| `COLUMN_DATA_TYPE_UNSPECIFIED` | Default enum value, no effect on types. Do not use. |\n| `COLUMN_DATA_TYPE_STRING` | The associated column should be treated as a string (in the same encoding as the input file, if the file is CSV). Useful if the column is auto-detected as numeric. |\n| `COLUMN_DATA_TYPE_NUMERIC` | The associated column should be treated as a numeric (useful for columns with no data, which become strings by default). |\n| `COLUMN_DATA_TYPE_LONG` | The associated column should be treated as a long. |"]]