Articles in this section
Category / Section

Execute Python Scripts Using Bold ETL and Visualize the Results in Bold Reports

Published:
Updated:

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.

select-bold-etl.png

etl-page.png

Step 2: Click Add Project in the left-side panel. Enter the project name and click the tick icon.

etl-add-project.png

python-test.png

Step 3: Click on the Project name. It will open a YAML editor to configure the source and destination connector configurations.

python-connectors-list.png

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.

python-script-add-template.png

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.

python-upload-file.png

Step 7: Choose the Python script file from your local server and click on the Upload button.

upload-python-script.png

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.

copy-path.png

add-filepath.png

Step 9: Click the Save button and choose the destination database configured in the Data Store settings.

reports.gif

Step 10: Go to Schedules and select the Run Now option from the context menu of the data source grid.

schedule-run-now.png

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.

python-table-creation.png

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.

python-datasource.png

python-query-designer.png

Step13: Create the report from the Bold Reports Data Source that was created by Bold ETL.

sentimental-analysis.png

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

Was this article useful?
Like
Dislike
Help us improve this page
Please provide feedback or comments
Comments (0)
Please  to leave a comment
Access denied
Access denied