Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
$ SHOW CREATE TABLE airbnb_db.listing_meta;
+----------------------------------------------------+
| createtab_stmt |
+----------------------------------------------------+
| CREATE EXTERNAL TABLE `airbnb_db.listing_meta`( |
| `listing_id` bigint, |
| `listing_name` string, |
| `listing_url` string, |
| `property_type` string, |
| `country` string, |
| `state` string, |
| `city` string, |
| `description` string) |
| COMMENT 'Airbnb Listing Meta' |
| PARTITIONED BY ( |
| `dt` string) |
| ROW FORMAT SERDE |
| 'org.apache.hadoop.hive.ql.io.parquet.serde.ParquetHiveSerDe' |
| WITH SERDEPROPERTIES ( |
| 'path'='s3://airbnb-data-lake/db/listing_meta') |
| STORED AS INPUTFORMAT |
| 'org.apache.hadoop.hive.ql.io.parquet.MapredParquetInputFormat' |
| OUTPUTFORMAT |
| 'org.apache.hadoop.hive.ql.io.parquet.MapredParquetOutputFormat' |
| LOCATION |
| 's3://airbnb-data-lake/db/listing_meta' |
| TBLPROPERTIES ( |
| 'spark.sql.create.version'='3.1.2', |
| 'spark.sql.partitionProvider'='catalog', |
| 'spark.sql.sources.provider'='PARQUET', |
| 'spark.sql.sources.schema.numPartCols'='1', |
| 'spark.sql.sources.schema.numParts'='1', |
| 'spark.sql.sources.schema.part.0'='{"type":"struct","fields":[{"name":"listing_id","type":"long","nullable":true,"metadata":{}},{"name":"listing_name","type":"string","nullable":true,"metadata":{}},{"name":"listing_url","type":"string","nullable":true,"metadata":{}},{"name":"property_type","type":"string","nullable":true,"metadata":{}},{"name":"country","type":"string","nullable":true,"metadata":{}},{"name":"state","type":"string","nullable":true,"metadata":{}},{"name":"city","type":"string","nullable":true,"metadata":{}},{"name":"description","type":"string","nullable":true,"metadata":{}},{"name":"dt","type":"string","nullable":true,"metadata":{}}]}', |
| 'spark.sql.sources.schema.partCol.0'='dt', |
| 'transient_lastDdlTime'='1636168577') |
+----------------------------------------------------+
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment