検索

質問
· 2021年9月14日

Looking for Example of How to Use %SQL.Export.Mgr Export Method

https://docs.intersystems.com/irislatest/csp/documatic/%25CSP.Documatic....

 

method Export(savertn As %Boolean = 0) [ Language = objectscript ]

 

I am looking to export table to a text file in a programmatic way. I am not familiar with this class and how to invoke a "savertn" as input here.

 

Essentially I would like to Export Table (SELECT * FROM Table) and save it as a text file locally on Linux server. Is there any examples out there of that? Perhaps I need to save the query output to a global and then pass that input to the export?

 

Thanks,

James

2 Comments
ディスカッション (2)0
続けるにはログインするか新規登録を行ってください
質問
· 2021年9月13日

SQL - use specific index

Hello Community,

we want to use a specific index on our sql-class.

The index we want to use is called "iFilter".
Currently we use the following technique of ignoring all other indices because the automatically chosen index is always too slow. 

SELECT TOP 100 d0.ID FROM %IGNOREINDEX Belegindex %IGNOREINDEX KundenNrGlobalindex %IGNOREINDEX Rechnungsnummerindex %IGNOREINDEX Erfassungsartindex %IGNOREINDEX Belegsuche %IGNOREINDEX DatumAuftragindex %IGNOREINDEX OnlineBestellnummerindex %IGNOREINDEX Belegnummerindex %IGNOREINDEX KundenNrGlobalindex %IGNOREINDEX VAMindex %IGNOREINDEX BelegnummerbeiLagerLagerBestellungIndex %IGNOREINDEX iStatusSolr db.BelegeKopf AS d0 WHERE (((d0.KundenNr = 'BUKR01')) AND d0.ErfassungsartBez IN ('AB', 'AN') AND d0.DatumAuftrag >= '2020')

Do you know of a better/shorter way to resolve this?

 

Best regards.

Florian Hansmann

3 Comments
ディスカッション (3)0
続けるにはログインするか新規登録を行ってください
質問
· 2021年9月13日

怎么获取Caché的CDC数据?

1.Caché数据库有没有办法配置然后用sql读取数据库实时变化的数据,类似于mssql那样?我看了可以写类去读取global获取journal的值,但是怎么用sql读呢?

2.不行的话,那用什么方式可以读取到journal日志文件,并输出日志文件的内容?

先谢谢大家了!!!

8 Comments
ディスカッション (8)1
続けるにはログインするか新規登録を行ってください
記事
· 2021年9月9日 2m read

RESTでクロスドメイン制約を回避する方法

これは InterSystems FAQ サイトの記事です。
 

2025.1以降CORS関連の設定方法は大きく変わっています。

詳細は、以下の記事を参照してください。

jQueryを使用してIRISからJSONデータを取得する方法

 

%CSP.REST クラスを継承する REST 用ディスパッチクラスで REST を実装している場合は、クロスドメイン制約回避用に用意されたパラメータ HandleCorsRequest を利用します。

設定方法は以下の通りです。

REST 用ディスパッチクラスをスタジオで修正する場合は、
[クラス] > [リファクタ] > [オーバーライド] を開き、[パラメータ]タブを選択 > [HandleCorsRequest] を選択後OKボタンを押下します。

 

以下の定義が追加されるので、1を設定します。

 

Parameter HandleCorsRequest=1;

REST ディスパッチクラスを Atelier で修正する場合は、オーバーライドメニューの用意がないため、パラメータの定義を追加するか、%CSP.REST クラスを開き、HandleCorsRequest の定義をコピーし修正します。

パラメータ:HandleCorsRequest 他に、REST 用ディスパッチクラスに用意する URL マップ(URL に対応するメソッドのマップ定義)の Route 要素毎に Cors 属性を true に設定する方法でも回避できます。
メモ:Cors 属性はデフォルトでは false が設定されています。

XData UrlMap
{
<Routes>
<Route Url="/persons/:keyword" Method="GET" Call="REST.Person:getperson" Cors="true" />
<Route Url="/persons2/" Method="POST" Call="REST.Person:getperson2"/>
Routes>
}

設定詳細については以下ドキュメントをご参照ください。


CORS使用のためのRESTサービスの構成について【IRIS】

CORS使用のためのRESTサービスの構成について

 

コードサンプルについては、関連トピックをご参照ください。

JQueryでデータをJSON形式で取得する方法

ディスカッション (0)1
続けるにはログインするか新規登録を行ってください
お知らせ
· 2021年9月8日

Video: Deploying & Upgrading IRIS with Kubernetes Operator

Hey Developers,

New video is already on InterSystems Developers YouTube:

⏯ Deploying & Upgrading IRIS with Kubernetes Operator

Extend your Kubernetes instance with the InterSystems Kubernetes Operator and learn the easiest way to deploy, upgrade, and expand your InterSystems IRIS data platform instance.

🗣 Presenter: @Steve Lubars, Distinguished Systems Developer, InterSystems 

Stay tuned!

ディスカッション (0)0
続けるにはログインするか新規登録を行ってください