Although you can use arcpy.FromWKT() there is a much more elegant token on arcpy.da.InsertCursor() than enables you to load a wkt text string straight into a featureclass.
Here is an example loading from a CSV file into a geodatabase with the geometry as a wkt string, but the same thing would apply for a sqlite database source if you iterated through the records. If you have upgraded the sqlite database to a spatialite database then you could convert the string wkt field into the geometry field, but there is a bug that crashes da.Update(row) on a geopackage at the moment (10.3 pre-release) but the da.InsertCursor(row) works ok. Of course it works normally if your target is a filegeodatabase.
def create_new(rcl):
''' create a new featureclass from scratch'''
# arcpy.management.CreateFeatureclass(ws, rcl, template='rcl_changeset_template', spatial_reference=sr)
arcpy.management.CreateFeatureclass(ws, rcl, 'POLYLINE', spatial_reference=sr)
arcpy.management.AddField(rcl, 'FID', 'LONG') # actually not a long but a complex string
arcpy.management.AddField(rcl, 'CHANGE', 'TEXT', field_length=16)
arcpy.management.AddField(rcl, 'ID', 'LONG')
arcpy.management.AddField(rcl, 'ALT_ID', 'LONG')
arcpy.management.AddField(rcl, 'STATUS', 'TEXT', field_length=4)
arcpy.management.AddField(rcl, 'NON_CADASTRAL_RD', 'TEXT', field_length=1)
arcpy.management.AddField(rcl, 'AUDIT_ID', 'LONG')
arcpy.management.AddField(rcl, 'SE_ROW_ID', 'LONG')
desc = arcpy.Describe(rcl)
print "target fc:", rcl, desc.shapeType, desc.spatialReference.name, desc.featureType
# create a buffer list without objectid and shape_length and rename shape field to a token
buf = [f.name.upper() for f in desc.fields]
print "Desc fields in target:",buf
buf.remove('OBJECTID')
# buf.remove('SHAPE_LENGTH')
buf[buf.index("SHAPE")] = 'SHAPE@WKT'
# shape field in cursor name MUST be one of special tokens so use SHAPE@WKT
dBuf = {f.upper():buf.index(f) for f in buf}
print "dBuf:", dBuf
# insert records into the featureclass
# maybe for speed we could use arcpy.da.Editor for bulk commits?
debug = False
icur = arcpy.da.InsertCursor(rcl, buf) # shape called SHAPE@ or SHAPE@WKT
with open(csv_file,'r') as f:
reader = csv.reader(f)
n = 0
for row in reader:
if reader.line_num == 1:
print "header:", len(row),row
rowCSV = [r.upper().replace('__','') for r in row] # get rid of double underscores in __change__
print "CSV header:",rowCSV
rowCSV[rowCSV.index("SHAPE")] = 'SHAPE@WKT'
dCSV = {r.upper():rowCSV.index(r) for r in rowCSV}
print "dCSV:", dCSV
for f in dBuf.keys():
try:
print "Field: {} Buf {}, CSV {} ".format(f, dBuf, dCSV)
except:
print "Field name dictionaries do not match", f
sys.exit(1)
print
print '-------------------- BEGIN --------------------------'
else:
n+=1
# fieldmapping by name dictionaries
# initialise a new buffer
feat = [None] * len(buf)
for f in buf: # iterate over field names
# just poke shape straight into buffer field as a WKT string!
if row[dCSV]: # populate if not an empty data element, otherwise leave as null
if f == 'FID':
feat[dBuf] = int(row[dCSV].split('.')[-1])
# print f,feat[dBuf]
else:
feat[dBuf] = row[dCSV]
icur.insertRow(feat)
del icur
deltaTime = datetime.datetime.now() - start
print n,"Well Done", deltaTime
return