$ python test_quote.py
Traceback (most recent call last):
File "test_quote.py", line 15, in <module>
print(table.to_bigquery_fields())
File "/Users/anonymous/anaconda3/lib/python3.6/site-packages/ddlparse/ddlparse.py", line 305, in to_bigquery_fields
return self._columns.to_bigquery_fields(name_case)
File "/Users/anonymous/anaconda3/lib/python3.6/site-packages/ddlparse/ddlparse.py", line 253, in to_bigquery_fields
bq_fields.append(col.to_bigquery_field(name_case))
File "/Users/anonymous/anaconda3/lib/python3.6/site-packages/ddlparse/ddlparse.py", line 217, in to_bigquery_field
return '{{"name": "{}", "type": "{}", "mode": "{}"}}'.format(self._get_name(name_case), self.bigquery_data_type, self.bigquery_mode)
File "/Users/anonymous/anaconda3/lib/python3.6/site-packages/ddlparse/ddlparse.py", line 206, in bigquery_data_type
raise ValueError("Unknown data type : '{}'".format(self._data_type))
ValueError: Unknown data type : 'SAMPLE_A_PK'
Problem
DDLの
CONSTRAINT
句で指定する制約名が、ダブルクォート("
)で囲われているとエラーになる。patern A: OK
code
result
patern B: NG
code
result
Environment