tables_transactional.json 3.6 KB

123456789101112131415161718192021222324252627282930313233343536
  1. [
  2. {
  3. "data_file": "sample_07.csv",
  4. "create_sql": "CREATE TABLE `sample_07` (\n `code` string ,\n `description` string ,\n `total_emp` int ,\n `salary` int )\nSTORED AS parquet\nTBLPROPERTIES ('transactional'='true', 'transactional_properties'='insert_only')\n",
  5. "table_name": "sample_07",
  6. "transactional": true,
  7. "dialects": ["hive", "impala"]
  8. },
  9. {
  10. "data_file": "sample_08.csv",
  11. "create_sql": "CREATE TABLE `sample_08` (\n `code` string ,\n `description` string ,\n `total_emp` int ,\n `salary` int )\nSTORED AS parquet\nTBLPROPERTIES ('transactional'='true', 'transactional_properties'='insert_only')\n",
  12. "table_name": "sample_08",
  13. "transactional": true,
  14. "dialects": ["hive", "impala"]
  15. },
  16. {
  17. "data_file": "customers.parquet",
  18. "create_sql": "CREATE TABLE `customers` (\n `id` INT,\n `name` STRING,\n `email_preferences` STRUCT<`email_format`:STRING, `frequency`:STRING, `categories`:STRUCT<`promos`:BOOLEAN, `surveys`:BOOLEAN>>,\n `addresses` MAP<STRING, STRUCT<`street_1`:STRING, `street_2`:STRING, `city`:STRING, `state`:STRING, `zip_code`:STRING>>,\n `orders` ARRAY<STRUCT<`order_id`:STRING, `order_date`:STRING, `items`:ARRAY<STRUCT<`product_id`:INT, `sku`:STRING, `name`:STRING, `price`:DOUBLE, `qty`:INT>>>>)\nSTORED AS PARQUET\nTBLPROPERTIES ('transactional'='false')\n",
  19. "table_name": "customers",
  20. "transactional": false,
  21. "dialects": ["hive", "impala"]
  22. },
  23. {
  24. "partition_files": {
  25. "`date`='2015-11-18'": "web_logs_1.csv",
  26. "`date`='2015-11-19'": "web_logs_2.csv",
  27. "`date`='2015-11-20'": "web_logs_3.csv",
  28. "`date`='2015-11-21'": "web_logs_4.csv"
  29. },
  30. "create_sql": "CREATE TABLE `web_logs` ( `_version_` bigint, `app` string, `bytes` int, `city` string, `client_ip` string, `code` smallint, `country_code` string, `country_code3` string, `country_name` string, `device_family` string, `extension` string, `latitude` float, `longitude` float, `method` string, `os_family` string, `os_major` string, `protocol` string, `record` string, `referer` string, `region_code` string, `request` string, `subapp` string, `time` string, `url` string, `user_agent` string, `user_agent_family` string, `user_agent_major` string, `id` string)\nPARTITIONED BY ( `date` string )\nSTORED AS parquet\nTBLPROPERTIES ('transactional'='true', 'transactional_properties'='insert_only')",
  31. "table_name": "web_logs",
  32. "columns": [{"name": "_version_", "type": "bigint"}, {"name": "app", "type": "string"}, {"name": "bytes", "type": "int"}, {"name": "city", "type": "string"}, {"name": "client_ip", "type": "string"}, {"name": "code", "type": "smallint"}, {"name": "country_code", "type": "string"}, {"name": "country_code3", "type": "string"}, {"name": "country_name", "type": "string"}, {"name": "device_family", "type": "string"}, {"name": "extension", "type": "string"}, {"name": "latitude", "type": "float"}, {"name": "longitude", "type": "float"}, {"name": "method", "type": "string"}, {"name": "os_family", "type": "string"}, {"name": "os_major", "type": "string"}, {"name": "protocol", "type": "string"}, {"name": "record", "type": "string"}, {"name": "referer", "type": "string"}, {"name": "region_code", "type": "string"}, {"name": "request", "type": "string"}, {"name": "subapp", "type": "string"}, {"name": "time", "type": "string"}, {"name": "url", "type": "string"}, {"name": "user_agent", "type": "string"}, {"name": "user_agent_family", "type": "string"}, {"name": "user_agent_major", "type": "string"}, {"name": "id", "type": "string"}, {"name": "date", "type": "string"}],
  33. "transactional": true,
  34. "dialects": ["hive", "impala"]
  35. }
  36. ]