I have a scala config file created with the library pureconfig. I would like to write a wrapper in python to read and write this configfile (to give a better access to non scala users). Is the easiest way to parse the whole schema ?
My config file looks like:
tables = [
{
name = TABLE_1
partition_strategy = "none"
partitions = [
{
path = [
"/shared/fall/raw/TABLE_1_2015.csv"
]
}
]
}
{
name = TABLE_2
partition_strategy = "none"
partitions = [
{
path = [
"/shared/fall/raw_data/TABLE_2_2015.csv"
]
}
]
}
{
name = TABLE_3
partition_strategy = "year"
partition_column = "FLX_DIS_DTD"
partitions = [
{
year = 2014
path = [
"/shared/fall/raw/2014_2016/PRODUCT/TABLE_3*2014.CSV",
"/shared/fall/raw/2014_2016/PRODUCT/TABLE_3*2015.CSV",
]
},
{
year = 2016
path = [
"/shared/fall/raw/2014_2016/PRODUCT/TABLE_3*2016.CSV",
"/shared/fall/raw/2014_2016/PRODUCT/TABLE_3*2017.CSV",
]
}
]
}
]