def resolve(self):
		print >> sys.stderr, 'process', self.processed
		for ent in self.block:
			kind = dsutil.get_kind(ent)
			line = [ ]
			for column in self.columns:
				name  = column
				value, t = dsutil.prop_value(ent, column)
				if column == '__key__':
					name = 'id'
					last = value[len(value) - 1]
					value = last.get('name') or last.get('id')
				if value:
					value = value.encode('UTF-8')
				line.append(value)
			values = [ ("'%s'" % (str(x).replace("'", "''"))) for x in line]
			values = [ kind ] + values
			print self.sql % tuple(values)
dataset/ETHPy150Open murer/dsopz/dsopz/processor_sql.py/SQLProcessor.resolve/original