Closed dboeke closed 1 year ago
hmmm .... wondering how you got to that state?
What do you see for .inspect test
?
Seems to work for me:
/tmp/crap $ cat test.csv
Billable Hours,Bundle Type
10,xxx
/tmp/crap $ steampipe query
Welcome to Steampipe v0.17.0-alpha.16
For more information, type .help
> .inspect test
+----------------+-------+-------------------------------------------------------+
| column | type | description |
+----------------+-------+-------------------------------------------------------+
| Billable Hours | text | Field 0. |
| Bundle Type | text | Field 1. |
| _ctx | jsonb | Steampipe context in JSON form, e.g. connection_name. |
+----------------+-------+-------------------------------------------------------+
> select "Billable Hours" from test;
+----------------+
| Billable Hours |
+----------------+
| 10 |
+----------------+
Time: 73ms.
>
Strange
> .inspect test
+-------------------+-------+-------------------------------------------------------+
| column | type | description |
+-------------------+-------+-------------------------------------------------------+
| Bundle Type | text | Field 1. |
| _ctx | jsonb | Steampipe context in JSON form, e.g. connection_name. |
| Billable Hours | text | Field 0. |
+-------------------+-------+-------------------------------------------------------+
> select "Billable Hours" from test
Error: column "Billable Hours" does not exist (SQLSTATE 42703)
> select "Bundle Type" from test
+-------------+
| Bundle Type |
+-------------+
| xxx |
+-------------+
>
@dboeke It seems that there exist a hidden character. Because the column should given alphabetical order when you inspect the table, but it does not.
oh - good catch @daeho-ro ... I wonder if it's a UTF-8 CSV file, similar to https://github.com/turbot/steampipe-plugin-csv/issues/38?
I think this is same as #38.
Describe the bug Can't query column header for csv file with the name "Billable Hours"
Steampipe version (
steampipe -v
) Example: v0.16.3Plugin version (
steampipe plugin list
) Example: v0.3.2To reproduce create this csv file:
query the file:
Expected behavior Both queries should work
Additional context Was having trouble reproducing with other column names, e.g. "Foo Bar" works fine...