Friday, October 22, 2021

.::: Latihan SSIS convert csv file to SQL / MSSQL :::.



1. Create database on SQL Server 
create database LatSSIS;
use LatSSIS;
go

create table barang(
KODE_BARANG char(6) not null ,
NAMA_BARANG varchar(25), 
SATUAN_BARANG varchar(20),
STOK_BARANG decimal(4),
KETERANGAN varchar(50),
primary key (KODE_BARANG));

2. create file latBI.txt on notepad 
KODE_BARANG,NAMA_BARANG,SATUAN_BARANG,STOK_BARANG,KETERANGAN
ELK-01,RICE COOKER,BUAH,20,1 RUSAK
ELK-02,LEMARI ES,UNIT,8,
ELK-03,TELEVISI,UNIT,30,
ELK-04,RADIO/TAPE,BUAH,35,BAGUS SEMUA
ELK-05,KOMPUTER,UNIT,28,BAGUS SEMUA
ELK-06,KIPAS ANGIN,BUAH,38,BAGUS SEMUA

3. Double Click/ Drag Data Flow Task -> Control Flow

4. Double Click Control Flow -> Data Flow 

5. Drag Other Sources -> Flat File Source 

6. Flat File Source Editor -> Create Connection manager 

7. Drag Other Destinations -> ADO Net Destinations 

8. Double Click ADO Net Destination -> Configure Connection manager 

9. start

10. check sql server  


























No comments:

Post a Comment

Popular Posts