Problem
You want to use a block that has been pre-built. These are blocks that have been built by Razorthink, or its partners, blocks that you have downloaded from the market place, or others that you have custom built.
Solution
You need to be able to do multiple tasks to be able to easily use pre-built blocks, specifically:
- List available blocks filtered on descriptions, tags, authors etc.
- Review the block documentation
- Import and use a block
# list all blocks split strings razor.blocks().filter(contains("description:","split")) # list all blocks from marketplace split strings razor.marketplace().blocks().filter(contains("description:","split")) # list all blocks written by an author razor.blocks().filter(equals("author","sandeep")) # install a block from the marketplace to local blk = razor.marketplace().blocks("7891232945") blk.download() # describe a local block razor.blocks("7891232945").describe() # use the block to split a string import SplitString from razor.blocks.transformers # inputs can also be specified as class parameters during instantiation split_string = SplitString(delimiter='/', texts=['1/1/2000', '2/1/2000', '3/1/2000']) result = split_string.execute() list(result)
Discussion
Pre-built blocks are available for all types of processing that you might need, from data processing to ML/DL algorithms. Once you familiarize yourself with the structure, you can put rapidly put together a pipeline and address a wide variety of use cases simply and effectively.
It is also possible to build your own inventory of blocks that are shared across the organization. The following quick video provides an introduction to providing your own pre-built blocks.