mirror of
https://github.com/wassname/catalyst.git
synced 2026-07-01 10:33:54 +08:00
allow passing of data type from data source
This commit is contained in:
@@ -45,11 +45,12 @@ class DataSource(with_metaclass(ABCMeta)):
|
||||
"""
|
||||
Override this to hand craft conversion of row.
|
||||
"""
|
||||
row = {target: mapping_func(raw_row[source_key])
|
||||
for target, (mapping_func, source_key)
|
||||
in self.mapping.items()}
|
||||
row.update({'source_id': self.get_hash()})
|
||||
row = {}
|
||||
row.update({'type': self.event_type})
|
||||
row.update({target: mapping_func(raw_row[source_key])
|
||||
for target, (mapping_func, source_key)
|
||||
in self.mapping.items()})
|
||||
row.update({'source_id': self.get_hash()})
|
||||
return row
|
||||
|
||||
@property
|
||||
|
||||
Reference in New Issue
Block a user