Skip to content

AppGeo/postgres2cartodb

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

33 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

postgres2cartodb

convert({
  postgres: {
    connection : {
      database: 'foo',
      ...
    },
    table: 'myTable',
    geometry: 'shape', // defaults to shape
  },
  cartodb: {
    connection: {
      user: 'username',
      key: 'apikey'
    },
    table: 'myTable'
  }
}, function (err) {
  // done
})
Usage: postgres2cartodb inTable [outTable] [options]

Options:
  -p, --postgres  postgres connection config, should be a path to a json
                  file                          [default: $POSTGRES_CONFIG]
  -c, --cartodb   cartodb connection config, should be a path to a json
                  file                           [default: $CARTODB_CONFIG]
  -g, --geometry  geometry field                    [default: "shape"]
  -m, --method     import method                             [default: "create"]
  -r, --replace    switch to replace mode
  -a, --append     switch to append mode
  -b, --batchsize  set the batch size                             [default: 200]
  -d, --direct     upload directly to the table (create/append only)
                                                                [default: false]
  -h, --help      Show Help                                  [boolean]

Examples:
  postgres2cartodb -p ./postgres.json -c ./cartodb.   specify the files
  json inTable outTable
  postgres2cartodb inTable                            use environmental variables and
                                            the same table names
  postgres2cartodb inTable outTable --no-g            use environmental variables and
                                            pass no geometry

About

move data from postgres into cartodb

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Contributors 3

  •  
  •  
  •