Сравнение версий

Ключ

  • Эта строка добавлена.
  • Эта строка удалена.
  • Изменено форматирование.

...

Раскрыть
titleПример настройки


Блок кода
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": ""
        }
    }
}'

[???]Dremio

...

titleПример настройки
Блок кода
{
    "enabled": true,
    "jdbcOptions": {
        "connection": "jdbc:dremio:direct=84.201.179.200:31010;schema=visio;user=visio;password=Polymedia9",
        "isResetUpdateTime": true
    },
    "sqlMapping": {
        "fact_d01": {
            "columns": {},
            "sqlTable": ""
        },
        "fact_d11": {
            "columns": {},
            "sqlTable": ""
        },
        "fact_d21": {
            "columns": {},
            "sqlTable": ""
        },
        "fact_d31": {
            "columns": {},
            "sqlTable": ""
        },
        "fact_d41": {
            "columns": {},
            "sqlTable": ""
        },
        "fact_d51": {
            "columns": {},
            "sqlTable": ""
        },
        "fact_d61": {
            "columns": {},
            "sqlTable": ""
        },
        "fact_d71": {
            "columns": {},
            "sqlTable": ""
        },
        "fact_d81": {
            "columns": {},
            "sqlTable": ""
        },
        "fact_d91": {
            "columns": {},
            "sqlTable": ""
        },
        "izm1": {
            "columns": {},
            "sqlTable": ""
        },
        "izm10": {
            "columns": {},
            "sqlTable": ""
        },
        "izm11": {
            "columns": {},
            "sqlTable": ""
        },
        "izm12": {
            "columns": {},
            "sqlTable": ""
        },
        "izm13": {
            "columns": {},
            "sqlTable": ""
        },
        "izm14": {
            "columns": {},
            "sqlTable": ""
        },
        "izm15": {
            "columns": {},
            "sqlTable": ""
        },
        "izm16": {
            "columns": {},
            "sqlTable": ""
        },
        "izm17": {
            "columns": {},
            "sqlTable": ""
        },
        "izm18": {
            "columns": {},
            "sqlTable": ""
        },
        "izm19": {
            "columns": {},
            "sqlTable": ""
        },
        "izm2": {
            "columns": {},
            "sqlTable": ""
        },
        "izm20": {
            "columns": {},
            "sqlTable": ""
        },
        "izm3": {
            "columns": {},
            "sqlTable": ""
        },
        "izm4": {
            "columns": {},
            "sqlTable": ""
        },
        "izm5": {
            "columns": {},
            "sqlTable": ""
        },
        "izm6": {
            "columns": {},
            "sqlTable": ""
        },
        "izm7": {
            "columns": {},
            "sqlTable": ""
        },
        "izm8": {
            "columns": {},
            "sqlTable": ""
        },
        "izm9": {
            "columns": {},
            "sqlTable": ""
        }
    }
}