-- DBMS: bigquery
CREATE TABLE `isb-cgc.GDC_metadata.rel14_aliquot2caseIDmap`
(
  program_name STRING OPTIONS(description="Program name, eg TCGA or TARGET"),
  project_id STRING OPTIONS(description="ID of the Project -- e.g. TCGA-BRCA, TARGET-AML, etc."),
  case_gdc_id STRING OPTIONS(description="GDC unique identifier"),
  case_barcode STRING OPTIONS(description="Submitter identifier, eg HCC1954, TCGA-ZX-AA5X, etc"),
  sample_gdc_id STRING OPTIONS(description="Unique GDC identifier for this sample (corresponds to the sample_barcode), eg a1ec9279-c1a6-4e58-97ed-9ec1f36187c5  --  this can be used to access more information from the GDC data portal"),
  sample_barcode STRING OPTIONS(description="Original/submitter sample ID"),
  sample_type STRING OPTIONS(description="Two-digit sample_type code which forms part of the sample barcode eg. 01,11,06, etc."),
  sample_type_name STRING OPTIONS(description="The longer name of the sample type; eg. Primary Tumor, Recurrent Tumor, etc."),
  portion_gdc_id STRING OPTIONS(description="Original/submitter portion ID"),
  portion_barcode STRING OPTIONS(description="Original/submitter portion ID"),
  analyte_gdc_id STRING OPTIONS(description="Original/submitter analyte ID"),
  analyte_barcode STRING OPTIONS(description="Original/submitter analyte ID"),
  aliquot_gdc_id STRING OPTIONS(description="Unique GDC identifier for this aliquot (corresponds to the aliquot_barcode), eg 7fbfdb3e-1fd2-4206-8d2e-7f68e4a15844  --  this can be used to access more information from the GDC data portal"),
  aliquot_barcode STRING OPTIONS(description="Original TCGA aliquot barcode, eg TCGA-12-1089-01A-01D-0517-01")
)
OPTIONS(
  friendly_name="ALIQUOT IDS TO CASE IDS REL14",
  description="Data was generated from file metadata information from the GDC release 14, December 2018. Aliquot barcodes are mapped to case information.\nMore details: https://docs.gdc.cancer.gov/Data/Release_Notes/Data_Release_Notes/#data-release-140",
  labels=[("access", "open"), ("data_type", "file_metadata"), ("source", "gdc"), ("status", "archived"), ("category", "metadata")]
);

INSERT INTO `isb-cgc.GDC_metadata.rel14_aliquot2caseIDmap` (program_name, project_id, case_gdc_id, case_barcode, sample_gdc_id, sample_barcode, sample_type, sample_type_name, portion_gdc_id, portion_barcode, analyte_gdc_id, analyte_barcode, aliquot_gdc_id, aliquot_barcode) VALUES ('TCGA', 'TCGA-BLCA', '9c274536-3ca1-4f0e-93a8-1688074d862f', 'TCGA-DK-A1A6', 'f7f74a2b-5299-424d-b9a7-2b313dc7823c', 'TCGA-DK-A1A6-06A', '06', 'Metastatic', '5df8dcdf-6717-48b1-988d-5239a6f5bd69', 'TCGA-DK-A1A6-06A-11', '778c228e-2cbb-4a93-8284-420b1f58152c', 'TCGA-DK-A1A6-06A-11D', '1ca9ccad-2c41-4778-b8c5-fb3a12b39bb7', 'TCGA-DK-A1A6-06A-11D-A42E-08'), ('TCGA', 'TCGA-BLCA', '9c274536-3ca1-4f0e-93a8-1688074d862f', 'TCGA-DK-A1A6', 'f7f74a2b-5299-424d-b9a7-2b313dc7823c', 'TCGA-DK-A1A6-06A', '06', 'Metastatic', '5df8dcdf-6717-48b1-988d-5239a6f5bd69', 'TCGA-DK-A1A6-06A-11', '778c228e-2cbb-4a93-8284-420b1f58152c', 'TCGA-DK-A1A6-06A-11D', '21b7cada-0c06-41a3-9d0f-d8c5639cf259', 'TCGA-DK-A1A6-06A-11D-A42F-05'), ('TCGA', 'TCGA-BLCA', '9c274536-3ca1-4f0e-93a8-1688074d862f', 'TCGA-DK-A1A6', 'f7f74a2b-5299-424d-b9a7-2b313dc7823c', 'TCGA-DK-A1A6-06A', '06', 'Metastatic', '5df8dcdf-6717-48b1-988d-5239a6f5bd69', 'TCGA-DK-A1A6-06A-11', '778c228e-2cbb-4a93-8284-420b1f58152c', 'TCGA-DK-A1A6-06A-11D', 'db4348f1-e8d7-4ff5-bd35-effdce348f90', 'TCGA-DK-A1A6-06A-11D-A42D-01'), ('TCGA', 'TCGA-BLCA', '9c274536-3ca1-4f0e-93a8-1688074d862f', 'TCGA-DK-A1A6', 'f7f74a2b-5299-424d-b9a7-2b313dc7823c', 'TCGA-DK-A1A6-06A', '06', 'Metastatic', '5df8dcdf-6717-48b1-988d-5239a6f5bd69', 'TCGA-DK-A1A6-06A-11', '9759dbc9-0ad8-4fc7-acdb-5435d6469b46', 'TCGA-DK-A1A6-06A-11R', '140812fb-9641-43b9-b963-9a74d2566ce0', 'TCGA-DK-A1A6-06A-11R-A42T-07'), ('TCGA', 'TCGA-BLCA', '9c274536-3ca1-4f0e-93a8-1688074d862f', 'TCGA-DK-A1A6', 'f7f74a2b-5299-424d-b9a7-2b313dc7823c', 'TCGA-DK-A1A6-06A', '06', 'Metastatic', '5df8dcdf-6717-48b1-988d-5239a6f5bd69', 'TCGA-DK-A1A6-06A-11', '9759dbc9-0ad8-4fc7-acdb-5435d6469b46', 'TCGA-DK-A1A6-06A-11R', '1b11b644-f9d9-4ba5-9beb-ce054c0e0f86', 'TCGA-DK-A1A6-06A-11R-A466-07');