I am working on SAP Hana BTP Cockpit. I created 1 instance and enter in database explorer. there i created 1 table and transfer that table to aws s3 bucket using this command:
Export into ‘://:@/<path/folder>/Filename.csv’ from USER.TABLE_NAME;
now i want to automate this export for everyday or every hour but i dont find the way.
i tried to store this query in stored procedure but i faced syntax error.
1.i tried to create stored procedure as below:
CREATE PROCEDURE EXPORT_TO_S3()
LANGUAGE SQLSCRIPT
AS
BEGIN
Export into ‘://:@/<path/folder>/Filename.csv’ from USER.TABLE_NAME;
END;
but it gives me error as:
Error: (dberror) [257]: sql syntax error: incorrect syntax near into.
2.i also tried to create an event:
CREATE EVENT “HOURLY_SALES_UPDATE_EVENT”
SCHEDULE START AT ‘2024-08-12 00:00:00’
EVERY 1 HOUR
DO
BEGIN
Export into ‘://:@/<path/folder>/Filename.csv’ from USER.TABLE_NAME;
END;
but it gives me error as:
Error: (dberror) [257]: sql syntax error: incorrect syntax near “EVENT”: line 100 col 7 (at pos 8)
3.tried to create job also:
CREATE JOB “HOURLY_SALES_UPDATE”
START TIME ‘2024-08-12 00:00:00’
RECURRING EVERY 1 HOURS
AS BEGIN
Export into ‘://:@/<path/folder>/Filename.csv’ from USER.TABLE_NAME;
END;
but it gives me error as:
Error: Error: (dberror) [257]: sql syntax error: incorrect syntax near “JOB”: line 93 col 7 (at pos 8)
Prasad is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.