### Clone and Setup ROI Reporting Agent Source: https://github.com/treasure-data/treasure-boxes/blob/master/engage-box/roi_reporting/agent/README.md Clone the repository, set up the sparse checkout, create the necessary database, and push the agent. This quick start guide covers the essential steps for initial deployment. ```bash # 1. Clone repository git clone --depth 1 --filter=blob:none --sparse https://github.com/treasure-data/treasure-boxes.git cd treasure-boxes git sparse-checkout set engage-box/roi_reporting cd engage-box/roi_reporting/agent # 2. Create database (if not exists) tdx api -X POST /v3/database/create/engage_roi_reporting # Note: "Name has already been taken" error is OK if database already exists # 3. Create LLM project tdx llm project create "ROI Reporting Agent" # 4. Push agent tdx agent push . -f ``` -------------------------------- ### Start S3 Example Workflow Source: https://github.com/treasure-data/treasure-boxes/blob/master/integration-box/s3/README.md Initiate the S3 example workflow using the `td wf start` command. This command starts a new session for the specified workflow and project. ```sh $ td wf start s3 s3 --session now 2019-09-14 10:15:23 +0900: Digdag v0.9.39 Started a session attempt: session id: 12623047 attempt id: 55668803 uuid: 094b3ba3-7b79-4abb-a529-89e5b67ba711 project: s3 workflow: s3 session time: 2019-09-14 01:15:24 +0000 retry attempt name: params: {} created at: 2019-09-14 10:15:27 +0900 * Use `td workflow session 12623047` to show session status. * Use `td workflow task 55668803` and `td workflow log 55668803` to show task status and logs. ``` -------------------------------- ### Python Environment Setup Source: https://github.com/treasure-data/treasure-boxes/blob/master/engage-box/roi_reporting/workflows/reporting_agent/README.md Set up a Python virtual environment and install necessary dependencies using pip. Ensure Python 3.6 or later is installed. ```bash # Create a virtual environment python -m venv reporting_agent_env # Activate the virtual environment # On macOS/Linux: source reporting_agent_env/bin/activate # On Windows (Note: Windows commands are provided for reference but have not been verified): # reporting_agent_env\Scripts\activate # Create a requirements.txt file with the following content: cat > requirements.txt << EOL pytd>=0.9.0 pandas>=1.0.0 numpy>=1.19.0 EOL # Install dependencies pip install -r requirements.txt ``` -------------------------------- ### Push and Start Basic Monitoring Workflow Source: https://context7.com/treasure-data/treasure-boxes/llms.txt Use these commands to push the basic monitoring workflow and start initial and incremental ingestions. Ensure secrets are set before starting. ```bash td wf push basic_monitoring td wf secrets --project basic_monitoring --set td.apikey=1234/abcdefg... td wf start basic_monitoring initial_ingest --session now # After initial load, run incremental daily: td wf start basic_monitoring incremental_ingest --session now ``` -------------------------------- ### Running td-spark PySpark Example Source: https://github.com/treasure-data/treasure-boxes/blob/master/integration-box/pyspark/README.md Commands to push the td-spark project, set API keys and endpoint secrets, and start a PySpark session. ```bash $ td wf push td-spark $ td wf secrets --project td-spark --set td.apikey --set td.apiserver # Input TD API KEY (1/XXXXXXX) and ENDPOINT (e.g. https://api.treasuredata.com) $ td wf start td-spark pyspark --session now ``` -------------------------------- ### Start HTTP Server (Python 3) Source: https://github.com/treasure-data/treasure-boxes/blob/master/tool-box/workflow-visualizer/README.md Start a simple HTTP server on port 8000 using Python 3. This is required to serve the visualizer's files locally. ```bash $ python -m http.server 8000 ``` -------------------------------- ### Start Workflow Session with td wf start Source: https://github.com/treasure-data/treasure-boxes/blob/master/td/power_bi/README.md Trigger a workflow session manually. Replace `` and `` with your project and workflow names, respectively. 'now' starts the session immediately. ```bash # Run $ td wf start --session now ``` -------------------------------- ### Start HTTP Server (Python 2) Source: https://github.com/treasure-data/treasure-boxes/blob/master/tool-box/workflow-visualizer/README.md Start a simple HTTP server on port 8000 using Python 2. This is required to serve the visualizer's files locally. ```bash $ python -m SimpleHTTPServer 8000 ``` -------------------------------- ### Install Python Packages Source: https://github.com/treasure-data/treasure-boxes/blob/master/integration-box/scorer-edge/README.md Install necessary Python packages for Treasure Data integration and image processing. Use the --user flag to install packages in the user's home directory. ```sh pip install --user pytd imutils ``` -------------------------------- ### Start Workflow Session with td wf start Source: https://github.com/treasure-data/treasure-boxes/blob/master/scenarios/backup_and_delete/README.md Trigger a manual session for the workflow to observe its execution. The '--session now' flag starts the session immediately. ```bash # Run $ td wf start backup_and_delete --session now ``` -------------------------------- ### Start Treasure Data Workflow for S3 Source: https://github.com/treasure-data/treasure-boxes/blob/master/tool-box/s3_presigned/README.md Execute the S3 workflow using `td wf start`. This command initiates the session, which will then generate the pre-signed URL. ```sh $ td wf start s3_presigned s3 --session now 2019-09-14 10:15:23 +0900: Digdag v0.9.39 Started a session attempt: session id: 12623047 attempt id: 55668803 uuid: 094b3ba3-7b79-4abb-a529-89e5b67ba711 project: s3_presigned workflow: s3 session time: 2019-09-14 01:15:24 +0000 retry attempt name: params: {} created at: 2019-09-14 10:15:27 +0900 * Use `td workflow session 12623047` to show session status. * Use `td workflow task 55668803` and `td workflow log 55668803` to show task status and logs. ``` -------------------------------- ### Input JSON Lines Data Example Source: https://github.com/treasure-data/treasure-boxes/blob/master/scenarios/expand_json_s3/README.md This is an example of the expected input file format, which must be in JSON Lines. Each JSON object should be on a single line. ```json {"id": 1, "name":"John Smith", "valid_user":true, "email":{"primary": "foo1@example.com", "secondary": "bar1@example.com"}} {"id": 2, "name":"Joe Bloggs", "valid_user":false, "email":{"primary": "foo2@example.com", "secondary": "bar2@example.com"}} ``` -------------------------------- ### Workflow Log Output Example Source: https://github.com/treasure-data/treasure-boxes/blob/master/machine-learning-box/ml_tips/README.md Example output from the workflow log showing AUC and Log Loss metrics. ```text echo>: auc: 0.8044451551007356 logloss: 0.5337748192743182 ``` -------------------------------- ### Target List Table Structure Example Source: https://github.com/treasure-data/treasure-boxes/blob/master/activation_actions/filter_by_target_list/README.md Provides an example schema for a target list table, which includes anonymous_id for joining. ```sql campaign_target_list ( anonymous_id VARCHAR, -- Anonymous ID (JOIN KEY) campaign_id VARCHAR -- Campaign ID ) ``` -------------------------------- ### Start Workflow Session Source: https://github.com/treasure-data/treasure-boxes/blob/master/integration-box/python/README.md Initiates a session for the uploaded workflow. This command starts the execution and provides details for monitoring the session and task status. ```bash td wf start simple-example simple --session now 2019-05-13 21:04:32 -0700: Digdag v0.9.36 Started a session attempt: session id: 250802 attempt id: 250930 uuid: 2453cfa8-2b16-4a6f-83c2-9e9c9e7cdb33 project: simple-example workflow: simple session time: 2019-05-14 04:04:32 +0000 retry attempt name: params: {} created at: 2019-05-13 21:04:35 -0700 * Use `td workflow session 250802` to show session status. * Use `td workflow task 250930` and `td workflow log 250930` to show task status and logs. ``` -------------------------------- ### Run Workflow Source: https://github.com/treasure-data/treasure-boxes/blob/master/integration-box/auth0_batch/README.md Start the Auth0 batch workflow for exporting user data. ```bash $ td wf start auth0_batch export --session now ``` -------------------------------- ### Start Recommendation Workflow Source: https://github.com/treasure-data/treasure-boxes/blob/master/machine-learning-box/recommendation/docs/more.md Command to start the main recommendation workflow using Treasure Workflow, typically after data preparation. ```bash $ td wf start recommendation recommend --session now -p apikey={YOUR_API_KEY} ``` -------------------------------- ### Start Workflow Session with td wf start Source: https://github.com/treasure-data/treasure-boxes/blob/master/td/redshift/README.md Manually trigger a workflow session. Replace `td_redshift` with your workflow's name. ```bash # Run $ td wf start sample_project td_redshift --session now ``` -------------------------------- ### List Directory Contents Source: https://github.com/treasure-data/treasure-boxes/blob/master/integration-box/python/README.md Verifies that you are in the correct directory for the example. This command should show README.md, other_scripts, scripts, and simple.dig. ```bash $ ls README.md other_scripts scripts simple.dig ``` -------------------------------- ### Install TD Workflow Wrapper Source: https://github.com/treasure-data/treasure-boxes/blob/master/integration-box/python/README.md Installs a wrapper script for the TD CLI to simplify workflow management. Ensure you have curl and appropriate permissions to write to /usr/local/bin. ```bash curl -sL https://gist.github.com/kiyoto/d46ccf71faa924320c0a7993515d0e9c > /usr/local/bin/tdwf chmod +x /usr/local/bin/tdwf ``` -------------------------------- ### Start Workflow Execution Source: https://github.com/treasure-data/treasure-boxes/blob/master/scenarios/monitoring/workflow_monitoring/README.md Starts the execution of the 'initial_ingest_session_attempt' workflow for the 'workflow_monitoring' project. The '--session now' argument initiates the workflow immediately. ```bash $td wf start workflow_monitoring initial_ingest_session_attempt --session now ``` -------------------------------- ### Upload Workflow to TreasureData Source: https://github.com/treasure-data/treasure-boxes/blob/master/integration-box/slack/README.md Use this command to upload the example workflow to your TreasureData account. ```bash # Upload td wf push td_slack_example ``` -------------------------------- ### Start Workflow Session Source: https://github.com/treasure-data/treasure-boxes/blob/master/td/s3-v2/README.md Manually trigger a workflow session using the `td wf start` command. Specify the project name and the workflow name. ```bash # Run $ td wf start td_s3_v2 td_s3_v2 --session now ``` -------------------------------- ### Start Workflow Session Source: https://github.com/treasure-data/treasure-boxes/blob/master/machine-learning-box/recommendation/collaborative_filtering/README.md Initiate a new session for the collaborative filtering workflow on Treasure Data. ```bash td wf start --session now collaborative_filtering dimsum ``` -------------------------------- ### Run Initial Ingest Workflow Source: https://github.com/treasure-data/treasure-boxes/blob/master/scenarios/monitoring/basic_monitoring/README.md Starts the initial ingest workflow for metadata. Use 'now' for the session to run immediately. ```bash $td wf start basic_monitoring initial_ingest --session now ``` -------------------------------- ### Start Workflow in Server Mode Source: https://github.com/treasure-data/treasure-boxes/blob/master/td_load/gcs/README.md Manually trigger a workflow session on the server using `td wf start`. This command initiates the `daily_load` session for the `td_load_gcs` workflow. ```bash # Run $ td wf start td_load_gcs daily_load --session now ``` -------------------------------- ### Upload and Run Workflow Source: https://github.com/treasure-data/treasure-boxes/blob/master/td_run/README.md Commands to upload the workflow to Treasure Data and start a session for running saved queries. ```bash $ td wf push td_run_example ``` ```bash $ td wf start td_run_example run_saved_query --session now ``` -------------------------------- ### Push and Start TD Recommendation Workflow Source: https://github.com/treasure-data/treasure-boxes/blob/master/machine-learning-box/recommendation/README.md Commands to push the recommendation workflow to Treasure Data and start a recommendation session. Ensure the workflow script and configuration files are present. ```sh $ ./data.sh $ td wf push recommendation # push workflow to TD $ td wf start recommendation recommend --session now ``` -------------------------------- ### Push and Start GDPR Workflow Source: https://context7.com/treasure-data/treasure-boxes/llms.txt Commands to push the GDPR workflow and start its execution with specified database and parameters table. This workflow automates GDPR DELETE, UPDATE, and INFORM operations. ```bash td wf push gdpr_workflow td wf start gdpr_workflow gdpr_workflow --session now \ -p database=gdpr_example_db \ -p params_table=params ``` -------------------------------- ### Start Workflow Session Source: https://github.com/treasure-data/treasure-boxes/blob/master/td/sftp/README.md Trigger a workflow session manually using `td wf start`. Specify the project name and workflow name, and optionally a session time like 'now'. ```bash # Run $ td wf start td_sftp td_sftp --session now ``` -------------------------------- ### Upload and Run Treasure Data Workflow Source: https://github.com/treasure-data/treasure-boxes/blob/master/td/presto_and_hive/README.md Commands to upload the workflow to Treasure Data and start a session for the 'nasdaq_analysis' analysis. ```bash td wf push td_example ``` ```bash td wf start td_example nasdaq_analysis --session now ``` -------------------------------- ### Run Test Setup Script Source: https://github.com/treasure-data/treasure-boxes/blob/master/engage-box/roi_reporting/workflows/reporting_agent/README.md Execute the script to create test tables with sample data. This script requires the database name and can configure the number of revenue samples, days, and realism. ```bash # From the root of the engage-api repository python scripts/reporting_agent/setup_test_tables.py --database engage_roi_reporting --create-tables --revenue-samples 500 --days 30 --realistic-revenue ``` -------------------------------- ### Start Workflow Manually Source: https://github.com/treasure-data/treasure-boxes/blob/master/td_load/instagram_user_and_media_insights/README.md Manually trigger a workflow session. Replace 'daily_load' with your workflow name if different. ```sh # Run $ td wf start ig_insights daily_load --session now ``` -------------------------------- ### Start Workflow Session Source: https://github.com/treasure-data/treasure-boxes/blob/master/td/gcs/README.md Trigger a workflow session manually using the `td wf start` command. Specify the project name, workflow name, and session time. For example, to start the 'export_gcs' workflow in the 'td_gcs' project for the current time, use '--session now'. ```bash # Run $ td wf start td_gcs export_gcs --session now ``` -------------------------------- ### Setup Data Preparation Workflows First Source: https://github.com/treasure-data/treasure-boxes/blob/master/engage-box/roi_reporting/README.md Navigate to the workflows directory to set up the Data Preparation Workflows. This option is suitable for creating tables from scratch. ```bash cd workflows/reporting_agent/ # Follow instructions in workflows/reporting_agent/README.md ``` -------------------------------- ### Start Treasure Data Workflow Session Source: https://github.com/treasure-data/treasure-boxes/blob/master/td_ddl/README.md Use this command to start a manual session for the 'ddl_operations' part of the workflow. The '--session now' argument starts it immediately. ```bash # Run $ td wf start td_run_example ddl_operations --session now ``` -------------------------------- ### swimOS Tutorial Application Output Source: https://github.com/treasure-data/treasure-boxes/blob/master/integration-box/swimos/README.md Example output from the swimOS tutorial application demonstrating data publishing, agent updates, and POST requests to the Treasure Data Postback API. ```text > Task :run Running Tutorial plane... [/unit/master] Hello, world! [/unit/master] publish: commanded with {foo:60,bar:106,baz:198} [/unit/master] latest: set to {foo:60,bar:106,baz:198} from [/unit/master] history: appended {0, {1574293480492,{foo:60,bar:106,baz:198}}} [/unit/master] histogram: replaced 1574293480000's value to {count:2} from [/unit/master] Sending POST request to: https://in.treasuredata.com/postback/v3/event/DATABASE_NAME/TABLE_NAME [/unit/master] Data: {"time":1574293480534,"foo":60,"bar":106,"baz":198} [/unit/master] Response code: 200 [/unit/master] publish: commanded with {foo:58,bar:134,baz:188} [/unit/master] latest: set to {foo:58,bar:134,baz:188} from {foo:60,bar:106,baz:198} [/unit/master] history: appended {1, {1574293481172,{foo:58,bar:134,baz:188}}} [/unit/master] histogram: replaced 1574293480000's value to {count:21} from {count:2} [/unit/master] Sending POST request to: https://in.treasuredata.com/postback/v3/event/DATABASE_NAME/TABLE_NAME [/unit/master] Data: {"time":1574293481172,"foo":58,"bar":134,"baz":188} [/unit/master] Response code: 200 ... ``` -------------------------------- ### Execute ML Tips Workflow Source: https://github.com/treasure-data/treasure-boxes/blob/master/machine-learning-box/ml_tips/README.md Commands to upload the sample dataset, push the workflow, and start a session for the ML tips workflow. ```sh $ ./data.sh # Upload sample dataset to Treasure Data $ td wf push ml_tips $ td wf start ml_tips titanic --session now ``` -------------------------------- ### Create Sample Database Source: https://github.com/treasure-data/treasure-boxes/blob/master/integration-box/elastic-map-reduce/README.md Create a temporary database in Treasure Data to store the job results. This database may already exist if previous tutorials were run. ```bash # Sample Database. NOTE: this database may already exist if you've run past tutorials. $ td db:create workflow_temp ``` -------------------------------- ### Install mbed-cli requirements Source: https://github.com/treasure-data/treasure-boxes/blob/master/integration-box/mbed-os/README.md Installs the necessary Python packages for mbed-cli. ```sh pip install -r requirements.txt ``` -------------------------------- ### Setup AI Reporting Agent First Source: https://github.com/treasure-data/treasure-boxes/blob/master/engage-box/roi_reporting/README.md Navigate to the agent directory to set up the AI Reporting Agent. This option is suitable if the database and tables already exist. ```bash cd agent/ # Follow instructions in agent/README.md ``` -------------------------------- ### Run swimOS Tutorial Application Source: https://github.com/treasure-data/treasure-boxes/blob/master/integration-box/swimos/README.md Execute the Gradle task to run the swimOS tutorial. This will start a mock data source publishing records to a Web Agent, which then forwards them to Treasure Data. ```sh ./gradlew run ``` -------------------------------- ### Start Treasure Data Workflow Session Source: https://github.com/treasure-data/treasure-boxes/blob/master/td/elasticsearch/README.md Manually trigger a workflow session using `td wf start`. Specify the project name and the workflow name (e.g., `td_elasticsearch`). The `--session now` argument starts the session immediately. ```bash td wf start sample_project td_elasticsearch --session now ``` -------------------------------- ### Start Workflow Session Manually Source: https://github.com/treasure-data/treasure-boxes/blob/master/scenarios/result_export/export_result_tableau/README.md Triggers the workflow session manually. Use 'now' to start the session immediately. ```bash # Run $ td wf start export_result_tableau --session now ``` -------------------------------- ### Run Workflow with Existing Authentication Source: https://github.com/treasure-data/treasure-boxes/blob/master/td_load/google_analytics/README.md Start the `td_load_example` workflow using the `daily_load_with_existing_authentication` task. This method is used when authentication is managed via the Treasure Data console. ```bash td wf start td_load_example daily_load_with_existing_authentication --session now ``` -------------------------------- ### Prepare Dataset and Push Workflow Source: https://github.com/treasure-data/treasure-boxes/blob/master/machine-learning-box/tf-idf/README.md Execute these commands to prepare the sample dataset, create a stopwords table, push the TF-IDF workflow to Treasure Data, and start a new session. ```sh $ ./data.sh # prepare sample dataset $ ./stopwords.sh # prepare stopwords table $ td wf push tfidf # push workflow to TD $ td wf start tfidf tfidf --session now -p apikey=${YOUR_TD_API_KEY} ``` -------------------------------- ### Start Workflow Session Source: https://github.com/treasure-data/treasure-boxes/blob/master/td/nasdaq_analysis/README.md Initiates a workflow session for 'nasdaq_analysis' starting immediately. This command is used to manually trigger the workflow execution. ```bash td wf start td_example nasdaq_analysis --session now ``` -------------------------------- ### Prepare Database and Table Source: https://github.com/treasure-data/treasure-boxes/blob/master/tool-box/get_cdp_segments/README.md Create the necessary database and table in Treasure Data where the segment data will be imported. ```bash $ td db:create example_db $ td table:create master_segment_lists segment_lists ``` -------------------------------- ### Manually Configure Data Source and Target Database Source: https://github.com/treasure-data/treasure-boxes/blob/master/machine-learning-box/recommendation/docs/more.md Example of how to manually configure the source table and target database in the `config/params.yml` file. ```yaml # Data: source: source_db.table_name # input table target: target_db # output database ``` -------------------------------- ### Start Workflow Session Source: https://github.com/treasure-data/treasure-boxes/blob/master/td/twitter_tailored_audience/README.md Manually trigger a workflow session. This command initiates the execution of your defined workflow. You can specify 'now' to start immediately. ```bash # Run $ td wf start twitter_tailored_audience twitter_tailored_audience --session now ``` -------------------------------- ### Start Treasure Data Workflow Session Source: https://github.com/treasure-data/treasure-boxes/blob/master/scenarios/result_export/export_result_redshift/README.md Manually trigger a new session for your Treasure Data workflow. Use 'now' to start immediately. ```bash # Run $ td wf start export_result_redshift export_result_redshift --session now ``` -------------------------------- ### Navigate to Project Directory Source: https://github.com/treasure-data/treasure-boxes/blob/master/README.md Change into the cloned Treasure Boxes directory to begin making changes. ```bash $ cd treasure-boxes ``` -------------------------------- ### Navigate to Data Preparation Workflows Directory Source: https://github.com/treasure-data/treasure-boxes/blob/master/engage-box/roi_reporting/README.md Change directory to the Data Preparation Workflows component. Detailed setup instructions are available in the workflow's README. ```bash cd workflows/reporting_agent/ # See workflows/reporting_agent/README.md for detailed setup instructions ``` -------------------------------- ### Start Workflow Session Source: https://github.com/treasure-data/treasure-boxes/blob/master/scenarios/account_reporting/README.md Manually trigger a workflow session using the `td wf start` command. Specify the workflow name and session details. ```bash # Run $ td wf start account_reporting account_reporting --session now ``` -------------------------------- ### Prepare Database and Tables Source: https://github.com/treasure-data/treasure-boxes/blob/master/data-box/tapad-cross-device-graph/README.md Create the necessary database and tables in Treasure Data for storing DGA and ID mapping data. Modify settings in tapad_data_ingestion.dig if table names are changed. ```bash $ td db:create tapad $ td table:create tapad dga $ td table:create tapad id_map $ td table:create tapad idfa $ td table:create tapad adid ``` -------------------------------- ### Start Recommendation Workflow Source: https://github.com/treasure-data/treasure-boxes/blob/master/machine-learning-box/recommendation/docs/more.md Initiates the recommendation workflow, including ID mapping if user/item IDs are not long values. Requires your Treasure Data API key and target database. ```bash $ td wf start recommendation map_id --session now -p apikey=${YOUR_TD_API_KEY} ``` -------------------------------- ### Start Workflow in Local Mode Source: https://github.com/treasure-data/treasure-boxes/blob/master/td_load/gcs/README.md Manually trigger a workflow session using `td wf start`. This command initiates the `daily_load` session for the `td_load_gcs` workflow. ```bash $ td wf start td_load_gcs daily_load --session now ``` -------------------------------- ### Run Marketo Data Ingestion Workflow Source: https://github.com/treasure-data/treasure-boxes/blob/master/td_load/marketo/README.md Upload the workflow, set the necessary Marketo credentials as secrets, and then start a session for the daily load. Ensure that the target database and tables exist before running. ```bash # Upload $ td wf push td_load_example # Run $ td wf start td_load_example daily_load --session now ``` -------------------------------- ### Start Workflow Session Source: https://github.com/treasure-data/treasure-boxes/blob/master/td/postgresql/README.md Trigger a workflow session manually using the `td wf start` command. This initiates a new run of your Treasure Data workflow. ```bash # Run $ td wf start td_postgresql td_postgresql --session now ``` -------------------------------- ### Start Workflow Session with td Source: https://github.com/treasure-data/treasure-boxes/blob/master/td/ftp/README.md Trigger a workflow session manually using the `td wf start` command. Specify the workflow name and the session time. ```bash td wf start td_ftp td_ftp --session now ``` -------------------------------- ### Start Recommendation Prediction Workflow Source: https://github.com/treasure-data/treasure-boxes/blob/master/machine-learning-box/recommendation/docs/more.md Command to start the recommendation prediction workflow using Treasure Workflow. It includes specifying the session and passing an API key. ```bash $ td wf start recommendation predict --session now -p apikey={YOUR_API_KEY} ``` -------------------------------- ### Initialize Treasure Data SDK Source: https://github.com/treasure-data/treasure-boxes/blob/master/integration-box/datalayer_papi/datalayer_papi.html Initializes the Treasure Data SDK with essential configuration including the host, write key, and database. It also sets the SDK to start in signed mode. ```javascript // Initialize TD. var td = new Treasure({ host: 'us01.records.in.treasuredata.com', // US RT endpoint writeKey: 'xxx/yyyyy', // write-only TD API key database: 'zzz' // TD database // Send td_ip, td_user_agent, td_path, td_host, td_client_id and td_global_id from the beginning, if set. (Should ask for consent from website visitors first!) startInSignedMode: true }); ``` -------------------------------- ### Start Workflow Session Source: https://github.com/treasure-data/treasure-boxes/blob/master/scenarios/kill_wf_attempt/README.md Manually trigger a workflow session. This command starts the 'kill_wf_attempt' workflow with the 'kill_wf_attempt' session name, set to run immediately ('now'). ```bash # Run $ td wf start kill_wf_attempt kill_wf_attempt --session now ``` -------------------------------- ### Data Loading Steps Source: https://github.com/treasure-data/treasure-boxes/blob/master/tool-box/cjo-profile-viewer/docs/PROJECT_SUMMARY.md Illustrates the two-step process for loading journey configuration and profile data. This involves fetching journey details and then querying profile data based on selected attributes. ```text Step 1: Load Journey Config → Extract audience ID → Get available attributes Step 2: Select attributes → Load Profile Data → Enable visualization ``` -------------------------------- ### Start Workflow Session with TD CLI Source: https://github.com/treasure-data/treasure-boxes/blob/master/scenarios/import_iterable_to_treasuredata/README.md Manually trigger a workflow session using the TD CLI. The '--session now' argument starts an immediate execution. ```bash # Run td wf start import_iterable_to_td import_iterable_to_td --session now ``` -------------------------------- ### Start Treasure Data Workflow Source: https://github.com/treasure-data/treasure-boxes/blob/master/integration-box/scorer-cloud/README.md Manually start the Treasure Data workflow to process data. This command initiates a session to begin the data ingestion process. ```sh td wf start scorer scorer --session now ``` -------------------------------- ### Upload Project Source: https://github.com/treasure-data/treasure-boxes/blob/master/scenarios/invalid_v_column/README.md Use this command to upload the project to Treasure Data. ```bash td wf push invalid_v_column ``` -------------------------------- ### Top-k Item Recommendation Pipeline Setup Source: https://context7.com/treasure-data/treasure-boxes/llms.txt Schema definition for input and output tables for a Matrix Factorization-based collaborative filtering recommendation system. Supports PySpark ALS alternative. ```yaml # Input table schema (must be named "input") # userid LONG | itemid LONG | rating FLOAT # 3077 | 2046 | 4.0 # Output table: recommended items per user # userid LONG | recommended_items ARRAY # 10 | [4454,2609,1214,1949,33539,7079,2324,224,3989,26939] ``` -------------------------------- ### Run Marketo Daily Load (UpdatedAt Filter - Initialization) Source: https://github.com/treasure-data/treasure-boxes/blob/master/scenarios/marketo_daily_load/README.md Initiates the Marketo daily load workflow for leads, filtering by their last update timestamp. This is the first step in processing updates. Replace 'YOUR_DATE' with the desired date in 'YYYY-MM-DD' format. ```bash td wf start marketo_daily_load initialize_updatedat --session 'YOUR_DATE(ex. 2018-01-01)' ``` -------------------------------- ### Run Initial Ingest Workflow Source: https://github.com/treasure-data/treasure-boxes/blob/master/scenarios/monitoring/cdp_monitoring/README.md Starts the initial ingest workflow for CDP metadata. Use 'now' for the session to run immediately. ```bash td wf start cdp_monitoring initial_ingest --session now ``` -------------------------------- ### List Databases Source: https://github.com/treasure-data/treasure-boxes/blob/master/engage-box/roi_reporting/agent/README.md Lists all available databases. Use this to verify the existence and exact name of the 'engage_roi_reporting' database. ```bash tdx db list | grep engage_roi_reporting ``` -------------------------------- ### Start Workflow Session Manually with td Source: https://github.com/treasure-data/treasure-boxes/blob/master/td/mailchimp/README.md Trigger a workflow session manually using the `td wf start` command, specifying the project and workflow name, and the session time. ```bash # Run $ td wf start mailchimp_export mailchimp_export --session now ``` -------------------------------- ### Start Treasure Data Workflow Session Source: https://github.com/treasure-data/treasure-boxes/blob/master/scenarios/result_export/export_result_ftp/README.md Manually trigger a workflow session using the `td wf start` command. Specify the project, workflow name, and session timing. ```bash # Run $ td wf start export_result_ftp export_result_ftp --session now ``` -------------------------------- ### Start Workflow Session with TD CLI Source: https://github.com/treasure-data/treasure-boxes/blob/master/scenarios/kick_another_account_workflow_kohki/README.md Manually trigger a workflow session using `td wf start`. This command initiates the execution of the specified workflow in the target account. ```bash # Run $ td wf start kick_another_account_workflow_kohki kick_another_account_workflow_kohki --session now ``` -------------------------------- ### Create Database Source: https://github.com/treasure-data/treasure-boxes/blob/master/engage-box/roi_reporting/agent/README.md Creates a new database with the specified name. Use this if the 'engage_roi_reporting' database is not found. ```bash tdx api -X POST /v3/database/create/engage_roi_reporting ``` -------------------------------- ### Push and Start CLTV Prediction Workflow Source: https://github.com/treasure-data/treasure-boxes/blob/master/machine-learning-box/customer-lifetime-value/README.md Use these commands to push the CLTV prediction workflow to Treasure Data, set necessary API secrets, and start a prediction session. ```sh $ td wf push cltv-prediction # push workflow to TD $ td wf secrets --project cltv-prediction --set td.apikey td.apiserver $ td wf start cltv-prediction predict --session now ```