@@ -962,37 +962,6 @@ def test_from_api_repr(self):
962962 # from google.cloud.bigquery.format_options import ParquetOptions
963963 from google .cloud .bigquery .job .load import ColumnNameCharacterMap
964964
965- # resource = {
966- # "load": {
967- # "allowJaggedRows": True,
968- # "createDisposition": "CREATE_NEVER",
969- # "encoding": "UTF-8",
970- # "fieldDelimiter": ",",
971- # "ignoreUnknownValues": True,
972- # "maxBadRecords": 10,
973- # "nullMarker": "\\N",
974- # "quote": '"',
975- # "schema": {
976- # "fields": [
977- # {"name": "name", "type": "STRING", "mode": "NULLABLE"},
978- # {"name": "age", "type": "INTEGER", "mode": "NULLABLE"},
979- # ]
980- # },
981- # "skipLeadingRows": "1",
982- # "sourceFormat": "CSV",
983- # "timePartitioning": {
984- # "type": "DAY",
985- # "field": "transaction_date",
986- # },
987- # "useAvroLogicalTypes": True,
988- # "writeDisposition": "WRITE_TRUNCATE",
989- # "timeZone": "America/New_York",
990- # "parquetOptions": {"enableListInference": True},
991- # "columnNameCharacterMap": "V2",
992- # "someNewField": "some-value",
993- # }
994- # }
995-
996965 config = LoadJobConfig .from_api_repr (self .RESOURCE )
997966
998967 self .assertTrue (config .allow_jagged_rows )
@@ -1058,35 +1027,5 @@ def test_to_api_repr(self):
10581027
10591028 api_repr = config .to_api_repr ()
10601029
1061- # expected = {
1062- # "load": {
1063- # "allowJaggedRows": True,
1064- # "createDisposition": "CREATE_NEVER",
1065- # "encoding": "UTF-8",
1066- # "fieldDelimiter": ",",
1067- # "ignoreUnknownValues": True,
1068- # "maxBadRecords": 10,
1069- # "nullMarker": r"\N",
1070- # "quote": '"',
1071- # "schema": {
1072- # "fields": [
1073- # {"name": "name", "type": "STRING", "mode": "NULLABLE"},
1074- # {"name": "age", "type": "INTEGER", "mode": "NULLABLE"},
1075- # ]
1076- # },
1077- # "skipLeadingRows": "1",
1078- # "sourceFormat": "CSV",
1079- # "timePartitioning": {
1080- # "type": "DAY",
1081- # "field": "transaction_date",
1082- # },
1083- # "useAvroLogicalTypes": True,
1084- # "writeDisposition": "WRITE_TRUNCATE",
1085- # "timeZone": "America/New_York",
1086- # "parquetOptions": {"enableListInference": True},
1087- # "columnNameCharacterMap": "V2",
1088- # "someNewField": "some-value",
1089- # }
1090- # }
10911030 expected = self .RESOURCE
10921031 self .assertEqual (api_repr , expected )
0 commit comments