Commit bd92c00a by hejiangming

Merge branch 'developer' of http://47.106.101.75/abel_cjy/Amazon-Selection-Data into developer

parents f99eb454 776e91a3
......@@ -38,7 +38,7 @@ class AsinImageLocalPath(object):
def read_data(self):
# sql = f"select img_unique from selection.{self.image_table} where state=1;"
# df = pd.read_sql(sql, con=self.engine_doris)
sql = f"SELECT * from us_inv_img_info WHERE updated_at>= CURDATE() - INTERVAL 3 DAY and state =3;"
sql = f"SELECT * from us_inv_img_info WHERE updated_at>= CURDATE() - INTERVAL 3 DAY and state =3 and id_segment is not null;"
df = pd.read_sql(sql, con=self.engine_mysql)
print(f"sql: {sql}", df.shape)
return df
......
......@@ -61,14 +61,14 @@ if __name__ == '__main__':
if date_type == 'us':
sql = f"""
create table if not exists {export_tb} (
like {export_master_tb} including comments
like {export_master_tb} including defaults including comments
);
delete from {export_tb} where report_date >= '{start_day}' and report_date <= '{end_day}'
"""
else:
sql = f"""
create table if not exists {export_tb} (
like {export_master_tb} including comments
like {export_master_tb} including defaults including comments
);
delete from {export_tb} where report_date > '{start_day}' and report_date <= '{end_day}'
"""
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment