<html><head>
<meta http-equiv="Content-Type" content="text/html; charset=us-ascii">
</head>
<body alink="#EE0000" bgcolor="#ffffff" link="#0B6CDA" text="#000000" vlink="#551A8B">
Hi List.<br>
<br>
I'm trying to convert a CSV to PostgreSQL with ogr2ogr, but the CSV
is coming from an API:<br>
<br>
<pre style="margin: 0px 0px 1em; padding: 5px; border: 0px none; font-size: 13px; width: auto; max-height: 600px; overflow: auto; background-color: rgb(239, 240, 241); word-wrap: normal; color: rgb(36, 39, 41); font-style: normal; font-variant-ligatures: normal; font-variant-caps: normal; font-weight: normal; letter-spacing: normal; text-align: left; text-indent: 0px; text-transform: none; word-spacing: 0px;"><a class="moz-txt-link-freetext" href="http://api.statbank.dk/v1/data/FT/CSV?delimiter=Semicolon&HOVEDDELE=*&Tid=*">http://api.statbank.dk/v1/data/FT/CSV?delimiter=Semicolon&HOVEDDELE=*&Tid=*</a></pre>
<br>
I have tried following ogr2ogr:<br>
<br>
ogr2ogr -f PostgreSQL PG:"dbname=postgres host=localhost port=5432
user=postgres password=xxx"
CSV:"/vsicurl/<a class="moz-txt-link-freetext" href="http://api.statbank.dk/v1/data/FT/CSV?delimiter=Semicolon&HOVEDDELE=*&Tid=*">http://api.statbank.dk/v1/data/FT/CSV?delimiter=Semicolon&HOVEDDELE=*&Tid=*</a>"
-nln FT -lco SEPARATOR=SEMICOLON<br>
<br>
But are getting: Unable to open data source.... <br>
I can get it working if I download the CSV and use ogr2ogr, but
would prefer to fetch it straight from the API to reduce the steps
in my script.<br>
<br>
Thanks in advance. <br>
<br>
Anders<br>
</body>
</html>