Make sure SQL functions, including "year", are quoted correctly

Description

Getting error below.
The query is 'select artist, album, year, catalog, cover from syn11219957'. 'Year' is now a function so we should quote the column name.

Environment

Master against staging 201.0-x

Activity

Show:
Kimyen Truong
June 4, 2018, 10:04 PM

Thanks Xa! I will rename the ticket so that I can quickly determine what do to here.

Xavier Schildwachter
June 4, 2018, 10:02 PM
Edited

The problem was that 'Year' needed to be quoted in the query (else it's parsed as a function name).
The only place where I see this is: synapsePythonClient//synapseclient/table.py.

Note: Integrations test passed OK.
Also, the error return now is "Unknown column 'YEAR' in 'field list'" which is a bit misleading.

Kimyen Truong
June 4, 2018, 9:24 PM

, which test failed? Do you have the full stack trace? Or is this a syn.tableQuery failure because of the quotes?

Assignee

Unassigned

Reporter

Xavier Schildwachter

Labels

None

Validator

Xavier Schildwachter

Development Area

None

Release Version History

None

Slack Channel

None

Epic Link

Components

Affects versions

Priority

Major