Import data from .csv file failing

I am trying to import a .csv file into cockroach as mentioned here

I dropped my table using DROP TABLE then executed the below command:-

IMPORT TABLE ip_metadata (
    startrange bigint NOT NULL,
    endrange bigint NOT NULL,
    blob text,
    INDEX startrange_on_ip_metadata (startrange),
    INDEX endrange_on_ip_metadata (endrange)
)
CSV DATA ('/Users/tuk/Desktop/ip_metadata.csv')
WITH
    temp = '/tmp/'
;

This is giving me an error pq: unsupported storage scheme: "". Can someone let me know what does the above error mean?

Both the CSV and temp filenames must be URLs: https://www.cockroachlabs.com/docs/v1.1/import.html#import-file-temp-directory-urls. If you are running a single-node cluster then you should append both with nodelocal://.

@mjibson - This is working fine.

But failing when this is used as part of execute command

cockroach sql --insecure --execute="DROP TABLE IF EXISTS van.ip_metadata;
IMPORT TABLE van.ip_metadata (
    startrange bigint NOT NULL,
    endrange bigint NOT NULL,
    blob text,
    INDEX startrange_on_ip_metadata (startrange),
    INDEX endrange_on_ip_metadata (endrange)
)
CSV DATA ('nodelocal:///Users/dmanna/Desktop/ip_metadata.csv')
WITH
    temp = 'nodelocal:///tmp/temp.txt'
;
";

The above command is giving error Error: pq: must specify target database with "into_db" option

<Removed, was incorrect>

Er, actually, into_db isn’t in 1.1, so just have to set the session DB for now, e.g. SET DATABASE = 'van; before running the IMPORT

Do you want me file an issue in github to fix the docs?