You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
In SQL, INSERT INTO ... SELECT ... happily works without column aliases, using column positions. This doesn't work in Lingual 1.1:
Lingual 1.1
#!/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 dataprintf"\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 C,D \
--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
# Doesn't work
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 A, B from "IN"."IN";EOQ
Error output in both cases:
{utcTimestamp=1398423862581, currentTimestamp=1398423862581, localTimestamp=1398423862581, timeZone=sun.util.calendar.ZoneInfo[id="Etc/UTC",offset=0,dstSavings=0,useDaylight=false,transitions=0,lastRule=null]}
Warning: exception while executing query: could not build flow from assembly: [[HBaseScheme[['C', 'D' ...][cascading.hbase.HBaseFactory.createScheme(HBaseFactory.java:120)] unable to resolve scheme sink selector: [{1}:'C'], with incoming: [{2}:'A', 'B' | String, String]]: [HBaseScheme[['C', 'D' ...][cascading.hbase.HBaseFactory.createScheme(HBaseFactory.java:120)] unable to resolve scheme sink selector: [{1}:'C'], with incoming: [{2}:'A', 'B' | String, String]: could not select fields: [{1}:'C'], from: [{2}:'A', 'B' | String, String] (state=,code=0)
Error: exception while executing query (state=,code=0)
Postgres
CREATETABLEint (
a textNOT NULL,
b textNOT NULL
);
CREATETABLEoutt (
c textNOT NULL,
d textNOT NULL
);
insert intointvalues ('1', 'a'), ('2', 'b');
insert into outt select*fromint-- worksinsert into outt select a, b fromint-- also works
The text was updated successfully, but these errors were encountered:
alexanderdean
changed the title
INSERT ... SELECT ... doesn't work without aliases in Lingual 1.1
INSERT ... SELECT ... doesn't work using column positions in Lingual 1.1
Apr 25, 2014
alexanderdean
changed the title
INSERT ... SELECT ... doesn't work using column positions in Lingual 1.1
INSERT INTO ... SELECT ... doesn't work using column positions in Lingual 1.1
Apr 25, 2014
In SQL, INSERT INTO ... SELECT ... happily works without column aliases, using column positions. This doesn't work in Lingual 1.1:
Lingual 1.1
Error output in both cases:
Postgres
The text was updated successfully, but these errors were encountered: