Return-Path: X-Original-To: apmail-drill-dev-archive@www.apache.org Delivered-To: apmail-drill-dev-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 545BF196E6 for ; Mon, 14 Mar 2016 06:52:34 +0000 (UTC) Received: (qmail 95071 invoked by uid 500); 14 Mar 2016 06:52:33 -0000 Delivered-To: apmail-drill-dev-archive@drill.apache.org Received: (qmail 95007 invoked by uid 500); 14 Mar 2016 06:52:33 -0000 Mailing-List: contact dev-help@drill.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@drill.apache.org Delivered-To: mailing list dev@drill.apache.org Received: (qmail 94992 invoked by uid 99); 14 Mar 2016 06:52:33 -0000 Received: from arcas.apache.org (HELO arcas) (140.211.11.28) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 14 Mar 2016 06:52:33 +0000 Received: from arcas.apache.org (localhost [127.0.0.1]) by arcas (Postfix) with ESMTP id 6B84E2C1F54 for ; Mon, 14 Mar 2016 06:52:33 +0000 (UTC) Date: Mon, 14 Mar 2016 06:52:33 +0000 (UTC) From: "Ian Hellstrom (JIRA)" To: dev@drill.apache.org Message-ID: In-Reply-To: References: Subject: [jira] [Created] (DRILL-4506) Allow substitution variables in SQL scripts MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-JIRA-FingerPrint: 30527f35849b9dde25b450d4833f0394 Ian Hellstrom created DRILL-4506: ------------------------------------ Summary: Allow substitution variables in SQL scripts Key: DRILL-4506 URL: https://issues.apache.org/jira/browse/DRILL-4506 Project: Apache Drill Issue Type: Bug Components: SQL Parser Reporter: Ian Hellstrom It would be great if substitution variables could be created =C3=A0 la SQL*= Plus in scripts. This would be especially helpful when objects need to be (= re-)created from scratch (i.e. in testing), and they share e.g. workspaces,= which have to be hard-coded otherwise. The following is a rough idea (based on SQL*Plus syntax): {code} IN_LOCATION=3Dhdfs.project OUT_LOCATION=3Dhdfs.storage CREATE VIEW &OUT_LOCATION.view_name AS SELECT * FROM &IN_LOCATION.table_name; {code} For a first implementation, it would be best to have simply substitution va= riables and not allow computations to be done, although it is conceivable t= hat that would be a second step. -- This message was sent by Atlassian JIRA (v6.3.4#6332)