Search results
Suggest a FeaturePDF

PythonScript

PythonScript is a file with a .py extension that contains a sequence of instructions written in the Python programming language to perform tasks such as automation, data processing or analysis.

Example Configuration

version: 1.0.1
encrypt_credentials: false
union_all_tables: true
add_dbname_column: false
use_snake_casing: true
plugins:
  extractors:
  - name: pyscript1
    connectorname: PythonScript
    schemaname:
    config:
      filePath: C:\BoldServices\app_data\elt\connectors\csvreaders.py
    properties:
    metadata:
    select:

Configure the Bold Data Hub to connect PythonScript

  1. Click the Data Hub icon on the Navigation Pane.

PythonScript Data Hub- Reports

  1. Click Add Pipeline and provide the new pipeline’s name.

PythonScript Data Hub- Reports

  1. Select the newly created pipeline and add the PythonScript template.

PythonScript Data Hub- Reports

  1. In your Python Script, ensure you have a data frame object. Add the following line after the dataframe object that is moved to tables using Bold ETL.
pipeline.run(yourdataframename, table_name="yourtablename")

Replace yourdataframename with dataframe name & yourtablename with desired table name in your destination database.

  1. Click the “Upload File” button to upload your Python file.

PythonScript - Reports

  1. Copy the filepath and replace in filePath property.

PythonScript - Reports

PythonScript - Reports

  1. Click Save and choose the desired destination to save the pipeline.

PythonScript - Reports

  1. Creating a Pipeline in Bold Data Hub automatically creates a Data Source in Bold Reports®. The Bold Reports® Data Source is a live data source to the destination database used in Bold Data Hub.

PythonScript- Reports

Schedule Bold Data Hub Job

  1. To configure interval-based scheduling, click on the schedules tab and select the created pipeline and click on the schedule icon and configure it.

PythonScript - Reports

PythonScript - Reports

  1. For on-demand refresh, click Run Now button.

PythonScript - Reports

  1. The Schedule history can be checked using the history option as well as logs.

PythonScript - Reports

  1. Click on Logs to see if the run is completed and data source is created in Bold Reports®.

PythonScript - Reports

  1. Click Edit DataSource Option to view the created tables.