cartodb local unlimited tables
CartoDBConfig
https://github.com/UCL-ShippingGroup/shipviz/wiki/CartoDBConfig
By default, the limit of rows in CartoDB is 500000. To set custom platform limits for a user you can use the set_custom_limits_for_user rake task :
rake cartodb:set_custom_limits_for_user[username,import_file_size,table_row_count,concurrent_imports]
For the user "development" in my local CartoDB install, I've used the following:
rake cartodb:set_custom_limits_for_user[development,157286400000,10000000,10]
Also executing
rake -D
from $HOME/cartodb, we can see the list of all rake tasks and a description of what they do:parallels@ubuntu:~/cartodb/script$ rake -D
(in /home/parallels/cartodb)
rake about
List versions of all Rails frameworks and the environment
rake assets:copy_non_digest_files
Copy digest assets files to non-digest files
rake cartodb:blog:get_last_posts
Get last posts
rake cartodb:cache:invalidate_surrogate_key[key]
invalidate Varnish surrogate key
rake cartodb:common_data:generate_s3_assets[all_public]
Generates datasets assets and upload them to Amazon S3
rake cartodb:db:add_test_users_to_organization[org_name,first_index,last_index]
Add users to an organization. Used to resume a broken :create_test_organization task
rake cartodb:db:add_the_geom_webmercator
Add the_geom_webmercator column to every table which needs it
rake cartodb:db:add_timezones_to_timestamps
Add timezone to timestamp users columns
rake cartodb:db:change_user_password
Set the password of the user in the USER_NAME environment variable to the value of the USER_PASSWORD environment variable
rake cartodb:db:cleanup_importer_tables
Moves left-over tables from failed imports from the public to the cdb_importer schema
rake cartodb:db:copy_api_keys_from_redis
Copy user api_keys from redis to postgres
rake cartodb:db:create_default_vis_permissions[page_size,page]
Setup default permissions on existing visualizations
rake cartodb:db:create_importer_schema
Create importer schema and assign privileges to owner
rake cartodb:db:create_new_organization_with_owner
Create new organization with owner
rake cartodb:db:create_organization_members_public_users
Create public users for users beloging to an organization
rake cartodb:db:create_publicuser
make public and tile users
rake cartodb:db:create_test_organization[org_name,n_users]
Create an organization with an arbitrary number of users for test purposes. Owner user: -admin. Users: -. You might need to set conn_validator_timeout to -1 in config/database.yml (development)
rake cartodb:db:create_user
Create a plain user account
rake cartodb:db:drop_other_privileges_on_user_schema[username]
Drop other users privileges on user schema
rake cartodb:db:enable_oracle_fdw_extension[username,oracle_url,remote_user,remote_password,remote_schema,table_definition_json_path]
Enable oracle_fdw extension in database
rake cartodb:db:get_modified_layers
get modified layers
rake cartodb:db:get_viewed_visualization_ids[redis_ip,output_file]
Get from redis the list of visualization ids viewed
rake cartodb:db:grant_general_raster_permissions
Grant general raster permissions
rake cartodb:db:load_api_calls_from_es
Load api calls from ES to redis
rake cartodb:db:load_functions[database_host,version,num_threads,thread_sleep,sleep,statement_timeout]
Install/upgrade CARTODB SQL functions
rake cartodb:db:load_oids
Load table oids
rake cartodb:db:load_varnish_trigger[num_threads,thread_sleep,database_host,sleep]
Install/upgrade Varnish invalidation trigger
rake cartodb:db:load_varnish_trigger_user[username]
Install/upgrade Varnish trigger for a single user
rake cartodb:db:migrate_to[version]
Runs the specified CartoDB migration script
rake cartodb:db:move_user_to_schema[username]
Move user to its own schema
rake cartodb:db:populate_permission_entity_id[page_size,page]
Check all visualizations and populate their Permission object's entity_id and entity_type
rake cartodb:db:populate_visualization_total_map_views[visualizations_list]
Populate visualization total map views from partial days
rake cartodb:db:recreate_table_triggers[username]
Recreates all table triggers for non-orgs users. Optionally you can pass a username param to do this only for one user. Example: cartodb:db:recreate_table_triggers['my_username']
rake cartodb:db:register_ghost_table[username,table_name]
Link one ghost table to the user dashboard, does not remove the original table
rake cartodb:db:register_table_dependencies
Rebuild user tables/layers join table
rake cartodb:db:reload_users_avatars
Reload users avatars
rake cartodb:db:remove_duplicate_indexes[database_host,sleep,dryrun]
Removes duplicated indexes created in some accounts
rake cartodb:db:reset_trigger_check_quota
reset check quota trigger on all user tables
rake cartodb:db:reset_trigger_check_quota_for_user[username]
reset check quota trigger for a given user
rake cartodb:db:rollback_migration[version]
Undo migration changes USE WITH CARE
rake cartodb:db:save_users_metadata
Save users metadata in redis
rake cartodb:db:set_all_user_privileges[username]
Set all user privileges
rake cartodb:db:set_all_users_account_type_to_free
reset all Users account type to FREE
rake cartodb:db:set_all_users_private_tables_enabled_to_false
reset all Users privacy tables permissions type to false
rake cartodb:db:set_all_users_to_free_table_quota
reset Users table quota to 5
rake cartodb:db:set_organization_quota[organization_name,quota_in_gb]
set organization quota to amount in GB
rake cartodb:db:set_organization_seats[organization_name,seats]
set organization seats
rake cartodb:db:set_permissions
Set DB Permissions
rake cartodb:db:set_table_oids
Sets table_ids for all table metadata recors
rake cartodb:db:set_unlimited_table_quota[username]
set unlimited table quota
rake cartodb:db:set_user_account_type[username,account_type]
Set users account type. DEDICATED or FREE
rake cartodb:db:set_user_as_organization_member
Set organization member group role
rake cartodb:db:set_user_private_tables_enabled[username,private_tables_enabled]
set users private tables enabled
rake cartodb:db:set_user_privileges_in_cartodb_schema[username]
Set user privileges in CartoDB schema and CDB_TableMetadata
rake cartodb:db:set_user_quota[username,quota_in_mb]
set users quota to amount in mb
rake cartodb:db:set_user_table_quota[username,table_quota]
set users table quota
rake cartodb:db:setup
Setup cartodb database and creates a new user from environment variables:
- ENV['EMAIL']: user e-mail
- ENV['PASSWORD']: user password
- ENV['SUBDOMAIN']: user subdomain
rake cartodb:db:unregister_extraneous_cartodb_members[database_host,sleep,dryrun]
Unregisters extraneous members from the "cartodb" extension
rake cartodb:db:unshare_all_entities[user]
Unshare all entities for a given user
rake cartodb:db:update_cache_trigger
update the old cache trigger which was using redis to the varnish one
rake cartodb:db:update_test_quota_trigger
Update test_quota trigger
rake cartodb:db:update_the_geom_webmercator_trigger
Update update_the_geom_webmercator_trigger
rake cartodb:db:update_timestamp_fields
update created_at and updated_at to correct type and add the default value to now
rake cartodb:db:upgrade_postgres_extension[database_host,version,sleep,statement_timeout]
Upgrade cartodb postgresql extension
rake cartodb:explore_api:drop
Deletes the visualizations table
rake cartodb:explore_api:setup
Creates visualizations at common-data user and loads the data for the very first time. This table contains an aggregated, desnormalized view of the public data at visualizations, and it's used by Explore API
rake cartodb:explore_api:update
Updates the data at visualizations
rake cartodb:generate_random_csv
Generates random CSV files in db/fake_data
rake cartodb:import[username,filepath]
Import a file to CartoDB
rake cartodb:import_multitable_file
Imports a multi-table file
rake cartodb:increase_limits_for_twitter_import_users
Increase limits for twitter import users
rake cartodb:log:post_process_requests[input_file]
Take an input with the format 'verb,request,respnse_time' and outputs 'verb,controller,action,response_time'
rake cartodb:overlays:create_overlays[clear_overlays]
create overlays from url_options
rake cartodb:overlays:remove_duplicate_overlays
removes duplicated overlays from visualizations
rake cartodb:prototypes:import_madrid_clubbing
Generates data for Madrid Clubbing prototype
rake cartodb:random_table_with_lots_of_rows
Create a table with thousands of random rows
rake cartodb:redis:purge_vizjson
purge redis vizjson cache
rake cartodb:redis:user_metadata
update redis with metadata for every user
rake cartodb:remotes:load_all[from_username]
Load common data account remotes for multiple users, in alphabetical order. If you pass a username, it will do it beginning in the next username
rake cartodb:remotes:reload[username]
Load common data account remotes. Pass username as first argument. Example: `rake cartodb:remotes:reload[development]`
rake cartodb:remotes:reload_org[org_name]
Load common data account remotes for a whole organization. Pass organization name as first argument. Example: `rake cartodb:remotes:reload[my_team]`
rake cartodb:set_custom_limits_for_user[username,import_file_size,table_row_count,concurrent_imports]
Set custom platform limits for a user
rake cartodb:setup_max_import_file_size_based_on_disk_quota
Adapt max_import_file_size according to disk quota
rake cartodb:setup_max_import_table_row_count_based_on_disk_quota
Adapt max_import_table_row_count according to disk quota
rake cartodb:sync_tables[force_all_arg]
Runs the sync tables process
rake cartodb:upload_to_s3
Uploads a single data import enqueued file to S3, triggering the normal flow afterwards
rake cartodb:users:update_remote_map_views
Get map views from remote service for every user
rake cartodb:vizs:create_named_maps[order]
Create named maps for all eligible existing visualizations
rake cartodb:vizs:delete_inconsistent[username]
Purges broken visualizations due to bug during deletion.
rake dataimport:log:set_expiration
Set expiration of DataImport logs to 2 days
rake db:create[env]
Create the database defined in config/database.yml for the current Rails.env - also creates the test database if Rails.env.development?
rake db:create:all
Create all the local databases defined in config/database.yml
rake db:drop[env]
Create the database defined in config/database.yml for the current Rails.env - also creates the test database if Rails.env.development?
rake db:drop:all
Drops all the local databases defined in config/database.yml
rake db:force_close_open_connections
Forcibly close any open connections to the test database
rake db:forward
Pushes the schema to the next version. Specify the number of steps with STEP=n
rake db:migrate
Migrate the database to the latest version
rake db:migrate:down
Runs the "down" for a given migration VERSION.
rake db:migrate:redo
Rollbacks the database one migration and re migrate up. If you want to rollback more than one step, define STEP=x. Target specific version with VERSION=x.
rake db:migrate:reset
Resets your database using your migrations for the current environment
rake db:migrate:up
Runs the "up" for a given migration VERSION.
rake db:reset
Drops and recreates the database from db/schema.rb for the current environment and loads the seeds.
rake db:rollback
Rolls the schema back to the previous version. Specify the number of steps with STEP=n
rake db:schema:dump
Create a db/schema.rb file that can be portably used against any DB supported by Sequel
rake db:schema:load
Load a schema.rb file into the database
rake db:seed
Load the seed data from db/seeds.rb
rake db:setup
Create the database, load the schema, and initialize with the seed data
rake doc:app
Generate docs for the app -- also available doc:rails, doc:guides, doc:plugins (options: TEMPLATE=/rdoc-template.rb, TITLE="Custom Title")
rake log:clear
Truncates all *.log files in log/ to zero bytes
rake middleware
Prints out your Rack middleware stack
rake notes
Enumerate all annotations (use notes:optimize, :fixme, :todo for focus)
rake notes:custom
Enumerate a custom annotation, specify with ANNOTATION=CUSTOM
rake rails:template
Applies the template supplied by LOCATION=(/path/to/template) or URL
rake rails:update
Update configs and some other initially generated files (or use just update:configs, update:scripts, or update:application_controller)
rake resque:clear
Clear pending tasks
rake resque:failures:sort
Sort the 'failed' queue for the redis_multi_queue failure backend
rake resque:stop_workers
Quit running workers
rake resque:work
Start a Resque worker
rake resque:workers
Start multiple Resque workers. Should only be used in dev mode.
rake rollbar:test
Verify your gem installation by sending a test exception to Rollbar
rake routes
Print out all defined routes in match order, with names. Target specific controller with CONTROLLER=x.
rake secret
Generate a cryptographically secure secret key (this is typically used to generate a secret for cookie sessions).
rake state_machine:draw
Draws state machines using GraphViz (options: CLASS=User,Vehicle; FILE=user.rb,vehicle.rb [not required in Rails / Merb]; FONT=Arial; FORMAT=png; ORIENTATION=portrait / Draws state machines using GraphViz (options: CLASS=User,Vehicle; FILE=user.rb,vehicle.rb [not required in Rails / Merb]; FONT=Arial; FORMAT=png; ORIENTATION=portrait
rake stats
Report code statistics (KLOCs, etc) from the application
rake time:zones:all
Displays all time zones, also available: time:zones:us, time:zones:local -- filter with OFFSET parameter, e.g., OFFSET=-6
rake tmp:clear
Clear session, cache, and socket files from tmp/ (narrow w/ tmp:sessions:clear, tmp:cache:clear, tmp:sockets:clear)
rake tmp:create
Creates tmp directories for sessions, cache, sockets, and pids
rake user:query_api_key[username]
Get the API key from a username
rake user:relocation:organize[username,new_organization]
Relocate user to organization
rake user:relocation:relocate[username,new_database_host]
Relocate user to another database_host
======================================================================
"run fully" you specifically mean increase max tables, disk quota, account type, etc., see the commented out parts at the bottom of this script:
# Update your quota to 10GB
echo "--- Updating quota to 10GB"
bundle exec rake cartodb:db:set_user_quota["${SUBDOMAIN}",10240]
if test $? -ne 0; then exit 1; fi
# Allow unlimited tables to be created
echo "--- Allowing unlimited tables creation"
bundle exec rake cartodb:db:set_unlimited_table_quota["${SUBDOMAIN}"]
if test $? -ne 0; then exit 1; fi
# Allow user to create private tables in addition to public
echo "--- Allowing private tables creation"
bundle exec rake \
cartodb:db:set_user_private_tables_enabled["${SUBDOMAIN}",'true']
if test $? -ne 0; then exit 1; fi
# Set the account type
echo "--- Setting cartodb account type"
bundle exec rake \
cartodb:db:set_user_account_type["${SUBDOMAIN}",'[DEDICATED]']
if test $? -ne 0; then exit 1; fi
Run as a shell script or just paste into your console from the cartodb directory. First make sure SUBDOMAIN is set, or hardcode here.
No comments:
Post a Comment