markdown
The NikeITPersonasToSalesforce component is a building block of a Yeager Workflow designed to import Nike IT personas data to Salesforce. This component processes the data provided by the input model, performs data transformation, and returns the number of successful imports and the total number of records imported.
This input model has the following fields:
organization_name
(str): Name of the organization.department_name
(str): Name of the department.salesforce_credentials
(Dict[str, Any]): Dictionary containing the Salesforce credentials.
This output model has the following fields:
successful_imports
(int): Number of successful imports.total_imported
(int): Total number of records imported.
The transform function of the NikeITPersonasToSalesforce component has the following parameters:
args
(NikeITPersonasToSalesforceIn): The input model provided by the user.callbacks
(typing.Any): Optional callbacks. Defaults to None.
The transform()
method performs the following steps:
- Calls the
transform()
method of the superclass (AbstractWorkflow) with the provided input model and callbacks. - Extracts the outputs from the
results_dict
returned by the superclass method. - Creates an output model with the extracted data
successful_imports
andtotal_imported
. - Returns the output model.
This component has the following external dependencies:
typing
: For type hints and type annotations.dotenv
: To load environment variables from the.env
file.pydantic
: For input and output model validation and serialization.fastapi
: To create FastAPI application for handling API requests.
There are no external API calls made by this component.
Error handling is not explicitly performed in this component. Errors are propagated from the superclass and handled by the Yeager Workflow Engine.
Here's an example of how to use the NikeITPersonasToSalesforce component in a Yeager Workflow.
- Create the input with the necessary data, such as organization name, department name, and Salesforce credentials.