Abstract

Text-to-SQL emerges to play an important role in interactive data analysis, which provides a friendly interface for converting natural language into relational database language (i.e., SQL). In order to translate a user’s query into an executable SQL statement, semantic parsing is essential to the transformation process. In particular, existing efforts provide some feasible solutions, and state-of-the-art models mainly adopt the sketch-based paradigm such that template values are to be filled. To this end, most methods extract values based on column representations. However, if the query contains multiple values that belong to different columns, these methods may fail to extract the values accurately. Moreover, it can be difficult to infer the right values when the query does not explicitly mention the corresponding column names. To bridge the gap, we propose a novel neural architecture, namely, ER-SQL for learning enhanced representations for Text-to-SQL. Based on pre-trained model BERT, ER-SQL uses column contents to better extract features of columns. Moreover, ER-SQL harnesses the column representations to latently reformulate the query. To verify the effectiveness of ER-SQL, comprehensive experiments demonstrate that ER-SQL achieves better results than existing models on the benchmark dataset WikiSQL, as well as on a representative Chinese dataset TableQA.

Talk to us

Join us for a 30 min session where you can share your feedback and ask us any queries you have

Schedule a call

Disclaimer: All third-party content on this website/platform is and will remain the property of their respective owners and is provided on "as is" basis without any warranties, express or implied. Use of third-party content does not indicate any affiliation, sponsorship with or endorsement by them. Any references to third-party content is to identify the corresponding services and shall be considered fair use under The CopyrightLaw.