I want to create an application to obtain data in BigQuery from a user message. I saw that Gemini in BigQuery does exactly what I want, where I enter text and it generates SQL, queries data and generates graphs. However, I would like to use these resources outside of BigQuery Studio, such as in Python. Is there any way to do this? Or is there another feature in BigQuery that allows you to query data using natural language?
Solved! Go to Solution.
Currently, Gemini's natural language to SQL capabilities within BigQuery are currently exclusive to BigQuery Studio. There's no official public API for direct use in Python applications.
While google-cloud-aiplatform
and google-cloud-language
are valuable for other AI/NLP tasks, they don't directly support natural language to SQL translation.
However, if you are looking to integrate this type of natural language to SQL translation functionality outside of BigQuery Studio, such as in a Python application, you will need to consider a few approaches:
BigQuery API with Custom Implementation:
Vertex AI and LLMs:
Using BigQuery ML for Predictions:
Currently, Gemini's natural language to SQL capabilities within BigQuery are currently exclusive to BigQuery Studio. There's no official public API for direct use in Python applications.
While google-cloud-aiplatform
and google-cloud-language
are valuable for other AI/NLP tasks, they don't directly support natural language to SQL translation.
However, if you are looking to integrate this type of natural language to SQL translation functionality outside of BigQuery Studio, such as in a Python application, you will need to consider a few approaches:
BigQuery API with Custom Implementation:
Vertex AI and LLMs:
Using BigQuery ML for Predictions:
Thank you for the response and clarification.
I've started exploring the use of LLMs to generate SQL.
Hello,
Are there any news on that matter?
Is there an API?