User bio
404 bio not found
Member since Apr 5, 2019
Replies:

Great article, if your are looking for an approach without objectscript and making use of "irispyhton", check this code :

python code :

import pandas as pd

from sqlalchemy import create_engine,types

engine = create_engine('iris+emb:///')

df = pd.read_csv("/irisdev/app/notebook/Notebooks/date_panda.csv")
# change type of FullDate to date
df['FullDate'] = pd.to_datetime(df['FullDate'])
df.head()

df.to_sql('DateFact', engine, schema="Demo" ,if_exists='replace', index=True,
        dtype={'DayName': types.VARCHAR(50), 'FullDate': types.DATE, 'MonthName': types.VARCHAR(50),
        'MonthYear': types.INTEGER, 'Year': types.INTEGER})

requirements.txt :

pandas
sqlalchemy==1.4.22
sqlalchemy-iris==0.5.0
irissqlcli

date_panda.csv

ID,DayName,FullDate,MonthName,MonthYear,Year
1,Monday,1900-01-01,January,190001,1900
2,Tuesday,1900-01-02,January,190001,1900
3,Wednesday,1900-01-03,January,190001,1900
4,Thursday,1900-01-04,January,190001,1900
5,Friday,1900-01-05,January,190001,1900
6,Saturday,1900-01-06,January,190001,1900
7,Sunday,1900-01-07,January,190001,1900
8,Monday,1900-01-08,January,190001,1900
9,Tuesday,1900-01-09,January,190001,1900
nc -z -v localhost 1972

Use netcat, it will tell you if the port is open, if not then it's may be because superserver is not ready

Thank for the feedback.

I think I will continue to use my sunglasses to check the community at night for a while cool

Open Exchange applications:
Followers:
Following:
Guillaume has not followed anybody yet.
Global Masters badges: