Use the td schema:set command to annotate schema:

  • where <column_name> consists of lowercase alphabets, numbers, and "_" only

  • where <type> can be one of the following:int, long, double, float, string, array<T>

$ td schema:set <database> <table> <column_name>:<type>...

For this example, the schema would be added as follows:

td schema:set testdb www_access action:string labels:'array<string>' user:int

Treasure Data, Presto, and Hive Schema Differences

Treasure Data

Presto

Hive

int

bigint

smallint

int

bigint

int

long

bigint

bigint

double

double

decimal

float

double

float

double

double

double

Convert to string or int

boolean

boolean

string

varchar

string or varchar

string or Convert to long

date

string

string or Convert to long

timestamp

timestamp

See also:

  • No labels