Is it possible to build a SQL query using PyPika using a list to select fields? Attempting something similar to the below to build a SQL query.
from pypika import Query, Table
customers = Table('data_table')
field_list = ['user', 'age']
sql = Query.from_(customers).select(field_list).where(
(customers.start_time >= start_time) &
(customers.end_time <= end_time) &
(customers.pair == pair)
)
I believe this should work:
Note the unpacking of field_list with * ;)