| | 21 | == 資料表建置 == |
| | 22 | * 編輯資料表綱要 |
| | 23 | {{{ |
| | 24 | $ vim gse.hql |
| | 25 | CREATE TABLE GSEFamily ( |
| | 26 | 'Sample-iid', |
| | 27 | 'Supplementary-Data', |
| | 28 | Description |
| | 29 | ); |
| | 30 | }}} |
| | 31 | * 建立GSEFamily資料表 |
| | 32 | {{{ |
| | 33 | $ hypertable --batch < gse.hql |
| | 34 | }}} |
| | 35 | * 透過轉檔程式產生GSEFamily.tsv |
| | 36 | * [http://trac.nchc.org.tw/grid/wiki/BioInfo_Project/2008-04-10 轉檔程式](windows) |
| | 37 | {{{ |
| | 38 | C:\> GSEXmlParser.exe -f tsv -i GSE2109_family.xml -o GSEFamily.tsv |
| | 39 | }}} |
| | 40 | * 匯入資料到GSEFamily資料表 |
| | 41 | {{{ |
| | 42 | $ load data infile "GSEFamily.tsv" into table GSEFamily; |
| | 43 | }}} |
| | 44 | * 以Hql Command模式登入hypertable |
| | 45 | {{{ |
| | 46 | $ hypertable |
| | 47 | }}} |
| | 48 | * 搜尋資料 |
| | 49 | {{{ |
| | 50 | hypertable> select * from GSEFamily; |
| | 51 | hypertable> select "Supplementary-Data" from GSEFamily; |
| | 52 | hypertable> select "Sample-iid" from GSEFamily; |
| | 53 | hypertable> select "Description" from GSEFamily; |
| | 54 | }}} |
| | 55 | * 刪除資料 |
| | 56 | {{{ |
| | 57 | hypertable> delete * from GSEFamily where ROW="Breast"; |
| | 58 | }}} |
| | 59 | |
| | 60 | == Hadoop整合 == |