avatar khanh than

SOFTWARE ENGINEER

To keep tracking my skills & accomplisments

19 Dec 2024

● Dev Tools

Gcp Gemini In Bigquery

A. OVERVIEW

Hi, My name is Diane and Mr.Tate is my data scientist. We work a digiatal company called “Data Beans”. We sold business challenges for clients with data and AI.

Our new client is “Coffee on Wheels”. They sell coffee on food trucks and operates across cities globally.

WE HELP THEM TRANSFORM OPERATIONS BY USING DATA AND AI:

We’ve recently meet Bea, a manager at Coffee on Wheels, to understand the business requirement. Bee envisions a captivating dashboard for the future of food trucks which achieve three main goals:

  1. ENHANCE SALES:
    • Identify top and underperforming menu items.
    • Suggest innovative replacement.
  2. MANAGE CUSTOMER RELATIONSHIPS:
    • Analyze customer reviews.
    • Generate proper feedback.
  3. OPTIMIZE TRUCK LOGISTIC:
    • Determine real-time truck locations (based on weather, events, traffic, customer preferences).
    • Equip every truck with an “intelligent GPS”.

So, we have 3 common CHALLENGES:

CHAL 1: EXPLORE & PREPARE DATA.

CHAL 2: ASSIST CODE DEVELOPMENT.

CHAL 3: DISCOVER & VISUALIZE WORKFLOW.

GEMINI USES AI TO HELP WITH 2 TOOLS:

Tool 1: Insights.

Tool 2: Table Explorer.

B. PRECAUTIONS AS USING GEMINI:

C. LET’S START A LAB:

  1. For exploring data:
    • Gemini suggests some tasks on a side bar (filter,…).
    • Use natrual language prompts (text input in SQL like #show me top 2 orders).
  2. For data pipeline:
    • Gemini enhances ETL speed (extract, transform, load) significantly.
    • Quickly visualize the data pipeline in a graph.
  3. Lab practice:
    • Task 1: Generate data “insights” on the order item table.
    • Task 2: Use “table explorer” to review details of the location table.
    • Task 3: Query the order item table without code.
    • Task 4: Review the menu and order tables.

Table Explorer on Coffee on Wheels

Figure 1: Table-Explorer on “Coffee on Wheels”



Table Explorer on Coffee on Wheels

Figure 2: Insights & Gemini Prompt on “Coffee on Wheels”

D. CODE ASSISTANT (or USING PROMPT):

There are 2 ways to use Gemini Prompt:

How to modify (transform) a query:

Gemini can also have a feature “explain code” like a personal SQL tutor as following image:

Table Explorer on Coffee on Wheels

Rules to make questions

E. WHAT ABOUT TROUBLESHOOTING:

Gemini offer 3 features: “review code”, “debug code”, and “optimize code”. For using these features, just ask and add your code directly into the prompt on the right bottom as following image.

Gemini-Prompt-Debug on Coffee on Wheels

F. DATA CANVAS

“Data canvas” is an Gen-AI-powered tool. It has 5 primary features:

LAB OF “Data Canvas” tasks:

Open the data canvas

Data canvas on Coffee on Wheels

Join 3 tables (it’s not automatic, we have to add a prompt to generate a SQL, then run it).

Join tables on Coffee on Wheels

After joining, we have 3 btns:

NOTICE AS SHARING:

see sharings on Coffee on Wheels

G. CONCLUSION :

Share on: