标签:
目录:
连接hadoop配置语法:
global configuration settings for PolyBase Hadoop and Azure blob storage connectivity, Syntax:
sp_configure [ @configname = ] ‘hadoop connectivity‘,
[ @configvalue = ] { 0 | 1 | 2 | 3 | 4 | 5 | 6 | 7 }
[;]
RECONFIGURE
[;]
sp_configure @configname = ‘hadoop connectivity‘, @configvalue = 7;
GO
RECONFIGURE
GO
配置hadoop连接
sp_configure @configname = ‘hadoop connectivity‘, @configvalue = 7;
GO
RECONFIGURE
GO
Pushdown配置:
$HADOOP_CONF_DIR,/usr/hdp/current/hadoop-client/*,/usr/hdp/current/hadoop-client/lib/*,/usr/hdp/current/hadoop-hdfs-client/*,/usr/hdp/current/hadoop-hdfs-client/lib/*,/usr/hdp/current/hadoop-yarn-client/*,/usr/hdp/current/hadoop-yarn-client/lib/*
Create external tables for Azure blob storage
CREATE MASTER KEY ENCRYPTION BY PASSWORD = ‘Password01!‘;
CREATE DATABASE SCOPED CREDENTIAL JNAzureCredit
WITH IDENTITY = ‘zhushy‘, Secret = XXXX‘; /*存储访问Key*/
CREATE EXTERNAL DATA SOURCE JNAzureStorage with (
TYPE = HADOOP,
LOCATION =‘wasb://<blob_container_name>@<azure_storage_account_name>.blob.core.chinacloudapi.cn‘,
CREDENTIAL = JNAzureCredit
);
CREATE EXTERNAL FILE FORMAT TextFileFormat WITH (
FORMAT_TYPE = DELIMITEDTEXT,
FORMAT_OPTIONS (FIELD_TERMINATOR =‘ ‘, USE_TYPE_DEFAULT = TRUE))
CREATE EXTERNAL TABLE [dbo].[hospital] (
[ID] varchar(128) NULL,
[name] varchar(128) null
)
WITH (LOCATION=‘/zhu/data1.txt‘,
DATA_SOURCE = JNAzureStorage,
FILE_FORMAT = TextFileFormat
);
DW(六):polybase访问Azure Blob Storage
标签:
原文地址:http://www.cnblogs.com/tgzhu/p/5913508.html