Closed qianxuanyon closed 4 years ago
When an exception occurs, the correct code cannot run
Resolved
Execute after an exception
pygrametl._alltables.remove(tag_table)
Hello,
Good that you resolved the problem! I think it will be vary hard to make a general way for deciding when an exception should lead to that a table is removed from pygrametl._alltables. Thus, I think it has to handled manually as you do in your example.
Best regards, Christian
Hi
I'm sorry I ran into a problem again
When it reported an error, I changed the value of the measures parameter After modifying the code, it stays at the old error
print(time.ctime()) dw_conn = pygrametl.ConnectionWrapper(connection=conn) sour = SQLSource(connection = conn, query = 'SELECT ID,A,B FROM test_x1 where rownum<10')
test_y1
tag_table = BatchFactTable(name = 'test_y1',keyrefs=[],measures = ['ID','A','B'],batchsize=50000,targetconnection = dw_conn)
for row in sour: tag_table.insert(row) dw_conn.commit()
Sun Sep 20 18:49:45 2020
DatabaseError Traceback (most recent call last)