Execute Python Scripts Using Bold ETL and Visualize the Results in Bold Reports
To execute a Python script in Bold ETL and visualize the results in Bold Reports, follow the step-by-step process below.
Step 1: Click on the Bold ETL icon to open the Bold ETL site in a new tab.
Step 2: Click Add Project in the left-side panel. Enter the project name and click the tick icon.
Step 3: Click on the Project name. It will open a YAML editor to configure the source and destination connector configurations.
Step 4: Click PythonScript in the left side panel and Add Template in the right side panel, to add the sample configuration in the YAML editor.
Step 5: In your Python script, ensure you have a data frame object. Add the following line after the DataFrame object is moved to tables using Bold ETL.
pipeline.run(yourdataframename, table_name="yourtablename")
Replace yourdataframename with the DataFrame name and yourtablename with the desired table name in your destination database.
Step 6: Then click Upload File button in right side corner.
Step 7: Choose the Python script file from your local server and click on the Upload button.
Make sure the Python Script file has .py extension.
Step 8: The file path will be copied into the ‘filepath’ textbox. Now, you can copy the path and paste it into the YAML editor.
Step 9: Click the Save button and choose the destination database configured in the Data Store settings.
Step 10: Go to Schedules and select the Run Now option from the context menu of the data source grid.
Step 11: Logs will be available in the Logs tab. Click the project name in the left-side panel and switch to the Logs tab.
Step 12: The data frame will be created as a table in the destination database, and a data source will be created in Bold Reports Data Sources, named as project name in Bold ETL.
Step13: Create the report from the Bold Reports Data Source that was created by Bold ETL.
Reference:
Working with Bold ETL
To run the sentimental_analysis.py sample, install the scikit-learn pip package using the command pip install scikit-learn. If you are using Windows, use the command C:\BoldServices\Python39\Scripts\pip.exe install scikit-learn.
Attachments