Built-In Python Functions and Types
Overview
Below is a list of pre-defined functions that are available in the Python Script step. They allow you to access Reference Data, as well as Business and Fiscal Calendars.
Function: get_fiscal_periods_between_dates
Returns all periods of a Fiscal Calendar between dates.
Arguments
Returns
A list of Fiscal Periods
Function: get_next_fiscal_period_after_date
Gets the next Fiscal period for a given Fiscal Calendar after a given date.
Returns
Fiscal Period
Function: get_fiscal_period_by_date
Gets the Fiscal period for a given Fiscal Calendar after a given date.
Returns
Fiscal Period
Function: get_fiscal_period_by_fiscal_year_and_period_number
Gets the Fiscal period from given Fiscal Calendar, year and period.
Returns
Fiscal Period
Function: get_business_days_between_dates
Gets the list of all business days between given dates.
Returns
A list of BusinesDays
Function: get_business_days_from_year
Gets the list of all business days for a given year.
Returns
A list of BusinesDays
Function: get_business_days_from_year_and_month
Gets the list of all business days for a given year.
Returns
A list of BusinesDays
Function: get_business_day_from_year_and_month_and_day
Gets information about business day of a given day.
Returns
A BusinesDays
Function: get_next_working_business_day_from_date
Gets the next working day after a given date.
Returns
A BusinesDays
Function: get_nearest_working_business_day_from_date
Gets the nearest working day for a supplied date. This can be the supplied date if it is a Business Date.
Returns
A BusinesDays
Function: get_nth_business_day_before_reference_date
Gets the nth working day after a given reference date.
Returns
A BusinesDays
Function: lookup
Performs the lookup a given Fynapse Reference Data Entity using the conditions provided.
Returns
A list of Reference Data Entities that are matching the supplied conditions. The Reference Data Entities will have the properties as defined in the Configuration Data JSON file.
Function: equal_condition
A condition that defines an EQ (=) condition between the properties of a Data Entity and the value provided.
Function: publish
Creates a Flow variable and makes it available to a subsequent Flow step.
Type: Period
Type that represents a Fiscal period. Each Period type has the following properties:
Type: BusinessDay
Type that returns information a given day returned from a Business Calendar.
Type: BusinessDayInfo
Type that represents information about a Business Day.
Function: ingestion_id
Returns the Ingestion ID of the input record that was the source of data used in the Flow.
Function: get_current_business_date
Returns current Business Date, i.e. Fynapse system date adjusted for the specified Subledger Node Configurations timezone.
Function: get_current_system_date
Returns current System Date, i.e. the actual date and time of the machine you are using to work with Fynapse.
Function: logger
Logs defined messages to the Error Management.
We recommend you carefully plan what messages you want to implement, as having too many messages may cause an information overload that will not be easy to analyze.
All three types of messages have a 4,000 character limit.
The configured messages will be logged in the Error Management with: Category: Flow Subcategory: Log Severity: Information/Warning/Error based on the type of the configured message.