how to connect to oracle database from snowflake? - oracle

I have to pull some data from oracle and update the data in snowflake. And ofcourse the size of the data is 5gb.
Is there any procedure to connect to oracle database from snowflake? OR
Do I need to connect them using a programming language as python?

You'll need to unload the data from Oracle and load into Snowflake, as there are no "direct connect" options I've ever heard about.
I'd use SQL*Loader to unload, push the files to AWS S3 (or your cloud vendor's storage), and issue Snowflake COPY INTO TABLE commands, it should be fairly straightforward.

There is no equivalent to Oracle database links in Snowflake. You would need an external process to move the data from Oracle to S3. Then you can configure a Snowpipe task to load from S3 into Snowflake. See Loading Continuously Using Snowpipe for more information.

I would suggest to use python programming to extract and load data from oracle to snowflake. Since your oracle table is being updated daily write python program to generate merge statement dynamically to load your incremental data from oracle to snowflake.
Snowflake supports Java script based stored procedure so you can use stored procedure to generate merge statement dynamically by passing table name as parameter and you can call it via python.
Initial load from oracle to snowflake may take time as you have 5GB data from your source system.

Related

Creating Oracle DBLink to insert data into a SQLite Database

I've been task with figuring out a way to get data from Oracle and store it in a SQLite database. The back story is we currently use SQLite for our local storage on a mobile application and we currently populate that data via a file download, because the data is a large amount it could take up to 5 minutes to populate the database. An easy solution for us would be to build the table on the server and download it via http. The data is currently stored in a Oracle database on the server. My question is is it possible to create a DBLink from Oracle to SQLite to insert the data into the SQLite database on the server? If this is not possible are there any other solutions that would achieve this?
Thanks

Oracle to Neo4j Sync

Do we have any utility to sync data between Oracle & Neo4J database. I want to use Neo4j in readonly mode & all writes will happen to oracle DB.
I think this depends on how often you want to have the data synced. Are you looking for a periodic sync/ETL process (say hourly or daily), or are looking for live updates into Neo4j?
I'm not aware of tools designed for this, but it's not terribly difficult to script yourself.
A periodic sync is obviously easiest. You can do that directly using the Java API and connecting via JDBC to Oracle. You could also just dump the data from Oracle as a CSV and import into Neo4j. This would be done similiarly to how data is imported from PostreSQL in this article: http://neo4j.com/developer/guide-importing-data-and-etl/
There is a SO response for exporting data from Oracle using sqlplus/spool:
How do I spool to a CSV formatted file using SQLPLUS?
If you're looking for live syncing, you'd probably do this either through monitoring the transaction log or by adding triggers onto your tables, depending on the complexity of your data.

Transfer data from an ORACLE View to greenplum DB table

I have an Oracle view containing very large amount of data in it and I want to migrate this data in a table in Greenplum database. Is there any way I can write any query in Postgresql to fetch that Oracle view's data?
If not possible by query in Postgresql, kindly suggest me some way to access Oracle view from Linux server, so that I can create data file from that Oracle view to my Linux server and load that file via gpfdist to a Greenplum table.
NOTE: an Oracle view is from third party, I only have an access to view that data (I have all the connection info) I can access that view via SQL Developer
NOTE: Exporting data from SQL Developer to my local machine is not feasible here as the data is very large
Thanks,
Sunny
The last time I used Greenplum (3 years ago) I don't think there were any untrusted languages like plperlu, so fetching directly from Oracle from within Greenplum might not be possible. If the data has a primary key, are you able to fetch in batches, compress it, then ship it to Greenplum?
Do you have a Greenplum support contract? If so, you could also try them if you haven't already: https://sso.emc.com/sso/login.htm
I recall that gpfdist can be configured to fetch from remote servers with a bit of fiddling, so if you are able to copy out the Oracle data to disk, you could fetch it using gpfdist without any intermediary steps.

How to download table from Oracle with little server load

I have a Oracle server which is very highly loaded. I want to Select big table with several millions rows of data and download the data using SQL Developer. How I can do this with little performance impact of the production database?
use oracle's export tool for most efficient dump of data from a table.
example
exp user/password tables=mytable query="optional where clause here"
Note you have to have oracle client installed to use it.

What is Oracle SQL Loader?

What is Oracle SQL Loader and what is it used for?
SQL Loader is utility provided by Oracle which enables us to load data from flat files into database tables. It is well covered in the documentation (check the Utilities Guide). The key thing is that SQL Loader is an external OS program.
External tables were introduced in Oracle 9i, allowing us to define tables whose data is supplied from flat files. These provide most of the functionality of SQL Loader with a lot more convenience. For instance we can manipulate and re-format the data using SQL functions which is simpler than using SQL Loader's syntax. It also means that we can pull the data from inside the database rather than pushing it from the OS.
However, for loading huge volumes of data in ultra-quick time a well-tuned SQL Loader control file will beat external tables for performance. Also, if there is a complicated OS process associated with the data files - e.g. ftp, gunzip, pre-processing with sed or awk - it can be more convenient to call SQL Loader from inside the shell script rather than attempting to hook up with a database job. So SQL Loader is still useful in certain scenarios but it is not necessarily the automatic first choice.
It is one of Oracle's bulk data loading tools.
You use it to load data from flat files (such as CSV) into the database.
For details, please check their documentation (or this FAQ)
To transfer data from one Oracle database to another oracle database, we use oracle data pump. And in oracle versions previous to 10g we use oracle export/import. But if you want to transfer data from a non oracle database to an oracle database, you create a flat file of the data in the non oracle database and using SQL Loader load the data into oracle database.
Following is procedure to load the data from Third Party Database into Oracle using SQL Loader.
1.Convert the Data into Flat file using third party database command.
2.Create the Table Structure in Oracle Database using appropriate datatypes
3.Write a Control File, describing how to interpret the flat file and options to load the data.
4.Execute SQL Loader utility specifying the control file in the command line argument

Resources