Menu

Loading Files with Different Date Formats per Column in GBase 8a
📰

Loading Files with Different Date Formats per Column in GBase 8a

DEV Community: database·Michael·11 days ago
#iJDsgOAm
#devtodatabase#devto#dev#date#gbase
Long article (281 words) — no AI summary yet.
Reading 0:00
15s threshold

GBase 8a, the China-domestically developed MPP analytical database from GBASE, lets you declare a date format when loading data. But what if one file mixes formats — the first date column as year-month-day and the second as month-day-year? The gbase loader handles this per column through table_fields , so the file can go in as-is.

Date formats apply to date , datetime , timestamp , and time columns.

Table Definition

A three-column table where d1 and d2 are both date :

gbase > create table td1 ( id int , d1 date , d2 date ) ; Query OK , 0 rows affected ( Elapsed : 00 : 00 : 00.18 )

Enter fullscreen mode

Exit fullscreen mode

Sample Data

td1.txt , comma-separated.…

Continue reading — create a free account

Join HashtagPLUS to read full articles, follow hashtags, vote, and join the conversation.