private void CreateTable(string tableName, string clusterUrl, string username, string password, string storage, string key) { string command = string.Format(@"CREATE TABLE {0} (column1 STRING, column2 STRING, column3 STRING) STORED AS TEXTFILE", tableName); using (var hiveConnection = new HiveConnection(new Uri(clusterUrl), username, password, storage, key)) { hiveConnection.ExecuteHiveQuery(command).WaitForResult(); } }
private void RunJob(string tableName, string clusterUrl, string username, string password, string storage, string key) { string command = string.Format(@"SELECT COUNT(*), column1 FROM {0} GROUP BY column1", tableName); using (var hiveConnection = new HiveConnection(new Uri(clusterUrl), username, password, storage, key)) { hiveConnection.ExecuteHiveQuery(command).WaitForResult(); } }