Robin Moffatt
09/14/2022, 8:39 PMCREATE TABLE s3.tiny_v2.orders (
orderkey bigint,
custkey bigint,
orderstatus varchar(1),
totalprice double,
orderdate date,
orderpriority varchar(15),
clerk varchar(15),
shippriority integer,
comment varchar(79)
) WITH (
external_location = '<s3a://example/main/tiny_v2/orders>',
format = 'ORC'
);
My questions so far:
1. If the Trino schema has a location location = '<s3a://example/v2/tiny>'
then why is the external location for the table still under main
(external_location = '<s3a://example/main/tiny_v2/orders>'
) ?
2. What should I see as a result of creating this if it does work? In my head I’m expecting, since it’s a branch off main, to see 15k records, is that right?
trino:> select count(*) from s3.tiny.orders;
_col0
-------
15000
(1 row)
trino:> select count(*) from s3.tiny_v2.orders;
_col0
-------
0
(1 row)
TIA 🙂create table as select
statements in the blog that populate the data, should there be a commit in lakeFS?main
, then branched to a new branch (v3
). I then created my v3_orders table against external_location = '<s3a://example/v3/tiny/orders>'
This worked:
trino:tiny_v2> select count(*) from s3.tiny_v3.orders;
_col0
-------
15000
(1 row)
Guy Hardonag
09/14/2022, 9:07 PMtiny/orders
-> tiny_v2/orders
) there aren’t any records in the new location (try using the external location <s3a://example/v2/tiny/orders>'
)
Thank you very much for pointing this out.Robin Moffatt
09/14/2022, 9:08 PMmain
branch before creating the v2
branch?Guy Hardonag
09/14/2022, 9:09 PMcreate table as select
statement there should be a commit.Robin Moffatt
09/14/2022, 9:11 PMGuy Hardonag
09/14/2022, 9:12 PMRobin Moffatt
09/14/2022, 9:13 PMUsing the Everything Bagel
the trino client command has had its --
mangled into —
docker compose — profile client run — rm trino-client
should be
docker compose --profile client run --rm trino-client
Guy Hardonag
09/14/2022, 9:14 PM