Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

00-stylist-AI-function-tools-introduction - Tools_Orders not found #176

Open
jzforde opened this issue Jan 19, 2025 · 1 comment
Open

00-stylist-AI-function-tools-introduction - Tools_Orders not found #176

jzforde opened this issue Jan 19, 2025 · 1 comment

Comments

@jzforde
Copy link

jzforde commented Jan 19, 2025

The table or view `tools_orders` cannot be found. Verify the spelling and correctness of the schema and catalog.
If you did not qualify the name with a schema, verify the current_schema() output, or qualify the name with the correct schema and catalog.
To tolerate the error on drop use DROP VIEW IF EXISTS or DROP TABLE IF EXISTS. SQLSTATE: 42P01

%sql
CREATE OR REPLACE FUNCTION get_customer_orders ()
RETURNS TABLE(user_id STRING,
id STRING,
transaction_date STRING,
item_count DOUBLE,
amount DOUBLE,
order_status STRING)
COMMENT 'Returns a list of customer orders for the given customer ID (expect a UUID)'
LANGUAGE SQL
RETURN
SELECT o.* from tools_orders o
inner join tools_customers c on c.id = o.user_id
where email=current_user() ORDER BY transaction_date desc;

SELECT * FROM get_customer_orders();

@QuentinAmbard
Copy link
Collaborator

Hi,
The table is created in the 00-init-stylist notebook, are you sure you ran the first %run ./_resource/00-init-stylist notebook cell ?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants