diff --git a/ingestion/src/metadata/ingestion/source/salesforce.py b/ingestion/src/metadata/ingestion/source/salesforce.py index 87396a6836f..ea80f700b5e 100644 --- a/ingestion/src/metadata/ingestion/source/salesforce.py +++ b/ingestion/src/metadata/ingestion/source/salesforce.py @@ -92,13 +92,19 @@ class SalesforceSource(Source[OMetaDatabaseAndTable]): return cls(config, metadata_config, ctx) def column_type(self, column_type: str): - if column_type in ["ID", "PHONE", "CURRENCY"]: - type = "INT" - elif column_type in ["REFERENCE", "PICKLIST", "TEXTAREA", "ADDRESS", "URL"]: - type = "VARCHAR" - else: - type = column_type - return type + if column_type in {"ID", "PHONE", "CURRENCY"}: + return "INT" + if column_type in { + "REFERENCE", + "PICKLIST", + "TEXTAREA", + "ADDRESS", + "URL", + "EMAIL", + }: + return "VARCHAR" + + return column_type def next_record(self) -> Iterable[OMetaDatabaseAndTable]: yield from self.salesforce_client() @@ -143,9 +149,10 @@ class SalesforceSource(Source[OMetaDatabaseAndTable]): Column( name=column["name"], description=column["label"], - columnDataType=self.column_type(column["type"].upper()), - columnConstraint=col_constraint, + dataType=self.column_type(column["type"].upper()), + constraint=col_constraint, ordinalPosition=row_order, + dataLength=column["length"], ) ) row_order += 1