Reputation: 321
I'm trying to extract data from my influx DB to a csv file using the below commands from terminal. It is showing me some syntax error.
influx \
-host "$INFLUXDB_HOST" \
-username "$INFLUXDB_USERNAME" \
-password "$INFLUXDB_PASSWORD" \
-ssl \
-precision rfc3339 \
-format "csv" \
-execute "select * from "users" where "_user_id" = '2830278'" \
-database "$INFLUXDB_DATABASE" > "usersdata".csv;
the error I'm getting is: error parsing query: found USERS, expected identifier at line 1, char 15
There is something I'm missing here. can someone look at this and tell me.
Upvotes: 0
Views: 278
Reputation: 321
This did work
influx \
-host "$INFLUXDB_HOST" \
-username "$INFLUXDB_USERNAME" \
-password "$INFLUXDB_PASSWORD" \
-ssl \
-precision rfc3339 \
-format "csv" \
-execute "select * from users where _user_id = '2830278'" \
-database "$INFLUXDB_DATABASE" > "usersdata".csv;
Upvotes: 0