From issues-return-86785-archive-asf-public=cust-asf.ponee.io@nifi.apache.org Wed Oct 16 20:38:02 2019 Return-Path: X-Original-To: archive-asf-public@cust-asf.ponee.io Delivered-To: archive-asf-public@cust-asf.ponee.io Received: from mail.apache.org (hermes.apache.org [207.244.88.153]) by mx-eu-01.ponee.io (Postfix) with SMTP id 2774118067C for ; Wed, 16 Oct 2019 22:38:02 +0200 (CEST) Received: (qmail 61635 invoked by uid 500); 16 Oct 2019 20:38:01 -0000 Mailing-List: contact issues-help@nifi.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@nifi.apache.org Delivered-To: mailing list issues@nifi.apache.org Received: (qmail 61608 invoked by uid 99); 16 Oct 2019 20:38:01 -0000 Received: from mailrelay1-us-west.apache.org (HELO mailrelay1-us-west.apache.org) (209.188.14.139) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 16 Oct 2019 20:38:01 +0000 Received: from jira-he-de.apache.org (static.172.67.40.188.clients.your-server.de [188.40.67.172]) by mailrelay1-us-west.apache.org (ASF Mail Server at mailrelay1-us-west.apache.org) with ESMTP id BC897E30C8 for ; Wed, 16 Oct 2019 20:38:00 +0000 (UTC) Received: from jira-he-de.apache.org (localhost.localdomain [127.0.0.1]) by jira-he-de.apache.org (ASF Mail Server at jira-he-de.apache.org) with ESMTP id 3CB18780486 for ; Wed, 16 Oct 2019 20:38:00 +0000 (UTC) Date: Wed, 16 Oct 2019 20:38:00 +0000 (UTC) From: "Andy LoPresto (Jira)" To: issues@nifi.apache.org Message-ID: In-Reply-To: References: Subject: [jira] [Created] (NIFI-6782) Create EL function for repeating a string MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-JIRA-FingerPrint: 30527f35849b9dde25b450d4833f0394 Andy LoPresto created NIFI-6782: ----------------------------------- Summary: Create EL function for repeating a string Key: NIFI-6782 URL: https://issues.apache.org/jira/browse/NIFI-6782 Project: Apache NiFi Issue Type: New Feature Components: Extensions Affects Versions: 1.9.2 Reporter: Andy LoPresto Assignee: Matt Burgess As per a discussion with [~mattyb149], an Expression Language function which allowed for a number of repetitions of a string would be useful for generating arbitrary random text in a {{GenerateFlowFile}} processor. The usage would be: {code} ${"some string here":repeat(4)} # repeats the literal string 4 times ${literal("this_is_also_an_attribute_name"):repeat(3)} # repeats the literal string 3 times ${my_string_attr:repeat(5)} # repeats the value in the attribute 5 times ${"explicit string":repeat(random():mod(10):plus(1))} # repeats the string between 1 and 10 times {code} If it's easy to implement, I think a multiple parameter option would also be convenient, but it is not a requirement: {code} ${"explicit string":repeat(random():mod(10):plus(1))} # repeats the string between 1 and 10 times ${"explicit string":repeat(1, 10)} # identical behavior to above {code} -- This message was sent by Atlassian Jira (v8.3.4#803005)