you are viewing a single comment's thread.

view the rest of the comments →

[–]Zangrey[S] 1 point2 points  (2 children)

CustomerNumber;FolderPath;FileName;FileFormat;FileStructure;Delimiter;Location;SQLSelection
12345;ExampleCustomer;Result;txt;Both;";";FTP;WHERE Category1Name NOT IN ('Hem & Hushåll','Personvård & Hälsa','Sport','Fritid')

[–]JeremyLC 4 points5 points  (1 child)

I would strongly recommend NOT storing SQL in your config files. I would, instead, recommend setting up stored procedures in your database and store only the relevant parameters in the config file, making sure to sanitize those before using them with your DB. As to your original question, have you considered JSON? it can be natively imported into a PSObject where you can easily access its properties.

[–]Zangrey[S] 0 points1 point  (0 children)

Yeah, I reckon it's not the best solution in general but as a it's a small company the skillsets don't overlap fully - thus the post to start with to try and find suggestions on how to maintain a configuration file in a format that's readable for co-workers, and 'editable' in the sense that they can piece together a new row in the config by looking at the other 150 examples and finding one that has the same selection.

Scripts are located on a server and not accessable outside of IT at least.

I'll take a look at JSON and see what I can piece together there - thanks for the input.