Python 使用Google BigQuery和将字符串重新格式化为日期的SQLAlchemy
我正在使用SqlAlchemy从google Big Query连接我的python脚本和google。下面是我的代码,我有两个问题:Python 使用Google BigQuery和将字符串重新格式化为日期的SQLAlchemy,python,sqlalchemy,google-bigquery,Python,Sqlalchemy,Google Bigquery,我正在使用SqlAlchemy从google Big Query连接我的python脚本和google。下面是我的代码,我有两个问题: query = ''' SELECT *, PARSE_DATE("%Y-%m-%d", date_of_contact) as parsed_column FROM GoogleCloudDatabase.GoogleCloudTable ORDER BY date_of_contact DESC ''' 联系人的列date_将日期
query = '''
SELECT
*,
PARSE_DATE("%Y-%m-%d", date_of_contact) as parsed_column
FROM
GoogleCloudDatabase.GoogleCloudTable
ORDER BY
date_of_contact DESC
'''
eg: "%m-%d-%Y" "Dec-31-2021" or
"%d %m %Y" "31 Dec 2021" or
"%Y:%m:%d" "2021:Dec:31"
当然两个都是!这在SQLAlchemy中不起作用。当它是字符串格式时。