Skip to content

Instantly share code, notes, and snippets.

@anand086
Created November 10, 2021 05:01
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save anand086/c4b43b1c31b6221f41af9e136a43117a to your computer and use it in GitHub Desktop.
Save anand086/c4b43b1c31b6221f41af9e136a43117a to your computer and use it in GitHub Desktop.
CREATE EXTERNAL TABLE `source_citibike`(
`starttime` string,
`stoptime` string,
`start_station_id` bigint,
`start_station_name` string,
`start_station_latitude` double,
`start_station_longitude` double,
`end_station_id` bigint,
`end_station_name` string,
`end_station_latitude` double,
`end_station_longitude` double,
`bikeid` bigint,
`usertype` string,
`birth_year` bigint,
`gender` bigint)
PARTITIONED BY (
`partition_0` string)
ROW FORMAT DELIMITED
FIELDS TERMINATED BY ','
STORED AS INPUTFORMAT
'org.apache.hadoop.mapred.TextInputFormat'
OUTPUTFORMAT
'org.apache.hadoop.hive.ql.io.HiveIgnoreKeyTextOutputFormat'
LOCATION
's3://learn-share-repeat-us-west-2/source/citibike/'
TBLPROPERTIES (
'CrawlerSchemaDeserializerVersion'='1.0',
'CrawlerSchemaSerializerVersion'='1.0',
'areColumnsQuoted'='false',
'averageRecordSize'='175',
'classification'='csv',
'columnsOrdered'='true',
'compressionType'='none',
'delimiter'=',',
'objectCount'='2',
'recordCount'='19656',
'sizeKey'='3440024',
'skip.header.line.count'='1',
'typeOfData'='file')
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment