Compare commits
9 Commits
d05c98784f
...
dev
| Author | SHA1 | Date | |
|---|---|---|---|
| 076f5755ca | |||
| 9948000b71 | |||
| 4fafc80254 | |||
| 1a76108209 | |||
| c42b516895 | |||
| 7e67bc4218 | |||
| 64a3159f9e | |||
| ba00654ac5 | |||
| 8b1200383e |
60
collect_env_report.ps1
Normal file
60
collect_env_report.ps1
Normal file
@@ -0,0 +1,60 @@
|
||||
$ErrorActionPreference = "Stop"
|
||||
|
||||
Write-Host "[1/6] Collecting environment info..." -ForegroundColor Cyan
|
||||
$report = @()
|
||||
$report += "# ETL Manager Environment Report"
|
||||
$report += "Timestamp: $(Get-Date -Format 'yyyy-MM-dd HH:mm:ss')"
|
||||
$report += ""
|
||||
|
||||
Write-Host "[2/6] Resolving python/pip..." -ForegroundColor Cyan
|
||||
$report += "## Executables"
|
||||
$py = (Get-Command python -ErrorAction SilentlyContinue)
|
||||
$pip = (Get-Command pip -ErrorAction SilentlyContinue)
|
||||
if ($py) { $report += "python: $($py.Source)" } else { $report += "python: NOT FOUND" }
|
||||
if ($pip) { $report += "pip: $($pip.Source)" } else { $report += "pip: NOT FOUND" }
|
||||
$report += ""
|
||||
|
||||
Write-Host "[3/6] Python details..." -ForegroundColor Cyan
|
||||
$report += "## Python info"
|
||||
$report += (python -c "import sys, platform; print('version='+sys.version.replace('\n',' ')); print('executable='+sys.executable); print('prefix='+sys.prefix); print('base_prefix='+sys.base_prefix); print('arch='+platform.architecture()[0]); print('platform='+platform.platform())" 2>&1)
|
||||
$report += ""
|
||||
|
||||
Write-Host "[4/6] pip details..." -ForegroundColor Cyan
|
||||
$report += "## pip"
|
||||
$report += (python -m pip --version 2>&1)
|
||||
$report += ""
|
||||
|
||||
Write-Host "[5/6] PySide6 details..." -ForegroundColor Cyan
|
||||
$report += "## PySide6"
|
||||
$pyside = @'
|
||||
try:
|
||||
import PySide6
|
||||
from PySide6 import QtCore
|
||||
print('PySide6='+PySide6.__version__)
|
||||
print('Qt='+QtCore.qVersion())
|
||||
print('PySide6_path='+PySide6.__file__)
|
||||
print('Qt_plugins_path='+QtCore.QLibraryInfo.path(QtCore.QLibraryInfo.PluginsPath))
|
||||
except Exception as e:
|
||||
print('PySide6_import_error='+repr(e))
|
||||
'@
|
||||
$report += ($pyside | python - 2>&1)
|
||||
$report += ""
|
||||
|
||||
Write-Host "[6/6] Installed packages..." -ForegroundColor Cyan
|
||||
$report += "## Installed packages (freeze)"
|
||||
$report += (python -m pip list --format=freeze 2>&1)
|
||||
|
||||
$reportPath = "D:\env_report_local.txt"
|
||||
if (-not (Test-Path "D:\")) {
|
||||
Write-Host "[WARN] D: not found, fallback to current directory." -ForegroundColor Yellow
|
||||
$reportPath = ".\env_report_local.txt"
|
||||
}
|
||||
$reportDir = Split-Path $reportPath
|
||||
if ($reportDir -and -not (Test-Path $reportDir)) {
|
||||
New-Item -ItemType Directory -Path $reportDir -Force | Out-Null
|
||||
}
|
||||
|
||||
Write-Host "[WRITE] $reportPath" -ForegroundColor Green
|
||||
$report -join "`n" | Set-Content -Path $reportPath -Encoding UTF8
|
||||
Write-Host "[DONE]" -ForegroundColor Green
|
||||
Write-Output $reportPath
|
||||
121
env_report_local.txt
Normal file
121
env_report_local.txt
Normal file
@@ -0,0 +1,121 @@
|
||||
# ETL Manager Environment Report
|
||||
Timestamp: 2026-01-28 00:56:34
|
||||
|
||||
## Executables
|
||||
python: C:\ProgramData\miniconda3\python.exe
|
||||
pip: C:\ProgramData\miniconda3\Scripts\pip.exe
|
||||
|
||||
## Python info
|
||||
version=3.13.9 | packaged by Anaconda, Inc. | (main, Oct 21 2025, 19:09:58) [MSC v.1929 64 bit (AMD64)]
|
||||
executable=C:\ProgramData\miniconda3\python.exe
|
||||
prefix=C:\ProgramData\miniconda3
|
||||
base_prefix=C:\ProgramData\miniconda3
|
||||
arch=64bit
|
||||
platform=Windows-10-10.0.17763-SP0
|
||||
|
||||
## pip
|
||||
pip 25.3 from C:\ProgramData\miniconda3\Lib\site-packages\pip (python 3.13)
|
||||
|
||||
|
||||
## PySide6
|
||||
PySide6=6.10.1
|
||||
Qt=6.10.1
|
||||
PySide6_path=C:\ProgramData\miniconda3\Lib\site-packages\PySide6\__init__.py
|
||||
Qt_plugins_path=C:/ProgramData/miniconda3/Lib/site-packages/PySide6/plugins
|
||||
|
||||
## Installed packages (freeze)
|
||||
altgraph==0.17.5
|
||||
anaconda-anon-usage==0.7.4
|
||||
annotated-types==0.6.0
|
||||
archspec==0.2.5
|
||||
beautifulsoup4==4.13.4
|
||||
boltons==25.0.0
|
||||
brotlicffi==1.1.0.0
|
||||
certifi==2025.11.12
|
||||
cffi==2.0.0
|
||||
chardet==3.0.4
|
||||
charset-normalizer==3.4.4
|
||||
colorama==0.4.6
|
||||
conda==25.9.1
|
||||
conda-anaconda-telemetry==0.3.0
|
||||
conda-anaconda-tos==0.2.2
|
||||
conda-content-trust==0.2.0
|
||||
conda-libmamba-solver==25.4.0
|
||||
conda-package-handling==2.4.0
|
||||
conda_package_streaming==0.12.0
|
||||
coverage==7.12.0
|
||||
cryptography==46.0.3
|
||||
distro==1.9.0
|
||||
et_xmlfile==2.0.0
|
||||
frozendict==2.4.6
|
||||
ftfy==6.3.1
|
||||
googletrans==4.0.0rc1
|
||||
h11==0.9.0
|
||||
h2==3.2.0
|
||||
hpack==3.0.0
|
||||
hstspreload==2025.1.1
|
||||
httpcore==0.9.1
|
||||
httpx==0.13.3
|
||||
hyperframe==5.2.0
|
||||
idna==2.10
|
||||
iniconfig==2.3.0
|
||||
jsonpatch==1.33
|
||||
jsonpointer==3.0.0
|
||||
libmambapy==2.3.2
|
||||
lxml==6.0.2
|
||||
markdown-it-py==4.0.0
|
||||
mdurl==0.1.2
|
||||
menuinst==2.4.1
|
||||
numpy==2.3.2
|
||||
openpyxl==3.1.5
|
||||
packaging==25.0
|
||||
pandas==2.3.1
|
||||
pefile==2024.8.26
|
||||
pip==25.2
|
||||
platformdirs==4.5.0
|
||||
pluggy==1.5.0
|
||||
psycopg2==2.9.10
|
||||
psycopg2-binary==2.9.11
|
||||
pyaes==1.6.1
|
||||
pyasn1==0.6.1
|
||||
pycosat==0.6.6
|
||||
pycparser==2.23
|
||||
pydantic==2.12.3
|
||||
pydantic_core==2.41.4
|
||||
Pygments==2.19.2
|
||||
pyinstaller==6.18.0
|
||||
pyinstaller-hooks-contrib==2025.11
|
||||
PySide6==6.10.1
|
||||
PySide6_Addons==6.10.1
|
||||
PySide6_Essentials==6.10.1
|
||||
PySocks==1.7.1
|
||||
pytest==9.0.1
|
||||
pytest-cov==7.0.0
|
||||
python-dateutil==2.9.0.post0
|
||||
python-docx==1.2.0
|
||||
python-dotenv==1.2.1
|
||||
pytz==2025.2
|
||||
pywin32-ctypes==0.2.3
|
||||
requests==2.32.5
|
||||
rfc3986==1.5.0
|
||||
rich==14.2.0
|
||||
rsa==4.9.1
|
||||
ruamel.yaml==0.18.16
|
||||
ruamel.yaml.clib==0.2.14
|
||||
setuptools==80.9.0
|
||||
shiboken6==6.10.1
|
||||
six==1.17.0
|
||||
sniffio==1.3.1
|
||||
soupsieve==2.7
|
||||
Telethon==1.40.0
|
||||
tqdm==4.67.1
|
||||
truststore==0.10.1
|
||||
typing_extensions==4.15.0
|
||||
typing-inspection==0.4.2
|
||||
tzdata==2025.2
|
||||
urllib3==2.5.0
|
||||
wcwidth==0.2.14
|
||||
wheel==0.45.1
|
||||
win_inet_pton==1.1.0
|
||||
xlsxwriter==3.2.9
|
||||
zstandard==0.24.0
|
||||
@@ -32,7 +32,7 @@ SCHEMA_ETL=etl_admin
|
||||
# API 配置
|
||||
# ------------------------------------------------------------------------------
|
||||
API_BASE=https://pc.ficoo.vip/apiprod/admin/v1/
|
||||
API_TOKEN=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJjbGllbnQtdHlwZSI6IjQiLCJ1c2VyLXR5cGUiOiIxIiwiaHR0cDovL3NjaGVtYXMubWljcm9zb2Z0LmNvbS93cy8yMDA4LzA2L2lkZW50aXR5L2NsYWltcy9yb2xlIjoiMTIiLCJyb2xlLWlkIjoiMTIiLCJ0ZW5hbnQtaWQiOiIyNzkwNjgzMTYwNzA5OTU3Iiwibmlja25hbWUiOiLnp5_miLfnrqHnkIblkZjvvJrmganmgakxIiwic2l0ZS1pZCI6IjAiLCJtb2JpbGUiOiIxMzgxMDUwMjMwNCIsInNpZCI6IjI5NTA0ODk2NTgzOTU4NDUiLCJzdGFmZi1pZCI6IjMwMDk5MTg2OTE1NTkwNDUiLCJvcmctaWQiOiIwIiwicm9sZS10eXBlIjoiMyIsInJlZnJlc2hUb2tlbiI6Iks1ZnBhYlRTNkFsR0FpMmN4WGYrMHdJVkk0L2UvTVQrSVBHM3V5VWRrSjg9IiwicmVmcmVzaEV4cGlyeVRpbWUiOiIyMDI2LzEvMzEg5LiL5Y2IMTA6MTQ6NTEiLCJuZWVkQ2hlY2tUb2tlbiI6ImZhbHNlIiwiZXhwIjoxNzY5ODY4ODkxLCJpc3MiOiJ0ZXN0IiwiYXVkIjoiVXNlciJ9.BH3-iwwrBczb8aFfI__6kwe3AIsEPacN9TruaTrQ3nY
|
||||
API_TOKEN=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJjbGllbnQtdHlwZSI6IjQiLCJ1c2VyLXR5cGUiOiIxIiwiaHR0cDovL3NjaGVtYXMubWljcm9zb2Z0LmNvbS93cy8yMDA4LzA2L2lkZW50aXR5L2NsYWltcy9yb2xlIjoiMTIiLCJyb2xlLWlkIjoiMTIiLCJ0ZW5hbnQtaWQiOiIyNzkwNjgzMTYwNzA5OTU3Iiwibmlja25hbWUiOiLnp5_miLfnrqHnkIblkZjvvJrmganmgakxIiwic2l0ZS1pZCI6IjAiLCJtb2JpbGUiOiIxMzgxMDUwMjMwNCIsInNpZCI6IjI5NTA0ODk2NTgzOTU4NDUiLCJzdGFmZi1pZCI6IjMwMDk5MTg2OTE1NTkwNDUiLCJvcmctaWQiOiIwIiwicm9sZS10eXBlIjoiMyIsInJlZnJlc2hUb2tlbiI6Ik1oKzFpTitjclRHMTY3cUp5SzFXYllteVBaaUhjdDI2ZTZDZkJvd1pxSVk9IiwicmVmcmVzaEV4cGlyeVRpbWUiOiIyMDI2LzIvNyDkuIvljYg5OjU2OjE4IiwibmVlZENoZWNrVG9rZW4iOiJmYWxzZSIsImV4cCI6MTc3MDQ3MjU3OCwiaXNzIjoidGVzdCIsImF1ZCI6IlVzZXIifQ.rY03o82SKznD7NOktXKzTOI1btl2FHsklMCChOlZUeY
|
||||
|
||||
# API 请求超时(秒)
|
||||
API_TIMEOUT=20
|
||||
@@ -129,3 +129,4 @@ INTEGRITY_AUTO_CHECK=false
|
||||
# 默认任务列表(逗号分隔,可被 CLI --tasks 参数覆盖)
|
||||
# ------------------------------------------------------------------------------
|
||||
# RUN_TASKS=ODS_PAYMENT,ODS_MEMBER,ODS_SETTLEMENT_RECORDS,DWD_LOAD_FROM_ODS
|
||||
|
||||
|
||||
@@ -1,44 +0,0 @@
|
||||
# -*- mode: python ; coding: utf-8 -*-
|
||||
|
||||
|
||||
a = Analysis(
|
||||
['C:\\dev\\LLTQ\\ETL\\feiqiu-ETL\\etl_billiards\\gui\\main.py'],
|
||||
pathex=[],
|
||||
binaries=[],
|
||||
datas=[('C:\\dev\\LLTQ\\ETL\\feiqiu-ETL\\etl_billiards\\gui\\resources', 'gui/resources'), ('C:\\dev\\LLTQ\\ETL\\feiqiu-ETL\\etl_billiards\\database\\schema_dwd_doc.sql', 'database'), ('C:\\dev\\LLTQ\\ETL\\feiqiu-ETL\\etl_billiards\\database\\schema_dws.sql', 'database'), ('C:\\dev\\LLTQ\\ETL\\feiqiu-ETL\\etl_billiards\\database\\schema_etl_admin.sql', 'database'), ('C:\\dev\\LLTQ\\ETL\\feiqiu-ETL\\etl_billiards\\database\\schema_ODS_doc.sql', 'database'), ('C:\\dev\\LLTQ\\ETL\\feiqiu-ETL\\etl_billiards\\database\\seed_ods_tasks.sql', 'database'), ('C:\\dev\\LLTQ\\ETL\\feiqiu-ETL\\etl_billiards\\database\\seed_scheduler_tasks.sql', 'database')],
|
||||
hiddenimports=['PySide6.QtCore', 'PySide6.QtGui', 'PySide6.QtWidgets', 'psycopg2', 'psycopg2.extras', 'psycopg2.extensions', 'gui.models.task_model', 'gui.models.schedule_model', 'gui.utils.cli_builder', 'gui.utils.config_helper', 'gui.utils.app_settings', 'gui.workers.task_worker', 'gui.workers.db_worker', 'gui.widgets.settings_dialog'],
|
||||
hookspath=[],
|
||||
hooksconfig={},
|
||||
runtime_hooks=[],
|
||||
excludes=['matplotlib', 'numpy', 'pandas', 'scipy', 'PIL', 'cv2', 'tkinter'],
|
||||
noarchive=False,
|
||||
optimize=0,
|
||||
)
|
||||
pyz = PYZ(a.pure)
|
||||
|
||||
exe = EXE(
|
||||
pyz,
|
||||
a.scripts,
|
||||
[],
|
||||
exclude_binaries=True,
|
||||
name='ETL_Manager',
|
||||
debug=False,
|
||||
bootloader_ignore_signals=False,
|
||||
strip=False,
|
||||
upx=True,
|
||||
console=False,
|
||||
disable_windowed_traceback=False,
|
||||
argv_emulation=False,
|
||||
target_arch=None,
|
||||
codesign_identity=None,
|
||||
entitlements_file=None,
|
||||
)
|
||||
coll = COLLECT(
|
||||
exe,
|
||||
a.binaries,
|
||||
a.datas,
|
||||
strip=False,
|
||||
upx=True,
|
||||
upx_exclude=[],
|
||||
name='ETL_Manager',
|
||||
)
|
||||
@@ -90,9 +90,11 @@ def build_exe(onefile: bool = False, console: bool = False):
|
||||
|
||||
# 隐式导入
|
||||
hidden_imports = [
|
||||
# PySide6 核心模块
|
||||
"PySide6.QtCore",
|
||||
"PySide6.QtGui",
|
||||
"PySide6.QtWidgets",
|
||||
# 数据库
|
||||
"psycopg2",
|
||||
"psycopg2.extras",
|
||||
"psycopg2.extensions",
|
||||
@@ -138,6 +140,9 @@ def build_exe(onefile: bool = False, console: bool = False):
|
||||
result = subprocess.run(cmd, cwd=str(project_root))
|
||||
|
||||
if result.returncode == 0:
|
||||
# 打包后精简:删除不需要的文件
|
||||
slim_dist(project_root / "dist" / "ETL_Manager" / "_internal")
|
||||
|
||||
print()
|
||||
print("=" * 50)
|
||||
print("打包成功!")
|
||||
@@ -149,6 +154,77 @@ def build_exe(onefile: bool = False, console: bool = False):
|
||||
sys.exit(1)
|
||||
|
||||
|
||||
def slim_dist(internal_dir: Path):
|
||||
"""精简打包后的文件,删除不需要的内容"""
|
||||
if not internal_dir.exists():
|
||||
return
|
||||
|
||||
print()
|
||||
print("精简打包文件...")
|
||||
|
||||
removed_size = 0
|
||||
|
||||
# 1. 删除不需要的翻译文件(只保留中文和英文)
|
||||
translations_dir = internal_dir / "PySide6" / "translations"
|
||||
if translations_dir.exists():
|
||||
keep_langs = {"zh_CN", "zh_TW", "en"}
|
||||
for qm_file in translations_dir.glob("*.qm"):
|
||||
# 检查是否是需要保留的语言
|
||||
keep = False
|
||||
for lang in keep_langs:
|
||||
if lang in qm_file.name:
|
||||
keep = True
|
||||
break
|
||||
if not keep:
|
||||
size = qm_file.stat().st_size
|
||||
qm_file.unlink()
|
||||
removed_size += size
|
||||
|
||||
# 2. 删除 opengl32sw.dll(软件渲染,20MB,通常不需要)
|
||||
opengl_sw = internal_dir / "PySide6" / "opengl32sw.dll"
|
||||
if opengl_sw.exists():
|
||||
size = opengl_sw.stat().st_size
|
||||
opengl_sw.unlink()
|
||||
removed_size += size
|
||||
print(f" 删除: opengl32sw.dll ({size / 1024 / 1024:.1f} MB)")
|
||||
|
||||
# 3. 删除不需要的 Qt 模块 DLL(如果存在)
|
||||
unnecessary_dlls = [
|
||||
"Qt6Pdf.dll", # PDF 支持
|
||||
"Qt6Qml.dll", # QML 引擎
|
||||
"Qt6QmlMeta.dll",
|
||||
"Qt6QmlModels.dll",
|
||||
"Qt6QmlWorkerScript.dll",
|
||||
"Qt6Quick.dll", # Quick UI
|
||||
"Qt6VirtualKeyboard.dll", # 虚拟键盘
|
||||
]
|
||||
pyside6_dir = internal_dir / "PySide6"
|
||||
for dll_name in unnecessary_dlls:
|
||||
dll_path = pyside6_dir / dll_name
|
||||
if dll_path.exists():
|
||||
size = dll_path.stat().st_size
|
||||
dll_path.unlink()
|
||||
removed_size += size
|
||||
print(f" 删除: {dll_name} ({size / 1024 / 1024:.1f} MB)")
|
||||
|
||||
# 4. 删除不需要的插件目录
|
||||
unnecessary_plugins = [
|
||||
"networkinformation", # 网络信息
|
||||
"tls", # TLS 支持(数据库已有)
|
||||
]
|
||||
plugins_dir = pyside6_dir / "plugins"
|
||||
if plugins_dir.exists():
|
||||
for plugin_name in unnecessary_plugins:
|
||||
plugin_path = plugins_dir / plugin_name
|
||||
if plugin_path.exists():
|
||||
size = sum(f.stat().st_size for f in plugin_path.rglob("*") if f.is_file())
|
||||
shutil.rmtree(plugin_path)
|
||||
removed_size += size
|
||||
print(f" 删除插件: {plugin_name}")
|
||||
|
||||
print(f"共节省: {removed_size / 1024 / 1024:.1f} MB")
|
||||
|
||||
|
||||
def main():
|
||||
"""主函数"""
|
||||
import argparse
|
||||
|
||||
@@ -109,9 +109,18 @@ DEFAULTS = {
|
||||
"mode": "history",
|
||||
"history_start": "2025-07-01",
|
||||
"history_end": "",
|
||||
"include_dimensions": False,
|
||||
"include_dimensions": True,
|
||||
"auto_check": False,
|
||||
"auto_backfill": False,
|
||||
"compare_content": True,
|
||||
"content_sample_limit": 50,
|
||||
"backfill_mismatch": True,
|
||||
"recheck_after_backfill": True,
|
||||
"ods_task_codes": "",
|
||||
"force_monthly_split": True,
|
||||
},
|
||||
"dwd": {
|
||||
"fact_upsert": True,
|
||||
},
|
||||
|
||||
}
|
||||
|
||||
@@ -55,7 +55,12 @@ ENV_MAP = {
|
||||
"INTEGRITY_INCLUDE_DIMENSIONS": ("integrity.include_dimensions",),
|
||||
"INTEGRITY_AUTO_CHECK": ("integrity.auto_check",),
|
||||
"INTEGRITY_AUTO_BACKFILL": ("integrity.auto_backfill",),
|
||||
"INTEGRITY_COMPARE_CONTENT": ("integrity.compare_content",),
|
||||
"INTEGRITY_CONTENT_SAMPLE_LIMIT": ("integrity.content_sample_limit",),
|
||||
"INTEGRITY_BACKFILL_MISMATCH": ("integrity.backfill_mismatch",),
|
||||
"INTEGRITY_RECHECK_AFTER_BACKFILL": ("integrity.recheck_after_backfill",),
|
||||
"INTEGRITY_ODS_TASK_CODES": ("integrity.ods_task_codes",),
|
||||
"DWD_FACT_UPSERT": ("dwd.fact_upsert",),
|
||||
}
|
||||
|
||||
|
||||
|
||||
@@ -7,7 +7,7 @@ CREATE TABLE IF NOT EXISTS billiards_ods.member_profiles (
|
||||
tenant_id BIGINT,
|
||||
register_site_id BIGINT,
|
||||
site_name TEXT,
|
||||
id BIGINT PRIMARY KEY,
|
||||
id BIGINT,
|
||||
system_member_id BIGINT,
|
||||
member_card_grade_code BIGINT,
|
||||
member_card_grade_name TEXT,
|
||||
@@ -19,10 +19,12 @@ CREATE TABLE IF NOT EXISTS billiards_ods.member_profiles (
|
||||
status INT,
|
||||
user_status INT,
|
||||
create_time TIMESTAMP,
|
||||
content_hash TEXT NOT NULL,
|
||||
source_file TEXT,
|
||||
source_endpoint TEXT,
|
||||
fetched_at TIMESTAMPTZ DEFAULT now(),
|
||||
payload JSONB NOT NULL
|
||||
payload JSONB NOT NULL,
|
||||
PRIMARY KEY (id, content_hash)
|
||||
);
|
||||
|
||||
COMMENT ON TABLE billiards_ods.member_profiles IS 'ODS 原始明细表:会员档案/会员账户信息。来源:export/test-json-doc/member_profiles.json;分析:member_profiles-Analysis.md。字段以导出原样为主;ETL 补充 source_file/source_endpoint/fetched_at,并保留 payload 为原始记录快照。';
|
||||
@@ -53,7 +55,7 @@ CREATE TABLE IF NOT EXISTS billiards_ods.member_balance_changes (
|
||||
register_site_id BIGINT,
|
||||
registerSiteName TEXT,
|
||||
paySiteName TEXT,
|
||||
id BIGINT PRIMARY KEY,
|
||||
id BIGINT,
|
||||
tenant_member_id BIGINT,
|
||||
tenant_member_card_id BIGINT,
|
||||
system_member_id BIGINT,
|
||||
@@ -73,10 +75,12 @@ CREATE TABLE IF NOT EXISTS billiards_ods.member_balance_changes (
|
||||
operator_name TEXT,
|
||||
is_delete INT,
|
||||
create_time TIMESTAMP,
|
||||
content_hash TEXT NOT NULL,
|
||||
source_file TEXT,
|
||||
source_endpoint TEXT,
|
||||
fetched_at TIMESTAMPTZ DEFAULT now(),
|
||||
payload JSONB NOT NULL
|
||||
payload JSONB NOT NULL,
|
||||
PRIMARY KEY (id, content_hash)
|
||||
);
|
||||
|
||||
COMMENT ON TABLE billiards_ods.member_balance_changes IS 'ODS 原始明细表:会员余额变更流水。来源:export/test-json-doc/member_balance_changes.json;分析:member_balance_changes-Analysis.md。字段以导出原样为主;ETL 补充 source_file/source_endpoint/fetched_at,并保留 payload 为原始记录快照。';
|
||||
@@ -117,7 +121,7 @@ CREATE TABLE IF NOT EXISTS billiards_ods.member_stored_value_cards (
|
||||
system_member_id BIGINT,
|
||||
register_site_id BIGINT,
|
||||
site_name TEXT,
|
||||
id BIGINT PRIMARY KEY,
|
||||
id BIGINT,
|
||||
member_card_grade_code BIGINT,
|
||||
member_card_grade_code_name TEXT,
|
||||
member_card_type_name TEXT,
|
||||
@@ -181,10 +185,12 @@ CREATE TABLE IF NOT EXISTS billiards_ods.member_stored_value_cards (
|
||||
tenantName TEXT,
|
||||
pdAssisnatLevel TEXT,
|
||||
cxAssisnatLevel TEXT,
|
||||
content_hash TEXT NOT NULL,
|
||||
source_file TEXT,
|
||||
source_endpoint TEXT,
|
||||
fetched_at TIMESTAMPTZ DEFAULT now(),
|
||||
payload JSONB NOT NULL
|
||||
payload JSONB NOT NULL,
|
||||
PRIMARY KEY (id, content_hash)
|
||||
);
|
||||
|
||||
COMMENT ON TABLE billiards_ods.member_stored_value_cards IS 'ODS 原始明细表:会员储值/卡券账户列表。来源:export/test-json-doc/member_stored_value_cards.json;分析:member_stored_value_cards-Analysis.md。字段以导出原样为主;ETL 补充 source_file/source_endpoint/fetched_at,并保留 payload 为原始记录快照。';
|
||||
@@ -264,7 +270,7 @@ COMMENT ON COLUMN billiards_ods.member_stored_value_cards.payload IS '【说明
|
||||
|
||||
|
||||
CREATE TABLE IF NOT EXISTS billiards_ods.recharge_settlements (
|
||||
id BIGINT PRIMARY KEY,
|
||||
id BIGINT,
|
||||
tenantid BIGINT,
|
||||
siteid BIGINT,
|
||||
sitename TEXT,
|
||||
@@ -325,10 +331,12 @@ CREATE TABLE IF NOT EXISTS billiards_ods.recharge_settlements (
|
||||
isfirst INT,
|
||||
rechargecardamount NUMERIC(18,2),
|
||||
giftcardamount NUMERIC(18,2),
|
||||
content_hash TEXT NOT NULL,
|
||||
source_file TEXT,
|
||||
source_endpoint TEXT,
|
||||
fetched_at TIMESTAMPTZ DEFAULT now(),
|
||||
payload JSONB NOT NULL
|
||||
payload JSONB NOT NULL,
|
||||
PRIMARY KEY (id, content_hash)
|
||||
);
|
||||
|
||||
COMMENT ON TABLE billiards_ods.recharge_settlements IS 'ODS 原始明细表:充值结算记录。来源:export/test-json-doc/recharge_settlements.json;分析:recharge_settlements-Analysis.md。字段以导出原样为主;ETL 补充 source_file/source_endpoint/fetched_at,并保留 payload 为原始记录快照。';
|
||||
@@ -400,7 +408,7 @@ COMMENT ON COLUMN billiards_ods.recharge_settlements.payload IS '【说明】完
|
||||
|
||||
|
||||
CREATE TABLE IF NOT EXISTS billiards_ods.settlement_records (
|
||||
id BIGINT PRIMARY KEY,
|
||||
id BIGINT,
|
||||
tenantid BIGINT,
|
||||
siteid BIGINT,
|
||||
sitename TEXT,
|
||||
@@ -461,10 +469,12 @@ CREATE TABLE IF NOT EXISTS billiards_ods.settlement_records (
|
||||
isfirst INT,
|
||||
rechargecardamount NUMERIC(18,2),
|
||||
giftcardamount NUMERIC(18,2),
|
||||
content_hash TEXT NOT NULL,
|
||||
source_file TEXT,
|
||||
source_endpoint TEXT,
|
||||
fetched_at TIMESTAMPTZ DEFAULT now(),
|
||||
payload JSONB NOT NULL
|
||||
payload JSONB NOT NULL,
|
||||
PRIMARY KEY (id, content_hash)
|
||||
);
|
||||
|
||||
COMMENT ON TABLE billiards_ods.settlement_records IS 'ODS 原始明细表:结账/结算记录。来源:export/test-json-doc/settlement_records.json;分析:settlement_records-Analysis.md。字段以导出原样为主;ETL 补充 source_file/source_endpoint/fetched_at,并保留 payload 为原始记录快照。';
|
||||
@@ -536,7 +546,7 @@ COMMENT ON COLUMN billiards_ods.settlement_records.payload IS '【说明】完
|
||||
|
||||
|
||||
CREATE TABLE IF NOT EXISTS billiards_ods.assistant_cancellation_records (
|
||||
id BIGINT PRIMARY KEY,
|
||||
id BIGINT,
|
||||
siteId BIGINT,
|
||||
siteProfile JSONB,
|
||||
assistantName TEXT,
|
||||
@@ -549,10 +559,12 @@ CREATE TABLE IF NOT EXISTS billiards_ods.assistant_cancellation_records (
|
||||
tableName TEXT,
|
||||
trashReason TEXT,
|
||||
createTime TIMESTAMP,
|
||||
content_hash TEXT NOT NULL,
|
||||
source_file TEXT,
|
||||
source_endpoint TEXT,
|
||||
fetched_at TIMESTAMPTZ DEFAULT now(),
|
||||
payload JSONB NOT NULL
|
||||
payload JSONB NOT NULL,
|
||||
PRIMARY KEY (id, content_hash)
|
||||
);
|
||||
|
||||
COMMENT ON TABLE billiards_ods.assistant_cancellation_records IS 'ODS 原始明细表:助教作废/取消记录。来源:export/test-json-doc/assistant_cancellation_records.json;分析:assistant_cancellation_records-Analysis.md。字段以导出原样为主;ETL 补充 source_file/source_endpoint/fetched_at,并保留 payload 为原始记录快照。';
|
||||
@@ -576,7 +588,7 @@ COMMENT ON COLUMN billiards_ods.assistant_cancellation_records.payload IS '【
|
||||
|
||||
|
||||
CREATE TABLE IF NOT EXISTS billiards_ods.assistant_accounts_master (
|
||||
id BIGINT PRIMARY KEY,
|
||||
id BIGINT,
|
||||
tenant_id BIGINT,
|
||||
site_id BIGINT,
|
||||
assistant_no TEXT,
|
||||
@@ -638,10 +650,12 @@ CREATE TABLE IF NOT EXISTS billiards_ods.assistant_accounts_master (
|
||||
light_equipment_id TEXT,
|
||||
entry_sign_status INT,
|
||||
resign_sign_status INT,
|
||||
content_hash TEXT NOT NULL,
|
||||
source_file TEXT,
|
||||
source_endpoint TEXT,
|
||||
fetched_at TIMESTAMPTZ DEFAULT now(),
|
||||
payload JSONB NOT NULL
|
||||
payload JSONB NOT NULL,
|
||||
PRIMARY KEY (id, content_hash)
|
||||
);
|
||||
|
||||
COMMENT ON TABLE billiards_ods.assistant_accounts_master IS 'ODS 原始明细表:助教档案主数据。来源:export/test-json-doc/assistant_accounts_master.json;分析:assistant_accounts_master-Analysis.md。字段以导出原样为主;ETL 补充 source_file/source_endpoint/fetched_at,并保留 payload 为原始记录快照。';
|
||||
@@ -714,7 +728,7 @@ COMMENT ON COLUMN billiards_ods.assistant_accounts_master.payload IS '【说明
|
||||
|
||||
|
||||
CREATE TABLE IF NOT EXISTS billiards_ods.assistant_service_records (
|
||||
id BIGINT PRIMARY KEY,
|
||||
id BIGINT,
|
||||
tenant_id BIGINT,
|
||||
site_id BIGINT,
|
||||
siteProfile JSONB,
|
||||
@@ -779,9 +793,11 @@ CREATE TABLE IF NOT EXISTS billiards_ods.assistant_service_records (
|
||||
is_not_responding INT,
|
||||
is_confirm INT,
|
||||
payload JSONB NOT NULL,
|
||||
content_hash TEXT NOT NULL,
|
||||
source_file TEXT,
|
||||
source_endpoint TEXT,
|
||||
fetched_at TIMESTAMPTZ DEFAULT now()
|
||||
fetched_at TIMESTAMPTZ DEFAULT now(),
|
||||
PRIMARY KEY (id, content_hash)
|
||||
);
|
||||
|
||||
COMMENT ON TABLE billiards_ods.assistant_service_records IS 'ODS 原始明细表:助教服务流水。来源:export/test-json-doc/assistant_service_records.json;分析:assistant_service_records-Analysis.md。字段以导出原样为主;ETL 补充 source_file/source_endpoint/fetched_at,并保留 payload 为原始记录快照。';
|
||||
@@ -856,7 +872,7 @@ COMMENT ON COLUMN billiards_ods.assistant_service_records.fetched_at IS '【说
|
||||
|
||||
|
||||
CREATE TABLE IF NOT EXISTS billiards_ods.site_tables_master (
|
||||
id BIGINT PRIMARY KEY,
|
||||
id BIGINT,
|
||||
site_id BIGINT,
|
||||
siteName TEXT,
|
||||
"appletQrCodeUrl" TEXT,
|
||||
@@ -881,10 +897,12 @@ CREATE TABLE IF NOT EXISTS billiards_ods.site_tables_master (
|
||||
table_status INT,
|
||||
temporary_light_second INT,
|
||||
virtual_table INT,
|
||||
content_hash TEXT NOT NULL,
|
||||
source_file TEXT,
|
||||
source_endpoint TEXT,
|
||||
fetched_at TIMESTAMPTZ DEFAULT now(),
|
||||
payload JSONB NOT NULL
|
||||
payload JSONB NOT NULL,
|
||||
PRIMARY KEY (id, content_hash)
|
||||
);
|
||||
|
||||
COMMENT ON TABLE billiards_ods.site_tables_master IS 'ODS 原始明细表:门店桌台主数据。来源:export/test-json-doc/site_tables_master.json;分析:site_tables_master-Analysis.md。字段以导出原样为主;ETL 补充 source_file/source_endpoint/fetched_at,并保留 payload 为原始记录快照。';
|
||||
@@ -919,7 +937,7 @@ COMMENT ON COLUMN billiards_ods.site_tables_master.payload IS '【说明】完
|
||||
|
||||
|
||||
CREATE TABLE IF NOT EXISTS billiards_ods.table_fee_discount_records (
|
||||
id BIGINT PRIMARY KEY,
|
||||
id BIGINT,
|
||||
tenant_id BIGINT,
|
||||
site_id BIGINT,
|
||||
siteProfile JSONB,
|
||||
@@ -939,10 +957,12 @@ CREATE TABLE IF NOT EXISTS billiards_ods.table_fee_discount_records (
|
||||
order_trade_no TEXT,
|
||||
is_delete INT,
|
||||
create_time TIMESTAMP,
|
||||
content_hash TEXT NOT NULL,
|
||||
source_file TEXT,
|
||||
source_endpoint TEXT,
|
||||
fetched_at TIMESTAMPTZ DEFAULT now(),
|
||||
payload JSONB NOT NULL
|
||||
payload JSONB NOT NULL,
|
||||
PRIMARY KEY (id, content_hash)
|
||||
);
|
||||
|
||||
COMMENT ON TABLE billiards_ods.table_fee_discount_records IS 'ODS 原始明细表:台费折扣记录。来源:export/test-json-doc/table_fee_discount_records.json;分析:table_fee_discount_records-Analysis.md。字段以导出原样为主;ETL 补充 source_file/source_endpoint/fetched_at,并保留 payload 为原始记录快照。';
|
||||
@@ -973,7 +993,7 @@ COMMENT ON COLUMN billiards_ods.table_fee_discount_records.payload IS '【说明
|
||||
|
||||
|
||||
CREATE TABLE IF NOT EXISTS billiards_ods.table_fee_transactions (
|
||||
id BIGINT PRIMARY KEY,
|
||||
id BIGINT,
|
||||
tenant_id BIGINT,
|
||||
site_id BIGINT,
|
||||
siteProfile JSONB,
|
||||
@@ -1013,9 +1033,11 @@ CREATE TABLE IF NOT EXISTS billiards_ods.table_fee_transactions (
|
||||
salesman_user_id BIGINT,
|
||||
create_time TIMESTAMP,
|
||||
payload JSONB NOT NULL,
|
||||
content_hash TEXT NOT NULL,
|
||||
source_file TEXT,
|
||||
source_endpoint TEXT,
|
||||
fetched_at TIMESTAMPTZ DEFAULT now()
|
||||
fetched_at TIMESTAMPTZ DEFAULT now(),
|
||||
PRIMARY KEY (id, content_hash)
|
||||
);
|
||||
|
||||
COMMENT ON TABLE billiards_ods.table_fee_transactions IS 'ODS 原始明细表:台费流水。来源:export/test-json-doc/table_fee_transactions.json;分析:table_fee_transactions-Analysis.md。字段以导出原样为主;ETL 补充 source_file/source_endpoint/fetched_at,并保留 payload 为原始记录快照。';
|
||||
@@ -1065,7 +1087,7 @@ COMMENT ON COLUMN billiards_ods.table_fee_transactions.fetched_at IS '【说明
|
||||
|
||||
|
||||
CREATE TABLE IF NOT EXISTS billiards_ods.goods_stock_movements (
|
||||
siteGoodsStockId BIGINT PRIMARY KEY,
|
||||
siteGoodsStockId BIGINT,
|
||||
tenantId BIGINT,
|
||||
siteId BIGINT,
|
||||
siteGoodsId BIGINT,
|
||||
@@ -1084,10 +1106,12 @@ CREATE TABLE IF NOT EXISTS billiards_ods.goods_stock_movements (
|
||||
remark TEXT,
|
||||
operatorName TEXT,
|
||||
createTime TIMESTAMP,
|
||||
content_hash TEXT NOT NULL,
|
||||
source_file TEXT,
|
||||
source_endpoint TEXT,
|
||||
fetched_at TIMESTAMPTZ DEFAULT now(),
|
||||
payload JSONB NOT NULL
|
||||
payload JSONB NOT NULL,
|
||||
PRIMARY KEY (siteGoodsStockId, content_hash)
|
||||
);
|
||||
|
||||
COMMENT ON TABLE billiards_ods.goods_stock_movements IS 'ODS 原始明细表:商品库存变动流水。来源:export/test-json-doc/goods_stock_movements.json;分析:goods_stock_movements-Analysis.md。字段以导出原样为主;ETL 补充 source_file/source_endpoint/fetched_at,并保留 payload 为原始记录快照。';
|
||||
@@ -1117,7 +1141,7 @@ COMMENT ON COLUMN billiards_ods.goods_stock_movements.payload IS '【说明】
|
||||
|
||||
|
||||
CREATE TABLE IF NOT EXISTS billiards_ods.stock_goods_category_tree (
|
||||
id BIGINT PRIMARY KEY,
|
||||
id BIGINT,
|
||||
tenant_id BIGINT,
|
||||
category_name TEXT,
|
||||
alias_name TEXT,
|
||||
@@ -1128,10 +1152,12 @@ CREATE TABLE IF NOT EXISTS billiards_ods.stock_goods_category_tree (
|
||||
categoryBoxes JSONB,
|
||||
sort INT,
|
||||
is_warehousing INT,
|
||||
content_hash TEXT NOT NULL,
|
||||
source_file TEXT,
|
||||
source_endpoint TEXT,
|
||||
fetched_at TIMESTAMPTZ DEFAULT now(),
|
||||
payload JSONB NOT NULL
|
||||
payload JSONB NOT NULL,
|
||||
PRIMARY KEY (id, content_hash)
|
||||
);
|
||||
|
||||
COMMENT ON TABLE billiards_ods.stock_goods_category_tree IS 'ODS 原始明细表:商品分类树。来源:export/test-json-doc/stock_goods_category_tree.json;分析:stock_goods_category_tree-Analysis.md。字段以导出原样为主;ETL 补充 source_file/source_endpoint/fetched_at,并保留 payload 为原始记录快照。';
|
||||
@@ -1153,7 +1179,7 @@ COMMENT ON COLUMN billiards_ods.stock_goods_category_tree.payload IS '【说明
|
||||
|
||||
|
||||
CREATE TABLE IF NOT EXISTS billiards_ods.goods_stock_summary (
|
||||
siteGoodsId BIGINT PRIMARY KEY,
|
||||
siteGoodsId BIGINT,
|
||||
goodsName TEXT,
|
||||
goodsUnit TEXT,
|
||||
goodsCategoryId BIGINT,
|
||||
@@ -1167,10 +1193,12 @@ CREATE TABLE IF NOT EXISTS billiards_ods.goods_stock_summary (
|
||||
rangeSaleMoney NUMERIC(18,2),
|
||||
rangeInventory NUMERIC(18,4),
|
||||
currentStock NUMERIC(18,4),
|
||||
content_hash TEXT NOT NULL,
|
||||
source_file TEXT,
|
||||
source_endpoint TEXT,
|
||||
fetched_at TIMESTAMPTZ DEFAULT now(),
|
||||
payload JSONB NOT NULL
|
||||
payload JSONB NOT NULL,
|
||||
PRIMARY KEY (siteGoodsId, content_hash)
|
||||
);
|
||||
|
||||
COMMENT ON TABLE billiards_ods.goods_stock_summary IS 'ODS 原始明细表:商品库存汇总。来源:export/test-json-doc/goods_stock_summary.json;分析:goods_stock_summary-Analysis.md。字段以导出原样为主;ETL 补充 source_file/source_endpoint/fetched_at,并保留 payload 为原始记录快照。';
|
||||
@@ -1195,7 +1223,7 @@ COMMENT ON COLUMN billiards_ods.goods_stock_summary.payload IS '【说明】完
|
||||
|
||||
|
||||
CREATE TABLE IF NOT EXISTS billiards_ods.payment_transactions (
|
||||
id BIGINT PRIMARY KEY,
|
||||
id BIGINT,
|
||||
site_id BIGINT,
|
||||
siteProfile JSONB,
|
||||
relate_type INT,
|
||||
@@ -1206,10 +1234,12 @@ CREATE TABLE IF NOT EXISTS billiards_ods.payment_transactions (
|
||||
create_time TIMESTAMP,
|
||||
payment_method INT,
|
||||
online_pay_channel INT,
|
||||
content_hash TEXT NOT NULL,
|
||||
source_file TEXT,
|
||||
source_endpoint TEXT,
|
||||
fetched_at TIMESTAMPTZ DEFAULT now(),
|
||||
payload JSONB NOT NULL
|
||||
payload JSONB NOT NULL,
|
||||
PRIMARY KEY (id, content_hash)
|
||||
);
|
||||
|
||||
COMMENT ON TABLE billiards_ods.payment_transactions IS 'ODS 原始明细表:支付流水。来源:export/test-json-doc/payment_transactions.json;分析:payment_transactions-Analysis.md。字段以导出原样为主;ETL 补充 source_file/source_endpoint/fetched_at,并保留 payload 为原始记录快照。';
|
||||
@@ -1231,7 +1261,7 @@ COMMENT ON COLUMN billiards_ods.payment_transactions.payload IS '【说明】完
|
||||
|
||||
|
||||
CREATE TABLE IF NOT EXISTS billiards_ods.refund_transactions (
|
||||
id BIGINT PRIMARY KEY,
|
||||
id BIGINT,
|
||||
tenant_id BIGINT,
|
||||
tenantName TEXT,
|
||||
site_id BIGINT,
|
||||
@@ -1263,10 +1293,12 @@ CREATE TABLE IF NOT EXISTS billiards_ods.refund_transactions (
|
||||
is_delete INT,
|
||||
balance_frozen_amount NUMERIC(18,2),
|
||||
card_frozen_amount NUMERIC(18,2),
|
||||
content_hash TEXT NOT NULL,
|
||||
source_file TEXT,
|
||||
source_endpoint TEXT,
|
||||
fetched_at TIMESTAMPTZ DEFAULT now(),
|
||||
payload JSONB NOT NULL
|
||||
payload JSONB NOT NULL,
|
||||
PRIMARY KEY (id, content_hash)
|
||||
);
|
||||
|
||||
COMMENT ON TABLE billiards_ods.refund_transactions IS 'ODS 原始明细表:退款流水。来源:export/test-json-doc/refund_transactions.json;分析:refund_transactions-Analysis.md。字段以导出原样为主;ETL 补充 source_file/source_endpoint/fetched_at,并保留 payload 为原始记录快照。';
|
||||
@@ -1309,7 +1341,7 @@ COMMENT ON COLUMN billiards_ods.refund_transactions.payload IS '【说明】完
|
||||
|
||||
|
||||
CREATE TABLE IF NOT EXISTS billiards_ods.platform_coupon_redemption_records (
|
||||
id BIGINT PRIMARY KEY,
|
||||
id BIGINT,
|
||||
verify_id BIGINT,
|
||||
certificate_id TEXT,
|
||||
coupon_code TEXT,
|
||||
@@ -1335,10 +1367,12 @@ CREATE TABLE IF NOT EXISTS billiards_ods.platform_coupon_redemption_records (
|
||||
operator_name TEXT,
|
||||
is_delete INT,
|
||||
siteProfile JSONB,
|
||||
content_hash TEXT NOT NULL,
|
||||
source_file TEXT,
|
||||
source_endpoint TEXT,
|
||||
fetched_at TIMESTAMPTZ DEFAULT now(),
|
||||
payload JSONB NOT NULL
|
||||
payload JSONB NOT NULL,
|
||||
PRIMARY KEY (id, content_hash)
|
||||
);
|
||||
|
||||
COMMENT ON TABLE billiards_ods.platform_coupon_redemption_records IS 'ODS 原始明细表:平台券核销/使用记录。来源:export/test-json-doc/platform_coupon_redemption_records.json;分析:platform_coupon_redemption_records-Analysis.md。字段以导出原样为主;ETL 补充 source_file/source_endpoint/fetched_at,并保留 payload 为原始记录快照。';
|
||||
@@ -1375,7 +1409,7 @@ COMMENT ON COLUMN billiards_ods.platform_coupon_redemption_records.payload IS '
|
||||
|
||||
|
||||
CREATE TABLE IF NOT EXISTS billiards_ods.tenant_goods_master (
|
||||
id BIGINT PRIMARY KEY,
|
||||
id BIGINT,
|
||||
tenant_id BIGINT,
|
||||
goods_name TEXT,
|
||||
goods_bar_code TEXT,
|
||||
@@ -1407,9 +1441,11 @@ CREATE TABLE IF NOT EXISTS billiards_ods.tenant_goods_master (
|
||||
create_time TIMESTAMP,
|
||||
update_time TIMESTAMP,
|
||||
payload JSONB NOT NULL,
|
||||
content_hash TEXT NOT NULL,
|
||||
source_file TEXT,
|
||||
source_endpoint TEXT,
|
||||
fetched_at TIMESTAMPTZ DEFAULT now()
|
||||
fetched_at TIMESTAMPTZ DEFAULT now(),
|
||||
PRIMARY KEY (id, content_hash)
|
||||
);
|
||||
|
||||
COMMENT ON TABLE billiards_ods.tenant_goods_master IS 'ODS 原始明细表:租户商品主数据。来源:export/test-json-doc/tenant_goods_master.json;分析:tenant_goods_master-Analysis.md。字段以导出原样为主;ETL 补充 source_file/source_endpoint/fetched_at,并保留 payload 为原始记录快照。';
|
||||
@@ -1451,7 +1487,7 @@ COMMENT ON COLUMN billiards_ods.tenant_goods_master.fetched_at IS '【说明】E
|
||||
|
||||
|
||||
CREATE TABLE IF NOT EXISTS billiards_ods.group_buy_packages (
|
||||
id BIGINT PRIMARY KEY,
|
||||
id BIGINT,
|
||||
package_id BIGINT,
|
||||
package_name TEXT,
|
||||
selling_price NUMERIC(18,2),
|
||||
@@ -1486,10 +1522,12 @@ CREATE TABLE IF NOT EXISTS billiards_ods.group_buy_packages (
|
||||
area_tag_type INT,
|
||||
creator_name TEXT,
|
||||
create_time TIMESTAMP,
|
||||
content_hash TEXT NOT NULL,
|
||||
source_file TEXT,
|
||||
source_endpoint TEXT,
|
||||
fetched_at TIMESTAMPTZ DEFAULT now(),
|
||||
payload JSONB NOT NULL
|
||||
payload JSONB NOT NULL,
|
||||
PRIMARY KEY (id, content_hash)
|
||||
);
|
||||
|
||||
COMMENT ON TABLE billiards_ods.group_buy_packages IS 'ODS 原始明细表:团购套餐主数据。来源:export/test-json-doc/group_buy_packages.json;分析:group_buy_packages-Analysis.md。字段以导出原样为主;ETL 补充 source_file/source_endpoint/fetched_at,并保留 payload 为原始记录快照。';
|
||||
@@ -1535,7 +1573,7 @@ COMMENT ON COLUMN billiards_ods.group_buy_packages.payload IS '【说明】完
|
||||
|
||||
|
||||
CREATE TABLE IF NOT EXISTS billiards_ods.group_buy_redemption_records (
|
||||
id BIGINT PRIMARY KEY,
|
||||
id BIGINT,
|
||||
tenant_id BIGINT,
|
||||
site_id BIGINT,
|
||||
siteName TEXT,
|
||||
@@ -1579,9 +1617,11 @@ CREATE TABLE IF NOT EXISTS billiards_ods.group_buy_redemption_records (
|
||||
is_delete INT,
|
||||
create_time TIMESTAMP,
|
||||
payload JSONB NOT NULL,
|
||||
content_hash TEXT NOT NULL,
|
||||
source_file TEXT,
|
||||
source_endpoint TEXT,
|
||||
fetched_at TIMESTAMPTZ DEFAULT now()
|
||||
fetched_at TIMESTAMPTZ DEFAULT now(),
|
||||
PRIMARY KEY (id, content_hash)
|
||||
);
|
||||
|
||||
COMMENT ON TABLE billiards_ods.group_buy_redemption_records IS 'ODS 原始明细表:团购核销记录。来源:export/test-json-doc/group_buy_redemption_records.json;分析:group_buy_redemption_records-Analysis.md。字段以导出原样为主;ETL 补充 source_file/source_endpoint/fetched_at,并保留 payload 为原始记录快照。';
|
||||
@@ -1635,7 +1675,7 @@ COMMENT ON COLUMN billiards_ods.group_buy_redemption_records.fetched_at IS '【
|
||||
|
||||
|
||||
CREATE TABLE IF NOT EXISTS billiards_ods.settlement_ticket_details (
|
||||
orderSettleId BIGINT PRIMARY KEY,
|
||||
orderSettleId BIGINT,
|
||||
actualPayment NUMERIC(18,2),
|
||||
adjustAmount NUMERIC(18,2),
|
||||
assistantManualDiscount NUMERIC(18,2),
|
||||
@@ -1674,9 +1714,11 @@ CREATE TABLE IF NOT EXISTS billiards_ods.settlement_ticket_details (
|
||||
orderItem JSONB,
|
||||
tenantMemberCardLogs JSONB,
|
||||
payload JSONB NOT NULL,
|
||||
content_hash TEXT NOT NULL,
|
||||
source_file TEXT,
|
||||
source_endpoint TEXT,
|
||||
fetched_at TIMESTAMPTZ DEFAULT now()
|
||||
fetched_at TIMESTAMPTZ DEFAULT now(),
|
||||
PRIMARY KEY (orderSettleId, content_hash)
|
||||
);
|
||||
|
||||
COMMENT ON TABLE billiards_ods.settlement_ticket_details IS 'ODS 原始明细表:结算小票明细。来源:export/test-json-doc/settlement_ticket_details.json;分析:settlement_ticket_details-Analysis.md。字段以导出原样为主;ETL 补充 source_file/source_endpoint/fetched_at,并保留 payload 为原始记录快照。';
|
||||
@@ -1725,7 +1767,7 @@ COMMENT ON COLUMN billiards_ods.settlement_ticket_details.fetched_at IS '【说
|
||||
|
||||
|
||||
CREATE TABLE IF NOT EXISTS billiards_ods.store_goods_master (
|
||||
id BIGINT PRIMARY KEY,
|
||||
id BIGINT,
|
||||
tenant_id BIGINT,
|
||||
site_id BIGINT,
|
||||
siteName TEXT,
|
||||
@@ -1771,9 +1813,11 @@ CREATE TABLE IF NOT EXISTS billiards_ods.store_goods_master (
|
||||
create_time TIMESTAMP,
|
||||
update_time TIMESTAMP,
|
||||
payload JSONB NOT NULL,
|
||||
content_hash TEXT NOT NULL,
|
||||
source_file TEXT,
|
||||
source_endpoint TEXT,
|
||||
fetched_at TIMESTAMPTZ DEFAULT now()
|
||||
fetched_at TIMESTAMPTZ DEFAULT now(),
|
||||
PRIMARY KEY (id, content_hash)
|
||||
);
|
||||
|
||||
COMMENT ON TABLE billiards_ods.store_goods_master IS 'ODS 原始明细表:门店商品主数据。来源:export/test-json-doc/store_goods_master.json;分析:store_goods_master-Analysis.md。字段以导出原样为主;ETL 补充 source_file/source_endpoint/fetched_at,并保留 payload 为原始记录快照。';
|
||||
@@ -1828,7 +1872,7 @@ COMMENT ON COLUMN billiards_ods.store_goods_master.fetched_at IS '【说明】ET
|
||||
|
||||
|
||||
CREATE TABLE IF NOT EXISTS billiards_ods.store_goods_sales_records (
|
||||
id BIGINT PRIMARY KEY,
|
||||
id BIGINT,
|
||||
tenant_id BIGINT,
|
||||
site_id BIGINT,
|
||||
siteid BIGINT,
|
||||
@@ -1880,9 +1924,11 @@ CREATE TABLE IF NOT EXISTS billiards_ods.store_goods_sales_records (
|
||||
tenant_goods_category_id BIGINT,
|
||||
create_time TIMESTAMP,
|
||||
payload JSONB NOT NULL,
|
||||
content_hash TEXT NOT NULL,
|
||||
source_file TEXT,
|
||||
source_endpoint TEXT,
|
||||
fetched_at TIMESTAMPTZ DEFAULT now()
|
||||
fetched_at TIMESTAMPTZ DEFAULT now(),
|
||||
PRIMARY KEY (id, content_hash)
|
||||
);
|
||||
|
||||
COMMENT ON TABLE billiards_ods.store_goods_sales_records IS 'ODS 原始明细表:门店商品销售流水。来源:export/test-json-doc/store_goods_sales_records.json;分析:store_goods_sales_records-Analysis.md。字段以导出原样为主;ETL 补充 source_file/source_endpoint/fetched_at,并保留 payload 为原始记录快照。';
|
||||
|
||||
@@ -84,7 +84,7 @@ CREATE TABLE IF NOT EXISTS dim_site (
|
||||
SCD2_end_time TIMESTAMPTZ DEFAULT '9999-12-31',
|
||||
SCD2_is_current INT DEFAULT 1,
|
||||
SCD2_version INT DEFAULT 1,
|
||||
PRIMARY KEY (site_id)
|
||||
PRIMARY KEY (site_id, scd2_start_time)
|
||||
);
|
||||
|
||||
COMMENT ON TABLE billiards_dwd.dim_site IS 'DWD 维度表:dim_site。ODS 来源表:billiards_ods.table_fee_transactions(对应 JSON:table_fee_transactions.json;分析:table_fee_transactions-Analysis.md)。装载/清洗逻辑参考:etl_billiards/tasks/dwd_load_task.py(DwdLoadTask)。';
|
||||
@@ -133,7 +133,7 @@ CREATE TABLE IF NOT EXISTS dim_site_Ex (
|
||||
SCD2_end_time TIMESTAMPTZ DEFAULT '9999-12-31',
|
||||
SCD2_is_current INT DEFAULT 1,
|
||||
SCD2_version INT DEFAULT 1,
|
||||
PRIMARY KEY (site_id)
|
||||
PRIMARY KEY (site_id, scd2_start_time)
|
||||
);
|
||||
|
||||
COMMENT ON TABLE billiards_dwd.dim_site_ex IS 'DWD 维度表(扩展字段表):dim_site_ex。ODS 来源表:billiards_ods.table_fee_transactions(对应 JSON:table_fee_transactions.json;分析:table_fee_transactions-Analysis.md)。装载/清洗逻辑参考:etl_billiards/tasks/dwd_load_task.py(DwdLoadTask)。';
|
||||
@@ -176,7 +176,7 @@ CREATE TABLE IF NOT EXISTS dim_table (
|
||||
SCD2_end_time TIMESTAMPTZ DEFAULT '9999-12-31',
|
||||
SCD2_is_current INT DEFAULT 1,
|
||||
SCD2_version INT DEFAULT 1,
|
||||
PRIMARY KEY (table_id)
|
||||
PRIMARY KEY (table_id, scd2_start_time)
|
||||
);
|
||||
|
||||
COMMENT ON TABLE billiards_dwd.dim_table IS 'DWD 维度表:dim_table。ODS 来源表:billiards_ods.site_tables_master(对应 JSON:site_tables_master.json;分析:site_tables_master-Analysis.md)。装载/清洗逻辑参考:etl_billiards/tasks/dwd_load_task.py(DwdLoadTask)。';
|
||||
@@ -204,7 +204,7 @@ CREATE TABLE IF NOT EXISTS dim_table_Ex (
|
||||
SCD2_end_time TIMESTAMPTZ DEFAULT '9999-12-31',
|
||||
SCD2_is_current INT DEFAULT 1,
|
||||
SCD2_version INT DEFAULT 1,
|
||||
PRIMARY KEY (table_id)
|
||||
PRIMARY KEY (table_id, scd2_start_time)
|
||||
);
|
||||
|
||||
COMMENT ON TABLE billiards_dwd.dim_table_ex IS 'DWD 维度表(扩展字段表):dim_table_ex。ODS 来源表:billiards_ods.site_tables_master(对应 JSON:site_tables_master.json;分析:site_tables_master-Analysis.md)。装载/清洗逻辑参考:etl_billiards/tasks/dwd_load_task.py(DwdLoadTask)。';
|
||||
@@ -240,7 +240,7 @@ CREATE TABLE IF NOT EXISTS dim_assistant (
|
||||
SCD2_end_time TIMESTAMPTZ,
|
||||
SCD2_is_current INT,
|
||||
SCD2_version INT,
|
||||
PRIMARY KEY (assistant_id)
|
||||
PRIMARY KEY (assistant_id, scd2_start_time)
|
||||
);
|
||||
|
||||
COMMENT ON TABLE billiards_dwd.dim_assistant IS 'DWD 维度表:dim_assistant。ODS 来源表:billiards_ods.assistant_accounts_master(对应 JSON:assistant_accounts_master.json;分析:assistant_accounts_master-Analysis.md)。装载/清洗逻辑参考:etl_billiards/tasks/dwd_load_task.py(DwdLoadTask)。';
|
||||
@@ -314,7 +314,7 @@ CREATE TABLE IF NOT EXISTS dim_assistant_Ex (
|
||||
SCD2_end_time TIMESTAMPTZ,
|
||||
SCD2_is_current INT,
|
||||
SCD2_version INT,
|
||||
PRIMARY KEY (assistant_id)
|
||||
PRIMARY KEY (assistant_id, scd2_start_time)
|
||||
);
|
||||
|
||||
COMMENT ON TABLE billiards_dwd.dim_assistant_ex IS 'DWD 维度表(扩展字段表):dim_assistant_ex。ODS 来源表:billiards_ods.assistant_accounts_master(对应 JSON:assistant_accounts_master.json;分析:assistant_accounts_master-Analysis.md)。装载/清洗逻辑参考:etl_billiards/tasks/dwd_load_task.py(DwdLoadTask)。';
|
||||
@@ -383,7 +383,7 @@ CREATE TABLE IF NOT EXISTS dim_member (
|
||||
SCD2_end_time TIMESTAMPTZ,
|
||||
SCD2_is_current INT,
|
||||
SCD2_version INT,
|
||||
PRIMARY KEY (member_id)
|
||||
PRIMARY KEY (member_id, scd2_start_time)
|
||||
);
|
||||
|
||||
COMMENT ON TABLE billiards_dwd.dim_member IS 'DWD 维度表:dim_member。ODS 来源表:billiards_ods.member_profiles(对应 JSON:member_profiles.json;分析:member_profiles-Analysis.md)。装载/清洗逻辑参考:etl_billiards/tasks/dwd_load_task.py(DwdLoadTask)。';
|
||||
@@ -415,7 +415,7 @@ CREATE TABLE IF NOT EXISTS dim_member_Ex (
|
||||
SCD2_end_time TIMESTAMPTZ,
|
||||
SCD2_is_current INT,
|
||||
SCD2_version INT,
|
||||
PRIMARY KEY (member_id)
|
||||
PRIMARY KEY (member_id, scd2_start_time)
|
||||
);
|
||||
|
||||
COMMENT ON TABLE billiards_dwd.dim_member_ex IS 'DWD 维度表(扩展字段表):dim_member_ex。ODS 来源表:billiards_ods.member_profiles(对应 JSON:member_profiles.json;分析:member_profiles-Analysis.md)。装载/清洗逻辑参考:etl_billiards/tasks/dwd_load_task.py(DwdLoadTask)。';
|
||||
@@ -454,7 +454,7 @@ CREATE TABLE IF NOT EXISTS dim_member_card_account (
|
||||
SCD2_end_time TIMESTAMPTZ,
|
||||
SCD2_is_current INT,
|
||||
SCD2_version INT,
|
||||
PRIMARY KEY (member_card_id)
|
||||
PRIMARY KEY (member_card_id, scd2_start_time)
|
||||
);
|
||||
|
||||
COMMENT ON TABLE billiards_dwd.dim_member_card_account IS 'DWD 维度表:dim_member_card_account。ODS 来源表:billiards_ods.member_stored_value_cards(对应 JSON:member_stored_value_cards.json;分析:member_stored_value_cards-Analysis.md)。装载/清洗逻辑参考:etl_billiards/tasks/dwd_load_task.py(DwdLoadTask)。';
|
||||
@@ -538,7 +538,7 @@ CREATE TABLE IF NOT EXISTS dim_member_card_account_Ex (
|
||||
SCD2_end_time TIMESTAMPTZ,
|
||||
SCD2_is_current INT,
|
||||
SCD2_version INT,
|
||||
PRIMARY KEY (member_card_id)
|
||||
PRIMARY KEY (member_card_id, scd2_start_time)
|
||||
);
|
||||
|
||||
COMMENT ON TABLE billiards_dwd.dim_member_card_account_ex IS 'DWD 维度表(扩展字段表):dim_member_card_account_ex。ODS 来源表:billiards_ods.member_stored_value_cards(对应 JSON:member_stored_value_cards.json;分析:member_stored_value_cards-Analysis.md)。装载/清洗逻辑参考:etl_billiards/tasks/dwd_load_task.py(DwdLoadTask)。';
|
||||
@@ -619,7 +619,7 @@ CREATE TABLE IF NOT EXISTS dim_tenant_goods (
|
||||
SCD2_end_time TIMESTAMPTZ,
|
||||
SCD2_is_current INT,
|
||||
SCD2_version INT,
|
||||
PRIMARY KEY (tenant_goods_id)
|
||||
PRIMARY KEY (tenant_goods_id, scd2_start_time)
|
||||
);
|
||||
|
||||
COMMENT ON TABLE billiards_dwd.dim_tenant_goods IS 'DWD 维度表:dim_tenant_goods。ODS 来源表:billiards_ods.tenant_goods_master(对应 JSON:tenant_goods_master.json;分析:tenant_goods_master-Analysis.md)。装载/清洗逻辑参考:etl_billiards/tasks/dwd_load_task.py(DwdLoadTask)。';
|
||||
@@ -666,7 +666,7 @@ CREATE TABLE IF NOT EXISTS dim_tenant_goods_Ex (
|
||||
SCD2_end_time TIMESTAMPTZ,
|
||||
SCD2_is_current INT,
|
||||
SCD2_version INT,
|
||||
PRIMARY KEY (tenant_goods_id)
|
||||
PRIMARY KEY (tenant_goods_id, scd2_start_time)
|
||||
);
|
||||
|
||||
COMMENT ON TABLE billiards_dwd.dim_tenant_goods_ex IS 'DWD 维度表(扩展字段表):dim_tenant_goods_ex。ODS 来源表:billiards_ods.tenant_goods_master(对应 JSON:tenant_goods_master.json;分析:tenant_goods_master-Analysis.md)。装载/清洗逻辑参考:etl_billiards/tasks/dwd_load_task.py(DwdLoadTask)。';
|
||||
@@ -719,7 +719,7 @@ CREATE TABLE IF NOT EXISTS dim_store_goods (
|
||||
SCD2_end_time TIMESTAMPTZ,
|
||||
SCD2_is_current INT,
|
||||
SCD2_version INT,
|
||||
PRIMARY KEY (site_goods_id)
|
||||
PRIMARY KEY (site_goods_id, scd2_start_time)
|
||||
);
|
||||
|
||||
COMMENT ON TABLE billiards_dwd.dim_store_goods IS 'DWD 维度表:dim_store_goods。ODS 来源表:billiards_ods.store_goods_master(对应 JSON:store_goods_master.json;分析:store_goods_master-Analysis.md)。装载/清洗逻辑参考:etl_billiards/tasks/dwd_load_task.py(DwdLoadTask)。';
|
||||
@@ -780,7 +780,7 @@ CREATE TABLE IF NOT EXISTS dim_store_goods_Ex (
|
||||
SCD2_end_time TIMESTAMPTZ,
|
||||
SCD2_is_current INT,
|
||||
SCD2_version INT,
|
||||
PRIMARY KEY (site_goods_id)
|
||||
PRIMARY KEY (site_goods_id, scd2_start_time)
|
||||
);
|
||||
|
||||
COMMENT ON TABLE billiards_dwd.dim_store_goods_ex IS 'DWD 维度表(扩展字段表):dim_store_goods_ex。ODS 来源表:billiards_ods.store_goods_master(对应 JSON:store_goods_master.json;分析:store_goods_master-Analysis.md)。装载/清洗逻辑参考:etl_billiards/tasks/dwd_load_task.py(DwdLoadTask)。';
|
||||
@@ -833,7 +833,7 @@ CREATE TABLE IF NOT EXISTS dim_goods_category (
|
||||
SCD2_end_time TIMESTAMPTZ,
|
||||
SCD2_is_current INT,
|
||||
SCD2_version INT,
|
||||
PRIMARY KEY (category_id)
|
||||
PRIMARY KEY (category_id, scd2_start_time)
|
||||
);
|
||||
|
||||
COMMENT ON TABLE billiards_dwd.dim_goods_category IS 'DWD 维度表:dim_goods_category。ODS 来源表:billiards_ods.stock_goods_category_tree(对应 JSON:stock_goods_category_tree.json;分析:stock_goods_category_tree-Analysis.md)。装载/清洗逻辑参考:etl_billiards/tasks/dwd_load_task.py(DwdLoadTask)。';
|
||||
@@ -876,7 +876,7 @@ CREATE TABLE IF NOT EXISTS dim_groupbuy_package (
|
||||
SCD2_end_time TIMESTAMPTZ,
|
||||
SCD2_is_current INT,
|
||||
SCD2_version INT,
|
||||
PRIMARY KEY (groupbuy_package_id)
|
||||
PRIMARY KEY (groupbuy_package_id, scd2_start_time)
|
||||
);
|
||||
|
||||
COMMENT ON TABLE billiards_dwd.dim_groupbuy_package IS 'DWD 维度表:dim_groupbuy_package。ODS 来源表:billiards_ods.group_buy_packages(对应 JSON:group_buy_packages.json;分析:group_buy_packages-Analysis.md)。装载/清洗逻辑参考:etl_billiards/tasks/dwd_load_task.py(DwdLoadTask)。';
|
||||
@@ -927,7 +927,7 @@ CREATE TABLE IF NOT EXISTS dim_groupbuy_package_Ex (
|
||||
SCD2_end_time TIMESTAMPTZ,
|
||||
SCD2_is_current INT,
|
||||
SCD2_version INT,
|
||||
PRIMARY KEY (groupbuy_package_id)
|
||||
PRIMARY KEY (groupbuy_package_id, scd2_start_time)
|
||||
);
|
||||
|
||||
COMMENT ON TABLE billiards_dwd.dim_groupbuy_package_ex IS 'DWD 维度表(扩展字段表):dim_groupbuy_package_ex。ODS 来源表:billiards_ods.group_buy_packages(对应 JSON:group_buy_packages.json;分析:group_buy_packages-Analysis.md)。装载/清洗逻辑参考:etl_billiards/tasks/dwd_load_task.py(DwdLoadTask)。';
|
||||
|
||||
BIN
etl_billiards/dist/ETL_Manager/ETL_Manager.exe
vendored
BIN
etl_billiards/dist/ETL_Manager/ETL_Manager.exe
vendored
Binary file not shown.
BIN
etl_billiards/dist/ETL_Manager/_internal/LIBBZ2.dll
vendored
BIN
etl_billiards/dist/ETL_Manager/_internal/LIBBZ2.dll
vendored
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user