File: etl.cfg

package info (click to toggle)
python-stetl 1.2%2Bds-1
  • links: PTS, VCS
  • area: main
  • in suites: buster
  • size: 89,988 kB
  • sloc: python: 5,007; xml: 707; sql: 430; makefile: 155; sh: 50
file content (34 lines) | stat: -rw-r--r-- 1,071 bytes parent folder | download | duplicates (3)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
# Transform input xml to GML and output to multiple GML files.
# This is a scenario one could use to split a very big XML file into smaller files.

# Do 2 chains, the second is just to see on stdout how things go
[etl]
chains = input_big_xml_file|xml_assembler|transformer_xslt|multi_output_file,
         input_big_xml_file|xml_assembler|transformer_xslt|output_std

# The source input file (assume N GB XML files here...)
# "file_path" may be a directory, comma-separated files etc
[input_big_xml_file]
class = inputs.fileinput.XmlElementStreamerFileInput
file_path = input
element_tags = city

# Assembles etree docs from GML elements
[xml_assembler]
class = filters.xmlassembler.XmlAssembler
max_elements = 2
container_doc = <?xml version='1.0' encoding='utf-8'?>
   <cities>
   </cities>
element_container_tag = cities

[transformer_xslt]
class = filters.xsltfilter.XsltFilter
script = cities2gml.xsl

[multi_output_file]
class = outputs.fileoutput.MultiFileOutput
file_path = output/gmlcities-%03d.gml

[output_std]
class = outputs.standardoutput.StandardXmlOutput