This commit is contained in:
尹舟 2025-05-15 16:23:16 +08:00
parent 767d298af9
commit 48e5220ec5
3 changed files with 6 additions and 6 deletions

BIN
templates/favicon.ico Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 18 KiB

View File

@ -118,10 +118,10 @@
<a href="/"> <a href="/">
<img src="https://yinzhou.oss-cn-shanghai.aliyuncs.com/image/bianmu.png" width="50" height="50"> <img src="https://yinzhou.oss-cn-shanghai.aliyuncs.com/image/bianmu.png" width="50" height="50">
</a> </a>
<a href="/a"> <a href="/">
<img src="https://yinzhou.oss-cn-shanghai.aliyuncs.com/image/buoumao.png" width="50" height="50"> <img src="https://yinzhou.oss-cn-shanghai.aliyuncs.com/image/buoumao.png" width="50" height="50">
</a> </a>
<a href="/b"> <a href="/">
<img src="https://yinzhou.oss-cn-shanghai.aliyuncs.com/image/chaiquan.png" width="50" height="50"> <img src="https://yinzhou.oss-cn-shanghai.aliyuncs.com/image/chaiquan.png" width="50" height="50">
</a> </a>
<header><h1>SQL格式化工具</h1></header> <header><h1>SQL格式化工具</h1></header>
@ -132,10 +132,10 @@
</div> </div>
<div class="buttons"> <div class="buttons">
<button @click="insertSample" title="插入示例语句">示例</button>
<button @click="clearInput" title="清空输入框">清空</button> <button @click="clearInput" title="清空输入框">清空</button>
<button @click="formatSQL" :disabled="isProcessing">格式化</button> <button @click="formatSQL" :disabled="isProcessing">格式化</button>
<button @click="copyToClipboard">复制</button> <button @click="copyToClipboard">复制</button>
<button @click="insertSample" title="插入示例语句">示例</button>
</div> </div>
<div class="status-message" :class="statusClass">{{ statusMessage }}</div> <div class="status-message" :class="statusClass">{{ statusMessage }}</div>
@ -150,7 +150,7 @@
const {createApp, ref, onMounted, computed} = Vue; const {createApp, ref, onMounted, computed} = Vue;
const API_CONFIG = { const API_CONFIG = {
ENDPOINT: 'http://localhost:8778/convert', ENDPOINT: '/convert',
DEFAULT_HEADERS: { DEFAULT_HEADERS: {
'Content-Type': 'application/x-www-form-urlencoded' 'Content-Type': 'application/x-www-form-urlencoded'
}, },

View File

@ -5,13 +5,13 @@ from sqlglot.expressions import ColumnDef
def odps(schema, table_name, columns, colmapping, hologres_connection): def odps(schema, table_name, columns, colmapping, hologres_connection):
odps_sql = f''' odps_sql = f'''
CREATE EXTERNAL TABLE IF NOT EXISTS {table_name} CREATE EXTERNAL TABLE IF NOT EXISTS {table_name}_hologres
( (
{columns} {columns}
) )
STORED BY 'com.aliyun.odps.jdbc.JdbcStorageHandler' STORED BY 'com.aliyun.odps.jdbc.JdbcStorageHandler'
-- ip设置成经典网络ip 加Schema 加表名 -- ip设置成经典网络ip 加Schema 加表名
location 'jdbc:postgresql://hgprecn-cn-i7m2ssubq004-cn-hangzhou-internal.hologres.aliyuncs.com:80/sdk_statis?ApplicationName=MaxCompute&currentSchema={schema}&preferQueryMode=simple&useSSL=false&table={table_name}/' location 'jdbc:postgresql://hgprecn-cn-i7m2ssubq004-cn-hangzhou-internal.hologres.aliyuncs.com:80/sdk_statis?ApplicationName=MaxCompute&currentSchema={schema}&useSSL=false&table={table_name}/'
TBLPROPERTIES ( TBLPROPERTIES (
'mcfed.mapreduce.jdbc.driver.class'='org.postgresql.Driver', 'mcfed.mapreduce.jdbc.driver.class'='org.postgresql.Driver',
'odps.federation.jdbc.target.db.type'='holo', 'odps.federation.jdbc.target.db.type'='holo',