1

Is there a way to create a Hive external table using with location pointing to Azure Storage? We actually want to connect SAP HANA (SDA) to blob storage, so it seems the only way is to create an external hive table first which points to Azure blob storage and then use Hive ODBC connector/spark connectorto connect it toHANA SAP`. Does anyone have any idea how to achieve that?

1 Answer 1

0

You can create external tables in Hive or Spark on Azure. There are several options available:

  • Azure HDInsight
  • Azure Databricks (via Spark)
  • Hadoop distros supporting Azure Blob Storage (e. g. HDP)

External table creation would reference the data in the Blob storage account. See the following example for a Hive table created in HDInsight (wasb is used in the location):

CREATE EXTERNAL TABLE IF NOT EXISTS <database name>.<external textfile table name>
    (
        field1 string,
        field2 int,
        ...
        fieldN date
    )
    ROW FORMAT DELIMITED FIELDS TERMINATED BY '<field separator>'
        lines terminated by '<line separator>' STORED AS TEXTFILE
        LOCATION 'wasb:///<directory in Azure blob>' 
TBLPROPERTIES("skip.header.line.count"="1");

or in Azure Databricks:

CREATE EXTERNAL TABLE IF NOT EXISTS my_table (name STRING, age INT)
   COMMENT 'This table is created with existing data'
   LOCATION 'wasbs://<storage-account@<containername>.blob.core.windows.net/<directory>'

See also:

I don' t know what SAP supports. ODBC-Access is possible to all of the solutions.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.