framework
framework copied to clipboard
SqlParser behavior is not correct with `Dialect(header=False)`
Overview
See this failing test:
def test_sql_parser_header_false(database_url):
control = formats.SqlControl(table="table")
dialect = Dialect(header=False, controls=[control])
with Resource(database_url, dialect=dialect) as resource:
assert resource.header.missing
assert resource.read_rows() == [
{"field1": None, "field2": "name"},
{"field1": 1, "field2": "english"},
{"field1": 2, "field2": "中国人"},
]