pyhocon
pyhocon copied to clipboard
path traversal through lists
say I have the following configuration
{
source = [
{
type = mssql
port = 1344
tables {
une_table360 {
id = "UniqueID"
view = "someview"
}
une_table {
upload = false
view = "someview"
}
une_autre_table {
query = "SELECT TOP 100 FROM une_autre_table"
historicity = "delta"
view = "someview"
}
}
}
],
}
How can I access all my tables? I tried
-
conf.get("source.0.tables.une_table360") -
conf.get("source.[0].tables.une_table360") -
conf["source"][0]["tables"]["une_table360"]
I get a pyhocon.exceptions.ConfigException: source does not translate to a list which I find surprising