curl --location --request PUT 'http://192.168.44.68/viqube/sqlbackend' \
--header 'X-API-VERSION: 3.8' \
--header 'Content-Type: application/json' \
--data-raw '{
"enabled": true,
"jdbcOptions": {
"connection": "jdbc:postgresql://192.168.44.68:5433/shop?user=gpadmin&password=pivotal"
},
"sqlMapping": {
"cities": {
"columns": {
"city": {
"COUNT_WITH_NULL": "city"
}
},
"sqlTable": "cities"
},
"fact_datetime": {
"columns": {},
"sqlTable": ""
},
"fact_rur": {
"columns": {
"discount": {
"COUNT_WITH_NULL": "discount"
},
"period2_id": {
"DATE": "period2_id",
"DAY_NAME": "CASE DATE_PART('\''DOW'\'', period2_id) WHEN 1 THEN '\''Понедельник'\'' WHEN 2 THEN '\''Вторник'\'' WHEN 3 THEN '\''Среда'\'' WHEN 4 THEN '\''Четверг'\'' WHEN 5 THEN '\''Пятница'\'' WHEN 6 THEN '\''Суббота'\'' ELSE '\''Воскресенье'\'' END",
"DAY_NUMBER_IN_MONTH": "DATE_PART('\''DAY'\'', period2_id)",
"DAY_NUMBER_IN_WEEK": "DATE_PART('\''DOW'\'', period2_id)",
"DAY_NUMBER_IN_YEAR": "DATE_PART('\''DOY'\'', period2_id)",
"HALFYEAR": "CASE DATE_PART('\''QUARTER'\'', period2_id) WHEN 1 THEN 1 WHEN 2 THEN 1 WHEN 3 THEN 2 ELSE 2 END",
"MONTH": "DATE_PART('\''MONTH'\'', period2_id)",
"MONTH_NAME": "CASE DATE_PART('\''MONTH'\'', period2_id) WHEN 1 THEN '\''Январь'\'' WHEN 2 THEN '\''Февраль'\'' WHEN 3 THEN '\''Март'\'' WHEN 4 THEN '\''Апрель'\'' WHEN 5 THEN '\''Май'\'' WHEN 6 THEN '\''Июнь'\'' WHEN 7 THEN '\''Июль'\'' WHEN 8 THEN '\''Август'\'' WHEN 9 THEN '\''Сентябрь'\'' WHEN 10 THEN '\''Октябрь'\'' WHEN 11 THEN '\''Ноябрь'\'' ELSE '\''Декабрь'\'' END",
"QUARTER": "DATE_PART('\''QUARTER'\'', period2_id)",
"WEEK": "DATE_PART('\''WEEK'\'', period2_id)",
"YEAR": "DATE_PART('\''YEAR'\'', period2_id)",
"YEAR_FOR_WEEK": "DATE_PART('\''ISOYEAR'\'', period2_id)"
},
"period_id": {
"DATE": "period_id",
"DAY_NAME": "CASE DATE_PART('\''DOW'\'', period_id) WHEN 1 THEN '\''Понедельник'\'' WHEN 2 THEN '\''Вторник'\'' WHEN 3 THEN '\''Среда'\'' WHEN 4 THEN '\''Четверг'\'' WHEN 5 THEN '\''Пятница'\'' WHEN 6 THEN '\''Суббота'\'' ELSE '\''Воскресенье'\'' END",
"DAY_NUMBER_IN_MONTH": "DATE_PART('\''DAY'\'', period_id)",
"DAY_NUMBER_IN_WEEK": "DATE_PART('\''DOW'\'', period_id)",
"DAY_NUMBER_IN_YEAR": "DATE_PART('\''DOY'\'', period_id)",
"HALFYEAR": "CASE DATE_PART('\''QUARTER'\'', period_id) WHEN 1 THEN 1 WHEN 2 THEN 1 WHEN 3 THEN 2 ELSE 2 END",
"MONTH": "DATE_PART('\''MONTH'\'', period_id)",
"MONTH_NAME": "CASE DATE_PART('\''MONTH'\'', period_id) WHEN 1 THEN '\''Январь'\'' WHEN 2 THEN '\''Февраль'\'' WHEN 3 THEN '\''Март'\'' WHEN 4 THEN '\''Апрель'\'' WHEN 5 THEN '\''Май'\'' WHEN 6 THEN '\''Июнь'\'' WHEN 7 THEN '\''Июль'\'' WHEN 8 THEN '\''Август'\'' WHEN 9 THEN '\''Сентябрь'\'' WHEN 10 THEN '\''Октябрь'\'' WHEN 11 THEN '\''Ноябрь'\'' ELSE '\''Декабрь'\'' END",
"QUARTER": "DATE_PART('\''QUARTER'\'', period_id)",
"WEEK": "DATE_PART('\''WEEK'\'', period_id)",
"YEAR": "DATE_PART('\''YEAR'\'', period_id)",
"YEAR_FOR_WEEK": "DATE_PART('\''ISOYEAR'\'', period_id)"
},
"price": {
"COUNT_WITH_NULL": "price"
}
},
"sqlTable": "fact_rur"
},
"fact_usd": {
"columns": {
"discount": {
"COUNT_WITH_NULL": "discount"
},
"period2_id": {
"DATE": "period2_id",
"DAY_NAME": "CASE DATE_PART('\''DOW'\'', period2_id) WHEN 1 THEN '\''Понедельник'\'' WHEN 2 THEN '\''Вторник'\'' WHEN 3 THEN '\''Среда'\'' WHEN 4 THEN '\''Четверг'\'' WHEN 5 THEN '\''Пятница'\'' WHEN 6 THEN '\''Суббота'\'' ELSE '\''Воскресенье'\'' END",
"DAY_NUMBER_IN_MONTH": "DATE_PART('\''DAY'\'', period2_id)",
"DAY_NUMBER_IN_WEEK": "DATE_PART('\''DOW'\'', period2_id)",
"DAY_NUMBER_IN_YEAR": "DATE_PART('\''DOY'\'', period2_id)",
"HALFYEAR": "CASE DATE_PART('\''QUARTER'\'', period2_id) WHEN 1 THEN 1 WHEN 2 THEN 1 WHEN 3 THEN 2 ELSE 2 END",
"MONTH": "DATE_PART('\''MONTH'\'', period2_id)",
"MONTH_NAME": "CASE DATE_PART('\''MONTH'\'', period2_id) WHEN 1 THEN '\''Январь'\'' WHEN 2 THEN '\''Февраль'\'' WHEN 3 THEN '\''Март'\'' WHEN 4 THEN '\''Апрель'\'' WHEN 5 THEN '\''Май'\'' WHEN 6 THEN '\''Июнь'\'' WHEN 7 THEN '\''Июль'\'' WHEN 8 THEN '\''Август'\'' WHEN 9 THEN '\''Сентябрь'\'' WHEN 10 THEN '\''Октябрь'\'' WHEN 11 THEN '\''Ноябрь'\'' ELSE '\''Декабрь'\'' END",
"QUARTER": "DATE_PART('\''QUARTER'\'', period2_id)",
"WEEK": "DATE_PART('\''WEEK'\'', period2_id)",
"YEAR": "DATE_PART('\''YEAR'\'', period2_id)",
"YEAR_FOR_WEEK": "DATE_PART('\''ISOYEAR'\'', period2_id)"
},
"period_id": {
"DATE": "period_id",
"DAY_NAME": "CASE DATE_PART('\''DOW'\'', period_id) WHEN 1 THEN '\''Понедельник'\'' WHEN 2 THEN '\''Вторник'\'' WHEN 3 THEN '\''Среда'\'' WHEN 4 THEN '\''Четверг'\'' WHEN 5 THEN '\''Пятница'\'' WHEN 6 THEN '\''Суббота'\'' ELSE '\''Воскресенье'\'' END",
"DAY_NUMBER_IN_MONTH": "DATE_PART('\''DAY'\'', period_id)",
"DAY_NUMBER_IN_WEEK": "DATE_PART('\''DOW'\'', period_id)",
"DAY_NUMBER_IN_YEAR": "DATE_PART('\''DOY'\'', period_id)",
"HALFYEAR": "CASE DATE_PART('\''QUARTER'\'', period_id) WHEN 1 THEN 1 WHEN 2 THEN 1 WHEN 3 THEN 2 ELSE 2 END",
"MONTH": "DATE_PART('\''MONTH'\'', period_id)",
"MONTH_NAME": "CASE DATE_PART('\''MONTH'\'', period_id) WHEN 1 THEN '\''Январь'\'' WHEN 2 THEN '\''Февраль'\'' WHEN 3 THEN '\''Март'\'' WHEN 4 THEN '\''Апрель'\'' WHEN 5 THEN '\''Май'\'' WHEN 6 THEN '\''Июнь'\'' WHEN 7 THEN '\''Июль'\'' WHEN 8 THEN '\''Август'\'' WHEN 9 THEN '\''Сентябрь'\'' WHEN 10 THEN '\''Октябрь'\'' WHEN 11 THEN '\''Ноябрь'\'' ELSE '\''Декабрь'\'' END",
"QUARTER": "DATE_PART('\''QUARTER'\'', period_id)",
"WEEK": "DATE_PART('\''WEEK'\'', period_id)",
"YEAR": "DATE_PART('\''YEAR'\'', period_id)",
"YEAR_FOR_WEEK": "DATE_PART('\''ISOYEAR'\'', period_id)"
},
"price": {
"COUNT_WITH_NULL": "price"
}
},
"sqlTable": "fact_usd"
},
"fact_workers": {
"columns": {
"period_id": {
"DATE": "period_id",
"DAY_NAME": "CASE DATE_PART('\''DOW'\'', period_id) WHEN 1 THEN '\''Понедельник'\'' WHEN 2 THEN '\''Вторник'\'' WHEN 3 THEN '\''Среда'\'' WHEN 4 THEN '\''Четверг'\'' WHEN 5 THEN '\''Пятница'\'' WHEN 6 THEN '\''Суббота'\'' ELSE '\''Воскресенье'\'' END",
"DAY_NUMBER_IN_MONTH": "DATE_PART('\''DAY'\'', period_id)",
"DAY_NUMBER_IN_WEEK": "DATE_PART('\''DOW'\'', period_id)",
"DAY_NUMBER_IN_YEAR": "DATE_PART('\''DOY'\'', period_id)",
"HALFYEAR": "CASE DATE_PART('\''QUARTER'\'', period_id) WHEN 1 THEN 1 WHEN 2 THEN 1 WHEN 3 THEN 2 ELSE 2 END",
"MONTH": "DATE_PART('\''MONTH'\'', period_id)",
"MONTH_NAME": "CASE DATE_PART('\''MONTH'\'', period_id) WHEN 1 THEN '\''Январь'\'' WHEN 2 THEN '\''Февраль'\'' WHEN 3 THEN '\''Март'\'' WHEN 4 THEN '\''Апрель'\'' WHEN 5 THEN '\''Май'\'' WHEN 6 THEN '\''Июнь'\'' WHEN 7 THEN '\''Июль'\'' WHEN 8 THEN '\''Август'\'' WHEN 9 THEN '\''Сентябрь'\'' WHEN 10 THEN '\''Октябрь'\'' WHEN 11 THEN '\''Ноябрь'\'' ELSE '\''Декабрь'\'' END",
"QUARTER": "DATE_PART('\''QUARTER'\'', period_id)",
"WEEK": "DATE_PART('\''WEEK'\'', period_id)",
"YEAR": "DATE_PART('\''YEAR'\'', period_id)",
"YEAR_FOR_WEEK": "DATE_PART('\''ISOYEAR'\'', period_id)"
}
},
"sqlTable": "fact_workers"
},
"goods": {
"columns": {
"category": {
"COUNT_WITH_NULL": "category"
},
"name": {
"COUNT_WITH_NULL": "name"
}
},
"sqlTable": "goods"
},
"workers": {
"columns": {},
"sqlTable": ""
}
}
}' |