File tree Expand file tree Collapse file tree 1 file changed +3
-2
lines changed
Expand file tree Collapse file tree 1 file changed +3
-2
lines changed Original file line number Diff line number Diff line change @@ -49,6 +49,7 @@ def convert(
4949 selections .append (f'"{ k } " as "{ v } "' )
5050 if v == "geometry" :
5151 geom_column = k
52+ selection = ", " .join (selections )
5253
5354 filters = []
5455 where = ""
@@ -61,7 +62,6 @@ def convert(
6162 if len (filters ) > 0 :
6263 where = f"WHERE { ' AND ' .join (filters )} "
6364
64- selection = ", " .join (selections )
6565 if isinstance (urls , str ):
6666 sources = f'"{ urls } "'
6767 else :
@@ -74,6 +74,7 @@ def convert(
7474
7575 schemas = _collection .merge_schemas ({})
7676 props = schemas .get ("properties" , {})
77+ required = schemas .get ("required" , [])
7778 pq_fields = []
7879 for column in self .columns .values ():
7980 schema = props .get (column , {})
@@ -82,7 +83,7 @@ def convert(
8283 self .warning (f"{ column } : No mapping" )
8384 continue
8485 try :
85- field = get_pyarrow_field (column , schema = schema )
86+ field = get_pyarrow_field (column , schema = schema , required = column in required )
8687 pq_fields .append (field )
8788 except Exception as e :
8889 self .warning (f"{ column } : Skipped - { e } " )
You can’t perform that action at this time.
0 commit comments