LOAD DATA LOCAL INFILE "C:\\Users\\Javi\\Dropbox\\Master MISTIC\\TFM\\PEC3\\Mft2Csv_2017-12-21_15-26-05\\Mft_2017-12-21_15-26-05.csv"
INTO TABLE mft
CHARACTER SET 'latin1'
COLUMNS TERMINATED BY '|'
OPTIONALLY ENCLOSED BY '"'
ESCAPED BY '"'
LINES TERMINATED BY '\n'
IGNORE 1 LINES
(`RecordOffset`, `Signature`, `IntegrityCheck`, `Style`, @HEADER_MFTREcordNumber, @HEADER_SequenceNo, @Header_HardLinkCount, @FN_ParentReferenceNo, @FN_ParentSequenceNo, `FN_FileName`, `FilePath`, `HEADER_Flags`, `RecordActive`, @FileSizeBytes, `SI_FilePermission`, `FN_Flags`, `FN_NameType`, @ADS, @SI_CTime, @SI_ATime, @SI_MTime, @SI_RTime, @MSecTest, @FN_CTime, @FN_ATime, @FN_MTime, @FN_RTime, @CTimeTest, @FN_AllocSize, @FN_RealSize, @FN_EaSize, @SI_USN, `DATA_Name`, `DATA_Flags`, @DATA_LengthOfAttribute, @DATA_IndexedFlag, @DATA_VCNs, @DATA_NonResidentFlag, @DATA_CompressionUnitSize, @HEADER_LSN, @HEADER_RecordRealSize, @HEADER_RecordAllocSize, @HEADER_BaseRecord, @HEADER_BaseRecSeqNo, `HEADER_NextAttribID`, @DATA_AllocatedSize, @DATA_RealSize, @DATA_InitializedStreamSize, `SI_HEADER_Flags`, @SI_MaxVersions, @SI_VersionNumber, @SI_ClassID, @SI_OwnerID, @SI_SecurityID, @SI_Quota, @FN_CTime_2, @FN_ATime_2, @FN_MTime_2, @FN_RTime_2, @FN_AllocSize_2, @FN_RealSize_2, @FN_EaSize_2, `FN_Flags_2`, @FN_NameLength_2, `FN_NameType_2`, `FN_FileName_2`, `GUID_ObjectID`, `GUID_BirthVolumeID`, `GUID_BirthObjectID`, `GUID_BirthDomainID`, `VOLUME_NAME_NAME`, `VOL_INFO_NTFS_VERSION`, `VOL_INFO_FLAGS`, @FN_CTime_3, @FN_ATime_3, @FN_MTime_3, @FN_RTime_3, @FN_AllocSize_3, @FN_RealSize_3, @FN_EaSize_3, `FN_Flags_3`, @FN_NameLength_3, `FN_NameType_3`, `FN_FileName_3`, `DATA_Name_2`, @DATA_NonResidentFlag_2, `DATA_Flags_2`, @DATA_LengthOfAttribute_2, @DATA_IndexedFlag_2, @DATA_StartVCN_2, @DATA_LastVCN_2, @DATA_VCNs_2, @DATA_CompressionUnitSize_2, @DATA_AllocatedSize_2, @DATA_RealSize_2, @DATA_InitializedStreamSize_2, `DATA_Name_3`, @DATA_NonResidentFlag_3, `DATA_Flags_3`, @DATA_LengthOfAttribute_3, @DATA_IndexedFlag_3, @DATA_StartVCN_3, @DATA_LastVCN_3, @DATA_VCNs_3, @DATA_CompressionUnitSize_3, @DATA_AllocatedSize_3, @DATA_RealSize_3, @DATA_InitializedStreamSize_3, `STANDARD_INFORMATION_ON`, `ATTRIBUTE_LIST_ON`, `FILE_NAME_ON`, `OBJECT_ID_ON`, `SECURITY_DESCRIPTOR_ON`, `VOLUME_NAME_ON`, `VOLUME_INFORMATION_ON`, `DATA_ON`, `INDEX_ROOT_ON`, `INDEX_ALLOCATION_ON`, `BITMAP_ON`, `REPARSE_POINT_ON`, `EA_INFORMATION_ON`, `EA_ON`, `PROPERTY_SET_ON`, `LOGGED_UTILITY_STREAM_ON`)
SET 
HEADER_MFTREcordNumber = nullif(@HEADER_MFTREcordNumber,''),
HEADER_SequenceNo = nullif(@HEADER_SequenceNo,''),
Header_HardLinkCount = nullif(@Header_HardLinkCount,''),
FN_ParentReferenceNo = nullif(@FN_ParentReferenceNo,''),
FN_ParentSequenceNo = nullif(@FN_ParentSequenceNo,''),
FileSizeBytes = nullif(@FileSizeBytes,''),
ADS = nullif(@ADS,''),
SI_CTime = nullif(@SI_CTime,''),
SI_ATime = nullif(@SI_ATime,''),
SI_MTime = nullif(@SI_MTime,''),
SI_RTime = nullif(@SI_RTime,''),
MSecTest = nullif(@MSecTest,''),
FN_CTime = nullif(@FN_CTime,''),
FN_ATime = nullif(@FN_ATime,''),
FN_MTime = nullif(@FN_MTime,''),
FN_RTime = nullif(@FN_RTime,''),
CTimeTest = nullif(@CTimeTest,''),
FN_AllocSize = nullif(@FN_AllocSize,''),
FN_RealSize = nullif(@FN_RealSize,''),
FN_EaSize = nullif(@FN_EaSize,''),
SI_USN = nullif(@SI_USN,''),
DATA_LengthOfAttribute = nullif(@DATA_LengthOfAttribute,''),
DATA_IndexedFlag = nullif(@DATA_IndexedFlag,''),
DATA_VCNs = nullif(@DATA_VCNs,''),
DATA_NonResidentFlag = nullif(@DATA_NonResidentFlag,''),
DATA_CompressionUnitSize = nullif(@DATA_CompressionUnitSize,''),
HEADER_LSN = nullif(@HEADER_LSN,''),
HEADER_RecordRealSize = nullif(@HEADER_RecordRealSize,''),
HEADER_RecordAllocSize = nullif(@HEADER_RecordAllocSize,''),
HEADER_BaseRecord = nullif(@HEADER_BaseRecord,''),
HEADER_BaseRecSeqNo = nullif(@HEADER_BaseRecSeqNo,''),
DATA_AllocatedSize = nullif(@DATA_AllocatedSize,''),
DATA_RealSize = nullif(@DATA_RealSize,''),
DATA_InitializedStreamSize = nullif(@DATA_InitializedStreamSize,''),
SI_MaxVersions = nullif(@SI_MaxVersions,''),
SI_VersionNumber = nullif(@SI_VersionNumber,''),
SI_ClassID = nullif(@SI_ClassID,''),
SI_OwnerID = nullif(@SI_OwnerID,''),
SI_SecurityID = nullif(@SI_SecurityID,''),
SI_Quota = nullif(@SI_Quota,''),
FN_CTime_2 = nullif(@FN_CTime_2,''),
FN_ATime_2 = nullif(@FN_ATime_2,''),
FN_MTime_2 = nullif(@FN_MTime_2,''),
FN_RTime_2 = nullif(@FN_RTime_2,''),
FN_AllocSize_2 = nullif(@FN_AllocSize_2,''),
FN_RealSize_2 = nullif(@FN_RealSize_2,''),
FN_EaSize_2 = nullif(@FN_EaSize_2,''),
FN_NameLength_2 = nullif(@FN_NameLength_2,''),
FN_CTime_3 = nullif(@FN_CTime_3,''),
FN_ATime_3 = nullif(@FN_ATime_3,''),
FN_MTime_3 = nullif(@FN_MTime_3,''),
FN_RTime_3 = nullif(@FN_RTime_3,''),
FN_AllocSize_3 = nullif(@FN_AllocSize_3,''),
FN_RealSize_3 = nullif(@FN_RealSize_3,''),
FN_EaSize_3 = nullif(@FN_EaSize_3,''),
FN_NameLength_3 = nullif(@FN_NameLength_3,''),
DATA_NonResidentFlag_2 = nullif(@DATA_NonResidentFlag_2,''),
DATA_LengthOfAttribute_2 = nullif(@DATA_LengthOfAttribute_2,''),
DATA_IndexedFlag_2 = nullif(@DATA_IndexedFlag_2,''),
DATA_StartVCN_2 = nullif(@DATA_StartVCN_2,''),
DATA_LastVCN_2 = nullif(@DATA_LastVCN_2,''),
DATA_VCNs_2 = nullif(@DATA_VCNs_2,''),
DATA_CompressionUnitSize_2 = nullif(@DATA_CompressionUnitSize_2,''),
DATA_AllocatedSize_2 = nullif(@DATA_AllocatedSize_2,''),
DATA_RealSize_2 = nullif(@DATA_RealSize_2,''),
DATA_InitializedStreamSize_2 = nullif(@DATA_InitializedStreamSize_2,''),
DATA_NonResidentFlag_3 = nullif(@DATA_NonResidentFlag_3,''),
DATA_LengthOfAttribute_3 = nullif(@DATA_LengthOfAttribute_3,''),
DATA_IndexedFlag_3 = nullif(@DATA_IndexedFlag_3,''),
DATA_StartVCN_3 = nullif(@DATA_StartVCN_3,''),
DATA_LastVCN_3 = nullif(@DATA_LastVCN_3,''),
DATA_VCNs_3 = nullif(@DATA_VCNs_3,''),
DATA_CompressionUnitSize_3 = nullif(@DATA_CompressionUnitSize_3,''),
DATA_AllocatedSize_3 = nullif(@DATA_AllocatedSize_3,''),
DATA_RealSize_3 = nullif(@DATA_RealSize_3,''),
DATA_InitializedStreamSize_3 = nullif(@DATA_InitializedStreamSize_3,'')
;