0
AWSのPostgresデータベースにテーブルを作成するLuigiタスクを定義します。私のようなさまざまな輸入しようとしている:Python - Luigi - Postgresにコピー
import luigi.contrib.postgres.CopyToTable
from luigi.contrib.postgres import CopyToTable
import luigi.contrib.postgres
from luigi.contrib import postgres
import luigi.postgres (i thing this is depreceated)
をそして私は次のように、常に類似した別のエラーを受け取りますが:
AttributeError: module 'luigi.contrib' has no attribute 'postgres'
ModuleNotFoundError: No module named 'luigi.contrib.postgres'
は、誰もが、問題が何であるかを知っていますか?私の仕事は次です:
class InsertToRDS(luigi.contrib.postgres.CopyToTable):
def requires(self):
return ReShape()
host = ""
database = ""
user = ""
password = "" # ;)
table = "extropy"
columns = [("author", "TEXT"),
("file_id", "TEXT"),
("year.month_x", "DATE"),
("subject", "TEXT"),
("subject", "TEXT"),
("file_timestamp", "TEXT"),
("mail_content", "TEXT"),
("next_message", "TEXT"),
("prev_message", "TEXT"),
("year.month_y", "DATE"),]
ありがとうございます!
だと思います*(行5 - 最初のコードブロック) – marz