Database Reference
In-Depth Information
stock_price_low double,stock_price_close double,
stock_volume int,stock_price_adj_close double)
partitioned by (exchange string)
row format delimited
fields terminated by ','
LOCATION wasb://democlustercontainer@democluster.blob.core.windows.net/debarchan/StockData';
State : Completed
SubmissionTime : 11/24/2013 7:08:25 AM
Cluster : democluster
PercentComplete :
JobId : job_201311240635_0002
Logging initialized using configuration in file:/C:/apps/dist/hive-0.11.0.1.3.1.0-06/
conf/hive-log4j.properties
OK
Time taken: 22.438 seconds
You can verify the structure of the schema you just created using the script in Listing 8-5.
Listing 8-5. Verifying the Hive schema
$subscriptionName = "YourSubscriptionName"
$clustername = "democluster"
Select-AzureSubscription -SubscriptionName $subscriptionName
Use-AzureHDInsightCluster $clusterName
-Subscription (Get-AzureSubscription -Current).SubscriptionId
$querystring = “DESCRIBE stock_analysis;”
Invoke-Hive -Query $querystring
This should display the structure of the stock_analysis table as shown here:
Successfully connected to cluster democluster
Submitting Hive query..
Started Hive query with jobDetails Id : job_201311240635_0004
Hive query completed Successfully
stock_symbol string None
stock_date string None
stock_price_open double None
stock_price_high double None
stock_price_low double None
stock_price_close double None
stock_volume int None
stock_price_adj_close double None
exchange string None
# Partition Information
# col_name data_type comment
exchange string None
Now that you have the Hive schema ready, you can start loading the stock data in your stock_analysis table.
 
Search WWH ::




Custom Search