AlexGruPerm / ora_ch

Data loader from oracle to clickhouse and back.
1 stars 0 forks source link

Calculate multiple dates in single calc task. #22

Closed AlexGruPerm closed 7 months ago

AlexGruPerm commented 7 months ago

Change json keys from scalar to array for one parameter. And remove 2 keys.

Prev

     "view_query_id":1,
     "params":[
               {"name":"p_date_cache",      "value":"20240325"},
               {"name":"p_datecalc_cache",  "value":"20240325"},
               {"name":"curr_date_context", "value":"2024-03-25"},
               {"name":"analyt_datecalc",   "value":"2024-03-25"}
     ]

new

     "view_query_id":1,
     "params":[
        {"name": "analyt_datecalc","value": "2024-03-25"
        },
        {"name": "curr_date_context",
         "dates": ["2024-03-24",
                   "2024-03-25"]
        }
     ]

Inside queries p_date_cache and p_datecalc_cache calculated from: p_date_cache <- curr_date_context p_datecalc_cache <- analyt_datecalc

Also remove VIEW_NAME field from ora_to_ch_views_query.

AlexGruPerm commented 7 months ago
"view_query_id":1, => "query_id":1,