1
1

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

Workato:Pythonコネクタの制限事項

Posted at

はじめに

WorkatoにはPython, JavaScript, Rubyといった様々なローコードコネクタが提供されています。これらのコネクタを利用することで、Workatoコネクタのアクションとして提供されていない処理を、ユーザーサイドで使い慣れた言語を利用して実装することができます。

なお、これらのコネクタで実装したコードを実行する際は、次の制限事項に注意する必要があります。以下では、Pythonコネクタの制限について、補足を含めた形で記載します。

なお、Pythonに依存するライブラリ(モジュール)以外の内容について(特にメモリ周り)は、他のコネクタでも同様の制限は生じる可能性があります。このため、他のコネクタを利用する際もこれらの点を意識しながら開発を進められることをお勧めします。

制限事項

  • PDF files processed with the pypdf library must not exceed 35MB.
    pypdfでPDFを処理する場合は、35MBを超えてはならない。これを超えた場合はメモリ不足によるエラーで処理は中断する可能性がある。

  • Scripts must not exceed 1MB. Larger scripts may cause memory issues.
    スクリプトは1MBを超えてはならない、超えた場合はメモリの問題が発生する可能性がある。

    なお、Workatoに限らず1MBを超えるコードをWebブラウザ上のフォームフィールドにセットするとWebブラウザがクラッシュしたり動作が不安定となる恐れがあるため、あまり長すぎるコードの処理は推奨しない。もしコードの規模が大きい場合は、AWS Lambdaの利用を推奨したい。(PythonやRubyではこの上限を超える可能性は低いと思われるが、JavaScriptの場合はWebpackなどのバンドラーで1ファイルにまとめた際はこの上限に達する可能性があるため、特にJavaScriptで開発する際は注意が必要)

  • Python snippets are limited to 256MB of total memory, including libraries, temporary memory, and inputs.
    Pythonコネクタは256MBのメモリ上限がある(コード以外も含めて)。

  • CSV files processed with the Pandas library must not exceed 20MB. This limit accounts for Pandas’ temporary storage requirements.
    CSVファイルをPandasで処理する場合のファイルサイズの上限は20MB(これを超えてはならない)。これを超えた場合はメモリ不足によりエラーで処理が中断する可能性がある。

  • Excel files processed with the Pandas library must not exceed 5MB. Uncompressing Excel files requires additional memory.
    ExcelファイルをPandasで処理する場合のファイルサイズの上限は5MB(これを超えてはならない)。これを超えた場合はメモリ不足によりエラーで処理が中断する可能性がある。

    なお、PandasはExcelファイルを処理する際にopenpyxlを利用するため、openpyxlを利用する際も同様の制限が発生する。

    特に、openpyxlはファイルサイズに対して50倍のメモリを消費する点に注意が必要
    ※以下openpyxlのドキュメントより
    Memory use is fairly high in comparison with other libraries and applications and is approximately 50 times the original file size, e.g. 2.5 GB for a 50 MB Excel file. As many use cases involve either only reading or writing files, the Optimised Modes modes mean this is less of a problem.

  • Actions time out after 90 seconds.
    アクションの実行時間は最大90秒、これを超えた場合処理は中断(タイムアウト)する。

  • User-provided libraries are not supported.
    ユーザー側でライブラリを追加することはできない。
    (非公式ではあるが、以下の手順でユーザー側でライブラリを追加することは可能、しかし公式にはサポートしていないのと、今後利用不可となる可能性もあるため注意が必要)

参考

1
1
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
1
1

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?