Tiles on the boundary appear to be missing the fid column. In other tiles fid is present with the usual 'osgb'+16 digit format.
Where fid is missing, it gets imported with a NULL value, and this subsequently raises an error on import against the not-null constraint on the column.
For me, adding args.extend(['-forceNullable',]) towards the end of build_args() in utils.py did the trick. This prevents any not-null constraints making their way to the imported tables and avoids the error. If a unique or non-null fid is required, this can be dealt with after the import.
I seemed to get an ogc_fid primary key added to the imported data with and without this option, along with the original osgb fid values in a separate column.
This looks like the behaviour described in #18.
I'm importing OSMM Topology data with v7 schema.
Tiles on the boundary appear to be missing the
fid
column. In other tilesfid
is present with the usual 'osgb'+16 digit format. Wherefid
is missing, it gets imported with a NULL value, and this subsequently raises an error on import against the not-null constraint on the column.For me, adding
args.extend(['-forceNullable',])
towards the end ofbuild_args()
inutils.py
did the trick. This prevents any not-null constraints making their way to the imported tables and avoids the error. If a unique or non-nullfid
is required, this can be dealt with after the import.I seemed to get an
ogc_fid
primary key added to the imported data with and without this option, along with the original osgbfid
values in a separate column.