Re: How to build REST API on Google Cloud?
Hi @zeljana
Yes, you can build a REST API on Google Cloud Platform (GCP) to fetch data from SAP HANA and store it in BigQuery. Here’s a high-level overview of how you can achieve this:
a. Enable the necessary APIs: Cloud Functions, BigQuery API, and Cloud Storage API
b. Use Google Cloud Functions to create a serverless REST API. Cloud Functions can be triggered by HTTP requests, making them suitable for building RESTful services
c. Use a Python library like pyhdb or hdbcli to connect to SAP HANA and execute SQL queries to fetch the required data
d. Use the BigQuery client library for Python to insert the fetched data into a BigQuery table
Once you deploy the cloud function you can invoke in through http request or cloud scheduler
Hope this helps.
thanks,
Aakash
Read more here: Source link
