Run a Teradata MLOAD command in Windows command prompt, but use Python to trigger it

1.7k views Asked by At

I used to execute the MLOAD process by opening a command prompt and then typing MLOAD < MLOAD_FILE.txt. How do I do it using Python?

Assume that the MLOAD_FILE.txt is under directory C:\\Users\\MLOAD_FILES.

Thanks!

1

There are 1 answers

0
Prayson W. Daniel On

This worked for me.

import os

os.system("MLOAD < 'C:\\Users\\MLOAD_FILES.txt'")