Skip to content

Commit

Permalink
fix(ingestion/salesforce): fixed the issue by escaping the markdown s…
Browse files Browse the repository at this point in the history
…tring (#10157)
  • Loading branch information
dushayntAW authored Apr 2, 2024
1 parent 4bba834 commit 2873736
Show file tree
Hide file tree
Showing 3 changed files with 108 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -573,10 +573,15 @@ def _get_schema_field(

fieldTags: List[str] = self.get_field_tags(fieldName, field)

description = self._get_field_description(field, customField)

# escaping string starting with `#`
description = "\\" + description if description.startswith("#") else description

schemaField = SchemaFieldClass(
fieldPath=fieldPath,
type=SchemaFieldDataTypeClass(type=TypeClass()), # type:ignore
description=self._get_field_description(field, customField),
description=description,
# nativeDataType is set to data type shown on salesforce user interface,
# not the corresponding API data type names.
nativeDataType=field["FieldDefinition"]["DataType"],
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2508,6 +2508,74 @@
},
"RelationshipName": null,
"IsNillable": true
},
{
"attributes": {
"type": "EntityParticle",
"url": "/services/data/v54.0/tooling/sobjects/EntityParticle/Account.Unique_Account"
},
"QualifiedApiName": "Unique_Account",
"DeveloperName": "Unique_Account",
"Label": "# Unique_Account",
"FieldDefinition": {
"attributes": {
"type": "FieldDefinition",
"url": "/services/data/v54.0/tooling/sobjects/FieldDefinition/Account.Unique_Account"
},
"DataType": "Text(80)",
"LastModifiedDate": null,
"LastModifiedBy": null,
"IsIndexed": false,
"ComplianceGroup": null,
"SecurityClassification": null
},
"DataType": "string",
"Precision": 0,
"Scale": 0,
"Length": 80,
"Digits": 0,
"IsUnique": false,
"IsCompound": false,
"IsComponent": false,
"ReferenceTo": {
"referenceTo": null
},
"RelationshipName": null,
"IsNillable": true
},
{
"attributes": {
"type": "EntityParticle",
"url": "/services/data/v54.0/tooling/sobjects/EntityParticle/Account.Unique_Number"
},
"QualifiedApiName": "Unique_Number",
"DeveloperName": "Unique_Account",
"Label": "#Unique_Number",
"FieldDefinition": {
"attributes": {
"type": "FieldDefinition",
"url": "/services/data/v54.0/tooling/sobjects/FieldDefinition/Account.Unique_Number"
},
"DataType": "Text(80)",
"LastModifiedDate": null,
"LastModifiedBy": null,
"IsIndexed": false,
"ComplianceGroup": null,
"SecurityClassification": null
},
"DataType": "string",
"Precision": 0,
"Scale": 0,
"Length": 80,
"Digits": 0,
"IsUnique": false,
"IsCompound": false,
"IsComponent": false,
"ReferenceTo": {
"referenceTo": null
},
"RelationshipName": null,
"IsNillable": true
}
]
}
Original file line number Diff line number Diff line change
Expand Up @@ -1350,6 +1350,40 @@
},
"isPartOfKey": false,
"jsonProps": "{}"
},
{
"fieldPath": "Unique_Account",
"nullable": true,
"description": "\\# Unique_Account",
"type": {
"type": {
"com.linkedin.schema.StringType": {}
}
},
"nativeDataType": "Text(80)",
"recursive": false,
"globalTags": {
"tags": []
},
"isPartOfKey": false,
"jsonProps": "{}"
},
{
"fieldPath": "Unique_Number",
"nullable": true,
"description": "\\#Unique_Number",
"type": {
"type": {
"com.linkedin.schema.StringType": {}
}
},
"nativeDataType": "Text(80)",
"recursive": false,
"globalTags": {
"tags": []
},
"isPartOfKey": false,
"jsonProps": "{}"
}
],
"primaryKeys": [
Expand Down

0 comments on commit 2873736

Please sign in to comment.