Initial Commit
This commit is contained in:
18
.env
Normal file
18
.env
Normal file
@@ -0,0 +1,18 @@
|
||||
# ---- Configuración HFSQL ----
|
||||
HFSQL_DSN=HFSQL_TEST
|
||||
HFSQL_SERVER=localhost
|
||||
HFSQL_PORT=4900
|
||||
HFSQL_DATABASE=TEST_STRYKER
|
||||
HFSQL_USER=admin
|
||||
HFSQL_PASSWORD=""
|
||||
|
||||
# ---- Configuración PostgreSQL ----
|
||||
PG_HOST=localhost
|
||||
PG_PORT=5432
|
||||
PG_DB=Stryker_POSTGRE_TEST
|
||||
PG_USER=postgres
|
||||
PG_PASSWORD=admin
|
||||
|
||||
# ---- Parámetros generales ----
|
||||
BATCH_SIZE=1
|
||||
LOG_FILE=migracion.log
|
||||
43
README.txt
Normal file
43
README.txt
Normal file
@@ -0,0 +1,43 @@
|
||||
Para poder ejecutar el codigo necesitamos tener instaladas las librerias:
|
||||
|
||||
pip install -r requirements.txt
|
||||
|
||||
|
||||
|
||||
Para saber si tenemos el dirver odbc HFSQL ejecutar esto en el powershell.
|
||||
|
||||
odbcad32.exe
|
||||
|
||||
SI no aparece nada de HFSQL en controladores es que no lo tenemos:
|
||||
|
||||
Descargar de aqui:
|
||||
|
||||
https://www.windev.la/st/descargar/common-modules-25/wx25_90f.htm
|
||||
|
||||
descargar el ODBC DRIVER FOR HFSQL para x64 si es nuestro caso
|
||||
|
||||
en mi caso es el ODBC25PACKUS090f.exe
|
||||
|
||||
|
||||
buscamos donde estaba antes en odbcad32.exe y ya debe aparecer hfsql
|
||||
|
||||
|
||||
prueba con DSN:
|
||||
|
||||
HAy que hacerlo con DSN y pypyodbc
|
||||
|
||||
TODO
|
||||
-----
|
||||
|
||||
Todo en ingles
|
||||
hacer un proyecto de git local
|
||||
documentar bonito en notion
|
||||
|
||||
|
||||
hacer el postgre en un docker
|
||||
|
||||
|
||||
|
||||
#DE MOMENTO NO#dockerizar la app python para que tenga las librerias y versiones.Hacer un contenedor con dos imagenes.
|
||||
|
||||
|
||||
53
error_actual.txt
Normal file
53
error_actual.txt
Normal file
@@ -0,0 +1,53 @@
|
||||
[('idmcr_alert_execution', <class 'int'>),
|
||||
('idmcr_alert_definition', <class 'int'>),
|
||||
('idmcr_users', <class 'int'>),
|
||||
('file_path', <class 'str'>),
|
||||
('content_message', <class 'bytearray'>),
|
||||
('params', <class 'str'>),
|
||||
('createdby', <class 'str'>),
|
||||
('creationdate', <class 'datetime.datetime'>),
|
||||
('lastmodificationdate', <class 'datetime.datetime'>),
|
||||
('modifiedby', <class 'str'>),
|
||||
('idmcr_portal_customer_service', <class 'int'>),
|
||||
('idie_job_execution', <class 'int'>),
|
||||
('email', <class 'str'>),
|
||||
('idie_job_execution_parent', <class 'int'>),
|
||||
('idmcr_portal_customer_user_site', <class 'int'>),
|
||||
('idmcr_portal_customer_user', <class 'int'>),
|
||||
('idmcr_portal_customer_location', <class 'int'>),
|
||||
('loginfo', <class 'bytearray'>),
|
||||
('status', <class 'int'>), ('subject', <class 'bytearray'>),
|
||||
('email_copy', <class 'str'>),
|
||||
('idmcr_alert_setup', <class 'int'>),
|
||||
('idmcr_files', <class 'int'>),
|
||||
('reply_to', <class 'str'>)]
|
||||
|
||||
|
||||
[('idmcr_alert_execution', <class 'int'>, 16, 4, 4, 0, True),
|
||||
('idmcr_alert_definition', <class 'int'>, 16, 4, 4, 0, True),
|
||||
('idmcr_users', <class 'int'>, 16, 8, 8, 0, True),
|
||||
('file_path', <class 'str'>, 2147483647, 2147483647, 2147483647, 0, True),
|
||||
('content_message', <class 'bytearray'>, 2147483647, 2147483647, 2147483647, 0, True),
|
||||
('params', <class 'str'>, 251, 251, 251, 0, True),
|
||||
('createdby', <class 'str'>, 101, 101, 101, 0, True),
|
||||
('creationdate', <class 'datetime.datetime'>, 23, 8, 8, 0, True),
|
||||
('lastmodificationdate', <class 'datetime.datetime'>, 23, 8, 8, 0, True),
|
||||
('modifiedby', <class 'str'>, 101, 101, 101, 0, True),
|
||||
('idmcr_portal_customer_service', <class 'int'>, 16, 8, 8, 0, True),
|
||||
('idie_job_execution', <class 'int'>, 16, 4, 4, 0, True),
|
||||
('email', <class 'str'>, 2147483647, 2147483647, 2147483647, 0, True),
|
||||
('idie_job_execution_parent', <class 'int'>, 16, 4, 4, 0, True),
|
||||
('idmcr_portal_customer_user_site', <class 'int'>, 16, 8, 8, 0, True),
|
||||
('idmcr_portal_customer_user', <class 'int'>, 16, 8, 8, 0, True),
|
||||
('idmcr_portal_customer_location', <class 'int'>, 16, 8, 8, 0, True),
|
||||
('loginfo', <class 'bytearray'>, 2147483647, 2147483647, 2147483647, 0, True),
|
||||
('status', <class 'int'>, 16, 4, 4, 0, True),
|
||||
('subject', <class 'bytearray'>, 2147483647, 2147483647, 2147483647, 0, True),
|
||||
('email_copy', <class 'str'>, 2147483647, 2147483647, 2147483647, 0, True),
|
||||
('idmcr_alert_setup', <class 'int'>, 16, 8, 8, 0, True),
|
||||
('idmcr_files', <class 'int'>, 16, 8, 8, 0, True),
|
||||
('reply_to', <class 'str'>, 51, 51, 51, 0, True)]
|
||||
|
||||
|
||||
idmcr_alert_execution, idmcr_alert_definition, idmcr_users, file_path, content_message, params, createdby, creationdate, lastmodificationdate, modifiedby, idmcr_portal_customer_service, idie_job_execution, email, idie_job_execution_parent, idmcr_portal_customer_user_site, idmcr_portal_customer_user, idmcr_portal_customer_location, loginfo, status, subject, email_copy, idmcr_alert_setup, idmcr_files, reply_to) VALUES (%s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s)
|
||||
[67, 1, 6, 'id_po_hdr=70;id_cus=1', None, None, 2, 187, 0, 0, 0, 0, 0, 0, 0, None, None, None, None, None, None, None, None, None]]
|
||||
235
main.py
Normal file
235
main.py
Normal file
@@ -0,0 +1,235 @@
|
||||
#!/usr/bin/env python3
|
||||
# -*- coding: utf-8 -*-
|
||||
import datetime
|
||||
import sys
|
||||
import math
|
||||
import logging
|
||||
import psycopg2 # POSTGRE CONNECTOR
|
||||
import pypyodbc # HFSQL CONNECTOR
|
||||
import os
|
||||
from dotenv import load_dotenv
|
||||
from tqdm import tqdm
|
||||
|
||||
# ---------------- CONFIGURATION ----------------
|
||||
|
||||
# Load variables from .env
|
||||
load_dotenv()
|
||||
|
||||
# Read config from .env
|
||||
HFSQL_DSN = os.getenv("HFSQL_DSN")
|
||||
HFSQL_SERVER = os.getenv("HFSQL_SERVER")
|
||||
HFSQL_PORT = os.getenv("HFSQL_PORT")
|
||||
HFSQL_DATABASE = os.getenv("HFSQL_DATABASE")
|
||||
HFSQL_USER = os.getenv("HFSQL_USER")
|
||||
HFSQL_PASSWORD = os.getenv("HFSQL_PASSWORD")
|
||||
|
||||
# HFSQL Connection String
|
||||
HFSQL_CONN_STR = (f"DSN={HFSQL_DSN};UID={HFSQL_USER};PWD={HFSQL_PASSWORD}")
|
||||
|
||||
PG_HOST = os.getenv("PG_HOST")
|
||||
PG_PORT = os.getenv("PG_PORT")
|
||||
PG_DB = os.getenv("PG_DB")
|
||||
PG_USER = os.getenv("PG_USER")
|
||||
PG_PASSWORD = os.getenv("PG_PASSWORD")
|
||||
POSTGRES_CONN_STR = (
|
||||
f"host={PG_HOST} "
|
||||
f"port={PG_PORT} "
|
||||
f"dbname={PG_DB} "
|
||||
f"user={PG_USER} "
|
||||
f"password={PG_PASSWORD}"
|
||||
)
|
||||
|
||||
BATCH_SIZE = int(os.getenv("BATCH_SIZE", 10000))
|
||||
LOG_FILE = os.getenv("LOG_FILE", "migration.log")
|
||||
|
||||
# Data types mapping HFSQL → PostgreSQL
|
||||
TYPE_MAP = {
|
||||
int: 'INTEGER',
|
||||
str: 'TEXT',
|
||||
float: 'REAL',
|
||||
bool: 'BOOLEAN',
|
||||
bytes: 'BYTEA',
|
||||
datetime.datetime: 'TIMESTAMP',
|
||||
datetime.date: 'DATE',
|
||||
}
|
||||
|
||||
# ---------------- LOGGING ----------------
|
||||
logging.basicConfig(
|
||||
filename=LOG_FILE,
|
||||
filemode="a",
|
||||
level=logging.INFO,
|
||||
format="%(asctime)s - %(levelname)s - %(message)s"
|
||||
)
|
||||
|
||||
# ---------------- FUNCTIONS ----------------
|
||||
|
||||
def get_hfsql_types(cursor, table_name):
|
||||
"""
|
||||
Returns a list of columns [(name, hfsql_type)]
|
||||
"""
|
||||
cursor.execute(f"SELECT * FROM {table_name} WHERE 1=0")
|
||||
columns = [(desc[0],desc[1]) for desc in cursor.description]
|
||||
return columns
|
||||
|
||||
|
||||
def count_records(cursor, table_name):
|
||||
cursor.execute(f"SELECT COUNT(*) FROM {table_name}")
|
||||
return cursor.fetchone()[0]
|
||||
|
||||
|
||||
def generate_postgres_insert(table_name, columns):
|
||||
names = [col[0] for col in columns]
|
||||
placeholders = ", ".join(["%s"] * len(columns))
|
||||
fields = ", ".join(names)
|
||||
query = f"INSERT INTO {table_name} ({fields}) VALUES ({placeholders})"
|
||||
#print(fields)
|
||||
return query
|
||||
|
||||
|
||||
#def convert_type(value, hfsql_type):
|
||||
# if value is None:
|
||||
# return None
|
||||
# if isinstance(value, bytearray):
|
||||
# return bytes(value) # convertir a bytes para PostgreSQL
|
||||
# tipo_str = str(hfsql_type).lower()
|
||||
# if "tinyint" in tipo_str or "boolean" in tipo_str:
|
||||
# return bool(value)
|
||||
# if "date" in tipo_str or "datetime" in tipo_str:
|
||||
# return value
|
||||
# return value
|
||||
|
||||
def convert_type(value, hfsql_type):
|
||||
"""Convierte un valor HFSQL a PostgreSQL según TYPE_MAP"""
|
||||
if value is None:
|
||||
return None
|
||||
|
||||
# Tinyint / boolean
|
||||
if hfsql_type in ["tinyint", "boolean"]:
|
||||
return bool(value)
|
||||
|
||||
# Decimal / float
|
||||
if hfsql_type in ["float", "decimal"]:
|
||||
return float(value)
|
||||
|
||||
# Int / bigint
|
||||
if hfsql_type in ["int", "bigint"]:
|
||||
return int(value)
|
||||
|
||||
# Strings
|
||||
if hfsql_type in ["varchar", "char", "text"]:
|
||||
return str(value)
|
||||
|
||||
# Por defecto, devolver tal cual
|
||||
return value
|
||||
|
||||
def create_postgres_table_if_not_exists(cur_pg, table_name, columns):
|
||||
"""
|
||||
Crea la tabla en PostgreSQL si no existe, usando la estructura pasada en columns.
|
||||
columns: lista de tuplas (nombre_columna, tipo_columna)
|
||||
"""
|
||||
# Mapeo básico de tipos HFSQL a PostgreSQL (ajusta según tus tipos)
|
||||
|
||||
columns_ddl = []
|
||||
for col_name, col_type in columns:
|
||||
pg_type = TYPE_MAP.get(col_type, 'TEXT') # default a TEXT
|
||||
columns_ddl.append(f'"{col_name}" {pg_type}')
|
||||
|
||||
ddl = f'CREATE TABLE IF NOT EXISTS "{table_name}" (\n {",\n ".join(columns_ddl)}\n);'
|
||||
#print(f"dll Create ->{ddl}")
|
||||
|
||||
try:
|
||||
cur_pg.execute(ddl)
|
||||
cur_pg.connection.commit()
|
||||
print(f"✅ Tabla {table_name} creada o ya existía en PostgreSQL")
|
||||
except Exception as e:
|
||||
print(f"❌ Error creando tabla {table_name}: {e}")
|
||||
cur_pg.connection.rollback()
|
||||
|
||||
|
||||
def migrate_table(table_name):
|
||||
logging.info(f"Starting migration of table {table_name}")
|
||||
# HFSQL Connection
|
||||
try:
|
||||
conn_hf = pypyodbc.connect(HFSQL_CONN_STR)
|
||||
cur_hf = conn_hf.cursor()
|
||||
print("✅ Connected to HFSQL")
|
||||
except Exception as e:
|
||||
print("Error connecting to HFSQL:", e)
|
||||
return
|
||||
# POSTGRE Connection
|
||||
try:
|
||||
conn_pg = psycopg2.connect(POSTGRES_CONN_STR)
|
||||
cur_pg = conn_pg.cursor()
|
||||
print("✅ Connected to PostgreSQL")
|
||||
except Exception as e:
|
||||
print("Error connecting to POSTGRE:", e)
|
||||
return
|
||||
|
||||
# Get table info
|
||||
columns = get_hfsql_types(cur_hf, table_name)
|
||||
#print(f"Structure -> \n{columns}")
|
||||
total = count_records(cur_hf, table_name)
|
||||
#print(f"Total rows -> \n {total}")
|
||||
logging.info(f"Table {table_name}: {total} records detected")
|
||||
|
||||
#CREATE TABLE IF NOT EXISTS
|
||||
create_postgres_table_if_not_exists(cur_pg, table_name, columns)
|
||||
#CREATE INSERT
|
||||
insert_query = generate_postgres_insert(table_name, columns)
|
||||
total_batches = math.ceil(total / BATCH_SIZE)
|
||||
|
||||
for batch_num in tqdm(range(total_batches), desc=f"Migrating {table_name}"):
|
||||
|
||||
offset = batch_num * BATCH_SIZE
|
||||
columns_sql = ", ".join([f'"{col[0]}"' for col in columns])
|
||||
cur_hf.execute(f"SELECT {columns_sql} FROM {table_name} LIMIT {BATCH_SIZE} OFFSET {offset}")
|
||||
print(f"curfDesc-> {cur_hf}")
|
||||
# print(f"SELECT {columns_sql} FROM {table_name} LIMIT {BATCH_SIZE} OFFSET {offset}")
|
||||
rows = cur_hf.fetchall()
|
||||
print(f"row1 = {rows[0]}")
|
||||
|
||||
converted_data = []
|
||||
|
||||
for row_num, row in enumerate(rows, 1):
|
||||
row_values = []
|
||||
for i, value in enumerate(row):
|
||||
col_type = columns[i][1] # obtener el tipo de la columna por índice
|
||||
row_values.append(convert_type(value, col_type))
|
||||
print(f"Columna {i} :{value}")
|
||||
|
||||
# Rellenar con None si falta alguna columna
|
||||
while len(row_values) < len(columns):
|
||||
row_values.append(None)
|
||||
|
||||
converted_data.append(row_values)
|
||||
print(f"Converted Data -> {converted_data}")
|
||||
try:
|
||||
cur_pg.executemany(insert_query, converted_data)
|
||||
conn_pg.commit()
|
||||
except Exception as e:
|
||||
|
||||
conn_pg.rollback()
|
||||
logging.error(f"Error in batch {batch_num}: {e}")
|
||||
print(f"❌ Error in batch {batch_num}: {e}")
|
||||
print("🛑 Stopping migration due to error.")
|
||||
break
|
||||
# Detener la migración si falla un batch
|
||||
|
||||
cur_hf.close()
|
||||
conn_hf.close()
|
||||
cur_pg.close()
|
||||
conn_pg.close()
|
||||
|
||||
logging.info(f"Migration of {table_name} completed successfully.")
|
||||
print(f"✅ Table {table_name} migrated successfully.")
|
||||
|
||||
|
||||
# ---------------- MAIN ----------------
|
||||
|
||||
if __name__ == "__main__":
|
||||
if len(sys.argv) != 2:
|
||||
print("Usage: python migrate_table.py Table_Name")
|
||||
sys.exit(1)
|
||||
|
||||
table_name = sys.argv[1]
|
||||
migrate_table(table_name)
|
||||
229
main_simple_copia.py
Normal file
229
main_simple_copia.py
Normal file
@@ -0,0 +1,229 @@
|
||||
#!/usr/bin/env python3
|
||||
# -*- coding: utf-8 -*-
|
||||
import datetime
|
||||
import sys
|
||||
import math
|
||||
import logging
|
||||
import psycopg2 # POSTGRE CONNECTOR
|
||||
import pypyodbc # HFSQL CONNECTOR
|
||||
import os
|
||||
from dotenv import load_dotenv
|
||||
from tqdm import tqdm
|
||||
|
||||
# ---------------- CONFIGURATION ----------------
|
||||
|
||||
# Load variables from .env
|
||||
load_dotenv()
|
||||
|
||||
# Read config from .env
|
||||
HFSQL_DSN = os.getenv("HFSQL_DSN")
|
||||
HFSQL_SERVER = os.getenv("HFSQL_SERVER")
|
||||
HFSQL_PORT = os.getenv("HFSQL_PORT")
|
||||
HFSQL_DATABASE = os.getenv("HFSQL_DATABASE")
|
||||
HFSQL_USER = os.getenv("HFSQL_USER")
|
||||
HFSQL_PASSWORD = os.getenv("HFSQL_PASSWORD")
|
||||
|
||||
# HFSQL Connection String
|
||||
HFSQL_CONN_STR = (f"DSN={HFSQL_DSN};UID={HFSQL_USER};PWD={HFSQL_PASSWORD}")
|
||||
|
||||
PG_HOST = os.getenv("PG_HOST")
|
||||
PG_PORT = os.getenv("PG_PORT")
|
||||
PG_DB = os.getenv("PG_DB")
|
||||
PG_USER = os.getenv("PG_USER")
|
||||
PG_PASSWORD = os.getenv("PG_PASSWORD")
|
||||
POSTGRES_CONN_STR = (
|
||||
f"host={PG_HOST} "
|
||||
f"port={PG_PORT} "
|
||||
f"dbname={PG_DB} "
|
||||
f"user={PG_USER} "
|
||||
f"password={PG_PASSWORD}"
|
||||
)
|
||||
|
||||
BATCH_SIZE = int(os.getenv("BATCH_SIZE", 10000))
|
||||
LOG_FILE = os.getenv("LOG_FILE", "migration.log")
|
||||
|
||||
# Data types mapping HFSQL → PostgreSQL
|
||||
TYPE_MAP = {
|
||||
int: 'INTEGER',
|
||||
str: 'TEXT',
|
||||
float: 'REAL',
|
||||
bool: 'BOOLEAN',
|
||||
bytes: 'BYTEA',
|
||||
datetime.datetime: 'TIMESTAMP',
|
||||
datetime.date: 'DATE',
|
||||
}
|
||||
|
||||
# ---------------- LOGGING ----------------
|
||||
logging.basicConfig(
|
||||
filename=LOG_FILE,
|
||||
filemode="a",
|
||||
level=logging.INFO,
|
||||
format="%(asctime)s - %(levelname)s - %(message)s"
|
||||
)
|
||||
|
||||
# ---------------- FUNCTIONS ----------------
|
||||
|
||||
def get_hfsql_types(cursor, table_name):
|
||||
"""
|
||||
Returns a list of columns [(name, hfsql_type)]
|
||||
"""
|
||||
cursor.execute(f"SELECT * FROM {table_name} WHERE 1=0")
|
||||
columns = [(desc[0],desc[1]) for desc in cursor.description]
|
||||
return columns
|
||||
|
||||
|
||||
def count_records(cursor, table_name):
|
||||
cursor.execute(f"SELECT COUNT(*) FROM {table_name}")
|
||||
return cursor.fetchone()[0]
|
||||
|
||||
|
||||
def generate_postgres_insert(table_name, columns):
|
||||
names = [col[0] for col in columns]
|
||||
placeholders = ", ".join(["%s"] * len(columns))
|
||||
fields = ", ".join(names)
|
||||
query = f"INSERT INTO {table_name} ({fields}) VALUES ({placeholders})"
|
||||
return query
|
||||
|
||||
|
||||
#def convert_type(value, hfsql_type):
|
||||
# if value is None:
|
||||
# return None
|
||||
# if isinstance(value, bytearray):
|
||||
# return bytes(value) # convertir a bytes para PostgreSQL
|
||||
# tipo_str = str(hfsql_type).lower()
|
||||
# if "tinyint" in tipo_str or "boolean" in tipo_str:
|
||||
# return bool(value)
|
||||
# if "date" in tipo_str or "datetime" in tipo_str:
|
||||
# return value
|
||||
# return value
|
||||
|
||||
def convert_type(value, hfsql_type):
|
||||
"""Convierte un valor HFSQL a PostgreSQL según TYPE_MAP"""
|
||||
if value is None:
|
||||
return None
|
||||
|
||||
# Tinyint / boolean
|
||||
if hfsql_type in ["tinyint", "boolean"]:
|
||||
return bool(value)
|
||||
|
||||
# Decimal / float
|
||||
if hfsql_type in ["float", "decimal"]:
|
||||
return float(value)
|
||||
|
||||
# Int / bigint
|
||||
if hfsql_type in ["int", "bigint"]:
|
||||
return int(value)
|
||||
|
||||
# Strings
|
||||
if hfsql_type in ["varchar", "char", "text"]:
|
||||
return str(value)
|
||||
|
||||
# Por defecto, devolver tal cual
|
||||
return value
|
||||
|
||||
def create_postgres_table_if_not_exists(cur_pg, table_name, columns):
|
||||
"""
|
||||
Crea la tabla en PostgreSQL si no existe, usando la estructura pasada en columns.
|
||||
columns: lista de tuplas (nombre_columna, tipo_columna)
|
||||
"""
|
||||
# Mapeo básico de tipos HFSQL a PostgreSQL (ajusta según tus tipos)
|
||||
|
||||
columns_ddl = []
|
||||
for col_name, col_type in columns:
|
||||
pg_type = TYPE_MAP.get(col_type, 'TEXT') # default a TEXT
|
||||
columns_ddl.append(f'"{col_name}" {pg_type}')
|
||||
|
||||
print(columns_ddl[0])
|
||||
ddl = f'CREATE TABLE IF NOT EXISTS "{table_name}" (\n {",\n ".join(columns_ddl)}\n);'
|
||||
|
||||
try:
|
||||
cur_pg.execute(ddl)
|
||||
cur_pg.connection.commit()
|
||||
print(f"✅ Tabla {table_name} creada o ya existía en PostgreSQL")
|
||||
except Exception as e:
|
||||
print(f"❌ Error creando tabla {table_name}: {e}")
|
||||
cur_pg.connection.rollback()
|
||||
|
||||
|
||||
def migrate_table(table_name):
|
||||
logging.info(f"Starting migration of table {table_name}")
|
||||
# HFSQL Connection
|
||||
try:
|
||||
conn_hf = pypyodbc.connect(HFSQL_CONN_STR)
|
||||
cur_hf = conn_hf.cursor()
|
||||
print("✅ Connected to HFSQL")
|
||||
except Exception as e:
|
||||
print("Error connecting to HFSQL:", e)
|
||||
return
|
||||
# POSTGRE Connection
|
||||
try:
|
||||
conn_pg = psycopg2.connect(POSTGRES_CONN_STR)
|
||||
cur_pg = conn_pg.cursor()
|
||||
print("✅ Connected to PostgreSQL")
|
||||
except Exception as e:
|
||||
print("Error connecting to POSTGRE:", e)
|
||||
return
|
||||
|
||||
# Get table info
|
||||
columns = get_hfsql_types(cur_hf, table_name)
|
||||
print(f"Structure -> \n{columns}")
|
||||
total = count_records(cur_hf, table_name)
|
||||
print(f"Total rows -> \n {total}")
|
||||
logging.info(f"Table {table_name}: {total} records detected")
|
||||
|
||||
#CREATE TABLE IF NOT EXISTS
|
||||
create_postgres_table_if_not_exists(cur_pg, table_name, columns)
|
||||
#CREATE INSERT
|
||||
insert_query = generate_postgres_insert(table_name, columns)
|
||||
total_batches = math.ceil(total / BATCH_SIZE)
|
||||
|
||||
for batch_num in tqdm(range(total_batches), desc=f"Migrating {table_name}"):
|
||||
|
||||
offset = batch_num * BATCH_SIZE
|
||||
print(f"SELECT * FROM {table_name} LIMIT {BATCH_SIZE} OFFSET {offset}")
|
||||
cur_hf.execute(f"SELECT * FROM {table_name} LIMIT {BATCH_SIZE} OFFSET {offset}")
|
||||
rows = cur_hf.fetchall()
|
||||
|
||||
converted_data = []
|
||||
|
||||
for row_num, row in enumerate(rows, 1):
|
||||
row_values = []
|
||||
for i, value in enumerate(row):
|
||||
col_type = columns[i][1] # obtener el tipo de la columna por índice
|
||||
row_values.append(convert_type(value, col_type))
|
||||
|
||||
# Rellenar con None si falta alguna columna
|
||||
while len(row_values) < len(columns):
|
||||
row_values.append(None)
|
||||
|
||||
converted_data.append(row_values)
|
||||
try:
|
||||
cur_pg.executemany(insert_query, converted_data)
|
||||
conn_pg.commit()
|
||||
except Exception as e:
|
||||
|
||||
conn_pg.rollback()
|
||||
logging.error(f"Error in batch {batch_num}: {e}")
|
||||
print(f"❌ Error in batch {batch_num}: {e}")
|
||||
print("🛑 Stopping migration due to error.")
|
||||
break
|
||||
# Detener la migración si falla un batch
|
||||
|
||||
cur_hf.close()
|
||||
conn_hf.close()
|
||||
cur_pg.close()
|
||||
conn_pg.close()
|
||||
|
||||
logging.info(f"Migration of {table_name} completed successfully.")
|
||||
print(f"✅ Table {table_name} migrated successfully.")
|
||||
|
||||
|
||||
# ---------------- MAIN ----------------
|
||||
|
||||
if __name__ == "__main__":
|
||||
if len(sys.argv) != 2:
|
||||
print("Usage: python migrate_table.py Table_Name")
|
||||
sys.exit(1)
|
||||
|
||||
table_name = sys.argv[1]
|
||||
migrate_table(table_name)
|
||||
534
migracion.log
Normal file
534
migracion.log
Normal file
@@ -0,0 +1,534 @@
|
||||
2025-11-06 17:07:10,582 - INFO - Iniciando migraci<63>n de la tabla exp_mgt_analysis_header
|
||||
2025-11-06 17:10:28,857 - INFO - Iniciando migraci<63>n de la tabla exp_mgt_analysis_header
|
||||
2025-11-06 17:10:44,848 - INFO - Iniciando migraci<63>n de la tabla exp_mgt_analysis_header
|
||||
2025-11-06 17:23:11,649 - INFO - Iniciando migraci<63>n de la tabla exp_mgt_analysis_header
|
||||
2025-11-06 17:24:01,815 - INFO - Iniciando migraci<63>n de la tabla exp_mgt_analysis_header
|
||||
2025-11-06 17:24:31,801 - INFO - Iniciando migraci<63>n de la tabla exp_mgt_analysis_header
|
||||
2025-11-06 17:25:15,839 - INFO - Iniciando migraci<63>n de la tabla exp_mgt_analysis_header
|
||||
2025-11-06 17:25:48,883 - INFO - Iniciando migraci<63>n de la tabla exp_mgt_analysis_header
|
||||
2025-11-06 17:26:36,756 - INFO - Iniciando migraci<63>n de la tabla exp_mgt_analysis_header
|
||||
2025-11-06 17:27:03,264 - INFO - Iniciando migraci<63>n de la tabla exp_mgt_analysis_header
|
||||
2025-11-06 17:29:27,315 - INFO - Iniciando migraci<63>n de la tabla exp_mgt_analysis_header
|
||||
2025-11-06 17:33:55,110 - INFO - Iniciando migraci<63>n de la tabla exp_mgt_analysis_header
|
||||
2025-11-06 17:34:31,739 - INFO - Iniciando migraci<63>n de la tabla exp_mgt_analysis_header
|
||||
2025-11-06 17:35:12,807 - INFO - Iniciando migraci<63>n de la tabla exp_mgt_analysis_header
|
||||
2025-11-06 17:35:35,073 - INFO - Iniciando migraci<63>n de la tabla exp_mgt_analysis_header
|
||||
2025-11-06 17:36:02,224 - INFO - Iniciando migraci<63>n de la tabla exp_mgt_analysis_header
|
||||
2025-11-06 17:36:30,071 - INFO - Iniciando migraci<63>n de la tabla exp_mgt_analysis_header
|
||||
2025-11-06 17:37:10,760 - INFO - Iniciando migraci<63>n de la tabla exp_mgt_analysis_header
|
||||
2025-11-06 17:37:40,696 - INFO - Iniciando migraci<63>n de la tabla exp_mgt_analysis_header
|
||||
2025-11-06 17:38:22,255 - INFO - Iniciando migraci<63>n de la tabla exp_mgt_analysis_header
|
||||
2025-11-06 17:39:39,485 - INFO - Iniciando migraci<63>n de la tabla exp_mgt_analysis_header
|
||||
2025-11-06 17:42:59,387 - INFO - Iniciando migraci<63>n de la tabla exp_mgt_analysis_header
|
||||
2025-11-06 17:43:24,478 - INFO - Iniciando migraci<63>n de la tabla exp_mgt_analysis_header
|
||||
2025-11-06 17:52:17,413 - INFO - Iniciando migraci<63>n de la tabla exp_mgt_analysis_header
|
||||
2025-11-06 17:52:19,864 - INFO - Tabla exp_mgt_analysis_header: 1 registros detectados
|
||||
2025-11-06 17:53:29,924 - INFO - Iniciando migraci<63>n de la tabla exp_mgt_analysis_header
|
||||
2025-11-06 17:54:00,869 - INFO - Iniciando migraci<63>n de la tabla exp_mgt_analysis_header
|
||||
2025-11-06 17:54:20,652 - INFO - Iniciando migraci<63>n de la tabla exp_mgt_analysis_header
|
||||
2025-11-06 17:54:22,945 - INFO - Tabla exp_mgt_analysis_header: 1 registros detectados
|
||||
2025-11-06 17:55:02,081 - INFO - Iniciando migraci<63>n de la tabla exp_mgt_analysis_header
|
||||
2025-11-06 17:55:04,209 - INFO - Tabla exp_mgt_analysis_header: 1 registros detectados
|
||||
2025-11-06 17:55:48,783 - INFO - Iniciando migraci<63>n de la tabla exp_mgt_analysis_header
|
||||
2025-11-06 17:55:51,055 - INFO - Tabla exp_mgt_analysis_header: 1 registros detectados
|
||||
2025-11-07 09:27:09,280 - INFO - Iniciando migraci<63>n de la tabla exp_mgt_analysis_header
|
||||
2025-11-07 09:27:12,556 - INFO - Tabla exp_mgt_analysis_header: 1 registros detectados
|
||||
2025-11-07 16:20:38,623 - INFO - Starting migration of table exp_mgt_analysis_header
|
||||
2025-11-07 16:23:36,595 - INFO - Starting migration of table exp_mgt_analysis_header
|
||||
2025-11-07 16:23:38,804 - INFO - Table exp_mgt_analysis_header: 1 records detected
|
||||
2025-11-07 16:33:23,252 - INFO - Starting migration of table exp_mgt_analysis_header
|
||||
2025-11-07 16:33:35,646 - INFO - Table exp_mgt_analysis_header: 1 records detected
|
||||
2025-11-07 16:49:04,343 - INFO - Starting migration of table exp_mgt_analysis_header
|
||||
2025-11-07 16:49:13,979 - INFO - Table exp_mgt_analysis_header: 1 records detected
|
||||
2025-11-07 16:49:14,043 - ERROR - Error in batch 0: no existe la relaci<63>n <20>exp_mgt_analysis_header<65>
|
||||
LINE 1: INSERT INTO exp_mgt_analysis_header (idexp_mgt_analysis_head...
|
||||
^
|
||||
|
||||
2025-11-07 16:49:14,177 - INFO - Migration of exp_mgt_analysis_header completed successfully.
|
||||
2025-11-07 16:54:13,127 - INFO - Starting migration of table exp_mgt_analysis_header
|
||||
2025-11-07 16:54:15,670 - INFO - Table exp_mgt_analysis_header: 1 records detected
|
||||
2025-11-07 16:56:08,262 - INFO - Starting migration of table exp_mgt_analysis_header
|
||||
2025-11-07 16:56:10,624 - INFO - Table exp_mgt_analysis_header: 1 records detected
|
||||
2025-11-07 16:56:36,673 - INFO - Starting migration of table exp_mgt_analysis_header
|
||||
2025-11-07 16:56:38,982 - INFO - Table exp_mgt_analysis_header: 1 records detected
|
||||
2025-11-07 16:58:12,954 - INFO - Starting migration of table exp_mgt_analysis_header
|
||||
2025-11-07 16:58:15,206 - INFO - Table exp_mgt_analysis_header: 1 records detected
|
||||
2025-11-07 16:59:30,062 - INFO - Starting migration of table exp_mgt_analysis_header
|
||||
2025-11-07 16:59:32,147 - INFO - Table exp_mgt_analysis_header: 1 records detected
|
||||
2025-11-07 17:00:41,952 - INFO - Starting migration of table exp_mgt_analysis_header
|
||||
2025-11-07 17:00:44,292 - INFO - Table exp_mgt_analysis_header: 1 records detected
|
||||
2025-11-07 17:01:03,552 - INFO - Starting migration of table exp_mgt_analysis_header
|
||||
2025-11-07 17:01:05,766 - INFO - Table exp_mgt_analysis_header: 1 records detected
|
||||
2025-11-07 17:02:24,204 - INFO - Starting migration of table exp_mgt_analysis_header
|
||||
2025-11-07 17:02:26,436 - INFO - Table exp_mgt_analysis_header: 1 records detected
|
||||
2025-11-07 17:04:27,395 - INFO - Starting migration of table exp_mgt_analysis_header
|
||||
2025-11-07 17:04:29,630 - INFO - Table exp_mgt_analysis_header: 1 records detected
|
||||
2025-11-07 17:04:29,802 - INFO - Migration of exp_mgt_analysis_header completed successfully.
|
||||
2025-11-07 17:08:11,446 - INFO - Starting migration of table mcr_alert_execution
|
||||
2025-11-07 17:08:13,631 - INFO - Table mcr_alert_execution: 73273 records detected
|
||||
2025-11-07 17:08:17,505 - ERROR - Error in batch 0: list index out of range
|
||||
2025-11-07 17:08:22,296 - ERROR - Error in batch 1: list index out of range
|
||||
2025-11-07 17:08:28,006 - ERROR - Error in batch 2: list index out of range
|
||||
2025-11-07 17:08:34,664 - ERROR - Error in batch 3: list index out of range
|
||||
2025-11-07 17:08:43,428 - ERROR - Error in batch 4: list index out of range
|
||||
2025-11-07 17:08:56,562 - ERROR - Error in batch 5: list index out of range
|
||||
2025-11-07 17:09:11,459 - ERROR - Error in batch 6: list index out of range
|
||||
2025-11-07 17:09:23,171 - ERROR - Error in batch 7: list index out of range
|
||||
2025-11-07 17:09:23,262 - INFO - Migration of mcr_alert_execution completed successfully.
|
||||
2025-11-07 17:14:49,239 - INFO - Starting migration of table mcr_alert_execution
|
||||
2025-11-07 17:15:01,064 - INFO - Table mcr_alert_execution: 73273 records detected
|
||||
2025-11-07 17:15:03,203 - ERROR - Error in batch 0: list index out of range
|
||||
2025-11-07 17:15:03,290 - INFO - Migration of mcr_alert_execution completed successfully.
|
||||
2025-11-07 17:21:41,741 - INFO - Starting migration of table mcr_alert_execution
|
||||
2025-11-07 17:21:44,084 - INFO - Table mcr_alert_execution: 73273 records detected
|
||||
2025-11-07 17:21:46,380 - ERROR - Error in batch 0: list index out of range
|
||||
2025-11-07 17:23:41,646 - INFO - Starting migration of table mcr_alert_execution
|
||||
2025-11-07 17:23:43,936 - INFO - Table mcr_alert_execution: 73273 records detected
|
||||
2025-11-07 17:23:46,578 - ERROR - Error in batch 0: list index out of range
|
||||
2025-11-07 17:26:10,745 - INFO - Starting migration of table mcr_alert_execution
|
||||
2025-11-07 17:26:13,093 - INFO - Table mcr_alert_execution: 73273 records detected
|
||||
2025-11-07 17:26:15,268 - ERROR - Error in batch 0: la columna <20>creationdate<74> es de tipo timestamp without time zone pero la expresi<73>n es de tipo integer
|
||||
LINE 1: ...67, 1, 6, 'id_po_hdr=70;id_cus=1', NULL, NULL, 2, 187, 0, 0,...
|
||||
^
|
||||
HINT: Necesitar<61> reescribir la expresi<73>n o aplicarle una conversi<73>n de tipo.
|
||||
|
||||
2025-11-07 17:29:05,215 - INFO - Starting migration of table mcr_alert_execution
|
||||
2025-11-07 17:29:14,565 - INFO - Table mcr_alert_execution: 73273 records detected
|
||||
2025-11-07 17:29:57,374 - INFO - Starting migration of table mcr_alert_execution
|
||||
2025-11-07 17:30:01,748 - INFO - Table mcr_alert_execution: 73273 records detected
|
||||
2025-11-07 17:30:03,985 - ERROR - Error in batch 0: la columna <20>creationdate<74> es de tipo timestamp without time zone pero la expresi<73>n es de tipo integer
|
||||
LINE 1: ...67, 1, 6, 'id_po_hdr=70;id_cus=1', NULL, NULL, 2, 187, 0, 0,...
|
||||
^
|
||||
HINT: Necesitar<61> reescribir la expresi<73>n o aplicarle una conversi<73>n de tipo.
|
||||
|
||||
2025-11-07 17:33:47,446 - INFO - Starting migration of table mcr_alert_execution
|
||||
2025-11-07 17:33:49,724 - INFO - Table mcr_alert_execution: 73273 records detected
|
||||
2025-11-07 17:33:52,707 - ERROR - Error in batch 0: la columna <20>creationdate<74> es de tipo timestamp without time zone pero la expresi<73>n es de tipo integer
|
||||
LINE 1: ...67, 1, 6, 'id_po_hdr=70;id_cus=1', NULL, NULL, 2, 187, 0, 0,...
|
||||
^
|
||||
HINT: Necesitar<61> reescribir la expresi<73>n o aplicarle una conversi<73>n de tipo.
|
||||
|
||||
2025-11-07 17:35:27,802 - INFO - Starting migration of table mcr_alert_execution
|
||||
2025-11-07 17:35:29,882 - INFO - Table mcr_alert_execution: 73273 records detected
|
||||
2025-11-07 17:35:31,996 - ERROR - Error in batch 0: la columna <20>creationdate<74> es de tipo timestamp without time zone pero la expresi<73>n es de tipo integer
|
||||
LINE 1: ...67, 1, 6, 'id_po_hdr=70;id_cus=1', NULL, NULL, 2, 187, 0, 0,...
|
||||
^
|
||||
HINT: Necesitar<61> reescribir la expresi<73>n o aplicarle una conversi<73>n de tipo.
|
||||
|
||||
2025-11-07 17:37:01,187 - INFO - Starting migration of table mcr_alert_execution
|
||||
2025-11-07 17:37:12,631 - INFO - Table mcr_alert_execution: 73273 records detected
|
||||
2025-11-07 17:37:44,977 - INFO - Starting migration of table mcr_alert_execution
|
||||
2025-11-07 17:37:47,047 - INFO - Table mcr_alert_execution: 73273 records detected
|
||||
2025-11-07 17:37:47,556 - ERROR - Error in batch 0: la columna <20>creationdate<74> es de tipo timestamp without time zone pero la expresi<73>n es de tipo integer
|
||||
LINE 1: ...67, 1, 6, 'id_po_hdr=70;id_cus=1', NULL, NULL, 2, 187, 0, 0,...
|
||||
^
|
||||
HINT: Necesitar<61> reescribir la expresi<73>n o aplicarle una conversi<73>n de tipo.
|
||||
|
||||
2025-11-07 17:40:46,092 - INFO - Starting migration of table mcr_alert_execution
|
||||
2025-11-07 17:40:48,390 - INFO - Table mcr_alert_execution: 73273 records detected
|
||||
2025-11-07 17:40:49,043 - ERROR - Error in batch 0: list index out of range
|
||||
2025-11-07 17:41:04,540 - INFO - Starting migration of table mcr_alert_execution
|
||||
2025-11-07 17:41:06,892 - INFO - Table mcr_alert_execution: 73273 records detected
|
||||
2025-11-07 17:41:06,947 - ERROR - Error in batch 0: list index out of range
|
||||
2025-11-07 17:42:01,034 - INFO - Starting migration of table mcr_alert_execution
|
||||
2025-11-07 17:42:03,094 - INFO - Table mcr_alert_execution: 73273 records detected
|
||||
2025-11-07 17:42:03,166 - ERROR - Error in batch 0: list index out of range
|
||||
2025-11-07 17:42:21,185 - INFO - Starting migration of table mcr_alert_execution
|
||||
2025-11-07 17:42:23,294 - INFO - Table mcr_alert_execution: 73273 records detected
|
||||
2025-11-07 17:42:23,812 - ERROR - Error in batch 0: la columna <20>creationdate<74> es de tipo timestamp without time zone pero la expresi<73>n es de tipo integer
|
||||
LINE 1: ...67, 1, 6, 'id_po_hdr=70;id_cus=1', NULL, NULL, 2, 187, 0, 0,...
|
||||
^
|
||||
HINT: Necesitar<61> reescribir la expresi<73>n o aplicarle una conversi<73>n de tipo.
|
||||
|
||||
2025-11-07 17:42:57,573 - INFO - Starting migration of table mcr_alert_execution
|
||||
2025-11-07 17:43:00,017 - INFO - Table mcr_alert_execution: 73273 records detected
|
||||
2025-11-07 17:43:00,110 - ERROR - Error in batch 0: la columna <20>creationdate<74> es de tipo timestamp without time zone pero la expresi<73>n es de tipo integer
|
||||
LINE 1: ...67, 1, 6, 'id_po_hdr=70;id_cus=1', NULL, NULL, 2, 187, 0, 0,...
|
||||
^
|
||||
HINT: Necesitar<61> reescribir la expresi<73>n o aplicarle una conversi<73>n de tipo.
|
||||
|
||||
2025-11-07 17:46:42,067 - INFO - Starting migration of table exp_mgt_analysis_header
|
||||
2025-11-07 17:46:53,358 - INFO - Table exp_mgt_analysis_header: 1 records detected
|
||||
2025-11-07 17:46:53,520 - INFO - Migration of exp_mgt_analysis_header completed successfully.
|
||||
2025-11-07 17:47:39,675 - INFO - Starting migration of table exp_mgt_analysis_header
|
||||
2025-11-07 17:47:41,789 - INFO - Table exp_mgt_analysis_header: 1 records detected
|
||||
2025-11-07 17:47:41,923 - INFO - Migration of exp_mgt_analysis_header completed successfully.
|
||||
2025-11-07 17:49:22,100 - INFO - Starting migration of table exp_mgt_analysis_header
|
||||
2025-11-07 17:49:24,129 - INFO - Table exp_mgt_analysis_header: 1 records detected
|
||||
2025-11-07 17:49:24,282 - INFO - Migration of exp_mgt_analysis_header completed successfully.
|
||||
2025-11-07 17:50:55,240 - INFO - Starting migration of table exp_mgt_analysis_header
|
||||
2025-11-07 17:50:57,497 - INFO - Table exp_mgt_analysis_header: 1 records detected
|
||||
2025-11-07 17:50:57,648 - INFO - Migration of exp_mgt_analysis_header completed successfully.
|
||||
2025-11-07 17:51:40,407 - INFO - Starting migration of table mcr_alert_execution
|
||||
2025-11-07 17:51:42,733 - INFO - Table mcr_alert_execution: 73273 records detected
|
||||
2025-11-07 17:51:42,796 - ERROR - Error in batch 0: la sintaxis de entrada no es v<>lida para tipo timestamp: <20>eric.reber+test1234@rscfirm.com<6F>
|
||||
LINE 1: ...mestamp, '2022-12-22T10:44:19.799000'::timestamp, 'eric.rebe...
|
||||
^
|
||||
|
||||
2025-11-07 17:51:42,904 - INFO - Migration of mcr_alert_execution completed successfully.
|
||||
2025-11-07 17:55:37,444 - INFO - Starting migration of table mcr_alert_execution
|
||||
2025-11-07 17:55:39,402 - INFO - Table mcr_alert_execution: 73273 records detected
|
||||
2025-11-07 17:55:39,450 - ERROR - Error in batch 0: la sintaxis de entrada no es v<>lida para tipo timestamp: <20>eric.reber+test1234@rscfirm.com<6F>
|
||||
LINE 1: ...mestamp, '2022-12-22T10:44:19.799000'::timestamp, 'eric.rebe...
|
||||
^
|
||||
|
||||
2025-11-07 17:55:39,557 - INFO - Migration of mcr_alert_execution completed successfully.
|
||||
2025-11-07 17:58:44,592 - INFO - Starting migration of table mcr_alert_execution
|
||||
2025-11-07 17:58:46,712 - INFO - Table mcr_alert_execution: 73273 records detected
|
||||
2025-11-07 17:58:46,783 - ERROR - Error in batch 0: la sintaxis de entrada no es v<>lida para tipo timestamp: <20>eric.reber+test1234@rscfirm.com<6F>
|
||||
LINE 1: ...mestamp, '2022-12-22T10:44:19.799000'::timestamp, 'eric.rebe...
|
||||
^
|
||||
|
||||
2025-11-07 17:58:46,912 - INFO - Migration of mcr_alert_execution completed successfully.
|
||||
2025-11-07 17:59:36,386 - INFO - Starting migration of table mcr_alert_execution
|
||||
2025-11-07 17:59:47,982 - INFO - Table mcr_alert_execution: 73273 records detected
|
||||
2025-11-07 17:59:48,061 - ERROR - Error in batch 0: la sintaxis de entrada no es v<>lida para tipo timestamp: <20>eric.reber+test1234@rscfirm.com<6F>
|
||||
LINE 1: ...mestamp, '2022-12-22T10:44:19.799000'::timestamp, 'eric.rebe...
|
||||
^
|
||||
|
||||
2025-11-07 17:59:48,183 - INFO - Migration of mcr_alert_execution completed successfully.
|
||||
2025-11-07 18:01:29,239 - INFO - Starting migration of table mcr_alert_execution
|
||||
2025-11-07 18:01:31,525 - INFO - Table mcr_alert_execution: 73273 records detected
|
||||
2025-11-07 18:01:31,565 - ERROR - Error in batch 0: la sintaxis de entrada no es v<>lida para tipo timestamp: <20>eric.reber+test1234@rscfirm.com<6F>
|
||||
LINE 1: ...mestamp, '2022-12-22T10:44:19.799000'::timestamp, 'eric.rebe...
|
||||
^
|
||||
|
||||
2025-11-07 18:01:31,665 - INFO - Migration of mcr_alert_execution completed successfully.
|
||||
2025-11-10 09:10:20,598 - INFO - Starting migration of table mcr_alert_definition
|
||||
2025-11-10 09:10:23,535 - INFO - Table mcr_alert_definition: 31 records detected
|
||||
2025-11-10 09:10:23,780 - INFO - Migration of mcr_alert_definition completed successfully.
|
||||
2025-11-10 09:12:34,105 - INFO - Starting migration of table mcr_alert_definition
|
||||
2025-11-10 09:12:36,717 - INFO - Table mcr_alert_definition: 31 records detected
|
||||
2025-11-10 09:12:36,904 - INFO - Migration of mcr_alert_definition completed successfully.
|
||||
2025-11-10 09:13:33,290 - INFO - Starting migration of table mcr_alert_definition
|
||||
2025-11-10 09:13:35,824 - INFO - Table mcr_alert_definition: 31 records detected
|
||||
2025-11-10 09:13:59,207 - INFO - Starting migration of table mcr_alert_definition
|
||||
2025-11-10 09:14:01,640 - INFO - Table mcr_alert_definition: 31 records detected
|
||||
2025-11-10 09:14:01,800 - INFO - Migration of mcr_alert_definition completed successfully.
|
||||
2025-11-10 09:18:47,890 - INFO - Starting migration of table mcr_alert_definition
|
||||
2025-11-10 09:18:50,182 - INFO - Table mcr_alert_definition: 31 records detected
|
||||
2025-11-10 09:18:50,331 - INFO - Migration of mcr_alert_definition completed successfully.
|
||||
2025-11-10 09:19:25,566 - INFO - Starting migration of table mcr_alert_execution
|
||||
2025-11-10 09:19:27,770 - INFO - Table mcr_alert_execution: 73273 records detected
|
||||
2025-11-10 09:19:27,825 - ERROR - Error in batch 0: la columna <20>creationdate<74> es de tipo timestamp without time zone pero la expresi<73>n es de tipo integer
|
||||
LINE 1: ...67, 1, 6, 'id_po_hdr=70;id_cus=1', NULL, NULL, 2, 187, 0, 0,...
|
||||
^
|
||||
HINT: Necesitar<61> reescribir la expresi<73>n o aplicarle una conversi<73>n de tipo.
|
||||
|
||||
2025-11-10 09:19:27,932 - INFO - Migration of mcr_alert_execution completed successfully.
|
||||
2025-11-10 09:26:36,496 - INFO - Starting migration of table mcr_alert_execution
|
||||
2025-11-10 09:26:38,863 - INFO - Table mcr_alert_execution: 73273 records detected
|
||||
2025-11-10 09:26:38,915 - ERROR - Error in batch 0: la columna <20>creationdate<74> es de tipo timestamp without time zone pero la expresi<73>n es de tipo integer
|
||||
LINE 1: ...67, 1, 6, 'id_po_hdr=70;id_cus=1', NULL, NULL, 2, 187, 0, 0,...
|
||||
^
|
||||
HINT: Necesitar<61> reescribir la expresi<73>n o aplicarle una conversi<73>n de tipo.
|
||||
|
||||
2025-11-10 09:26:39,042 - INFO - Migration of mcr_alert_execution completed successfully.
|
||||
2025-11-10 09:27:37,131 - INFO - Starting migration of table mcr_alert_execution
|
||||
2025-11-10 09:27:39,213 - INFO - Table mcr_alert_execution: 73273 records detected
|
||||
2025-11-10 09:27:39,285 - ERROR - Error in batch 0: la columna <20>creationdate<74> es de tipo timestamp without time zone pero la expresi<73>n es de tipo integer
|
||||
LINE 1: ...67, 1, 6, 'id_po_hdr=70;id_cus=1', NULL, NULL, 2, 187, 0, 0,...
|
||||
^
|
||||
HINT: Necesitar<61> reescribir la expresi<73>n o aplicarle una conversi<73>n de tipo.
|
||||
|
||||
2025-11-10 09:27:39,412 - INFO - Migration of mcr_alert_execution completed successfully.
|
||||
2025-11-10 09:32:50,371 - INFO - Starting migration of table mcr_alert_execution
|
||||
2025-11-10 09:32:53,245 - INFO - Table mcr_alert_execution: 73273 records detected
|
||||
2025-11-10 09:32:53,321 - ERROR - Error in batch 0: la columna <20>creationdate<74> es de tipo timestamp without time zone pero la expresi<73>n es de tipo integer
|
||||
LINE 3: ...67, 1, 6, 'id_po_hdr=70;id_cus=1', NULL, NULL, 2, 187, 0, 0,...
|
||||
^
|
||||
HINT: Necesitar<61> reescribir la expresi<73>n o aplicarle una conversi<73>n de tipo.
|
||||
|
||||
2025-11-10 09:32:53,440 - INFO - Migration of mcr_alert_execution completed successfully.
|
||||
2025-11-10 09:41:49,933 - INFO - Starting migration of table mcr_alert_execution
|
||||
2025-11-10 09:41:52,145 - INFO - Table mcr_alert_execution: 73273 records detected
|
||||
2025-11-10 09:41:52,189 - ERROR - Error in batch 0: list index out of range
|
||||
2025-11-10 09:41:52,332 - INFO - Migration of mcr_alert_execution completed successfully.
|
||||
2025-11-10 09:43:56,881 - INFO - Starting migration of table mcr_alert_execution
|
||||
2025-11-10 09:43:59,253 - INFO - Table mcr_alert_execution: 73273 records detected
|
||||
2025-11-10 09:45:45,362 - INFO - Starting migration of table mcr_alert_execution
|
||||
2025-11-10 09:45:47,728 - INFO - Table mcr_alert_execution: 73273 records detected
|
||||
2025-11-10 09:48:54,731 - INFO - Starting migration of table mcr_alert_execution
|
||||
2025-11-10 09:48:57,007 - INFO - Table mcr_alert_execution: 73273 records detected
|
||||
2025-11-10 09:48:57,054 - ERROR - Error in batch 0: la columna <20>creationdate<74> es de tipo timestamp without time zone pero la expresi<73>n es de tipo integer
|
||||
LINE 1: ...67, 1, 6, 'id_po_hdr=70;id_cus=1', NULL, NULL, 2, 187, 0, 0,...
|
||||
^
|
||||
HINT: Necesitar<61> reescribir la expresi<73>n o aplicarle una conversi<73>n de tipo.
|
||||
|
||||
2025-11-10 09:48:57,196 - INFO - Migration of mcr_alert_execution completed successfully.
|
||||
2025-11-10 09:49:36,967 - INFO - Starting migration of table mcr_alert_execution
|
||||
2025-11-10 09:49:39,217 - INFO - Table mcr_alert_execution: 73273 records detected
|
||||
2025-11-10 09:49:39,284 - ERROR - Error in batch 0: la columna <20>creationdate<74> es de tipo timestamp without time zone pero la expresi<73>n es de tipo integer
|
||||
LINE 1: ...67, 1, 6, 'id_po_hdr=70;id_cus=1', NULL, NULL, 2, 187, 0, 0,...
|
||||
^
|
||||
HINT: Necesitar<61> reescribir la expresi<73>n o aplicarle una conversi<73>n de tipo.
|
||||
|
||||
2025-11-10 09:49:39,418 - INFO - Migration of mcr_alert_execution completed successfully.
|
||||
2025-11-10 10:03:45,006 - INFO - Starting migration of table mcr_alert_execution
|
||||
2025-11-10 10:03:50,830 - INFO - Table mcr_alert_execution: 73273 records detected
|
||||
2025-11-10 10:03:50,959 - ERROR - Error in batch 0: la columna <20>creationdate<74> es de tipo timestamp without time zone pero la expresi<73>n es de tipo integer
|
||||
LINE 1: ...67, 1, 6, 'id_po_hdr=70;id_cus=1', NULL, NULL, 2, 187, 0, 0,...
|
||||
^
|
||||
HINT: Necesitar<61> reescribir la expresi<73>n o aplicarle una conversi<73>n de tipo.
|
||||
|
||||
2025-11-10 10:03:51,091 - INFO - Migration of mcr_alert_execution completed successfully.
|
||||
2025-11-10 10:04:43,313 - INFO - Starting migration of table mcr_alert_execution
|
||||
2025-11-10 10:04:45,363 - INFO - Table mcr_alert_execution: 73273 records detected
|
||||
2025-11-10 10:04:45,407 - ERROR - Error in batch 0: la columna <20>creationdate<74> es de tipo timestamp without time zone pero la expresi<73>n es de tipo integer
|
||||
LINE 1: ...67, 1, 6, 'id_po_hdr=70;id_cus=1', NULL, NULL, 2, 187, 0, 0,...
|
||||
^
|
||||
HINT: Necesitar<61> reescribir la expresi<73>n o aplicarle una conversi<73>n de tipo.
|
||||
|
||||
2025-11-10 10:04:45,511 - INFO - Migration of mcr_alert_execution completed successfully.
|
||||
2025-11-10 10:05:58,972 - INFO - Starting migration of table mcr_alert_execution
|
||||
2025-11-10 10:06:00,991 - INFO - Table mcr_alert_execution: 73273 records detected
|
||||
2025-11-10 10:06:01,048 - ERROR - Error in batch 0: la columna <20>creationdate<74> es de tipo timestamp without time zone pero la expresi<73>n es de tipo integer
|
||||
LINE 1: ...67, 1, 6, 'id_po_hdr=70;id_cus=1', NULL, NULL, 2, 187, 0, 0,...
|
||||
^
|
||||
HINT: Necesitar<61> reescribir la expresi<73>n o aplicarle una conversi<73>n de tipo.
|
||||
|
||||
2025-11-10 10:06:01,172 - INFO - Migration of mcr_alert_execution completed successfully.
|
||||
2025-11-10 10:08:05,760 - INFO - Starting migration of table mcr_alert_execution
|
||||
2025-11-10 10:08:07,690 - INFO - Table mcr_alert_execution: 73273 records detected
|
||||
2025-11-10 10:08:07,770 - ERROR - Error in batch 0: la columna <20>creationdate<74> es de tipo timestamp without time zone pero la expresi<73>n es de tipo integer
|
||||
LINE 1: ...67, 1, 6, 'id_po_hdr=70;id_cus=1', NULL, NULL, 2, 187, 0, 0,...
|
||||
^
|
||||
HINT: Necesitar<61> reescribir la expresi<73>n o aplicarle una conversi<73>n de tipo.
|
||||
|
||||
2025-11-10 10:08:07,897 - INFO - Migration of mcr_alert_execution completed successfully.
|
||||
2025-11-10 10:10:39,201 - INFO - Starting migration of table mcr_alert_execution
|
||||
2025-11-10 10:10:41,445 - INFO - Table mcr_alert_execution: 73273 records detected
|
||||
2025-11-10 10:10:41,476 - ERROR - Error in batch 0: la columna <20>creationdate<74> es de tipo timestamp without time zone pero la expresi<73>n es de tipo integer
|
||||
LINE 1: ...67, 1, 6, 'id_po_hdr=70;id_cus=1', NULL, NULL, 2, 187, 0, 0,...
|
||||
^
|
||||
HINT: Necesitar<61> reescribir la expresi<73>n o aplicarle una conversi<73>n de tipo.
|
||||
|
||||
2025-11-10 10:10:41,582 - INFO - Migration of mcr_alert_execution completed successfully.
|
||||
2025-11-10 10:12:54,194 - INFO - Starting migration of table mcr_alert_execution
|
||||
2025-11-10 10:12:56,335 - INFO - Table mcr_alert_execution: 73273 records detected
|
||||
2025-11-10 10:12:56,361 - ERROR - Error in batch 0: la columna <20>creationdate<74> es de tipo timestamp without time zone pero la expresi<73>n es de tipo integer
|
||||
LINE 1: ...67, 1, 6, 'id_po_hdr=70;id_cus=1', NULL, NULL, 2, 187, 0, 0,...
|
||||
^
|
||||
HINT: Necesitar<61> reescribir la expresi<73>n o aplicarle una conversi<73>n de tipo.
|
||||
|
||||
2025-11-10 10:12:56,456 - INFO - Migration of mcr_alert_execution completed successfully.
|
||||
2025-11-10 10:15:35,256 - INFO - Starting migration of table mcr_alert_execution
|
||||
2025-11-10 10:15:37,479 - INFO - Connected to HFSQL
|
||||
2025-11-10 10:15:37,527 - INFO - Connected to PostgreSQL
|
||||
2025-11-10 10:15:37,547 - INFO - Columns: [('idmcr_alert_execution', "<class 'int'>"), ('idmcr_alert_definition', "<class 'int'>"), ('idmcr_users', "<class 'int'>"), ('file_path', "<class 'str'>"), ('content_message', "<class 'bytearray'>"), ('params', "<class 'str'>"), ('createdby', "<class 'str'>"), ('creationdate', "<class 'datetime.datetime'>"), ('lastmodificationdate', "<class 'datetime.datetime'>"), ('modifiedby', "<class 'str'>"), ('idmcr_portal_customer_service', "<class 'int'>"), ('idie_job_execution', "<class 'int'>"), ('email', "<class 'str'>"), ('idie_job_execution_parent', "<class 'int'>"), ('idmcr_portal_customer_user_site', "<class 'int'>"), ('idmcr_portal_customer_user', "<class 'int'>"), ('idmcr_portal_customer_location', "<class 'int'>"), ('loginfo', "<class 'bytearray'>"), ('status', "<class 'int'>"), ('subject', "<class 'bytearray'>"), ('email_copy', "<class 'str'>"), ('idmcr_alert_setup', "<class 'int'>"), ('idmcr_files', "<class 'int'>"), ('reply_to', "<class 'str'>")]
|
||||
2025-11-10 10:15:37,553 - INFO - Total rows: 73273
|
||||
2025-11-10 10:15:37,558 - INFO - Tabla mcr_alert_execution creada o ya exist<73>a.
|
||||
2025-11-10 10:16:31,092 - INFO - Starting migration of table mcr_alert_execution
|
||||
2025-11-10 10:16:33,150 - INFO - Connected to HFSQL
|
||||
2025-11-10 10:16:33,204 - INFO - Connected to PostgreSQL
|
||||
2025-11-10 10:16:33,225 - INFO - Columns: [('idmcr_alert_execution', "<class 'int'>"), ('idmcr_alert_definition', "<class 'int'>"), ('idmcr_users', "<class 'int'>"), ('file_path', "<class 'str'>"), ('content_message', "<class 'bytearray'>"), ('params', "<class 'str'>"), ('createdby', "<class 'str'>"), ('creationdate', "<class 'datetime.datetime'>"), ('lastmodificationdate', "<class 'datetime.datetime'>"), ('modifiedby', "<class 'str'>"), ('idmcr_portal_customer_service', "<class 'int'>"), ('idie_job_execution', "<class 'int'>"), ('email', "<class 'str'>"), ('idie_job_execution_parent', "<class 'int'>"), ('idmcr_portal_customer_user_site', "<class 'int'>"), ('idmcr_portal_customer_user', "<class 'int'>"), ('idmcr_portal_customer_location', "<class 'int'>"), ('loginfo', "<class 'bytearray'>"), ('status', "<class 'int'>"), ('subject', "<class 'bytearray'>"), ('email_copy', "<class 'str'>"), ('idmcr_alert_setup', "<class 'int'>"), ('idmcr_files', "<class 'int'>"), ('reply_to', "<class 'str'>")]
|
||||
2025-11-10 10:16:33,231 - INFO - Total rows: 73273
|
||||
2025-11-10 10:16:33,237 - INFO - Tabla mcr_alert_execution creada o ya exist<73>a.
|
||||
2025-11-10 10:16:33,265 - WARNING - Row 1 missing column idmcr_portal_customer_user, filling with None
|
||||
2025-11-10 10:16:33,265 - WARNING - Row 1 missing column idmcr_portal_customer_location, filling with None
|
||||
2025-11-10 10:16:33,265 - WARNING - Row 1 missing column loginfo, filling with None
|
||||
2025-11-10 10:16:33,265 - WARNING - Row 1 missing column status, filling with None
|
||||
2025-11-10 10:16:33,266 - WARNING - Row 1 missing column subject, filling with None
|
||||
2025-11-10 10:16:33,266 - WARNING - Row 1 missing column email_copy, filling with None
|
||||
2025-11-10 10:16:33,266 - WARNING - Row 1 missing column idmcr_alert_setup, filling with None
|
||||
2025-11-10 10:16:33,266 - WARNING - Row 1 missing column idmcr_files, filling with None
|
||||
2025-11-10 10:16:33,266 - WARNING - Row 1 missing column reply_to, filling with None
|
||||
2025-11-10 10:16:33,268 - ERROR - Error in batch 0: la columna <20>creationdate<74> es de tipo timestamp without time zone pero la expresi<73>n es de tipo integer
|
||||
LINE 1: ...67, 1, 6, 'id_po_hdr=70;id_cus=1', NULL, NULL, 2, 187, 0, 0,...
|
||||
^
|
||||
HINT: Necesitar<61> reescribir la expresi<73>n o aplicarle una conversi<73>n de tipo.
|
||||
|
||||
2025-11-10 10:16:33,386 - INFO - Migration of mcr_alert_execution completed successfully.
|
||||
2025-11-10 10:17:47,002 - INFO - Starting migration of table mcr_alert_execution
|
||||
2025-11-10 10:17:49,266 - INFO - Tabla mcr_alert_execution creada o ya exist<73>a.
|
||||
2025-11-10 10:17:49,310 - ERROR - Error in batch 1: la sintaxis de entrada no es v<>lida para tipo timestamp: <20>eric.reber@rscfirm.com <20>
|
||||
LINE 1: ... NULL, NULL, 2, '1970-01-01T01:03:08'::timestamp, 'eric.rebe...
|
||||
^
|
||||
|
||||
2025-11-10 10:17:49,434 - INFO - Migration of mcr_alert_execution completed successfully.
|
||||
2025-11-10 10:19:37,800 - INFO - Starting migration of table mcr_alert_execution
|
||||
2025-11-10 10:22:58,450 - INFO - Starting migration of table mcr_alert_execution
|
||||
2025-11-10 10:23:00,595 - INFO - Table mcr_alert_execution: 73273 records detected
|
||||
2025-11-10 10:24:34,320 - INFO - Starting migration of table mcr_alert_execution
|
||||
2025-11-10 10:24:36,891 - INFO - Table mcr_alert_execution: 73273 records detected
|
||||
2025-11-10 10:24:36,918 - ERROR - Error in batch 0: la columna <20>creationdate<74> es de tipo timestamp without time zone pero la expresi<73>n es de tipo integer
|
||||
LINE 1: ...67, 1, 6, 'id_po_hdr=70;id_cus=1', NULL, NULL, 2, 187, 0, 0,...
|
||||
^
|
||||
HINT: Necesitar<61> reescribir la expresi<73>n o aplicarle una conversi<73>n de tipo.
|
||||
|
||||
2025-11-10 10:24:37,028 - INFO - Migration of mcr_alert_execution completed successfully.
|
||||
2025-11-10 10:27:03,978 - INFO - Starting migration of table mcr_alert_execution
|
||||
2025-11-10 10:27:06,081 - INFO - Table mcr_alert_execution: 73273 records detected
|
||||
2025-11-10 10:27:23,476 - INFO - Starting migration of table mcr_alert_execution
|
||||
2025-11-10 10:27:25,543 - INFO - Table mcr_alert_execution: 73273 records detected
|
||||
2025-11-10 10:29:15,806 - INFO - Starting migration of table mcr_alert_execution
|
||||
2025-11-10 10:29:17,845 - INFO - Table mcr_alert_execution: 73273 records detected
|
||||
2025-11-10 10:29:17,873 - ERROR - Error in batch 0: la columna <20>creationdate<74> es de tipo timestamp without time zone pero la expresi<73>n es de tipo integer
|
||||
LINE 1: ...67, 1, 6, 'id_po_hdr=70;id_cus=1', NULL, NULL, 2, 187, 0, 0,...
|
||||
^
|
||||
HINT: Necesitar<61> reescribir la expresi<73>n o aplicarle una conversi<73>n de tipo.
|
||||
|
||||
2025-11-10 10:29:18,000 - INFO - Migration of mcr_alert_execution completed successfully.
|
||||
2025-11-10 10:29:39,166 - INFO - Starting migration of table mcr_alert_execution
|
||||
2025-11-10 10:29:41,269 - INFO - Table mcr_alert_execution: 73273 records detected
|
||||
2025-11-10 10:29:41,298 - ERROR - Error in batch 0: la columna <20>creationdate<74> es de tipo timestamp without time zone pero la expresi<73>n es de tipo integer
|
||||
LINE 1: ...67, 1, 6, 'id_po_hdr=70;id_cus=1', NULL, NULL, 2, 187, 0, 0,...
|
||||
^
|
||||
HINT: Necesitar<61> reescribir la expresi<73>n o aplicarle una conversi<73>n de tipo.
|
||||
|
||||
2025-11-10 10:29:41,393 - INFO - Migration of mcr_alert_execution completed successfully.
|
||||
2025-11-10 10:37:50,597 - INFO - Starting migration of table mcr_alert_execution
|
||||
2025-11-10 10:37:53,153 - INFO - Table mcr_alert_execution: 73273 records detected
|
||||
2025-11-10 10:37:53,214 - ERROR - Error in batch 0: la columna <20>creationdate<74> es de tipo timestamp without time zone pero la expresi<73>n es de tipo integer
|
||||
LINE 1: ...67, 1, 6, 'id_po_hdr=70;id_cus=1', NULL, NULL, 2, 187, 0, 0,...
|
||||
^
|
||||
HINT: Necesitar<61> reescribir la expresi<73>n o aplicarle una conversi<73>n de tipo.
|
||||
|
||||
2025-11-10 10:37:53,306 - INFO - Migration of mcr_alert_execution completed successfully.
|
||||
2025-11-10 10:39:22,098 - INFO - Starting migration of table mcr_alert_execution
|
||||
2025-11-10 10:39:24,165 - INFO - Table mcr_alert_execution: 73273 records detected
|
||||
2025-11-10 10:39:24,191 - ERROR - insert_query -> INSERT INTO mcr_alert_execution (idmcr_alert_execution, idmcr_alert_definition, idmcr_users, file_path, content_message, params, createdby, creationdate, lastmodificationdate, modifiedby, idmcr_portal_customer_service, idie_job_execution, email, idie_job_execution_parent, idmcr_portal_customer_user_site, idmcr_portal_customer_user, idmcr_portal_customer_location, loginfo, status, subject, email_copy, idmcr_alert_setup, idmcr_files, reply_to) VALUES (%s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s)
|
||||
2025-11-10 10:39:24,191 - ERROR - converted_data -> [[67, 1, 6, 'id_po_hdr=70;id_cus=1', None, None, 2, 187, 0, 0, 0, 0, 0, 0, 0, None, None, None, None, None, None, None, None, None]]
|
||||
2025-11-10 10:39:24,192 - ERROR - Error in batch 0: la columna <20>creationdate<74> es de tipo timestamp without time zone pero la expresi<73>n es de tipo integer
|
||||
LINE 1: ...67, 1, 6, 'id_po_hdr=70;id_cus=1', NULL, NULL, 2, 187, 0, 0,...
|
||||
^
|
||||
HINT: Necesitar<61> reescribir la expresi<73>n o aplicarle una conversi<73>n de tipo.
|
||||
|
||||
2025-11-10 10:39:24,313 - INFO - Migration of mcr_alert_execution completed successfully.
|
||||
2025-11-10 10:45:27,648 - INFO - Starting migration of table mcr_alert_execution
|
||||
2025-11-10 10:45:29,638 - INFO - Table mcr_alert_execution: 73273 records detected
|
||||
2025-11-10 10:45:29,685 - ERROR - insert_query -> INSERT INTO mcr_alert_execution (idmcr_alert_execution, idmcr_alert_definition, idmcr_users, file_path, content_message, params, createdby, creationdate, lastmodificationdate, modifiedby, idmcr_portal_customer_service, idie_job_execution, email, idie_job_execution_parent, idmcr_portal_customer_user_site, idmcr_portal_customer_user, idmcr_portal_customer_location, loginfo, status, subject, email_copy, idmcr_alert_setup, idmcr_files, reply_to) VALUES (%s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s)
|
||||
2025-11-10 10:45:29,686 - ERROR - converted_data -> [[67, 1, 6, 'id_po_hdr=70;id_cus=1', None, None, 2, 187, 0, 0, 0, 0, 0, 0, 0, None, None, None, None, None, None, None, None, None]]
|
||||
2025-11-10 10:45:29,689 - ERROR - Error in batch 0: la columna <20>creationdate<74> es de tipo timestamp without time zone pero la expresi<73>n es de tipo integer
|
||||
LINE 1: ...67, 1, 6, 'id_po_hdr=70;id_cus=1', NULL, NULL, 2, 187, 0, 0,...
|
||||
^
|
||||
HINT: Necesitar<61> reescribir la expresi<73>n o aplicarle una conversi<73>n de tipo.
|
||||
|
||||
2025-11-10 10:45:29,790 - INFO - Migration of mcr_alert_execution completed successfully.
|
||||
2025-11-10 10:50:06,997 - INFO - Starting migration of table mcr_alert_execution
|
||||
2025-11-10 10:50:09,070 - INFO - Table mcr_alert_execution: 73273 records detected
|
||||
2025-11-10 10:52:04,190 - INFO - Starting migration of table mcr_alert_execution
|
||||
2025-11-10 10:52:06,266 - INFO - Table mcr_alert_execution: 73273 records detected
|
||||
2025-11-10 10:54:35,084 - INFO - Starting migration of table mcr_alert_execution
|
||||
2025-11-10 10:54:37,151 - INFO - Table mcr_alert_execution: 73273 records detected
|
||||
2025-11-10 10:57:21,561 - INFO - Starting migration of table mcr_alert_execution
|
||||
2025-11-10 10:57:24,060 - INFO - Table mcr_alert_execution: 73273 records detected
|
||||
2025-11-10 10:57:24,217 - INFO - Migration of mcr_alert_execution completed successfully.
|
||||
2025-11-10 10:58:31,879 - INFO - Starting migration of table mcr_alert_execution
|
||||
2025-11-10 10:58:33,783 - INFO - Table mcr_alert_execution: 73273 records detected
|
||||
2025-11-10 10:58:33,932 - INFO - Migration of mcr_alert_execution completed successfully.
|
||||
2025-11-10 11:02:39,381 - INFO - Starting migration of table mcr_alert_execution
|
||||
2025-11-10 11:02:41,682 - INFO - Table mcr_alert_execution: 73273 records detected
|
||||
2025-11-10 11:02:41,806 - INFO - Migration of mcr_alert_execution completed successfully.
|
||||
2025-11-10 11:05:43,174 - INFO - Starting migration of table mcr_alert_execution
|
||||
2025-11-10 11:05:45,127 - INFO - Table mcr_alert_execution: 73273 records detected
|
||||
2025-11-10 11:05:45,266 - INFO - Migration of mcr_alert_execution completed successfully.
|
||||
2025-11-10 11:07:58,965 - INFO - Starting migration of table mcr_alert_execution
|
||||
2025-11-10 11:08:01,202 - INFO - Table mcr_alert_execution: 73273 records detected
|
||||
2025-11-10 11:12:17,964 - INFO - Starting migration of table mcr_alert_execution
|
||||
2025-11-10 11:12:20,076 - INFO - Table mcr_alert_execution: 73273 records detected
|
||||
2025-11-10 11:12:20,211 - INFO - Migration of mcr_alert_execution completed successfully.
|
||||
2025-11-10 11:12:57,268 - INFO - Starting migration of table mcr_alert_execution
|
||||
2025-11-10 11:12:59,338 - INFO - Table mcr_alert_execution: 73273 records detected
|
||||
2025-11-10 11:12:59,368 - ERROR - Error in batch 0: la columna <20>creationdate<74> es de tipo timestamp without time zone pero la expresi<73>n es de tipo integer
|
||||
LINE 1: ...67, 1, 6, 'id_po_hdr=70;id_cus=1', NULL, NULL, 2, 187, 0, 0,...
|
||||
^
|
||||
HINT: Necesitar<61> reescribir la expresi<73>n o aplicarle una conversi<73>n de tipo.
|
||||
|
||||
2025-11-10 11:12:59,508 - INFO - Migration of mcr_alert_execution completed successfully.
|
||||
2025-11-10 11:17:16,697 - INFO - Starting migration of table mcr_alert_execution
|
||||
2025-11-10 11:17:26,823 - INFO - Table mcr_alert_execution: 73273 records detected
|
||||
2025-11-10 11:17:26,880 - ERROR - Error in batch 0: la columna <20>creationdate<74> es de tipo timestamp without time zone pero la expresi<73>n es de tipo integer
|
||||
LINE 1: ...67, 1, 6, 'id_po_hdr=70;id_cus=1', NULL, NULL, 2, 187, 0, 0,...
|
||||
^
|
||||
HINT: Necesitar<61> reescribir la expresi<73>n o aplicarle una conversi<73>n de tipo.
|
||||
|
||||
2025-11-10 11:17:27,000 - INFO - Migration of mcr_alert_execution completed successfully.
|
||||
2025-11-10 11:19:44,048 - INFO - Starting migration of table mcr_alert_execution
|
||||
2025-11-10 11:19:46,145 - INFO - Table mcr_alert_execution: 73273 records detected
|
||||
2025-11-10 11:20:04,163 - INFO - Starting migration of table mcr_alert_execution
|
||||
2025-11-10 11:20:06,160 - INFO - Table mcr_alert_execution: 73273 records detected
|
||||
2025-11-10 11:20:06,184 - ERROR - Error in batch 0: la columna <20>creationdate<74> es de tipo timestamp without time zone pero la expresi<73>n es de tipo integer
|
||||
LINE 1: ...67, 1, 6, 'id_po_hdr=70;id_cus=1', NULL, NULL, 2, 187, 0, 0,...
|
||||
^
|
||||
HINT: Necesitar<61> reescribir la expresi<73>n o aplicarle una conversi<73>n de tipo.
|
||||
|
||||
2025-11-10 11:20:06,298 - INFO - Migration of mcr_alert_execution completed successfully.
|
||||
2025-11-10 11:20:36,837 - INFO - Starting migration of table mcr_alert_execution
|
||||
2025-11-10 11:20:39,104 - INFO - Table mcr_alert_execution: 73273 records detected
|
||||
2025-11-10 11:20:39,144 - ERROR - Error in batch 0: la columna <20>creationdate<74> es de tipo timestamp without time zone pero la expresi<73>n es de tipo integer
|
||||
LINE 1: ...67, 1, 6, 'id_po_hdr=70;id_cus=1', NULL, NULL, 2, 187, 0, 0,...
|
||||
^
|
||||
HINT: Necesitar<61> reescribir la expresi<73>n o aplicarle una conversi<73>n de tipo.
|
||||
|
||||
2025-11-10 11:20:39,264 - INFO - Migration of mcr_alert_execution completed successfully.
|
||||
2025-11-10 11:22:25,007 - INFO - Starting migration of table mcr_alert_execution
|
||||
2025-11-10 11:22:26,970 - INFO - Table mcr_alert_execution: 73273 records detected
|
||||
2025-11-10 11:22:26,994 - ERROR - Error in batch 0: la columna <20>creationdate<74> es de tipo timestamp without time zone pero la expresi<73>n es de tipo integer
|
||||
LINE 1: ...67, 1, 6, 'id_po_hdr=70;id_cus=1', NULL, NULL, 2, 187, 0, 0,...
|
||||
^
|
||||
HINT: Necesitar<61> reescribir la expresi<73>n o aplicarle una conversi<73>n de tipo.
|
||||
|
||||
2025-11-10 11:22:27,099 - INFO - Migration of mcr_alert_execution completed successfully.
|
||||
2025-11-10 11:28:16,934 - INFO - Starting migration of table mcr_alert_execution
|
||||
2025-11-10 11:28:19,002 - INFO - Table mcr_alert_execution: 73273 records detected
|
||||
2025-11-10 11:28:37,116 - INFO - Starting migration of table mcr_alert_execution
|
||||
2025-11-10 11:28:39,226 - INFO - Table mcr_alert_execution: 73273 records detected
|
||||
2025-11-10 11:28:39,253 - ERROR - Error in batch 0: la columna <20>creationdate<74> es de tipo timestamp without time zone pero la expresi<73>n es de tipo integer
|
||||
LINE 1: ...67, 1, 6, 'id_po_hdr=70;id_cus=1', NULL, NULL, 2, 187, 0, 0,...
|
||||
^
|
||||
HINT: Necesitar<61> reescribir la expresi<73>n o aplicarle una conversi<73>n de tipo.
|
||||
|
||||
2025-11-10 11:28:39,380 - INFO - Migration of mcr_alert_execution completed successfully.
|
||||
2025-11-10 11:29:04,517 - INFO - Starting migration of table mcr_alert_execution
|
||||
2025-11-10 11:29:06,610 - INFO - Table mcr_alert_execution: 73273 records detected
|
||||
2025-11-10 11:29:06,643 - ERROR - Error in batch 0: la columna <20>creationdate<74> es de tipo timestamp without time zone pero la expresi<73>n es de tipo integer
|
||||
LINE 1: ...67, 1, 6, 'id_po_hdr=70;id_cus=1', NULL, NULL, 2, 187, 0, 0,...
|
||||
^
|
||||
HINT: Necesitar<61> reescribir la expresi<73>n o aplicarle una conversi<73>n de tipo.
|
||||
|
||||
2025-11-10 11:29:06,747 - INFO - Migration of mcr_alert_execution completed successfully.
|
||||
2025-11-10 11:31:21,244 - INFO - Starting migration of table mcr_alert_execution
|
||||
2025-11-10 11:31:23,341 - INFO - Table mcr_alert_execution: 73273 records detected
|
||||
2025-11-10 11:31:23,376 - ERROR - Error in batch 0: la columna <20>creationdate<74> es de tipo timestamp without time zone pero la expresi<73>n es de tipo integer
|
||||
LINE 1: ...67, 1, 6, 'id_po_hdr=70;id_cus=1', NULL, NULL, 2, 187, 0, 0,...
|
||||
^
|
||||
HINT: Necesitar<61> reescribir la expresi<73>n o aplicarle una conversi<73>n de tipo.
|
||||
|
||||
2025-11-10 11:31:23,496 - INFO - Migration of mcr_alert_execution completed successfully.
|
||||
2025-11-10 11:35:18,644 - INFO - Starting migration of table mcr_alert_execution
|
||||
2025-11-10 11:35:20,765 - INFO - Table mcr_alert_execution: 73273 records detected
|
||||
2025-11-10 11:35:49,510 - INFO - Starting migration of table mcr_alert_execution
|
||||
2025-11-10 11:35:51,609 - INFO - Table mcr_alert_execution: 73273 records detected
|
||||
2025-11-10 11:35:51,639 - ERROR - Error in batch 0: la columna <20>creationdate<74> es de tipo timestamp without time zone pero la expresi<73>n es de tipo integer
|
||||
LINE 1: ...67, 1, 6, 'id_po_hdr=70;id_cus=1', NULL, NULL, 2, 187, 0, 0,...
|
||||
^
|
||||
HINT: Necesitar<61> reescribir la expresi<73>n o aplicarle una conversi<73>n de tipo.
|
||||
|
||||
2025-11-10 11:35:51,729 - INFO - Migration of mcr_alert_execution completed successfully.
|
||||
2025-11-10 11:38:40,017 - INFO - Starting migration of table mcr_alert_execution
|
||||
2025-11-10 11:38:42,030 - INFO - Table mcr_alert_execution: 73273 records detected
|
||||
2025-11-10 11:38:52,970 - INFO - Starting migration of table mcr_alert_execution
|
||||
2025-11-10 11:38:54,948 - INFO - Table mcr_alert_execution: 73273 records detected
|
||||
2025-11-10 11:38:54,977 - ERROR - Error in batch 0: la columna <20>creationdate<74> es de tipo timestamp without time zone pero la expresi<73>n es de tipo integer
|
||||
LINE 1: ...67, 1, 6, 'id_po_hdr=70;id_cus=1', NULL, NULL, 2, 187, 0, 0,...
|
||||
^
|
||||
HINT: Necesitar<61> reescribir la expresi<73>n o aplicarle una conversi<73>n de tipo.
|
||||
|
||||
2025-11-10 11:38:55,103 - INFO - Migration of mcr_alert_execution completed successfully.
|
||||
2025-11-10 11:39:27,020 - INFO - Starting migration of table mcr_alert_execution
|
||||
2025-11-10 11:39:29,050 - INFO - Table mcr_alert_execution: 73273 records detected
|
||||
2025-11-10 11:39:29,083 - ERROR - Error in batch 0: la columna <20>creationdate<74> es de tipo timestamp without time zone pero la expresi<73>n es de tipo integer
|
||||
LINE 1: ...67, 1, 6, 'id_po_hdr=70;id_cus=1', NULL, NULL, 2, 187, 0, 0,...
|
||||
^
|
||||
HINT: Necesitar<61> reescribir la expresi<73>n o aplicarle una conversi<73>n de tipo.
|
||||
|
||||
2025-11-10 11:39:29,187 - INFO - Migration of mcr_alert_execution completed successfully.
|
||||
2025-11-10 11:41:11,164 - INFO - Starting migration of table mcr_alert_execution
|
||||
2025-11-10 11:41:13,358 - INFO - Table mcr_alert_execution: 73273 records detected
|
||||
2025-11-10 11:41:13,403 - ERROR - Error in batch 0: la columna <20>creationdate<74> es de tipo timestamp without time zone pero la expresi<73>n es de tipo integer
|
||||
LINE 1: ...67, 1, 6, 'id_po_hdr=70;id_cus=1', NULL, NULL, 2, 187, 0, 0,...
|
||||
^
|
||||
HINT: Necesitar<61> reescribir la expresi<73>n o aplicarle una conversi<73>n de tipo.
|
||||
|
||||
2025-11-10 11:41:13,541 - INFO - Migration of mcr_alert_execution completed successfully.
|
||||
4
requirements.txt
Normal file
4
requirements.txt
Normal file
@@ -0,0 +1,4 @@
|
||||
psycopg2-binary
|
||||
pypyodbc
|
||||
python-dotenv
|
||||
tqdm
|
||||
Reference in New Issue
Block a user