<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=Windows-1252">
<style type="text/css" style="display:none;"> P {margin-top:0;margin-bottom:0;} </style>
</head>
<body dir="ltr">
<div style="font-family: Calibri, Arial, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);">
Have you considered a script or batch file using ogr2ogr to do this for you?<br>
</div>
<div>
<div style="font-family: Calibri, Arial, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);">
<br>
</div>
<div id="Signature">
<div>
<div></div>
<div></div>
<div name="divtagdefaultwrapper" style="font-family:Calibri,Arial,Helvetica,sans-serif; font-size:; margin:0">
<div class="BodyFragment">
<div class="PlainText">Brent Wood<br>
<br>
Principal Technician, Fisheries<br>
NIWA<br>
DDI:  +64 (4) 3860529</div>
</div>
</div>
</div>
</div>
</div>
<div id="appendonsend"></div>
<hr style="display:inline-block;width:98%" tabindex="-1">
<div id="divRplyFwdMsg" dir="ltr"><font face="Calibri, sans-serif" style="font-size:11pt" color="#000000"><b>From:</b> Qgis-user <qgis-user-bounces@lists.osgeo.org> on behalf of Johanna Botman via Qgis-user <qgis-user@lists.osgeo.org><br>
<b>Sent:</b> Wednesday, March 9, 2022 12:41<br>
<b>To:</b> qgis-user@lists.osgeo.org <qgis-user@lists.osgeo.org><br>
<b>Subject:</b> [Qgis-user] Model Designer - GDAL - Vector Conversion</font>
<div> </div>
</div>
<style>
<!--
@font-face
        {font-family:"Cambria Math"}
@font-face
        {font-family:Calibri}
p.x_MsoNormal, li.x_MsoNormal, div.x_MsoNormal
        {margin:0cm;
        font-size:11.0pt;
        font-family:"Calibri",sans-serif}
span.x_EmailStyle17
        {font-family:"Calibri",sans-serif;
        color:windowtext}
.x_MsoChpDefault
        {font-family:"Calibri",sans-serif}
@page WordSection1
        {margin:72.0pt 72.0pt 72.0pt 72.0pt}
div.x_WordSection1
        {}
-->
</style>
<div lang="EN-AU" link="#0563C1" vlink="#954F72" style="word-wrap:break-word">
<div class="x_WordSection1">
<p class="x_MsoNormal">I am trying to use the Model Designer to automate the creation of Tab files from SQL Database Tables.</p>
<p class="x_MsoNormal">I am using GDAL – Vector Conversion – Convert format</p>
<p class="x_MsoNormal">The resulting Tab file is missing the Primary Key field.</p>
<p class="x_MsoNormal">If use that same algorithm to export to a Geopackage, the PK is there.</p>
<p class="x_MsoNormal">I know that I can right click the SQL Table and select Export. That Tab file contains the PK. I need to export 30 tables so am looking for some automation.</p>
<p class="x_MsoNormal"> </p>
<p class="x_MsoNormal">Why does the algorithm produce a table without the key field?</p>
<p class="x_MsoNormal"> </p>
<p class="x_MsoNormal"><b><span style="font-size:12.0pt"> </span></b></p>
<p class="x_MsoNormal"><b><span style="font-size:12.0pt"> </span></b></p>
<p class="x_MsoNormal"><b><span style="font-size:12.0pt">Johanna Botman</span></b></p>
<p class="x_MsoNormal"><span style=""> </span></p>
<p class="x_MsoNormal"><span style="">Assets / GIS Officer – Melton City Council</span></p>
<p class="x_MsoNormal"><span style=""> </span></p>
<p class="x_MsoNormal"><span style="font-family:"Arial",sans-serif; color:#1F497D"> 
</span><span style="font-family:"Arial",sans-serif"></span></p>
<p class="x_MsoNormal"><span style="font-family:"Arial",sans-serif; color:#1F497D"> </span></p>
<p class="x_MsoNormal"><span style=""> </span></p>
<p class="x_MsoNormal"> </p>
</div>
<p><br>
***********************************************************************************<br>
The information in this message is privileged and confidential, intended only for the use of the individual or entity named above. If you are not the intended recipient you are hereby notified to delete the message and that any dissemination, copying or use
 of its content is strictly prohibited. If you have received this message in error please notify the Melton City Council.<br>
***********************************************************************************</p>
</div>
<table style="width: 600px; font-size: 8pt; font-family: Arial" cellspacing="20">
<tbody>
<tr>
<td><a href="https://www.niwa.co.nz"><img src="https://www.niwa.co.nz/static/niwa-2018-horizontal-180.png">
</a></td>
<td>
<table style="width: 500px">
<tbody>
<span>Brent Wood <br>
<font color="#1793d2">Principal Technician - GIS and Spatial Data Management</font><br>
<font color="#1793d2">Programme Leader - Environmental Information Delivery</font><br>
+64-4-386-0529<br>
<br>
National Institute of Water & Atmospheric Research Ltd (NIWA)<br>
301 Evans Bay Parade Hataitai Wellington New Zealand<br>
<b>Connect with NIWA:</b> <a href="https://www.niwa.co.nz">niwa.co.nz</a> <a href="https://www.facebook.com/nzniwa">
Facebook</a> <a href="https://www.linkedin.com/company/niwa">LinkedIn</a> <a href="https://twitter.com/niwa_nz">
Twitter</a> <a href="https://www.instagram.com/niwa_science">Instagram</a> </span>
</tbody>
</table>
</td>
</tr>
</tbody>
</table>
<font face="Arial" size="1">To ensure compliance with legal requirements and to maintain cyber security standards, NIWA's IT systems are subject to ongoing monitoring, activity logging and auditing. This monitoring and auditing service may be provided by third
 parties. Such third parties can access information transmitted to, processed by and stored on NIWA's IT systems</font>
</body>
</html>