-- DBMS: bigquery
CREATE TABLE `bigquery-public-data.geo_international_ports.world_port_index`
(
  index_number STRING,
  region_number STRING,
  port_name STRING,
  country STRING,
  port_latitude FLOAT64,
  port_longitude FLOAT64,
  publication_number STRING,
  chart_number STRING,
  harbor_size STRING,
  harbor_type STRING,
  shelter_afforded STRING,
  entry_tide BOOL,
  entry_swell BOOL,
  entry_ice BOOL,
  entry_other BOOL,
  overhead_limit BOOL,
  channel_depth STRING,
  anchorage_depth STRING,
  cargo_pier_depth STRING,
  cargo_oil_depth STRING,
  tide_range INT64,
  max_vessel_size STRING,
  good_holding_ground BOOL,
  turning_area BOOL,
  port_of_entry BOOL,
  us_representative BOOL,
  eta_message_required BOOL,
  pilot_required BOOL,
  pilot_available BOOL,
  pilot_local_assist BOOL,
  pilot_advised BOOL,
  tug_salvage BOOL,
  tug_assist BOOL,
  quarantine_procedures_required BOOL,
  quarantine_sscc_cert_required BOOL,
  quarantine_other BOOL,
  comms_phone BOOL,
  comms_fax BOOL,
  comms_radio BOOL,
  comms_vhf BOOL,
  comms_air BOOL,
  comms_rail BOOL,
  cargo_wharf BOOL,
  cargo_anchor BOOL,
  cargo_med_moor BOOL,
  cargo_beach_moor BOOL,
  cargo_ice_moor BOOL,
  med_facility BOOL,
  garbage_dispose BOOL,
  degauss BOOL,
  dirty_ballast BOOL,
  crane_fixed BOOL,
  crane_mobile BOOL,
  crane_float BOOL,
  lift_100_tons BOOL,
  lift_50_100_tons BOOL,
  lift_25_49_tons BOOL,
  lift_0_24_tons BOOL,
  services_longshore BOOL,
  services_electrical BOOL,
  services_steam BOOL,
  services_nav_equip BOOL,
  services_electrical_repair BOOL,
  provisions BOOL,
  water BOOL,
  fuel_oil BOOL,
  diesel BOOL,
  deck_supplies BOOL,
  eng_supplies BOOL,
  repair_types STRING,
  dry_dock_types STRING,
  railway_types STRING,
  port_geom GEOGRAPHY
)
PARTITION BY DATE(_PARTITIONTIME)
CLUSTER BY country, index_number, region_number, harbor_size;

INSERT INTO `bigquery-public-data.geo_international_ports.world_port_index` (index_number, region_number, port_name, country, port_latitude, port_longitude, publication_number, chart_number, harbor_size, harbor_type, shelter_afforded, entry_tide, entry_swell, entry_ice, entry_other, overhead_limit, channel_depth, anchorage_depth, cargo_pier_depth, cargo_oil_depth, tide_range, max_vessel_size, good_holding_ground, turning_area, port_of_entry, us_representative, eta_message_required, pilot_required, pilot_available, pilot_local_assist, pilot_advised, tug_salvage, tug_assist, quarantine_procedures_required, quarantine_sscc_cert_required, quarantine_other, comms_phone, comms_fax, comms_radio, comms_vhf, comms_air, comms_rail, cargo_wharf, cargo_anchor, cargo_med_moor, cargo_beach_moor, cargo_ice_moor, med_facility, garbage_dispose, degauss, dirty_ballast, crane_fixed, crane_mobile, crane_float, lift_100_tons, lift_50_100_tons, lift_25_49_tons, lift_0_24_tons, services_longshore, services_electrical, services_steam, services_nav_equip, services_electrical_repair, provisions, water, fuel_oil, diesel, deck_supplies, eng_supplies, repair_types, dry_dock_types, railway_types, port_geom, _PARTITIONTIME) VALUES ('8822', '8650', 'SOUTHWEST PASS', 'US', 28.45, -90.7, 'CP05', NULL, 'S', 'RN', 'N', False, False, False, True, NULL, NULL, NULL, NULL, 'J', 0, 'M', NULL, NULL, NULL, NULL, NULL, NULL, True, True, NULL, NULL, NULL, NULL, NULL, NULL, True, NULL, NULL, NULL, NULL, NULL, True, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, True, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 'POINT(-90.7 28.45)', NULL), ('47855', '47840', 'DORALEH', 'DJ', 11.6, 43.083333, '172', NULL, 'S', 'CN', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 'E', 'D', 0, 'L', NULL, NULL, NULL, NULL, True, True, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, True, NULL, NULL, True, NULL, NULL, True, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 'POINT(43.0833333333333 11.6)', NULL), ('61245', '61100', 'ISHIKARI BAY NEW PORT', 'JP', 43.216667, 141.283333, '159', NULL, 'M', 'CB', 'F', NULL, NULL, NULL, True, NULL, 'K', NULL, 'G', 'M', 0, 'L', NULL, NULL, True, NULL, NULL, False, True, NULL, NULL, NULL, True, NULL, NULL, NULL, True, True, True, NULL, NULL, NULL, True, NULL, NULL, NULL, NULL, True, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, True, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 'POINT(141.283333333333 43.2166666666667)', NULL), ('50922', '50920', 'MERAK MAS TERMINAL', 'ID', -5.916667, 105.983333, '150', NULL, 'M', 'CN', 'F', NULL, NULL, NULL, NULL, NULL, 'J', 'A', 'J', 'J', 0, 'M', NULL, NULL, NULL, NULL, NULL, NULL, True, NULL, NULL, NULL, True, NULL, NULL, NULL, True, NULL, True, NULL, NULL, NULL, True, NULL, NULL, NULL, NULL, True, NULL, NULL, NULL, NULL, True, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, True, True, True, NULL, NULL, NULL, NULL, NULL, 'POINT(105.983333333333 -5.91666666666667)', NULL), ('2200', '1930', 'PORT DE BECANCOUR', 'CA', 46.4, -72.383333, 'SCOR', NULL, 'V', 'RN', 'E', False, False, True, False, False, 'K', 'K', 'K', NULL, 0, 'M', True, NULL, NULL, NULL, True, True, NULL, NULL, NULL, NULL, True, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, True, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 'POINT(-72.3833333333333 46.4)', NULL);