Examples: query, "exact match", wildcard*, wild?ard, wild*rd
Fuzzy search: cake~ (finds cakes, bake)
Term boost: "red velvet"^4, chocolate^2
Field grouping: tags:(+work -"fun-stuff")
Escaping: Escape characters +-&|!(){}[]^"~*?:\ with \, e.g. \+
Range search: properties.timestamp:[1587729413488 TO *] (inclusive), properties.title:{A TO Z}(excluding A and Z)
Combinations: chocolate AND vanilla, chocolate OR vanilla, (chocolate OR vanilla) NOT "vanilla pudding"
Field search: properties.title:"The Title" AND text
Answered
Hey There, Is There A Way To Access The Trains Configuration Programmatically At Runtime In A Task (The Configuration That Is Dumped By The Agent In The Logs Before Executing A Task)

Hey there, is there a way to access the trains configuration programmatically at runtime in a task (the configuration that is dumped by the agent in the logs before executing a task)

  
  
Posted 4 years ago
Votes Newest

Answers 4


Awesome, thanks WackyRabbit7 , AgitatedDove14 !

  
  
Posted 4 years ago

Maybe WackyRabbit7 is a better approach as you will get a new object (instead of the runtime copy that is being used)

  
  
Posted 4 years ago

JitteryCoyote63 hacky but sure 🙂
` from trains.config import config_obj

print(config_obj) `

  
  
Posted 4 years ago

I'd go for

` from trains.utilities.pyhocon import ConfigFactory

config = ConfigFactory.parse_file(CONF_FILE_PATH) `

  
  
Posted 4 years ago