-
Notifications
You must be signed in to change notification settings - Fork 17
Open
Description
Test script:
#!/bin/bash
# Config
hdfs_path=/local/lingual-alias-test/
hbase_table=out
hbase_col_family=fields
export LINGUAL_PLATFORM=hadoop
export HADOOP_USER_NAME=hadoop
# Test data
printf "\n1\ta\n2\tb\n3\tc\n" > /tmp/alias.tsv
hadoop fs -copyFromLocal /tmp/alias.tsv "${hdfs_path}alias.tsv"
# Lingual 1.1
lingual catalog --init
lingual catalog --provider --add cascading:cascading-hbase:2.2.0:provider
lingual catalog --schema IN --add
lingual catalog --schema IN --stereotype TSVFILE -add \
--columns A,B \
--types string,string
lingual catalog --schema IN --table IN --stereotype TSVFILE -add "${hdfs_path}" --format tsv
lingual catalog --schema OUT --add
lingual catalog --schema OUT --protocol hbase --add --provider hbase
lingual catalog --schema OUT --stereotype HTABLE -add \
--columns A,B \
--types string,string
lingual catalog --schema OUT --format hbase --add --properties="family=${hbase_col_family}" --provider hbase
lingual catalog --schema OUT --table OUT --stereotype HTABLE -add "${hbase_table}" --protocol hbase --format hbase --provider hbase
# Works
lingual shell --sql - <<- EOQ
INSERT INTO "OUT"."OUT"
select *
from "IN"."IN";
SELECT * from "OUT"."OUT";
EOQ
# Doesn't work
lingual shell --sql - <<- EOQ
INSERT INTO "OUT"."OUT"
select
B as A,
A as B
from "IN"."IN";
EOQError is:
Warning: exception while executing query: could not build flow from assembly: [[HBaseScheme[['A', 'B' ...][cascading.hbase.HBaseFactory.createScheme(HBaseFactory.java:120)] unable to resolve scheme sink selector: [{1}:'A'], with incoming: [{2}:'$0', '$1' | String, String]]: [HBaseScheme[['A', 'B' ...][cascading.hbase.HBaseFactory.createScheme(HBaseFactory.java:120)] unable to resolve scheme sink selector: [{1}:'A'], with incoming: [{2}:'$0', '$1' | String, String]: could not select fields: [{1}:'A'], from: [{2}:'$0', '$1' | String, String] (state=,code=0)
Error: exception while executing query (state=,code=0)
Metadata
Metadata
Assignees
Labels
No labels