hadoop - Stop sqoop from converting datetime to bigint -
recently noticed whenever ingest sql database using sqoop, datetime fields converted bigint (epoch * 1000) instead of string.
important note: i'm storing parquet.
i have been trying bunch of sqoop flags "--map-column-java"
don't want manually define hundreds of columns in thousands of tables.
what flag missing prevent sqoop behaviour?
it seems sqoop didn't when storing in plain text.
instead of letting sqoop arcane magic on tables, decided following:
- ingest temporary table, stored text.
- create table (if not exists) temporary table, stored parquet
- insert overwrite text stored temporary table parquet stored table
this allows proper date formatting without hassle (maybe not existing) configuration , settings tweaking in sqoop.
the tradoff it's slower
Comments
Post a Comment