Skip to content

Latest commit

 

History

11 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 
 
 

Repository files navigation

build_raw

This project was done by Universidad Adolfo Ibañez - Territorial Intelligence Center - mainly by Felipe Matas

Build raw data to get the right one for PG using Info State concept

With this project, you can choose tables (even spatial ones) and will build a rust project to apply the concept or State records from https://github.com/CIT-UAI/info_rs

Very comfy, you will get all columns types and most of manual work will be done.

This project works over postgresql, is easier to handle data there than try to read any type of format, we use GDAL as interface to upload data.

Usage: build_raw [OPTIONS] --url <URL> --user <USER> --password <PASSWORD> --db <DB> --schema <SCHEMA> --mode <MODE> --port <PORT> --max-field-rows <MAX_FIELD_ROWS>

Options:
      --url <URL>
          URL of the database
      --user <USER>
          User name
      --password <PASSWORD>
          Password
      --db <DB>
          Database name
      --schema <SCHEMA>
          Schema name
      --table <TABLE>
          Table name
      --output-dir <OUTPUT_DIR>
          Output directory to build the project
      --input-files <INPUT_FILES>
          Input files to process this uses the glob format "*/*.shp"
      --input-file <INPUT_FILE>
          Input file If you want to use the PG mode, you still need this option to build the new project, you can also specify a dummy file if do not know where the file is
      --mode <MODE>
          Mode to save PG: Build raw.rs from a PG table this mode still needs input_file wich is used to connect main.rs with the new workflow File: Upload file to PG and build raw.rs Dir: Iterate over each dir, find a shp file upload the shp file to PG using the dirname as table name then generate the raw.rs [possible values: pg, dir, file]
      --port <PORT>
          Postgres port
      --max-field-rows <MAX_FIELD_ROWS>
          If the field of the table has less than this unique values it will build a match statement to handle each state
      --sql-adjustment-query <SQL_ADJUSTMENT_QUERY>
          Run the next query on the table after upload to postgres use {path} to represent the actual table
      --sql-adjustment-file <SQL_ADJUSTMENT_FILE>
          Run the next file as a sql batch use {path} to represent the actual table
      --ignore_column <IGNORE_COLUMNS>
          Ignore the next columns of the table to be included they will be keep as comments
  -h, --help
          Print help
  -V, --version
          Print version

About

Build raw data to get the right one for PG using Info State concept

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages