Post: Upload Data by Database

Connects to a specified database, retrieves data using the provided query or table, and uploads it as a source.

Endpoint:

data_upload/upload_db_data

Input Parameters:

  • usecaseId (string, required): Unique identifier of the use case
  • usecaseVersion (integer, default: 1): Version of the use case
  • database_config (object, required): Contains database connection details:
    • db_type (string, required): Type of database (e.g., postgres, mysql)
    • host, port, database, username, password (string): DB connection details
    • query (string, required if no table specified): SQL query to fetch the data
    • table_name (string, optional): Name of the table to load from

Output: Returns metadata about the uploaded file, such as status, file_name, file_location.