Use Python to transport data
An alternative to a previous post is the programme below. This uses Pandas dataframe to transport data. import pandas as pd from sqlalchemy.engine import create_engine from sqlalchemy.engine import URL from…
An alternative to a previous post is the programme below. This uses Pandas dataframe to transport data. import pandas as pd from sqlalchemy.engine import create_engine from sqlalchemy.engine import URL from…
Plse find enclosed a script to write records from SQL Server to Oracle: import pyodbc import datetime conn = pyodbc.connect('DSN=SQLServer;UID=sa;PWD=**') conntarget = pyodbc.connect('DSN=Rekendoos;UID=hr;PWD=**') table_name = 'MIGRATED_DIVORCE_SETTLEMENT__C' cursor = conn.cursor() cursortarget…
It might be that you see one record in a view that generates an error somewhere but you have not clue which record might generate that error. It could then…
In a data warehouse environment, we may have to close records when we have new records that are added to the system. Let me first provide the sql. CASE mut.etl_valid_fromWHEN…
Oracle has the concept of partitions: the idea that a set of records is stored in one partition, that is directly accessible. This avoids the situation that large segments of…
A nice feature of a DBMS is to be able to calculate elapse period. Important questions like “how many days to go to pension?’, can be addressed. In teradata, this…
Teradata recently introduced the concept of pivoting in its sql. The idea is relatively straightforward. A column is selected that has some distinct values. Pivoting then implies that the distinct…
Today, I played with the new SAS Viya environment. This environment has been promoted as a cloud based environment by SAS that acts as a SAAS solution to analytics needs…
I found one possibility to gracefully end a SAS job. The code is rather straight forward. One opens a macro with a condition statement %if %then etc. If the condition…
Similarly to Oracle connect by level (see also http://van-maanen.com/index.php/2016/04/08/an-oracle-programme-with-a-loop/ ), Teradata has a structure whereby tables can be connect in order to create a potentially large table. Let us show…