1.1 Log into the AWS Management Console with an AWS IAM user account , Go to the S3 service, Add a bucket , create a folder and upload the source CSV file into it.
2.6 Now create and assign a new "Workgroup" to this database schema. (By default it is set to "primary".) A workgroup in Athena is used to isolate query list and query history and groups queries for easy cost constraint enforcements.
2.7 Schema and Table definitions are reflected in Athena and a Query editor is made available, to query on the source data from S3 using SQL.
2.8 Now that Athena Tables are defined, let's prepare for the SAP HANA Cloud integration .
2.8.1 Since the corporate user for our AWS account has multi-factor authentication enabled, let's create a new IAM user and give it all permissions needed to access Athena and S3 . This is done by assigning the below mentioned policies to that IAM user.
2.8.2 Download AWS root CA as .pem file from here .
2.8.3 Download S3 bucket's root CA (Baltimore CyberTrust Root) by bringing up Object URL of the S3 data store in browser and downloading the certificate.
3. SAC HANA Cloud : Create the connection to Athena service
3.1 Log In to the SAP HANA Cloud instance database explorer as DBADMIN and follow the steps mentioned in this official SAP Help document to add the two AWS certificates we downloaded above in 2.7.2. This helps AWS trust the integration source system that calls the Athena APIs.
3.2 . In the SAP HANA Cloud dsatabase explorer, Expand the catalog folder of the database and right click on remote sources to add a remote source.
3.3 Add the remote source by entering the required details:
For Region enter the region of Athena service. For workgroup enter the name of the Workgroup we created in step 2.5 above . For Access and Secret Key , enter the Access and Secret Key that we created for the IAM user in step 2.7.1 above.
Click Create to finish creating the connection.
4.1 Click on the newly created remote source, select the schema (this is the Athena database schema), choose TABLE as Type and then click search. It should bring the names of the tables from Athena and list it as shown. Select a table and click on Create Virtual Objects. The standard naming convention for virtual tables is to prefix it with a v_ in front of the table name. (eg: v_employee)
4.2 Create a local/SAP HANA Cloud table and insert data into it, so it can be joined with the virtual table in Athena.
4.3 Create a SQL view by joining the two tables on a key column.
Every time the federated query is run (i.e., the virtual table is accessed) in SAP HANA Cloud, it creates an entry in the query history (Click on "History" tab) in Athena and is trackable !
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
26 | |
14 | |
13 | |
13 | |
12 | |
8 | |
8 | |
7 | |
6 | |
5 |