Quantcast
Channel: Active questions tagged config - Stack Overflow
Viewing all articles
Browse latest Browse all 5058

What is the easiest way to use python to read pureconfig config files created in scala?

$
0
0

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",        ]      }    ]  }]

Viewing all articles
Browse latest Browse all 5058

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>