Take the 2-minute tour ×
Database Administrators Stack Exchange is a question and answer site for database professionals who wish to improve their database skills and learn from others in the community. It's 100% free, no registration required.

Is there a stored procedure available in Postgres or Oracle that does a bulk load given a URL, as in:

url_bulkload csvFile.ctl

Where csvFile.ctl is

#
# csvFile.ctl -- Control file to load CSV input data from a URL
#
OUTPUT = schemaName.tableName               # [<schemaName>.]tableName
INPUT = http://path/to/input_data_file.csv  # Input data file location
TYPE = CSV                                  # Input file type
QUOTE = "\""                                # Quoting character
ESCAPE = \                                  # Escape character for Quoting
DELIMITER = ","                             # Delimiter

or alternatively like the psql COPY command

COPY tableName FROM 'http://path/to/input_data_file';
share

migration rejected from stackoverflow.com Jun 20 '13 at 10:23

This question came from our site for professional and enthusiast programmers. Votes, comments, and answers are locked due to the question being closed here, but it may be eligible for editing and reopening on the site where it originated.

closed as too localized by dezso, StanleyJohns, RolandoMySQLDBA, Max Vernon, Mark Storey-Smith Jun 20 '13 at 10:23

This question is unlikely to help any future visitors; it is only relevant to a small geographic area, a specific moment in time, or an extraordinarily narrow situation that is not generally applicable to the worldwide audience of the internet. For help making this question more broadly applicable, visit the help center.If this question can be reworded to fit the rules in the help center, please edit the question.

    
oracle has bulk load capabilities. –  Randy Mar 20 '13 at 19:59
comments disabled on deleted / locked posts

1 Answer

There is no single command that will do that for you in Oracle. You can however do this operation easily with the available tools:

  1. Use UTL_HTTP to retrieve the remote data
  2. Either:

    2.1 write the data to a file using UTL_FILE and load into the database using an external table / SQL*Loader

    2.1 or insert the data directly into a staging table using PL/SQL since CSV is a simple format.

share
add comment

Not the answer you're looking for? Browse other questions tagged or ask your own question.