Обновить dags/split_subkonto2.py
This commit is contained in:
parent
e133406a4c
commit
0a71e40a0f
|
|
@ -305,7 +305,17 @@ def merge_dict_and_split_1C(**kwargs):
|
||||||
with engine.begin() as conn:
|
with engine.begin() as conn:
|
||||||
conn.execute('CREATE TEMP TABLE temp_dict_subkonto_two (subkonto2 text null, naimenovanie text null, nomer text null, date_begin text null, date_end text null)')
|
conn.execute('CREATE TEMP TABLE temp_dict_subkonto_two (subkonto2 text null, naimenovanie text null, nomer text null, date_begin text null, date_end text null)')
|
||||||
result_df.to_sql('temp_dict_subkonto_two', con=conn, if_exists='append', index=False, method='multi')
|
result_df.to_sql('temp_dict_subkonto_two', con=conn, if_exists='append', index=False, method='multi')
|
||||||
conn.execute('INSERT INTO public.dict_subkonto_two SELECT * FROM temp_dict_subkonto_two')
|
conn.execute(
|
||||||
|
'''
|
||||||
|
INSERT INTO public.dict_subkonto_two (subkonto2, naimenovanie, nomer, date_begin, date_end)
|
||||||
|
SELECT
|
||||||
|
subkonto2
|
||||||
|
, naimenovanie
|
||||||
|
, nomer
|
||||||
|
, date_begin
|
||||||
|
, date_end
|
||||||
|
FROM temp_dict_subkonto_two'''
|
||||||
|
)
|
||||||
|
|
||||||
return result_df.to_dict('Данные загружены!')
|
return result_df.to_dict('Данные загружены!')
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue