-DATASET CSV empty
--

-CASE AzureExtensionNotLoaded
-SKIP_STATIC_LINK
-STATEMENT LOAD FROM "az://kuzu-test/vPerson.csv" RETURN *;
---- error(regex)
^IO exception: Cannot open file.+

-CASE AzureScan
-SKIP_STATIC_LINK
-LOAD_DYNAMIC_EXTENSION azure
-STATEMENT LOAD FROM "az://kuzu-test/vPerson.csv" RETURN *;
---- 5
0|Alice|1|True|False|35|5.000000|1900-01-01|2011-08-20 11:25:30Z+00:00|3 years 2 days 13 hours 2 minutes|[10,5]|[Aida]|[[10,8],[6,7,8]]|[96,54,86,92]|1.731000|A0EEBC99-9C0B-4EF8-BB6D-6BB9BD380A11
2|Bob|2|True|False|30|5.100000|1900-01-01|2008-11-03 13:25:30.000526-02:00|10 years 5 months 13 hours 24 us|[12,8]|[Bobby]|[[8,9],[9,10]]|[98,42,93,88]|0.990000|{a0eebc99-9c0b-4ef8-bb6d-6bb9bd380a12}
3|Carol|1|False|True|45|5.000000|1940-06-22|1911-08-20 02:32:21|48 hours 24 minutes 11 seconds|[4,5]|[Carmen,Fred]|[[8,10]]|[91,75,21,95]|1.000000|a0eebc999c0b4ef8bb6d6bb9bd380a13
5|Dan|2|False|True|20|4.800000|1950-07-23|2031-11-30 12:25:30Z|10 years 5 months 13 hours 24 us|[1,9]|[Wolfeschlegelstein,Daniel]|[[7,4],[8,8],[9]]|[76,88,99,89]|1.300000|a0ee-bc99-9c0b-4ef8-bb6d-6bb9-bd38-0a14
7|Elizabeth|1|False|True|20|4.700000|1980-10-26|1976-12-23 11:21:42|48 hours 24 minutes 11 seconds|[2]|[Ein]|[[6],[7],[8]]|[96,59,65,88]|1.463000|{a0eebc99-9c0b4ef8-bb6d6bb9-bd380a15}

-STATEMENT CALL current_setting('AZURE_CONNECTION_STRING') return *;
---- ok
-STATEMENT CREATE NODE TABLE Person AS LOAD FROM "az://kuzu-test/vPerson.csv" RETURN *;
---- ok
-STATEMENT MATCH (a:Person) RETURN a.fname, a.ISStudent, a.age;
---- 5
Alice|True|35
Bob|True|30
Carol|False|45
Dan|False|20
Elizabeth|False|20
-STATEMENT COPY Person FROM (LOAD FROM "az://${AZURE_ACCOUNT_NAME}.blob.core.windows.net/kuzu-test/vPerson2.csv" RETURN *);
---- ok
-STATEMENT MATCH (a:Person) RETURN a.fname, a.Gender, a.isWorker;
---- 8
Alice|1|False
Bob|2|False
Carol|1|True
Dan|2|True
Elizabeth|1|True
Farooq|2|False
Greg|2|False
Hubert Blaine Wolfeschlegelsteinhausenbergerdorff|2|True
-STATEMENT CREATE REL TABLE Knows (FROM Person TO Person, date DATE, meetTime TIMESTAMP, validInterval INTERVAL, comments STRING[], summary STRUCT(locations STRING[], transfer STRUCT(day DATE, amount INT64[])), notes UNION(firstmet DATE, type INT16, comment STRING), someMap MAP(STRING, STRING), MANY_MANY);
---- ok
-STATEMENT COPY Knows FROM (LOAD FROM "az://kuzu-test/eKnows.csv" RETURN *);
---- ok
-STATEMENT MATCH (a:Person)-[e:Knows]->(b:Person) RETURN a.fname, b.fname;
---- 6
Alice|Dan
Alice|Carol
Alice|Bob
Bob|Dan
Bob|Carol
Bob|Alice
-STATEMENT COPY Knows FROM (LOAD FROM "abfss://${AZURE_ACCOUNT_NAME}.dfs.core.windows.net/kuzu-test/dirA/dirB/eKnows_2.csv" RETURN *);
---- ok
-STATEMENT MATCH (a:Person)-[e:Knows]->(b:Person) RETURN a.fname, b.fname;
---- 14
Alice|Bob
Alice|Carol
Alice|Dan
Bob|Alice
Bob|Carol
Bob|Dan
Carol|Alice
Carol|Bob
Carol|Dan
Dan|Alice
Dan|Bob
Dan|Carol
Elizabeth|Farooq
Elizabeth|Greg
-STATEMENT LOAD FROM "abfss://kuzu-test/glob/glob*.csv" RETURN * ORDER BY id;
---- 16
0|bob
1|billy
2|emily
3|joanna
4|peter
5|alex
6|beatrice
7|timothy
8|geralt
9|jane
10|carol
11|michelle
12|walter
13|bryan
14|devin
15|farquaad
-STATEMENT LOAD FROM "az://kuzu-test/glob/*glob.csv" RETURN *;
---- 2
20|abc
21|xyz
-STATEMENT LOAD FROM "az://kuzu-test/glob/*glob*.csv" RETURN *;
---- error
Invalid Input Error: Schema mismatch between globbed files.
Main file schema: az://kuzu-test/glob/fglob.csv
Current file: az://kuzu-test/glob/glob1.csv
Column with name: "column0" is missing
Column with name: "column1" is missing
Potential Fix: Since your schema has a mismatch, consider setting union_by_name=true.

-CASE AzurePublicScan
-SKIP_STATIC_LINK
-LOAD_DYNAMIC_EXTENSION azure
-STATEMENT CALL AZURE_CONNECTION_STRING = "";
---- ok
-STATEMENT LOAD FROM 'az://${AZURE_PUBLIC_CONTAINER}/vPerson.csv' RETURN fname, Gender, isWorker;
---- 5
Alice|1|False
Bob|2|False
Carol|1|True
Dan|2|True
Elizabeth|1|True
-STATEMENT CALL AZURE_ACCOUNT_NAME = '${AZURE_ACCOUNT_NAME}';
---- ok
-STATEMENT LOAD FROM 'az://${AZURE_PUBLIC_CONTAINER}/vPerson.csv' RETURN fname, Gender, isWorker;
---- 5
Alice|1|False
Bob|2|False
Carol|1|True
Dan|2|True
Elizabeth|1|True

-CASE AzureInvalidAuth
-SKIP_STATIC_LINK
-LOAD_DYNAMIC_EXTENSION azure
-STATEMENT CALL AZURE_CONNECTION_STRING = "";
---- ok
-STATEMENT CALL AZURE_ACCOUNT_NAME = "";
---- ok
-STATEMENT LOAD FROM "az://kuzu-test/vPerson.csv" RETURN *;
---- error
Runtime exception: Azure authentication requires one of AZURE_CONNECTION_STRING or AZURE_ACCOUNT_NAME to be non-empty

-CASE AttachAzureDB
-SKIP_STATIC_LINK
-LOAD_DYNAMIC_EXTENSION azure
-STATEMENT ATTACH "az://random/path" as test (dbtype kuzu);
---- error
Runtime exception: This feature is not currently supported
