Actions

Template

JourneyMaterialsDebug: Difference between revisions

From Dune Awakening DB

mNo edit summary
mNo edit summary
Line 1: Line 1:
<includeonly><!-- Find actual column names -->
<includeonly><!-- Discover actual columns in journey tables -->
<div style="background: #333; border: 2px solid yellow; padding: 15px; color: white;">
<div style="background: #333; border: 2px solid yellow; padding: 15px; color: white;">
<h3>Finding Actual Column Names</h3>
<h3>Discovering Table Columns</h3>


<h4>1. All Journey Task Components:</h4>
<h4>1. Simple select all from task components (first row):</h4>
{{#get_external_data:source=externaldb
{{#get_external_data:source=externaldb
  |from=data_journey_task_components
  |from=data_journey_task_components
  |data=task_id=task_id,component_name=component_name
  |limit=1
  |limit=5
}}
{{#for_external_table:|
{{#external_value:all}}
}}
 
<h4>2. Journey 4 Data Chain Test:</h4>
<!-- First, get objectives for journey 4 -->
{{#get_external_data:source=externaldb
|from=data_journey_objectives
|where=journey_id=4
|limit=2
}}
<strong>Objectives:</strong><br/>
{{#for_external_table:|
{{#external_value:all}}<br/>
}}
 
<!-- Get tasks for those objectives -->
{{#get_external_data:source=externaldb
|from=data_journey_tasks
|join on=data_journey_objectives.id=data_journey_tasks.objective_id
|where=data_journey_objectives.journey_id=4
  |limit=3
}}
}}
<strong>Tasks:</strong><br/>
{{#for_external_table:|
{{#for_external_table:|
Task ID: {{{task_id}}}, Component: {{{component_name}}}<br/>
{{#external_value:all}}<br/>
}}
}}


<h4>2. Components for Tasks in Journey {{{id|{{{1|}}}}}}:</h4>
<!-- Get components for those tasks -->
{{#get_external_data:source=externaldb
{{#get_external_data:source=externaldb
  |from=data_journey_task_components
  |from=data_journey_task_components
  |join on=data_journey_tasks.id=data_journey_task_components.task_id,data_journey_objectives.id=data_journey_tasks.objective_id
  |join on=data_journey_tasks.id=data_journey_task_components.task_id,data_journey_objectives.id=data_journey_tasks.objective_id
  |data=component=data_journey_task_components.component_name
  |where=data_journey_objectives.journey_id=4
  |where=data_journey_objectives.journey_id={{{id|{{{1|}}}}}}
  |limit=5
}}
<strong>Components:</strong><br/>
{{#for_external_table:|
{{#external_value:all}}<br/>
}}
}}
Components needed for this journey: {{#for_external_table:|{{{component}}} | }}


<h4>3. Check if any components match recipe view items:</h4>
<h4>3. Sample Recipe View Data:</h4>
{{#get_external_data:source=externaldb
{{#get_external_data:source=externaldb
  |from=vw_recipe_inputs_by_level
  |from=vw_recipe_inputs_by_level
  |data=root_item=root_item,internal_name=internal_name
  |where=root_item='Water_Recovery_System'
|where=root_item IN ('Advanced_SurvivalFabricator_Placeable','T5DeepDesertShieldWallComponent','T2MachineComponent')
  |limit=5
  |limit=10
}}
}}
{{#for_external_table:|
{{#for_external_table:|
Root: {{{root_item}}}, Internal: {{{internal_name}}}<br/>
Root: {{{root_item}}}, Level: {{{level}}}, Item: {{{item_label}}} ({{{internal_name}}}), Qty: {{{total_qty}}}<br/>
}}
}}


</div>
</div>
</includeonly><noinclude>
</includeonly><noinclude>
This finds the actual column names in the tables.
This discovers the actual column structure.


Usage: <nowiki>{{JourneyMaterialsDebug3|id=4}}</nowiki>
Usage: <nowiki>{{JourneyMaterialsDebug4|id=4}}</nowiki>
</noinclude>
</noinclude>

Revision as of 14:16, 31 May 2025

This discovers the actual column structure.

Usage: {{JourneyMaterialsDebug4|id=4}}