So I have a large import file of line protocol data that looks like this:
# DDL
CREATE DATABASE cptdata
CREATE RETENTION POLICY oneyear ON cptdata DURATION 365d REPLICATION 1
# DML
# CONTEXT-DATABASE: cptdata
# CONTEXT-RETENTION-POLICY: oneyear
lpardata,partitionName=host1,frame=frame1 phys_cores_used=0.81 1533441720
lpardata,partitionName=host2,frame=frame2 phys_cores_used=0.52 1533441780
lpardata,partitionName=host3,frame=frame3 phys_cores_used=0.01 1533441840
[...]
When I import it I get this output:
$ influx -import -path=myimportfile.influx -precision=s
2018/10/19 14:29:23 Processed 100000 lines. Time elapsed: 488.612792ms. Points per second (PPS): 204661
2018/10/19 14:29:23 Processed 200000 lines. Time elapsed: 982.878739ms. Points per second (PPS): 203483
2018/10/19 14:29:24 Processed 300000 lines. Time elapsed: 1.407458905s. Points per second (PPS): 213150
2018/10/19 14:29:24 Processed 400000 lines. Time elapsed: 1.874520048s. Points per second (PPS): 213387
2018/10/19 14:29:25 Processed 500000 lines. Time elapsed: 2.402448304s. Points per second (PPS): 208121
2018/10/19 14:29:25 Processed 600000 lines. Time elapsed: 2.862350222s. Points per second (PPS): 209617
2018/10/19 14:29:26 Processed 700000 lines. Time elapsed: 3.324955206s. Points per second (PPS): 210529
2018/10/19 14:29:26 Processed 800000 lines. Time elapsed: 3.918903014s. Points per second (PPS): 204138
2018/10/19 14:29:27 Processed 900000 lines. Time elapsed: 4.372104188s. Points per second (PPS): 205850
2018/10/19 14:29:27 Processed 1000000 lines. Time elapsed: 4.845329892s. Points per second (PPS): 206384
2018/10/19 14:29:27 Processed 2 commands
2018/10/19 14:29:27 Processed 1001035 inserts
2018/10/19 14:29:27 Failed 0 inserts
But when I go to look and see whats in my measurement, I get nothing:
$ influx -database 'cptdata' -execute 'select count(*) from lpardata' -format 'column'
$
But it DOES create the database and measurement:
$ influx -execute 'SHOW DATABASES' -format 'column'
name: databases
name
----
_internal
cptdata
$ influx -database 'cptdata' -execute 'SHOW MEASUREMENTS' -format 'column'
name: measurements
name
----
lpardata
And when I manually insert data from the shell, it works:
$ influx
Connected to http://localhost:8086 version 1.6.3
InfluxDB shell version: 1.6.3
> USE cptdata
> INSERT lpardata,partitionName=host1,frame=frame1 phys_cores_used=0.81 1533441720
> SELECT COUNT(*) FROM lpardata
name: lpardata
time count_phys_cores_used
---- ---------------------
0 1
So, where the heck is my data if it was supposedly successfully imported?