asterixdb-notifications mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Xikui Wang (Code Review)" <do-not-re...@asterixdb.incubator.apache.org>
Subject Change in asterixdb[master]: [WIP][ING] Replace key-value configuration in feed with record
Date Fri, 08 Dec 2017 06:26:00 GMT
Xikui Wang has uploaded a new change for review.

  https://asterix-gerrit.ics.uci.edu/2209

Change subject: [WIP][ING] Replace key-value configuration in feed with record
......................................................................

[WIP][ING] Replace key-value configuration in feed with record

- user model changes: no
- storage format changes: no
- interface changes: no

Details:
TBA

Change-Id: I2dfb0fdf74d28ae0c45dafcf6babb624bd8b2149
---
M asterixdb/asterix-algebra/src/main/java/org/apache/asterix/optimizer/rules/UnnestToDataScanRule.java
M asterixdb/asterix-app/src/main/java/org/apache/asterix/app/translator/QueryTranslator.java
M asterixdb/asterix-app/src/main/java/org/apache/asterix/utils/FeedOperations.java
M asterixdb/asterix-app/src/test/resources/runtimets/queries/big-object/big_object_feed_20M/big_object_feed_20M.1.ddl.aql
M asterixdb/asterix-app/src/test/resources/runtimets/queries/dml/scan-delete-btree-correlated-secondary-index-nullable/scan-delete-btree-correlated-secondary-index-nullable.1.ddl.aql
M asterixdb/asterix-app/src/test/resources/runtimets/queries/dml/using-correlated-prefix-merge-policy-with-feed/using-correlated-prefix-merge-policy-with-feed.1.ddl.aql
M asterixdb/asterix-app/src/test/resources/runtimets/queries/feeds/change-feed-with-meta-csv/change-feed-with-meta-csv.1.ddl.aql
M asterixdb/asterix-app/src/test/resources/runtimets/queries/feeds/change-feed-with-meta-open-index-in-meta/change-feed-with-meta-open-index-in-meta.1.ddl.aql
M asterixdb/asterix-app/src/test/resources/runtimets/queries/feeds/change-feed-with-meta-pk-in-meta-index-after-ingest/change-feed-with-meta-pk-in-meta-index-after-ingest.1.ddl.aql
M asterixdb/asterix-app/src/test/resources/runtimets/queries/feeds/change-feed-with-meta-pk-in-meta-index-in-meta/change-feed-with-meta-pk-in-meta-index-in-meta.1.ddl.aql
M asterixdb/asterix-app/src/test/resources/runtimets/queries/feeds/change-feed-with-meta-pk-in-meta-index-with-missing-after-ingest/change-feed-with-meta-pk-in-meta-index-with-missing-after-ingest.1.ddl.aql
M asterixdb/asterix-app/src/test/resources/runtimets/queries/feeds/change-feed-with-meta-pk-in-meta-open-index-in-value/change-feed-with-meta-pk-in-meta-open-index-in-value.1.ddl.aql
M asterixdb/asterix-app/src/test/resources/runtimets/queries/feeds/change-feed-with-meta-pk-in-meta-open-index-with-missing/change-feed-with-meta-pk-in-meta-open-index-with-missing.1.ddl.aql
M asterixdb/asterix-app/src/test/resources/runtimets/queries/feeds/change-feed-with-meta-pk-in-meta/change-feed-with-meta-pk-in-meta.1.ddl.aql
M asterixdb/asterix-app/src/test/resources/runtimets/queries/feeds/change-feed-with-meta-with-mixed-index/change-feed-with-meta-with-mixed-index.1.ddl.aql
M asterixdb/asterix-app/src/test/resources/runtimets/queries/feeds/change-feed/change-feed.1.ddl.aql
M asterixdb/asterix-app/src/test/resources/runtimets/queries/feeds/connect-feed-with-function/connect-feed-with-function.1.ddl.aql
M asterixdb/asterix-app/src/test/resources/runtimets/queries/feeds/connect-feed/connect-feed.0.ddl.aql
M asterixdb/asterix-app/src/test/resources/runtimets/queries/feeds/connect-live-feed/connect-live-feed.0.ddl.aql
M asterixdb/asterix-app/src/test/resources/runtimets/queries/feeds/create-feed-with-policy/create-feed-with-policy.1.ddl.aql
M asterixdb/asterix-app/src/test/resources/runtimets/queries/feeds/disconnect-live-feed/disconnect-live-feed.0.ddl.aql
M asterixdb/asterix-app/src/test/resources/runtimets/queries/feeds/drop-dataverse-with-disconnected-feed/drop-dataverse-with-disconnected-feed.1.ddl.aql
M asterixdb/asterix-app/src/test/resources/runtimets/queries/feeds/drop-dataverse-with-function-used-by-feed/drop-dataverse-with-function-used-by-feed.2.ddl.aql
M asterixdb/asterix-app/src/test/resources/runtimets/queries/feeds/drop-function-no-longer-used-by-feed/drop-function-no-longer-used-by-feed.1.ddl.aql
M asterixdb/asterix-app/src/test/resources/runtimets/queries/feeds/drop-function-used-by-feed/drop-function-used-by-feed.1.ddl.aql
M asterixdb/asterix-app/src/test/resources/runtimets/queries/feeds/feed-push-socket/feed-push-socket.1.ddl.aql
M asterixdb/asterix-app/src/test/resources/runtimets/queries/feeds/feed-with-external-function/feed-with-external-function.1.ddl.aql
M asterixdb/asterix-app/src/test/resources/runtimets/queries/feeds/feed-with-external-parser-with-open-index/feed-with-external-parser-with-open-index.3.ddl.aql
M asterixdb/asterix-app/src/test/resources/runtimets/queries/feeds/feed-with-external-parser-with-two-open-indexes/feed-with-external-parser-with-two-open-indexes.3.ddl.aql
M asterixdb/asterix-app/src/test/resources/runtimets/queries/feeds/feed-with-external-parser/feed-with-external-parser.3.ddl.aql
M asterixdb/asterix-app/src/test/resources/runtimets/queries/feeds/feed-with-filtered-dataset/feed-with-filtered-dataset.1.ddl.aql
M asterixdb/asterix-app/src/test/resources/runtimets/queries/feeds/feed-with-meta-pk-in-meta/feed-with-meta-pk-in-meta.1.ddl.aql
M asterixdb/asterix-app/src/test/resources/runtimets/queries/feeds/feed-with-multiple-indexes/feed-with-multiple-indexes.3.ddl.aql
M asterixdb/asterix-app/src/test/resources/runtimets/queries/feeds/feed-with-undefined-function/feed-with-undefined-function.1.ddl.aql
M asterixdb/asterix-app/src/test/resources/runtimets/queries/feeds/feeds_01/feeds_01.1.ddl.aql
M asterixdb/asterix-app/src/test/resources/runtimets/queries/feeds/feeds_02/feeds_02.1.ddl.aql
M asterixdb/asterix-app/src/test/resources/runtimets/queries/feeds/feeds_03/feeds_03.1.ddl.aql
M asterixdb/asterix-app/src/test/resources/runtimets/queries/feeds/feeds_07/feeds_07.1.ddl.aql
M asterixdb/asterix-app/src/test/resources/runtimets/queries/feeds/feeds_08/feeds_08.1.ddl.aql
M asterixdb/asterix-app/src/test/resources/runtimets/queries/feeds/feeds_09/feeds_09.1.ddl.aql
M asterixdb/asterix-app/src/test/resources/runtimets/queries/feeds/feeds_10/feeds_10.1.ddl.aql
M asterixdb/asterix-app/src/test/resources/runtimets/queries/feeds/feeds_11/feeds_11.1.ddl.aql
M asterixdb/asterix-app/src/test/resources/runtimets/queries/feeds/feeds_12/feeds_12.1.ddl.aql
M asterixdb/asterix-app/src/test/resources/runtimets/queries/feeds/insert-feed/insert-feed.1.ddl.aql
M asterixdb/asterix-app/src/test/resources/runtimets/queries/feeds/issue_230_feeds/issue_230_feeds.1.ddl.aql
M asterixdb/asterix-app/src/test/resources/runtimets/queries/feeds/push-socket-with-auuid/push-socket-with-auuid.1.ddl.aql
M asterixdb/asterix-app/src/test/resources/runtimets/queries/feeds/record-reader-with-malformed-input-stream/record-reader-with-malformed-input-stream.1.ddl.aql
M asterixdb/asterix-app/src/test/resources/runtimets/queries/feeds/revised-tweet-parser/revised-tweet-parser.1.ddl.aql
M asterixdb/asterix-app/src/test/resources/runtimets/queries/feeds/start-feed/start-feed.1.ddl.aql
M asterixdb/asterix-app/src/test/resources/runtimets/queries/feeds/start-started-feed/start-started-feed.0.ddl.aql
M asterixdb/asterix-app/src/test/resources/runtimets/queries/feeds/stop-stopped-feed/stop-stopped-feed.0.ddl.aql
M asterixdb/asterix-app/src/test/resources/runtimets/queries/feeds/twitter-feed/twitter-feed.1.ddl.aql
M asterixdb/asterix-app/src/test/resources/runtimets/queries/filters/delete/delete.1.ddl.aql
M asterixdb/asterix-app/src/test/resources/runtimets/queries/filters/upsert/upsert.1.ddl.aql
M asterixdb/asterix-app/src/test/resources/runtimets/queries/hints/issue_251_dataset_hint_7/issue_251_dataset_hint_7.1.ddl.aql
M asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/dml/scan-delete-btree-correlated-secondary-index-nullable/scan-delete-btree-correlated-secondary-index-nullable.1.ddl.sqlpp
M asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/dml/scan-delete-inverted-index-ngram-correlated-secondary-index-nullable/scan-delete-inverted-index-ngram-correlated-secondary-index-nullable.1.ddl.sqlpp
M asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/dml/scan-delete-inverted-index-ngram-correlated-secondary-index/scan-delete-inverted-index-ngram-correlated-secondary-index.1.ddl.sqlpp
M asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/dml/scan-delete-inverted-index-word-correlated-secondary-index-nullable/scan-delete-inverted-index-word-correlated-secondary-index-nullable.1.ddl.sqlpp
M asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/dml/scan-delete-inverted-index-word-correlated-secondary-index/scan-delete-inverted-index-word-correlated-secondary-index.1.ddl.sqlpp
M asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/dml/scan-delete-rtree-correlated-secondary-index-nullable/scan-delete-rtree-correlated-secondary-index-nullable.1.ddl.sqlpp
M asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/dml/scan-delete-rtree-correlated-secondary-index/scan-delete-rtree-correlated-secondary-index.1.ddl.sqlpp
M asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/dml/scan-insert-rtree-correlated-secondary-index-nullable/scan-insert-rtree-correlated-secondary-index-nullable.1.ddl.sqlpp
M asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/dml/scan-insert-rtree-correlated-secondary-index-open/scan-insert-rtree-correlated-secondary-index-open.1.ddl.sqlpp
M asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/dml/scan-insert-rtree-correlated-secondary-index/scan-insert-rtree-correlated-secondary-index.1.ddl.sqlpp
M asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/dml/using-correlated-prefix-merge-policy-with-feed/using-correlated-prefix-merge-policy-with-feed.1.ddl.sqlpp
M asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/external-library/return_invalid_type/return_invalid_type.1.ddl.sqlpp
M asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/feeds/connect-feed-with-function/connect-feed-with-function.1.ddl.sqlpp
M asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/feeds/feed-with-external-function/feed-with-external-function.1.ddl.sqlpp
M asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/feeds/feeds_01/feeds_01.1.ddl.sqlpp
M asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/feeds/feeds_02/feeds_02.1.ddl.sqlpp
M asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/feeds/feeds_03/feeds_03.1.ddl.sqlpp
M asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/feeds/feeds_07/feeds_07.1.ddl.sqlpp
M asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/feeds/feeds_08/feeds_08.1.ddl.sqlpp
M asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/feeds/feeds_09/feeds_09.1.ddl.sqlpp
M asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/feeds/feeds_10/feeds_10.1.ddl.sqlpp
M asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/feeds/feeds_11/feeds_11.1.ddl.sqlpp
M asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/feeds/feeds_12/feeds_12.1.ddl.sqlpp
M asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/feeds/insert-feed/insert-feed.1.ddl.sqlpp
M asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/feeds/issue_230_feeds/issue_230_feeds.1.ddl.sqlpp
M asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/filters/delete/delete.1.ddl.sqlpp
M asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/filters/upsert/upsert.1.ddl.sqlpp
M asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/hints/issue_251_dataset_hint_7/issue_251_dataset_hint_7.1.ddl.sqlpp
M asterixdb/asterix-app/src/test/resources/runtimets/results/feeds/feeds_01/feeds_01.1.adm
M asterixdb/asterix-external-data/src/main/java/org/apache/asterix/external/adapter/factory/GenericAdapterFactory.java
M asterixdb/asterix-external-data/src/main/java/org/apache/asterix/external/feed/api/IFeed.java
M asterixdb/asterix-external-data/src/main/java/org/apache/asterix/external/operators/FeedIntakeOperatorDescriptor.java
M asterixdb/asterix-external-data/src/main/java/org/apache/asterix/external/util/ExternalDataConstants.java
M asterixdb/asterix-external-data/src/main/java/org/apache/asterix/external/util/ExternalDataUtils.java
M asterixdb/asterix-lang-aql/src/main/javacc/AQL.jj
M asterixdb/asterix-lang-common/src/main/java/org/apache/asterix/lang/common/statement/CreateFeedStatement.java
M asterixdb/asterix-lang-common/src/main/java/org/apache/asterix/lang/common/visitor/FormatPrintVisitor.java
M asterixdb/asterix-lang-sqlpp/src/main/javacc/SQLPP.jj
M asterixdb/asterix-metadata/src/main/java/org/apache/asterix/metadata/MetadataTransactionContext.java
M asterixdb/asterix-metadata/src/main/java/org/apache/asterix/metadata/bootstrap/MetadataRecordTypes.java
M asterixdb/asterix-metadata/src/main/java/org/apache/asterix/metadata/declared/MetadataProvider.java
M asterixdb/asterix-metadata/src/main/java/org/apache/asterix/metadata/entities/Feed.java
M asterixdb/asterix-metadata/src/main/java/org/apache/asterix/metadata/entitytupletranslators/FeedTupleTranslator.java
M asterixdb/asterix-metadata/src/main/java/org/apache/asterix/metadata/feeds/FeedMetadataUtil.java
99 files changed, 797 insertions(+), 712 deletions(-)


  git pull ssh://asterix-gerrit.ics.uci.edu:29418/asterixdb refs/changes/09/2209/1

diff --git a/asterixdb/asterix-algebra/src/main/java/org/apache/asterix/optimizer/rules/UnnestToDataScanRule.java b/asterixdb/asterix-algebra/src/main/java/org/apache/asterix/optimizer/rules/UnnestToDataScanRule.java
index 4550ba6..04ade95 100644
--- a/asterixdb/asterix-algebra/src/main/java/org/apache/asterix/optimizer/rules/UnnestToDataScanRule.java
+++ b/asterixdb/asterix-algebra/src/main/java/org/apache/asterix/optimizer/rules/UnnestToDataScanRule.java
@@ -219,7 +219,7 @@
         ARecordType metaType = null;
         // Does dataset have meta?
         if (dataset.hasMetaPart()) {
-            String metaTypeName = FeedUtils.getFeedMetaTypeName(sourceFeed.getAdapterConfiguration());
+            String metaTypeName = FeedUtils.getFeedMetaTypeName(sourceFeed.getFeedConfiguration());
             if (metaTypeName == null) {
                 throw new AlgebricksException("Feed to a dataset with metadata doesn't have meta type specified");
             }
@@ -236,7 +236,7 @@
         List<Integer> keySourceIndicator = null;
         List<Mutable<ILogicalExpression>> keyAccessExpression = null;
         List<ScalarFunctionCallExpression> keyAccessScalarFunctionCallExpression;
-        if (ExternalDataUtils.isChangeFeed(sourceFeed.getAdapterConfiguration())) {
+        if (ExternalDataUtils.isChangeFeed(sourceFeed.getFeedConfiguration())) {
             keyAccessExpression = new ArrayList<>();
             keyAccessScalarFunctionCallExpression = new ArrayList<>();
             pkTypes = ((InternalDatasetDetails) dataset.getDatasetDetails()).getPrimaryKeyType();
diff --git a/asterixdb/asterix-app/src/main/java/org/apache/asterix/app/translator/QueryTranslator.java b/asterixdb/asterix-app/src/main/java/org/apache/asterix/app/translator/QueryTranslator.java
index 6976507..d5f6981 100644
--- a/asterixdb/asterix-app/src/main/java/org/apache/asterix/app/translator/QueryTranslator.java
+++ b/asterixdb/asterix-app/src/main/java/org/apache/asterix/app/translator/QueryTranslator.java
@@ -1931,7 +1931,7 @@
         metadataProvider.setMetadataTxnContext(mdTxnCtx);
         MetadataLockUtil.createFeedBegin(lockManager, metadataProvider.getLocks(), dataverseName,
                 dataverseName + "." + feedName);
-        Feed feed = null;
+        Feed feed;
         try {
             feed = MetadataManager.INSTANCE.getFeed(metadataProvider.getMetadataTxnContext(), dataverseName, feedName);
             if (feed != null) {
@@ -1942,8 +1942,7 @@
                     throw new AlgebricksException("A feed with this name " + feedName + " already exists.");
                 }
             }
-            String adaptorName = cfs.getAdaptorName();
-            feed = new Feed(dataverseName, feedName, adaptorName, cfs.getAdaptorConfiguration());
+            feed = new Feed(dataverseName, feedName, cfs.getFeedConfigurations());
             FeedMetadataUtil.validateFeed(feed, mdTxnCtx, appCtx);
             MetadataManager.INSTANCE.addFeed(metadataProvider.getMetadataTxnContext(), feed);
             MetadataManager.INSTANCE.commitTransaction(mdTxnCtx);
@@ -2194,8 +2193,8 @@
             if (listener != null && listener.isActive()) {
                 throw new CompilationException(ErrorCode.FEED_CHANGE_FEED_CONNECTIVITY_ON_ALIVE_FEED, feedName);
             }
-            ARecordType outputType = FeedMetadataUtil.getOutputType(feed, feed.getAdapterConfiguration(),
-                    ExternalDataConstants.KEY_TYPE_NAME);
+            ARecordType outputType = FeedMetadataUtil.getOutputType(feed,
+                    feed.getFeedConfiguration().get(ExternalDataConstants.KEY_TYPE_NAME));
             List<FunctionSignature> appliedFunctions = cfs.getAppliedFunctions();
             for (FunctionSignature func : appliedFunctions) {
                 if (MetadataManager.INSTANCE.getFunction(mdTxnCtx, func) == null) {
diff --git a/asterixdb/asterix-app/src/main/java/org/apache/asterix/utils/FeedOperations.java b/asterixdb/asterix-app/src/main/java/org/apache/asterix/utils/FeedOperations.java
index 9dddda4..33ed6dd 100644
--- a/asterixdb/asterix-app/src/main/java/org/apache/asterix/utils/FeedOperations.java
+++ b/asterixdb/asterix-app/src/main/java/org/apache/asterix/utils/FeedOperations.java
@@ -449,7 +449,7 @@
         Pair<JobSpecification, IAdapterFactory> intakeInfo = buildFeedIntakeJobSpec(feed, metadataProvider, fpa);
         List<JobSpecification> jobsList = new ArrayList<>();
         // TODO: Figure out a better way to handle insert/upsert per conn instead of per feed
-        Boolean insertFeed = ExternalDataUtils.isInsertFeed(feed.getAdapterConfiguration());
+        Boolean insertFeed = ExternalDataUtils.isInsertFeed(feed.getFeedConfiguration());
         // Construct the ingestion Job
         JobSpecification intakeJob = intakeInfo.getLeft();
         IAdapterFactory ingestionAdaptorFactory = intakeInfo.getRight();
diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/queries/big-object/big_object_feed_20M/big_object_feed_20M.1.ddl.aql b/asterixdb/asterix-app/src/test/resources/runtimets/queries/big-object/big_object_feed_20M/big_object_feed_20M.1.ddl.aql
index e296d50..170e693 100644
--- a/asterixdb/asterix-app/src/test/resources/runtimets/queries/big-object/big_object_feed_20M/big_object_feed_20M.1.ddl.aql
+++ b/asterixdb/asterix-app/src/test/resources/runtimets/queries/big-object/big_object_feed_20M/big_object_feed_20M.1.ddl.aql
@@ -36,9 +36,10 @@
 create dataset testds(testtype) primary key id;
 
 
-create feed BigFeed
-using localfs
-(("path"="asterix_nc1://target/data/big-object/big_object_20M.adm"),
-("format"="adm"),
-("type-name"="testtype"),
-("tuple-interval"="2"));
+create feed BigFeed with {
+  "adapter-name" : "localfs",
+  "path" : "asterix_nc1://target/data/big-object/big_object_20M.adm",
+  "format" : "adm",
+  "type-name" : "testtype",
+  "tuple-interval" : "2"
+};
diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/queries/dml/scan-delete-btree-correlated-secondary-index-nullable/scan-delete-btree-correlated-secondary-index-nullable.1.ddl.aql b/asterixdb/asterix-app/src/test/resources/runtimets/queries/dml/scan-delete-btree-correlated-secondary-index-nullable/scan-delete-btree-correlated-secondary-index-nullable.1.ddl.aql
index ad5121d..6de0041 100644
--- a/asterixdb/asterix-app/src/test/resources/runtimets/queries/dml/scan-delete-btree-correlated-secondary-index-nullable/scan-delete-btree-correlated-secondary-index-nullable.1.ddl.aql
+++ b/asterixdb/asterix-app/src/test/resources/runtimets/queries/dml/scan-delete-btree-correlated-secondary-index-nullable/scan-delete-btree-correlated-secondary-index-nullable.1.ddl.aql
@@ -52,10 +52,10 @@
   }
 };
 
-create feed CustomerFeed
-using localfs
-(("path"="asterix_nc1://data/semistructured/co1k/customer.adm"),
-("format"="adm"),
-("type-name"="CustomerType"),
-("tuple-interval"="10"));
-
+create feed CustomerFeed with {
+ "adapter-name" : "localfs",
+ "path" : "asterix_nc1://data/semistructured/co1k/customer.adm",
+ "format" : "adm",
+ "type-name" : "CustomerType",
+ "tuple-interval" : "10"
+};
\ No newline at end of file
diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/queries/dml/using-correlated-prefix-merge-policy-with-feed/using-correlated-prefix-merge-policy-with-feed.1.ddl.aql b/asterixdb/asterix-app/src/test/resources/runtimets/queries/dml/using-correlated-prefix-merge-policy-with-feed/using-correlated-prefix-merge-policy-with-feed.1.ddl.aql
index 61e144e..195ff14 100644
--- a/asterixdb/asterix-app/src/test/resources/runtimets/queries/dml/using-correlated-prefix-merge-policy-with-feed/using-correlated-prefix-merge-policy-with-feed.1.ddl.aql
+++ b/asterixdb/asterix-app/src/test/resources/runtimets/queries/dml/using-correlated-prefix-merge-policy-with-feed/using-correlated-prefix-merge-policy-with-feed.1.ddl.aql
@@ -57,10 +57,11 @@
   }
 };
 
-create feed LineItemFeed
-using localfs
-(("path"="asterix_nc1://data/tpch0.001/lineitem.tbl"),
-("format"="delimited-text"),
-("delimiter"="|"),
-("type-name"="LineItemType"),
-("tuple-interval"="10"));
+create feed LineItemFeed with {
+  "adapter-name" : "localfs",
+  "path" : "asterix_nc1://data/tpch0.001/lineitem.tbl",
+  "format" : "delimited-text",
+  "delimiter" : "|",
+  "type-name" : "LineItemType",
+  "tuple-interval" : "10"
+};
diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/queries/feeds/change-feed-with-meta-csv/change-feed-with-meta-csv.1.ddl.aql b/asterixdb/asterix-app/src/test/resources/runtimets/queries/feeds/change-feed-with-meta-csv/change-feed-with-meta-csv.1.ddl.aql
index b695a5d..965605a 100644
--- a/asterixdb/asterix-app/src/test/resources/runtimets/queries/feeds/change-feed-with-meta-csv/change-feed-with-meta-csv.1.ddl.aql
+++ b/asterixdb/asterix-app/src/test/resources/runtimets/queries/feeds/change-feed-with-meta-csv/change-feed-with-meta-csv.1.ddl.aql
@@ -4,7 +4,7 @@
  * distributed with this work for additional information
  * regarding copyright ownership.  The ASF licenses this file
  * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
+ * "License"; you may not use this file except in compliance
  * with the License.  You may obtain a copy of the License at
  *
  *   http://www.apache.org/licenses/LICENSE-2.0
@@ -32,30 +32,31 @@
  id:int
  }
 
- create dataset TestDS(TestType) with meta(MetaType) primary key meta().id;
- create index TestIdx on TestDS(test);
- drop feed TestFeed if exists;
- create feed TestFeed using localfs
- (
-     ("parser"="record-with-metadata"),
-     ("reader"="localfs"),
-     ("path"="asterix_nc1://target/data/csv/change_feed.csv"),
-     //type of the record
-     ("type-name"="TestType"),
-     //type of the meta record
-     ("meta-type-name"="MetaType"),
-     //format of the record
-     ("record-format"="adm"),
-     // format of the meta record
-     ("format"="csv"),
-     ("delimiter"=","),
-     // index of the primary key the record (meta or orig)
-     ("key-indexes"="0"),
-     // indicates that PK originates from meta
-     ("key-indicators"="1"),
-     //index of the record in the meta record
-     ("record-index"="1"),
-     ("change-feed"="true"),
-     // whether CSV header is present in the input
-     ("header"="false")
- );
\ No newline at end of file
+create dataset TestDS(TestType) with meta(MetaType) primary key meta().id;
+create index TestIdx on TestDS(test);
+drop feed TestFeed if exists;
+
+create feed TestFeed with {
+  "adapter-name" : "localfs",
+  "parser" : "record-with-metadata",
+  "reader" : "localfs",
+  "path" : "asterix_nc1://target/data/csv/change_feed.csv",
+  //type of the record
+  "type-name" : "TestType",
+  //type of the meta record
+  "meta-type-name" : "MetaType",
+  //format of the record
+  "record-format" : "adm",
+  // format of the meta record
+  "format" : "csv",
+  "delimiter" : ",",
+  // index of the primary key the record (meta or orig)
+  "key-indexes" : "0",
+  // indicates that PK originates from meta
+  "key-indicators" : "1",
+  //index of the record in the meta record
+  "record-index" : "1",
+  "change-feed" : "true",
+  // whether CSV header is present in the input
+  "header" : "false"
+};
diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/queries/feeds/change-feed-with-meta-open-index-in-meta/change-feed-with-meta-open-index-in-meta.1.ddl.aql b/asterixdb/asterix-app/src/test/resources/runtimets/queries/feeds/change-feed-with-meta-open-index-in-meta/change-feed-with-meta-open-index-in-meta.1.ddl.aql
index 8d923c5..58f2091 100644
--- a/asterixdb/asterix-app/src/test/resources/runtimets/queries/feeds/change-feed-with-meta-open-index-in-meta/change-feed-with-meta-open-index-in-meta.1.ddl.aql
+++ b/asterixdb/asterix-app/src/test/resources/runtimets/queries/feeds/change-feed-with-meta-open-index-in-meta/change-feed-with-meta-open-index-in-meta.1.ddl.aql
@@ -43,17 +43,18 @@
 
 create dataset KVStore(DocumentType) with meta(KVMetaType)primary key meta()."key";
 
-create feed KVChangeStream using adapter(
-    ("type-name"="DocumentType"),
-    ("meta-type-name"="KVMetaType"),
-    ("reader"="org.apache.asterix.external.input.record.reader.kv.KVTestReaderFactory"),
-    ("parser"="record-with-metadata"),
-    ("format"="dcp"),
-    ("record-format"="json"),
-    ("change-feed"="true"),
-    ("key-indexes"="0"),
-    ("key-indicators"="1"),
-    ("num-of-records"="1000")
-);
+create feed KVChangeStream with {
+  "adapter-name" : "adapter",
+  "type-name" : "DocumentType",
+  "meta-type-name" : "KVMetaType",
+  "reader" : "org.apache.asterix.external.input.record.reader.kv.KVTestReaderFactory",
+  "parser" : "record-with-metadata",
+  "format" : "dcp",
+  "record-format" : "json",
+  "change-feed" : "true",
+  "key-indexes" : "0",
+  "key-indicators" : "1",
+  "num-of-records" : "1000"
+};
 
 create index OpenIndex on KVStore(meta().id:int32?) enforced;
diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/queries/feeds/change-feed-with-meta-pk-in-meta-index-after-ingest/change-feed-with-meta-pk-in-meta-index-after-ingest.1.ddl.aql b/asterixdb/asterix-app/src/test/resources/runtimets/queries/feeds/change-feed-with-meta-pk-in-meta-index-after-ingest/change-feed-with-meta-pk-in-meta-index-after-ingest.1.ddl.aql
index 37e3e90..4f4ea0f 100644
--- a/asterixdb/asterix-app/src/test/resources/runtimets/queries/feeds/change-feed-with-meta-pk-in-meta-index-after-ingest/change-feed-with-meta-pk-in-meta-index-after-ingest.1.ddl.aql
+++ b/asterixdb/asterix-app/src/test/resources/runtimets/queries/feeds/change-feed-with-meta-pk-in-meta-index-after-ingest/change-feed-with-meta-pk-in-meta-index-after-ingest.1.ddl.aql
@@ -43,15 +43,16 @@
 
 create dataset KVStore(DocumentType) with meta(KVMetaType)primary key meta()."key";
 
-create feed KVChangeStream using adapter(
-    ("type-name"="DocumentType"),
-    ("meta-type-name"="KVMetaType"),
-    ("reader"="org.apache.asterix.external.input.record.reader.kv.KVTestReaderFactory"),
-    ("parser"="record-with-metadata"),
-    ("format"="dcp"),
-    ("record-format"="json"),
-    ("change-feed"="true"),
-    ("key-indexes"="0"),
-    ("key-indicators"="1"),
-    ("num-of-records"="1000")
-);
\ No newline at end of file
+create feed KVChangeStream with {
+ "adapter-name" : "adapter",
+  "type-name" : "DocumentType",
+  "meta-type-name" : "KVMetaType",
+  "reader" : "org.apache.asterix.external.input.record.reader.kv.KVTestReaderFactory",
+  "parser" : "record-with-metadata",
+  "format" : "dcp",
+  "record-format" : "json",
+  "change-feed" : "true",
+  "key-indexes" : "0",
+  "key-indicators" : "1",
+  "num-of-records" : "1000"
+};
diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/queries/feeds/change-feed-with-meta-pk-in-meta-index-in-meta/change-feed-with-meta-pk-in-meta-index-in-meta.1.ddl.aql b/asterixdb/asterix-app/src/test/resources/runtimets/queries/feeds/change-feed-with-meta-pk-in-meta-index-in-meta/change-feed-with-meta-pk-in-meta-index-in-meta.1.ddl.aql
index 1a1acea..c3e82f2 100644
--- a/asterixdb/asterix-app/src/test/resources/runtimets/queries/feeds/change-feed-with-meta-pk-in-meta-index-in-meta/change-feed-with-meta-pk-in-meta-index-in-meta.1.ddl.aql
+++ b/asterixdb/asterix-app/src/test/resources/runtimets/queries/feeds/change-feed-with-meta-pk-in-meta-index-in-meta/change-feed-with-meta-pk-in-meta-index-in-meta.1.ddl.aql
@@ -43,17 +43,18 @@
 
 create dataset KVStore(DocumentType) with meta(KVMetaType)primary key meta()."key";
 
-create feed KVChangeStream using adapter(
-    ("type-name"="DocumentType"),
-    ("meta-type-name"="KVMetaType"),
-    ("reader"="org.apache.asterix.external.input.record.reader.kv.KVTestReaderFactory"),
-    ("parser"="record-with-metadata"),
-    ("format"="dcp"),
-    ("record-format"="json"),
-    ("change-feed"="true"),
-    ("key-indexes"="0"),
-    ("key-indicators"="1"),
-    ("num-of-records"="1000")
-);
+create feed KVChangeStream with {
+ "adapter-name" : "adapter",
+  "type-name" : "DocumentType",
+  "meta-type-name" : "KVMetaType",
+  "reader" : "org.apache.asterix.external.input.record.reader.kv.KVTestReaderFactory",
+  "parser" : "record-with-metadata",
+  "format" : "dcp",
+  "record-format" : "json",
+  "change-feed" : "true",
+  "key-indexes" : "0",
+  "key-indicators" : "1",
+  "num-of-records" : "1000"
+};
 
-create index VBucketIndex on KVStore(meta().vbucket);
\ No newline at end of file
+create index VBucketIndex on KVStore(meta().vbucket);
diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/queries/feeds/change-feed-with-meta-pk-in-meta-index-with-missing-after-ingest/change-feed-with-meta-pk-in-meta-index-with-missing-after-ingest.1.ddl.aql b/asterixdb/asterix-app/src/test/resources/runtimets/queries/feeds/change-feed-with-meta-pk-in-meta-index-with-missing-after-ingest/change-feed-with-meta-pk-in-meta-index-with-missing-after-ingest.1.ddl.aql
index 6d475bd..689456d 100644
--- a/asterixdb/asterix-app/src/test/resources/runtimets/queries/feeds/change-feed-with-meta-pk-in-meta-index-with-missing-after-ingest/change-feed-with-meta-pk-in-meta-index-with-missing-after-ingest.1.ddl.aql
+++ b/asterixdb/asterix-app/src/test/resources/runtimets/queries/feeds/change-feed-with-meta-pk-in-meta-index-with-missing-after-ingest/change-feed-with-meta-pk-in-meta-index-with-missing-after-ingest.1.ddl.aql
@@ -43,15 +43,16 @@
 
 create dataset KVStore(DocumentType) with meta(KVMetaType)primary key meta()."key";
 
-create feed KVChangeStream using adapter(
-    ("type-name"="DocumentType"),
-    ("meta-type-name"="KVMetaType"),
-    ("reader"="org.apache.asterix.external.input.record.reader.kv.KVTestReaderFactory"),
-    ("parser"="record-with-metadata"),
-    ("format"="dcp"),
-    ("record-format"="json"),
-    ("change-feed"="true"),
-    ("key-indexes"="0"),
-    ("key-indicators"="1"),
-    ("num-of-records"="1000")
-);
\ No newline at end of file
+create feed KVChangeStream with {
+  "adapter-name" : "adapter",
+  "type-name" : "DocumentType",
+  "meta-type-name" : "KVMetaType",
+  "reader" : "org.apache.asterix.external.input.record.reader.kv.KVTestReaderFactory",
+  "parser" : "record-with-metadata",
+  "format" : "dcp",
+  "record-format" : "json",
+  "change-feed" : "true",
+  "key-indexes" : "0",
+  "key-indicators" : "1",
+  "num-of-records" : "1000"
+};
diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/queries/feeds/change-feed-with-meta-pk-in-meta-open-index-in-value/change-feed-with-meta-pk-in-meta-open-index-in-value.1.ddl.aql b/asterixdb/asterix-app/src/test/resources/runtimets/queries/feeds/change-feed-with-meta-pk-in-meta-open-index-in-value/change-feed-with-meta-pk-in-meta-open-index-in-value.1.ddl.aql
index 3ef8603..928f3ce 100644
--- a/asterixdb/asterix-app/src/test/resources/runtimets/queries/feeds/change-feed-with-meta-pk-in-meta-open-index-in-value/change-feed-with-meta-pk-in-meta-open-index-in-value.1.ddl.aql
+++ b/asterixdb/asterix-app/src/test/resources/runtimets/queries/feeds/change-feed-with-meta-pk-in-meta-open-index-in-value/change-feed-with-meta-pk-in-meta-open-index-in-value.1.ddl.aql
@@ -43,17 +43,18 @@
 
 create dataset KVStore(DocumentType) with meta(KVMetaType)primary key meta()."key";
 
-create feed KVChangeStream using adapter(
-    ("type-name"="DocumentType"),
-    ("meta-type-name"="KVMetaType"),
-    ("reader"="org.apache.asterix.external.input.record.reader.kv.KVTestReaderFactory"),
-    ("parser"="record-with-metadata"),
-    ("format"="dcp"),
-    ("record-format"="json"),
-    ("change-feed"="true"),
-    ("key-indexes"="0"),
-    ("key-indicators"="1"),
-    ("num-of-records"="1000")
-);
+create feed KVChangeStream with {
+  "adapter-name" : "adapter",
+  "type-name" : "DocumentType",
+  "meta-type-name" : "KVMetaType",
+  "reader" : "org.apache.asterix.external.input.record.reader.kv.KVTestReaderFactory",
+  "parser" : "record-with-metadata",
+  "format" : "dcp",
+  "record-format" : "json",
+  "change-feed" : "true",
+  "key-indexes" : "0",
+  "key-indicators" : "1",
+  "num-of-records" : "1000"
+};
 
 create index OpenIndex on KVStore(id:int32?) enforced;
diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/queries/feeds/change-feed-with-meta-pk-in-meta-open-index-with-missing/change-feed-with-meta-pk-in-meta-open-index-with-missing.1.ddl.aql b/asterixdb/asterix-app/src/test/resources/runtimets/queries/feeds/change-feed-with-meta-pk-in-meta-open-index-with-missing/change-feed-with-meta-pk-in-meta-open-index-with-missing.1.ddl.aql
index 8689c91..05e7564 100644
--- a/asterixdb/asterix-app/src/test/resources/runtimets/queries/feeds/change-feed-with-meta-pk-in-meta-open-index-with-missing/change-feed-with-meta-pk-in-meta-open-index-with-missing.1.ddl.aql
+++ b/asterixdb/asterix-app/src/test/resources/runtimets/queries/feeds/change-feed-with-meta-pk-in-meta-open-index-with-missing/change-feed-with-meta-pk-in-meta-open-index-with-missing.1.ddl.aql
@@ -43,17 +43,18 @@
 
 create dataset KVStore(DocumentType) with meta(KVMetaType)primary key meta()."key";
 
-create feed KVChangeStream using adapter(
-    ("type-name"="DocumentType"),
-    ("meta-type-name"="KVMetaType"),
-    ("reader"="org.apache.asterix.external.input.record.reader.kv.KVTestReaderFactory"),
-    ("parser"="record-with-metadata"),
-    ("format"="dcp"),
-    ("record-format"="json"),
-    ("change-feed"="true"),
-    ("key-indexes"="0"),
-    ("key-indicators"="1"),
-    ("num-of-records"="1000")
-);
+create feed KVChangeStream with {
+  "adapter-name" : "adapter",
+  "type-name" : "DocumentType",
+  "meta-type-name" : "KVMetaType",
+  "reader" : "org.apache.asterix.external.input.record.reader.kv.KVTestReaderFactory",
+  "parser" : "record-with-metadata",
+  "format" : "dcp",
+  "record-format" : "json",
+  "change-feed" : "true",
+  "key-indexes" : "0",
+  "key-indicators" : "1",
+  "num-of-records" : "1000"
+};
 
 create index OpenIndex on KVStore(exp:int32?) enforced;
diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/queries/feeds/change-feed-with-meta-pk-in-meta/change-feed-with-meta-pk-in-meta.1.ddl.aql b/asterixdb/asterix-app/src/test/resources/runtimets/queries/feeds/change-feed-with-meta-pk-in-meta/change-feed-with-meta-pk-in-meta.1.ddl.aql
index 2c74ac7..4dfeffb 100644
--- a/asterixdb/asterix-app/src/test/resources/runtimets/queries/feeds/change-feed-with-meta-pk-in-meta/change-feed-with-meta-pk-in-meta.1.ddl.aql
+++ b/asterixdb/asterix-app/src/test/resources/runtimets/queries/feeds/change-feed-with-meta-pk-in-meta/change-feed-with-meta-pk-in-meta.1.ddl.aql
@@ -4,7 +4,7 @@
  * distributed with this work for additional information
  * regarding copyright ownership.  The ASF licenses this file
  * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
+ * "License"; you may not use this file except in compliance
  * with the License.  You may obtain a copy of the License at
  *
  *   http://www.apache.org/licenses/LICENSE-2.0
@@ -42,15 +42,16 @@
 
 create dataset KVStore(DocumentType) with meta(KVMetaType)primary key meta()."key";
 
-create feed KVChangeStream using adapter(
-    ("type-name"="DocumentType"),
-    ("meta-type-name"="KVMetaType"),
-    ("reader"="org.apache.asterix.external.input.record.reader.kv.KVTestReaderFactory"),
-    ("parser"="record-with-metadata"),
-    ("format"="dcp"),
-    ("record-format"="json"),
-    ("change-feed"="true"),
-    ("key-indexes"="0"),
-    ("key-indicators"="1"),
-    ("num-of-records"="1000")
-);
\ No newline at end of file
+create feed KVChangeStream with {
+ "adapter-name" : "adapter",
+  "type-name" : "DocumentType",
+  "meta-type-name" : "KVMetaType",
+  "reader" : "org.apache.asterix.external.input.record.reader.kv.KVTestReaderFactory",
+  "parser" : "record-with-metadata",
+  "format" : "dcp",
+  "record-format" : "json",
+  "change-feed" : "true",
+  "key-indexes" : "0",
+  "key-indicators" : "1",
+  "num-of-records" : "1000"
+};
diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/queries/feeds/change-feed-with-meta-with-mixed-index/change-feed-with-meta-with-mixed-index.1.ddl.aql b/asterixdb/asterix-app/src/test/resources/runtimets/queries/feeds/change-feed-with-meta-with-mixed-index/change-feed-with-meta-with-mixed-index.1.ddl.aql
index 2471f79..6e2cefb 100644
--- a/asterixdb/asterix-app/src/test/resources/runtimets/queries/feeds/change-feed-with-meta-with-mixed-index/change-feed-with-meta-with-mixed-index.1.ddl.aql
+++ b/asterixdb/asterix-app/src/test/resources/runtimets/queries/feeds/change-feed-with-meta-with-mixed-index/change-feed-with-meta-with-mixed-index.1.ddl.aql
@@ -44,17 +44,18 @@
 
 create dataset KVStore(DocumentType) with meta(KVMetaType)primary key meta()."key";
 
-create feed KVChangeStream using adapter(
-    ("type-name"="DocumentType"),
-    ("meta-type-name"="KVMetaType"),
-    ("reader"="org.apache.asterix.external.input.record.reader.kv.KVTestReaderFactory"),
-    ("parser"="record-with-metadata"),
-    ("format"="dcp"),
-    ("record-format"="json"),
-    ("change-feed"="true"),
-    ("key-indexes"="0"),
-    ("key-indicators"="1"),
-    ("num-of-records"="1000")
-);
+create feed KVChangeStream with {
+  "adapter-name" : "adapter",
+  "type-name" : "DocumentType",
+  "meta-type-name" : "KVMetaType",
+  "reader" : "org.apache.asterix.external.input.record.reader.kv.KVTestReaderFactory",
+  "parser" : "record-with-metadata",
+  "format" : "dcp",
+  "record-format" : "json",
+  "change-feed" : "true",
+  "key-indexes" : "0",
+  "key-indicators" : "1",
+  "num-of-records" : "1000"
+};
 
-create index MixedIndex on KVStore(meta().vbucket,id);
\ No newline at end of file
+create index MixedIndex on KVStore(meta().vbucket,id);
diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/queries/feeds/change-feed/change-feed.1.ddl.aql b/asterixdb/asterix-app/src/test/resources/runtimets/queries/feeds/change-feed/change-feed.1.ddl.aql
index e78327a..44fedb1 100644
--- a/asterixdb/asterix-app/src/test/resources/runtimets/queries/feeds/change-feed/change-feed.1.ddl.aql
+++ b/asterixdb/asterix-app/src/test/resources/runtimets/queries/feeds/change-feed/change-feed.1.ddl.aql
@@ -31,13 +31,14 @@
 }
 
 create dataset FeedDataset(FeedRecordType) primary key id;
-create feed ChangeFeed using test_change_feed(
-    ("type-name"="FeedRecordType"),
-    ("record-format"="adm"),
-    ("format"="test-csv"),
-    ("delimiter"=","),
-    ("key-indexes"="0"),
-    ("reader"="org.apache.asterix.external.input.record.reader.RecordWithPKTestReaderFactory"),
-    ("parser"="org.apache.asterix.external.parser.factory.TestRecordWithPKParserFactory"),
-    ("change-feed"="true")
-);
\ No newline at end of file
+create feed ChangeFeed with {
+  "adapter-name" : "test_change_feed",
+  "type-name" : "FeedRecordType",
+  "record-format" : "adm",
+  "format" : "test-csv",
+  "delimiter" : ",",
+  "key-indexes" : "0",
+  "reader" : "org.apache.asterix.external.input.record.reader.RecordWithPKTestReaderFactory",
+  "parser" : "org.apache.asterix.external.parser.factory.TestRecordWithPKParserFactory",
+  "change-feed" : "true"
+};
diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/queries/feeds/connect-feed-with-function/connect-feed-with-function.1.ddl.aql b/asterixdb/asterix-app/src/test/resources/runtimets/queries/feeds/connect-feed-with-function/connect-feed-with-function.1.ddl.aql
index 631c3fb..159b3a2 100644
--- a/asterixdb/asterix-app/src/test/resources/runtimets/queries/feeds/connect-feed-with-function/connect-feed-with-function.1.ddl.aql
+++ b/asterixdb/asterix-app/src/test/resources/runtimets/queries/feeds/connect-feed-with-function/connect-feed-with-function.1.ddl.aql
@@ -47,11 +47,11 @@
     return object_merge($tty2, $anyname)
 }
 
-create feed UserFeed using socket_adapter
-(
-    ("sockets"="127.0.0.1:10001"),
-    ("address-type"="IP"),
-    ("type-name"="TwitterUser"),
-    ("format"="adm"),
-    ("upsert-feed"="true")
-);
\ No newline at end of file
+create feed UserFeed with {
+  "adapter-name" : "socket_adapter",
+  "sockets" : "127.0.0.1:10001",
+  "address-type" : "IP",
+  "type-name" : "TwitterUser",
+  "format" : "adm",
+  "upsert-feed" : "true"
+};
diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/queries/feeds/connect-feed/connect-feed.0.ddl.aql b/asterixdb/asterix-app/src/test/resources/runtimets/queries/feeds/connect-feed/connect-feed.0.ddl.aql
index 9237c1e..5a57d7c 100644
--- a/asterixdb/asterix-app/src/test/resources/runtimets/queries/feeds/connect-feed/connect-feed.0.ddl.aql
+++ b/asterixdb/asterix-app/src/test/resources/runtimets/queries/feeds/connect-feed/connect-feed.0.ddl.aql
@@ -37,10 +37,10 @@
 create dataset Tweets3 (Tweet)
 primary key id;
 
-create feed TwitterFeed using socket_adapter
-(
-    ("sockets"="127.0.0.1:10001"),
-    ("address-type"="IP"),
-    ("type-name"="Tweet"),
-    ("format"="adm")
-);
\ No newline at end of file
+create feed TwitterFeed with {
+ "adapter-name" : "socket_adapter",
+ "sockets" : "127.0.0.1:10001",
+ "address-type" : "IP",
+ "type-name" : "Tweet",
+ "format" : "adm"
+};
diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/queries/feeds/connect-live-feed/connect-live-feed.0.ddl.aql b/asterixdb/asterix-app/src/test/resources/runtimets/queries/feeds/connect-live-feed/connect-live-feed.0.ddl.aql
index 47bee4d..cfd885b 100644
--- a/asterixdb/asterix-app/src/test/resources/runtimets/queries/feeds/connect-live-feed/connect-live-feed.0.ddl.aql
+++ b/asterixdb/asterix-app/src/test/resources/runtimets/queries/feeds/connect-live-feed/connect-live-feed.0.ddl.aql
@@ -29,12 +29,12 @@
 create dataset Tweets1(TweetMessageType) primary key tweetid;
 create dataset Tweets2(TweetMessageType) primary key tweetid;
 
-create feed TweetFeed using socket_adapter
-(
- ("sockets"="127.0.0.1:10001"),
- ("address-type"="IP"),
- ("type-name"="TweetMessageType"),
- ("format"="adm")
-);
+create feed TweetFeed with {
+ "adapter-name" : "socket_adapter",
+ "sockets" : "127.0.0.1:10001",
+ "address-type" : "IP",
+ "type-name" : "TweetMessageType",
+ "format" : "adm"
+};
 
 connect feed TweetFeed to dataset Tweets1;
diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/queries/feeds/create-feed-with-policy/create-feed-with-policy.1.ddl.aql b/asterixdb/asterix-app/src/test/resources/runtimets/queries/feeds/create-feed-with-policy/create-feed-with-policy.1.ddl.aql
index 4e21323..138231f 100644
--- a/asterixdb/asterix-app/src/test/resources/runtimets/queries/feeds/create-feed-with-policy/create-feed-with-policy.1.ddl.aql
+++ b/asterixdb/asterix-app/src/test/resources/runtimets/queries/feeds/create-feed-with-policy/create-feed-with-policy.1.ddl.aql
@@ -49,10 +49,10 @@
 
 create dataset Tweets(TweetMessageType) primary key tweetid;
 
-create feed TweetFeed using socket_adapter
-(
-    ("sockets"="127.0.0.1:10001"),
-    ("address-type"="IP"),
-    ("type-name"="TweetMessageType"),
-    ("format"="adm")
-);
\ No newline at end of file
+create feed TweetFeed with {
+ "adapter-name" : "socket_adapter",
+  "sockets" : "127.0.0.1:10001",
+  "address-type" : "IP",
+  "type-name" : "TweetMessageType",
+  "format" : "adm"
+);
diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/queries/feeds/disconnect-live-feed/disconnect-live-feed.0.ddl.aql b/asterixdb/asterix-app/src/test/resources/runtimets/queries/feeds/disconnect-live-feed/disconnect-live-feed.0.ddl.aql
index 00fb12d..0b8f74e 100644
--- a/asterixdb/asterix-app/src/test/resources/runtimets/queries/feeds/disconnect-live-feed/disconnect-live-feed.0.ddl.aql
+++ b/asterixdb/asterix-app/src/test/resources/runtimets/queries/feeds/disconnect-live-feed/disconnect-live-feed.0.ddl.aql
@@ -29,13 +29,13 @@
 create dataset Tweets1(TweetMessageType) primary key tweetid;
 create dataset Tweets2(TweetMessageType) primary key tweetid;
 
-create feed TweetFeed using socket_adapter
-(
- ("sockets"="127.0.0.1:10001"),
- ("address-type"="IP"),
- ("type-name"="TweetMessageType"),
- ("format"="adm")
-);
+create feed TweetFeed with {
+  "adapter-name" : "socket_adapter",
+  "sockets" : "127.0.0.1:10001",
+  "address-type" : "IP",
+  "type-name" : "TweetMessageType",
+  "format" : "adm"
+};
 
 connect feed TweetFeed to dataset Tweets1;
 connect feed TweetFeed to dataset Tweets2;
diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/queries/feeds/drop-dataverse-with-disconnected-feed/drop-dataverse-with-disconnected-feed.1.ddl.aql b/asterixdb/asterix-app/src/test/resources/runtimets/queries/feeds/drop-dataverse-with-disconnected-feed/drop-dataverse-with-disconnected-feed.1.ddl.aql
index 70322cb..0a659fe 100644
--- a/asterixdb/asterix-app/src/test/resources/runtimets/queries/feeds/drop-dataverse-with-disconnected-feed/drop-dataverse-with-disconnected-feed.1.ddl.aql
+++ b/asterixdb/asterix-app/src/test/resources/runtimets/queries/feeds/drop-dataverse-with-disconnected-feed/drop-dataverse-with-disconnected-feed.1.ddl.aql
@@ -45,10 +45,10 @@
 
 create dataset Tweets(TweetMessageType) primary key tweetid;
 
-create feed TweetFeed using socket_adapter
-(
-    ("sockets"="127.0.0.1:10001"),
-    ("address-type"="IP"),
-    ("type-name"="TweetMessageType"),
-    ("format"="adm")
-);
\ No newline at end of file
+create feed TweetFeed with {
+  "adapter-name" : "socket_adapter",
+  "sockets" : "127.0.0.1:10001",
+  "address-type" : "IP",
+  "type-name" : "TweetMessageType",
+  "format" : "adm"
+};
diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/queries/feeds/drop-dataverse-with-function-used-by-feed/drop-dataverse-with-function-used-by-feed.2.ddl.aql b/asterixdb/asterix-app/src/test/resources/runtimets/queries/feeds/drop-dataverse-with-function-used-by-feed/drop-dataverse-with-function-used-by-feed.2.ddl.aql
index f16a105..3116f56 100644
--- a/asterixdb/asterix-app/src/test/resources/runtimets/queries/feeds/drop-dataverse-with-function-used-by-feed/drop-dataverse-with-function-used-by-feed.2.ddl.aql
+++ b/asterixdb/asterix-app/src/test/resources/runtimets/queries/feeds/drop-dataverse-with-function-used-by-feed/drop-dataverse-with-function-used-by-feed.2.ddl.aql
@@ -29,11 +29,11 @@
 
 create dataset TwitterUsers(TwitterUser) primary key screen-name;
 
-create feed UserFeed using socket_adapter
-(
-    ("sockets"="127.0.0.1:10001"),
-    ("address-type"="IP"),
-    ("type-name"="TwitterUser"),
-    ("format"="adm"),
-    ("upsert-feed"="true")
-);
\ No newline at end of file
+create feed UserFeed with {
+  "adapter-name" : "socket_adapter",
+  "sockets" : "127.0.0.1:10001",
+  "address-type" : "IP",
+  "type-name" : "TwitterUser",
+  "format" : "adm",
+  "upsert-feed" : "true"
+};
diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/queries/feeds/drop-function-no-longer-used-by-feed/drop-function-no-longer-used-by-feed.1.ddl.aql b/asterixdb/asterix-app/src/test/resources/runtimets/queries/feeds/drop-function-no-longer-used-by-feed/drop-function-no-longer-used-by-feed.1.ddl.aql
index 19eda0e..3ccff8f 100644
--- a/asterixdb/asterix-app/src/test/resources/runtimets/queries/feeds/drop-function-no-longer-used-by-feed/drop-function-no-longer-used-by-feed.1.ddl.aql
+++ b/asterixdb/asterix-app/src/test/resources/runtimets/queries/feeds/drop-function-no-longer-used-by-feed/drop-function-no-longer-used-by-feed.1.ddl.aql
@@ -4,7 +4,7 @@
  * distributed with this work for additional information
  * regarding copyright ownership.  The ASF licenses this file
  * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
+ * "License"; you may not use this file except in compliance
  * with the License.  You may obtain a copy of the License at
  *
  *   http://www.apache.org/licenses/LICENSE-2.0
@@ -34,11 +34,11 @@
     return object_merge($tty1, $xyz)
 }
 
-create feed UserFeed using socket_adapter
-(
-    ("sockets"="127.0.0.1:10001"),
-    ("address-type"="IP"),
-    ("type-name"="TwitterUser"),
-    ("format"="adm"),
-    ("upsert-feed"="true")
-);
\ No newline at end of file
+create feed UserFeed with {
+  "adapter-name" : "socket_adapter",
+  "sockets" : "127.0.0.1:10001",
+  "address-type" : "IP",
+  "type-name" : "TwitterUser",
+  "format" : "adm",
+  "upsert-feed" : "true"
+};
diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/queries/feeds/drop-function-used-by-feed/drop-function-used-by-feed.1.ddl.aql b/asterixdb/asterix-app/src/test/resources/runtimets/queries/feeds/drop-function-used-by-feed/drop-function-used-by-feed.1.ddl.aql
index 19eda0e..aaa573b 100644
--- a/asterixdb/asterix-app/src/test/resources/runtimets/queries/feeds/drop-function-used-by-feed/drop-function-used-by-feed.1.ddl.aql
+++ b/asterixdb/asterix-app/src/test/resources/runtimets/queries/feeds/drop-function-used-by-feed/drop-function-used-by-feed.1.ddl.aql
@@ -34,11 +34,11 @@
     return object_merge($tty1, $xyz)
 }
 
-create feed UserFeed using socket_adapter
-(
-    ("sockets"="127.0.0.1:10001"),
-    ("address-type"="IP"),
-    ("type-name"="TwitterUser"),
-    ("format"="adm"),
-    ("upsert-feed"="true")
-);
\ No newline at end of file
+create feed UserFeed with {
+  "adapter-name" : "socket_adapter",
+  "sockets" : "127.0.0.1:10001",
+  "address-type" : "IP",
+  "type-name" : "TwitterUser",
+  "format" : "adm",
+  "upsert-feed" : "true"
+};
diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/queries/feeds/feed-push-socket/feed-push-socket.1.ddl.aql b/asterixdb/asterix-app/src/test/resources/runtimets/queries/feeds/feed-push-socket/feed-push-socket.1.ddl.aql
index 547085f..c6ab096 100644
--- a/asterixdb/asterix-app/src/test/resources/runtimets/queries/feeds/feed-push-socket/feed-push-socket.1.ddl.aql
+++ b/asterixdb/asterix-app/src/test/resources/runtimets/queries/feeds/feed-push-socket/feed-push-socket.1.ddl.aql
@@ -49,10 +49,10 @@
 
 create dataset Tweets(TweetMessageType) primary key tweetid;
 
-create feed TweetFeed using socket_adapter
-(
-    ("sockets"="127.0.0.1:10001"),
-    ("address-type"="IP"),
-    ("type-name"="TweetMessageType"),
-    ("format"="adm")
-);
\ No newline at end of file
+create feed TweetFeed with {
+  "adapter-name" : "socket_adapter",
+  "sockets" : "127.0.0.1:10001",
+  "address-type" : "IP",
+  "type-name" : "TweetMessageType",
+  "format" : "adm"
+};
diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/queries/feeds/feed-with-external-function/feed-with-external-function.1.ddl.aql b/asterixdb/asterix-app/src/test/resources/runtimets/queries/feeds/feed-with-external-function/feed-with-external-function.1.ddl.aql
index 58b9174..e68f75a 100644
--- a/asterixdb/asterix-app/src/test/resources/runtimets/queries/feeds/feed-with-external-function/feed-with-external-function.1.ddl.aql
+++ b/asterixdb/asterix-app/src/test/resources/runtimets/queries/feeds/feed-with-external-function/feed-with-external-function.1.ddl.aql
@@ -47,11 +47,12 @@
   topics : {{string}}
 }
 
-create feed TweetFeed
-using localfs
-(("type-name"="TweetInputType"),
-("path"="asterix_nc1://data/twitter/obamatweets.adm"),
-("format"="adm"));
+create feed TweetFeed with {
+  "adapter-name" : "localfs",
+  "type-name" : "TweetInputType",
+  "path" : "asterix_nc1://data/twitter/obamatweets.adm",
+  "format" : "adm"
+};
 
 create dataset TweetsFeedIngest(TweetOutputType)
 primary key id;
diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/queries/feeds/feed-with-external-parser-with-open-index/feed-with-external-parser-with-open-index.3.ddl.aql b/asterixdb/asterix-app/src/test/resources/runtimets/queries/feeds/feed-with-external-parser-with-open-index/feed-with-external-parser-with-open-index.3.ddl.aql
index df82fd0..2052e10 100644
--- a/asterixdb/asterix-app/src/test/resources/runtimets/queries/feeds/feed-with-external-parser-with-open-index/feed-with-external-parser-with-open-index.3.ddl.aql
+++ b/asterixdb/asterix-app/src/test/resources/runtimets/queries/feeds/feed-with-external-parser-with-open-index/feed-with-external-parser-with-open-index.3.ddl.aql
@@ -27,9 +27,11 @@
 create dataset Condor(Classad) primary key GlobalJobId;
 create index BlockWritesIndex on Condor(BlockWrites:int64?) enforced;
 
-create feed CondorFeed using push_localfs(
-("path"="asterix_nc1://data/external-parser/dropbox/jobads1.txt,asterix_nc1://data/external-parser/dropbox/jobads2.txt, asterix_nc1://data/external-parser/dropbox2/jobads3.txt"),
-("reader"="localfs"),
-("format"="semi-structured"),
-("parser"="testlib#org.apache.asterix.external.library.ClassAdParserFactory"),
-("type-name"="Classad"));
+create feed CondorFeed with {
+  "adapter-name" : "push_localfs",
+  "path" : "asterix_nc1://data/external-parser/dropbox/jobads1.txt,asterix_nc1://data/external-parser/dropbox/jobads2.txt, asterix_nc1://data/external-parser/dropbox2/jobads3.txt",
+  "reader" : "localfs",
+  "format" : "semi-structured",
+  "parser" : "testlib#org.apache.asterix.external.library.ClassAdParserFactory",
+  "type-name" : "Classad"
+};
diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/queries/feeds/feed-with-external-parser-with-two-open-indexes/feed-with-external-parser-with-two-open-indexes.3.ddl.aql b/asterixdb/asterix-app/src/test/resources/runtimets/queries/feeds/feed-with-external-parser-with-two-open-indexes/feed-with-external-parser-with-two-open-indexes.3.ddl.aql
index fa9b833..53513b8 100644
--- a/asterixdb/asterix-app/src/test/resources/runtimets/queries/feeds/feed-with-external-parser-with-two-open-indexes/feed-with-external-parser-with-two-open-indexes.3.ddl.aql
+++ b/asterixdb/asterix-app/src/test/resources/runtimets/queries/feeds/feed-with-external-parser-with-two-open-indexes/feed-with-external-parser-with-two-open-indexes.3.ddl.aql
@@ -28,9 +28,11 @@
 create index BlockWritesIndex on Condor(BlockWrites:int64?) enforced;
 create index JobStartDateIndex on Condor(JobStartDate:int64?) enforced;
 
-create feed CondorFeed using push_localfs(
-("path"="asterix_nc1://data/external-parser/dropbox/jobads1.txt,asterix_nc1://data/external-parser/dropbox/jobads2.txt, asterix_nc1://data/external-parser/dropbox2/jobads3.txt"),
-("reader"="localfs"),
-("format"="semi-structured"),
-("parser"="testlib#org.apache.asterix.external.library.ClassAdParserFactory"),
-("type-name"="Classad"));
+create feed CondorFeed with {
+  "adapter-name" : "push_localfs",
+  "path" : "asterix_nc1://data/external-parser/dropbox/jobads1.txt,asterix_nc1://data/external-parser/dropbox/jobads2.txt, asterix_nc1://data/external-parser/dropbox2/jobads3.txt",
+  "reader" : "localfs",
+  "format" : "semi-structured",
+  "parser" : "testlib#org.apache.asterix.external.library.ClassAdParserFactory",
+  "type-name" : "Classad"
+};
diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/queries/feeds/feed-with-external-parser/feed-with-external-parser.3.ddl.aql b/asterixdb/asterix-app/src/test/resources/runtimets/queries/feeds/feed-with-external-parser/feed-with-external-parser.3.ddl.aql
index 1ec1f45..1be78a2 100644
--- a/asterixdb/asterix-app/src/test/resources/runtimets/queries/feeds/feed-with-external-parser/feed-with-external-parser.3.ddl.aql
+++ b/asterixdb/asterix-app/src/test/resources/runtimets/queries/feeds/feed-with-external-parser/feed-with-external-parser.3.ddl.aql
@@ -25,9 +25,11 @@
 use dataverse externallibtest;
 create dataset Condor(Classad) primary key GlobalJobId;
 
-create feed CondorFeed using push_localfs(
-("path"="asterix_nc1://data/external-parser/dropbox/jobads1.txt,asterix_nc1://data/external-parser/dropbox/jobads2.txt"),
-("reader"="localfs"),
-("format"="semi-structured"),
-("parser"="testlib#org.apache.asterix.external.library.ClassAdParserFactory"),
-("type-name"="Classad"));
+create feed CondorFeed with {
+  "adapter-name" : "push_localfs",
+  "path" : "asterix_nc1://data/external-parser/dropbox/jobads1.txt,asterix_nc1://data/external-parser/dropbox/jobads2.txt",
+  "reader" : "localfs",
+  "format" : "semi-structured",
+  "parser" : "testlib#org.apache.asterix.external.library.ClassAdParserFactory",
+  "type-name" : "Classad"
+};
diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/queries/feeds/feed-with-filtered-dataset/feed-with-filtered-dataset.1.ddl.aql b/asterixdb/asterix-app/src/test/resources/runtimets/queries/feeds/feed-with-filtered-dataset/feed-with-filtered-dataset.1.ddl.aql
index 8bd1e3d..cd7c638 100644
--- a/asterixdb/asterix-app/src/test/resources/runtimets/queries/feeds/feed-with-filtered-dataset/feed-with-filtered-dataset.1.ddl.aql
+++ b/asterixdb/asterix-app/src/test/resources/runtimets/queries/feeds/feed-with-filtered-dataset/feed-with-filtered-dataset.1.ddl.aql
@@ -39,7 +39,9 @@
 create dataset FacebookMessages(FacebookMessageType)
 primary key message-id with filter on send-time;
 
-create feed MessageFeed using localfs(
-("path"="asterix_nc1://data/fbm-with-send-time.adm"),
-("format"="adm"),
-("type-name"="FacebookMessageType"));
+create feed MessageFeed with {
+  "adapter-name" : "localfs",
+  "path" : "asterix_nc1://data/fbm-with-send-time.adm",
+  "format" : "adm",
+  "type-name" : "FacebookMessageType"
+};
diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/queries/feeds/feed-with-meta-pk-in-meta/feed-with-meta-pk-in-meta.1.ddl.aql b/asterixdb/asterix-app/src/test/resources/runtimets/queries/feeds/feed-with-meta-pk-in-meta/feed-with-meta-pk-in-meta.1.ddl.aql
index 601986f..5b4bb29 100644
--- a/asterixdb/asterix-app/src/test/resources/runtimets/queries/feeds/feed-with-meta-pk-in-meta/feed-with-meta-pk-in-meta.1.ddl.aql
+++ b/asterixdb/asterix-app/src/test/resources/runtimets/queries/feeds/feed-with-meta-pk-in-meta/feed-with-meta-pk-in-meta.1.ddl.aql
@@ -41,15 +41,16 @@
 
 create dataset KVStore(DocumentType) with meta(KVMetaType)primary key meta().id;
 
-create feed KVStream using adapter(
- ("reader"="localfs"),
- ("parser"="record-with-metadata"),
- ("type-name"="DocumentType"),
- ("meta-type-name"="KVMetaType"),
- ("path"="asterix_nc1://target/data/csv/openbeerdb/beer.csv"),
- ("format"="csv"),
- ("delimiter"=","),
- ("record-format"="adm"),
- ("record-index"="4"),
- ("header"="true")
-);
\ No newline at end of file
+create feed KVStream with {
+ "adapter-name" : "adapter",
+ "reader" : "localfs",
+ "parser" : "record-with-metadata",
+ "type-name" : "DocumentType",
+ "meta-type-name" : "KVMetaType",
+ "path" : "asterix_nc1://target/data/csv/openbeerdb/beer.csv",
+ "format" : "csv",
+ "delimiter" : ",",
+ "record-format" : "adm",
+ "record-index" : "4",
+ "header" : "true"
+};
diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/queries/feeds/feed-with-multiple-indexes/feed-with-multiple-indexes.3.ddl.aql b/asterixdb/asterix-app/src/test/resources/runtimets/queries/feeds/feed-with-multiple-indexes/feed-with-multiple-indexes.3.ddl.aql
index 2c60692..fc7b95d 100644
--- a/asterixdb/asterix-app/src/test/resources/runtimets/queries/feeds/feed-with-multiple-indexes/feed-with-multiple-indexes.3.ddl.aql
+++ b/asterixdb/asterix-app/src/test/resources/runtimets/queries/feeds/feed-with-multiple-indexes/feed-with-multiple-indexes.3.ddl.aql
@@ -24,9 +24,11 @@
  */
 use dataverse externallibtest;
 
-create feed CondorFeed using push_localfs(
-("path"="asterix_nc1://data/external-parser/dropbox/jobads1.txt,asterix_nc1://data/external-parser/dropbox/jobads2.txt"),
-("reader"="localfs"),
-("format"="semi-structured"),
-("parser"="testlib#org.apache.asterix.external.library.ClassAdParserFactory"),
-("type-name"="Classad"));
+create feed CondorFeed with {
+  "adapter-name" : "push_localfs",
+  "path" : "asterix_nc1://data/external-parser/dropbox/jobads1.txt,asterix_nc1://data/external-parser/dropbox/jobads2.txt",
+  "reader" : "localfs",
+  "format" : "semi-structured",
+  "parser" : "testlib#org.apache.asterix.external.library.ClassAdParserFactory",
+  "type-name" : "Classad"
+};
diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/queries/feeds/feed-with-undefined-function/feed-with-undefined-function.1.ddl.aql b/asterixdb/asterix-app/src/test/resources/runtimets/queries/feeds/feed-with-undefined-function/feed-with-undefined-function.1.ddl.aql
index d294772..8b9d007 100644
--- a/asterixdb/asterix-app/src/test/resources/runtimets/queries/feeds/feed-with-undefined-function/feed-with-undefined-function.1.ddl.aql
+++ b/asterixdb/asterix-app/src/test/resources/runtimets/queries/feeds/feed-with-undefined-function/feed-with-undefined-function.1.ddl.aql
@@ -29,11 +29,12 @@
   timestamp : string
 }
 
-create feed TweetFeed
-using localfs
-(("type-name"="TweetInputType"),
-("path"="asterix_nc1://data/twitter/obamatweets.adm"),
-("format"="adm"));
+create feed TweetFeed with {
+  "adapter-name" : "localfs",
+  "type-name" : "TweetInputType",
+  "path" : "asterix_nc1://data/twitter/obamatweets.adm",
+  "format" : "adm"
+};
 
 create dataset TweetsFeedIngest(TweetInputType)
 primary key id;
diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/queries/feeds/feeds_01/feeds_01.1.ddl.aql b/asterixdb/asterix-app/src/test/resources/runtimets/queries/feeds/feeds_01/feeds_01.1.ddl.aql
index 171c067..1a260ea 100644
--- a/asterixdb/asterix-app/src/test/resources/runtimets/queries/feeds/feeds_01/feeds_01.1.ddl.aql
+++ b/asterixdb/asterix-app/src/test/resources/runtimets/queries/feeds/feeds_01/feeds_01.1.ddl.aql
@@ -36,6 +36,10 @@
 create dataset Tweets(TweetType)
 primary key id;
 
-create feed TweetFeed
-using localfs
-(("type-name"="TweetType"),("path"="asterix_nc1://data/twitter/obamatweets.adm"),("format"="adm"),("tuple-interval"="10"))
+create feed TweetFeed with {
+  "adapter-name" : "localfs",
+  "type-name" : "TweetType",
+  "path" : "asterix_nc1://data/twitter/obamatweets.adm",
+  "format" : "adm",
+  "tuple-interval" : "10"
+};
diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/queries/feeds/feeds_02/feeds_02.1.ddl.aql b/asterixdb/asterix-app/src/test/resources/runtimets/queries/feeds/feeds_02/feeds_02.1.ddl.aql
index 589c93d..82371da 100644
--- a/asterixdb/asterix-app/src/test/resources/runtimets/queries/feeds/feeds_02/feeds_02.1.ddl.aql
+++ b/asterixdb/asterix-app/src/test/resources/runtimets/queries/feeds/feeds_02/feeds_02.1.ddl.aql
@@ -38,9 +38,11 @@
 create dataset Tweets(TweetType)
 primary key id;
 
-create feed  TweetFeed
-using localfs
-(("path"="asterix_nc1://data/twitter/obamatweets.adm"),
-("format"="adm"),
-("type-name"="TweetType"),
-("tuple-interval"="10"));
+create  feed TweetFeed with {
+  "adapter-name" : "localfs",
+  "path" : "asterix_nc1://data/twitter/obamatweets.adm",
+  "format": "adm",
+  "type-name" : "TweetType",
+  "tuple-interval" : "10"
+};
+
diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/queries/feeds/feeds_03/feeds_03.1.ddl.aql b/asterixdb/asterix-app/src/test/resources/runtimets/queries/feeds/feeds_03/feeds_03.1.ddl.aql
index 68fead0..cdd5f52 100644
--- a/asterixdb/asterix-app/src/test/resources/runtimets/queries/feeds/feeds_03/feeds_03.1.ddl.aql
+++ b/asterixdb/asterix-app/src/test/resources/runtimets/queries/feeds/feeds_03/feeds_03.1.ddl.aql
@@ -42,7 +42,10 @@
 $x
 }
 
-create feed TweetFeed
-using localfs
-(("type-name"="TweetType"),("path"="asterix_nc1://data/twitter/obamatweets.adm"),("format"="adm")
-,("tuple-interval"="10"));
+create feed TweetFeed with {
+ "adapter-name" : "localfs",
+  "type-name" : "TweetType",
+  "path" : "asterix_nc1://data/twitter/obamatweets.adm",
+  "format" : "adm",
+  "tuple-interval" : "10"
+};
\ No newline at end of file
diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/queries/feeds/feeds_07/feeds_07.1.ddl.aql b/asterixdb/asterix-app/src/test/resources/runtimets/queries/feeds/feeds_07/feeds_07.1.ddl.aql
index 0e881bc..f3ff1c9 100644
--- a/asterixdb/asterix-app/src/test/resources/runtimets/queries/feeds/feeds_07/feeds_07.1.ddl.aql
+++ b/asterixdb/asterix-app/src/test/resources/runtimets/queries/feeds/feeds_07/feeds_07.1.ddl.aql
@@ -53,13 +53,14 @@
 create dataset SyntheticTweets(TweetMessageType)
 primary key id;
 
-create feed  SyntheticTweetFeed
-using stream(
-("duration"="5"),
-("tps"="50"),
-("type-name"="TweetMessageType"),
-("format"="adm"),
-("stream-source"="org.apache.asterix.external.input.stream.factory.TwitterFirehoseStreamFactory"),
-("tput-duration"="5"),
-("dataverse-dataset"="feeds:SyntheticTweets"),
-("mode"="controlled"));
\ No newline at end of file
+create feed SyntheticTweetFeed with {
+  "adapter-name" : "stream",
+  "duration" : "5",
+  "tps" : "50",
+  "type-name" : "TweetMessageType",
+  "format" : "adm",
+  "stream-source" : "org.apache.asterix.external.input.stream.factory.TwitterFirehoseStreamFactory",
+  "tput-duration" : "5",
+  "dataverse-dataset" : "feeds:SyntheticTweets",
+  "mode" : "controlled"
+};
\ No newline at end of file
diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/queries/feeds/feeds_08/feeds_08.1.ddl.aql b/asterixdb/asterix-app/src/test/resources/runtimets/queries/feeds/feeds_08/feeds_08.1.ddl.aql
index b2300f2..8f5c9d2 100644
--- a/asterixdb/asterix-app/src/test/resources/runtimets/queries/feeds/feeds_08/feeds_08.1.ddl.aql
+++ b/asterixdb/asterix-app/src/test/resources/runtimets/queries/feeds/feeds_08/feeds_08.1.ddl.aql
@@ -57,13 +57,14 @@
 
 create index ngram_index on SyntheticTweets(message_text) type ngram(3);
 
-create feed  SyntheticTweetFeed
-using stream
-(("duration"="5"),
-("stream-source"="org.apache.asterix.external.input.stream.factory.TwitterFirehoseStreamFactory"),
-("tps"="50"),
-("type-name"="TweetMessageType"),
-("tput-duration"="5"),
-("dataverse-dataset"="feeds:SyntheticTweets"),
-("format"="adm"),
-("mode"="controlled"));
+create  feed SyntheticTweetFeed with {
+ "adapter-name" : "stream",
+ "duration" : "5",
+ "tps" : "50",
+ "stream-source" : "org.apache.asterix.external.input.stream.factory.TwitterFirehoseStreamFactory",
+ "type-name" : "TweetMessageType",
+ "tput-duration" : "5",
+ "dataverse-dataset" : "feeds:SyntheticTweets",
+ "format" : "adm",
+ "mode" : "controlled"
+};
diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/queries/feeds/feeds_09/feeds_09.1.ddl.aql b/asterixdb/asterix-app/src/test/resources/runtimets/queries/feeds/feeds_09/feeds_09.1.ddl.aql
index 7c0ac29..0be61d3 100644
--- a/asterixdb/asterix-app/src/test/resources/runtimets/queries/feeds/feeds_09/feeds_09.1.ddl.aql
+++ b/asterixdb/asterix-app/src/test/resources/runtimets/queries/feeds/feeds_09/feeds_09.1.ddl.aql
@@ -55,13 +55,13 @@
 
 create index message_text on SyntheticTweets(message_text) type btree;
 
-create feed  SyntheticTweetFeed
-using stream
-(("duration"="5"),
-("tps"="50"),
-("tput-duration"="5"),
-("type-name"="TweetMessageType"),
-("dataverse-dataset"="feeds:SyntheticTweets"),
-("format"="adm"),
-("stream-source"="org.apache.asterix.external.input.stream.factory.TwitterFirehoseStreamFactory"),
-("mode"="controlled"));
+create  feed SyntheticTweetFeed with {
+ "adapter-name" : "stream",
+ "duration" : "5",
+ "tps" : "50","tput-duration" : "5",
+ "type-name" : "TweetMessageType",
+ "dataverse-dataset" : "feeds:SyntheticTweets",
+ "format" : "adm",
+ "stream-source" : "org.apache.asterix.external.input.stream.factory.TwitterFirehoseStreamFactory",
+ "mode" : "controlled"
+};
\ No newline at end of file
diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/queries/feeds/feeds_10/feeds_10.1.ddl.aql b/asterixdb/asterix-app/src/test/resources/runtimets/queries/feeds/feeds_10/feeds_10.1.ddl.aql
index 75410f4..10b003a 100644
--- a/asterixdb/asterix-app/src/test/resources/runtimets/queries/feeds/feeds_10/feeds_10.1.ddl.aql
+++ b/asterixdb/asterix-app/src/test/resources/runtimets/queries/feeds/feeds_10/feeds_10.1.ddl.aql
@@ -43,9 +43,10 @@
 
 create index usernameIdx on Tweets(username) type btree;
 
-create feed TweetFeed
-using localfs
-(("path"="asterix_nc1://data/twitter/obamatweets.adm"),
-("format"="adm"),
-("type-name"="TweetType"),
-("tuple-interval"="10"));
+create  feed TweetFeed with {
+  "adapter-name" : "localfs",
+  "path" : "asterix_nc1://data/twitter/obamatweets.adm",
+  "format" : "adm",
+  "type-name" : "TweetType",
+  "tuple-interval" : "10"
+};
diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/queries/feeds/feeds_11/feeds_11.1.ddl.aql b/asterixdb/asterix-app/src/test/resources/runtimets/queries/feeds/feeds_11/feeds_11.1.ddl.aql
index f139d01..ac38c96 100644
--- a/asterixdb/asterix-app/src/test/resources/runtimets/queries/feeds/feeds_11/feeds_11.1.ddl.aql
+++ b/asterixdb/asterix-app/src/test/resources/runtimets/queries/feeds/feeds_11/feeds_11.1.ddl.aql
@@ -38,9 +38,10 @@
 create dataset Tweets(TweetType)
 primary key id;
 
-create feed TweetFeed
-using localfs
-(("path"="asterix_nc1://data/twitter/obamatweets.adm"),
-("format"="adm"),
-("type-name"="TweetType"),
-("tuple-interval"="10"));
\ No newline at end of file
+create  feed TweetFeed with {
+  "adapter-name" : "localfs",
+  "path" : "asterix_nc1://data/twitter/obamatweets.adm",
+  "format" : "adm",
+  "type-name" : "TweetType",
+  "tuple-interval" : "10"
+};
\ No newline at end of file
diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/queries/feeds/feeds_12/feeds_12.1.ddl.aql b/asterixdb/asterix-app/src/test/resources/runtimets/queries/feeds/feeds_12/feeds_12.1.ddl.aql
index dbf77ef..6fa9c45 100644
--- a/asterixdb/asterix-app/src/test/resources/runtimets/queries/feeds/feeds_12/feeds_12.1.ddl.aql
+++ b/asterixdb/asterix-app/src/test/resources/runtimets/queries/feeds/feeds_12/feeds_12.1.ddl.aql
@@ -41,9 +41,10 @@
 create dataset Tweets(TweetType)
 primary key id;
 
-create feed TweetFeed
-using localfs
-(("path"="asterix_nc1://data/twitter/obamatweets_duplicate.adm"),
-("format"="adm"),
-("type-name"="TweetType"),
-("tuple-interval"="10"));
+create feed TweetFeed with {
+  "adapter-name" : "localfs",
+  "path":"asterix_nc1://data/twitter/obamatweets_duplicate.adm",
+  "format":"adm",
+  "type-name":"TweetType",
+  "tuple-interval":"10"
+};
\ No newline at end of file
diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/queries/feeds/insert-feed/insert-feed.1.ddl.aql b/asterixdb/asterix-app/src/test/resources/runtimets/queries/feeds/insert-feed/insert-feed.1.ddl.aql
index 8dba0fe..052df1f 100644
--- a/asterixdb/asterix-app/src/test/resources/runtimets/queries/feeds/insert-feed/insert-feed.1.ddl.aql
+++ b/asterixdb/asterix-app/src/test/resources/runtimets/queries/feeds/insert-feed/insert-feed.1.ddl.aql
@@ -35,11 +35,11 @@
 
 create dataset TwitterUsers(TwitterUser) primary key screen-name;
 
-create feed UserFeed using socket_adapter
-(
-    ("sockets"="127.0.0.1:10001"),
-    ("address-type"="IP"),
-    ("type-name"="TwitterUser"),
-    ("format"="adm"),
-    ("insert-feed"="true")
-);
\ No newline at end of file
+create feed UserFeed with {
+ "adapter-name" : "socket_adapter",
+  "sockets" : "127.0.0.1:10001",
+  "address-type" : "IP",
+  "type-name" : "TwitterUser",
+  "format" : "adm",
+  "insert-feed" : "true"
+};
diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/queries/feeds/issue_230_feeds/issue_230_feeds.1.ddl.aql b/asterixdb/asterix-app/src/test/resources/runtimets/queries/feeds/issue_230_feeds/issue_230_feeds.1.ddl.aql
index 237c949..d999665 100644
--- a/asterixdb/asterix-app/src/test/resources/runtimets/queries/feeds/issue_230_feeds/issue_230_feeds.1.ddl.aql
+++ b/asterixdb/asterix-app/src/test/resources/runtimets/queries/feeds/issue_230_feeds/issue_230_feeds.1.ddl.aql
@@ -38,11 +38,10 @@
 create dataset Tweets(TweetType)
 primary key id;
 
-create feed TweetFeed
-using localfs
-(("path"="asterix_nc1://data/twitter/obamatweets.adm"),
-("format"="adm"),
-("type-name"="TweetType"),
-("tuple-interval"="10"));
-
-
+create feed TweetFeed with {
+  "adapter-name" : "localfs",
+  "path" : "asterix_nc1://data/twitter/obamatweets.adm",
+  "format" : "adm",
+  "type-name" : "TweetType",
+  "tuple-interval" : "10"
+};
diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/queries/feeds/push-socket-with-auuid/push-socket-with-auuid.1.ddl.aql b/asterixdb/asterix-app/src/test/resources/runtimets/queries/feeds/push-socket-with-auuid/push-socket-with-auuid.1.ddl.aql
index d234ecf..9b11ff7 100644
--- a/asterixdb/asterix-app/src/test/resources/runtimets/queries/feeds/push-socket-with-auuid/push-socket-with-auuid.1.ddl.aql
+++ b/asterixdb/asterix-app/src/test/resources/runtimets/queries/feeds/push-socket-with-auuid/push-socket-with-auuid.1.ddl.aql
@@ -62,10 +62,10 @@
 create dataset DBLP1(DBLPType1) primary key id autogenerated;
 create dataset DBLP2(DBLPType2) primary key dblpid;
 
-create feed DBLPFeed using socket_adapter
-(
-    ("sockets"="127.0.0.1:10001"),
-    ("address-type"="IP"),
-    ("type-name"="DBLPFeedType"),
-    ("format"="adm")
-);
\ No newline at end of file
+create feed DBLPFeed with {
+  "adapter-name" : "socket_adapter",
+  "sockets" : "127.0.0.1:10001",
+  "address-type" : "IP",
+  "type-name" : "DBLPFeedType",
+  "format" : "adm"
+};
diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/queries/feeds/record-reader-with-malformed-input-stream/record-reader-with-malformed-input-stream.1.ddl.aql b/asterixdb/asterix-app/src/test/resources/runtimets/queries/feeds/record-reader-with-malformed-input-stream/record-reader-with-malformed-input-stream.1.ddl.aql
index 747c858..1b37ef0 100644
--- a/asterixdb/asterix-app/src/test/resources/runtimets/queries/feeds/record-reader-with-malformed-input-stream/record-reader-with-malformed-input-stream.1.ddl.aql
+++ b/asterixdb/asterix-app/src/test/resources/runtimets/queries/feeds/record-reader-with-malformed-input-stream/record-reader-with-malformed-input-stream.1.ddl.aql
@@ -26,7 +26,9 @@
 
 create dataset Restaurants(RestaurantsType) primary key restr_id;
 
-create feed RFeed using localfs
-(("type-name"="RestaurantsType"),
-("path"="asterix_nc1://data/restaurants/"), /* This test case reply on restaurants.adm implicitly*/
-("format"="adm"));
\ No newline at end of file
+create feed RFeed with {
+  "adapter-name" : "localfs",
+  "type-name" : "RestaurantsType",
+  "path" : "asterix_nc1://data/restaurants/", /* This test case reply on restaurants.adm implicitly*/
+  "format" : "adm"
+};
diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/queries/feeds/revised-tweet-parser/revised-tweet-parser.1.ddl.aql b/asterixdb/asterix-app/src/test/resources/runtimets/queries/feeds/revised-tweet-parser/revised-tweet-parser.1.ddl.aql
index ddffc43..970fe06 100644
--- a/asterixdb/asterix-app/src/test/resources/runtimets/queries/feeds/revised-tweet-parser/revised-tweet-parser.1.ddl.aql
+++ b/asterixdb/asterix-app/src/test/resources/runtimets/queries/feeds/revised-tweet-parser/revised-tweet-parser.1.ddl.aql
@@ -47,9 +47,11 @@
 create dataset Tweets (Tweet)
 primary key id;
 
-create feed TwitterFeed using push_twitter(
-("type-name"="Tweet"),
-("format"="twitter-status"),//
-("consumer.key"="************"),
-("access.token"="************"),
-("access.token.secret"="************"));
\ No newline at end of file
+create feed TwitterFeed with {
+  "adapter-name" : "push_twitter",
+  "type-name" : "Tweet",
+  "format" : "twitter-status",//
+  "consumer.key" : "************",
+  "access.token" : "************",
+  "access.token.secret" : "************"
+};
diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/queries/feeds/start-feed/start-feed.1.ddl.aql b/asterixdb/asterix-app/src/test/resources/runtimets/queries/feeds/start-feed/start-feed.1.ddl.aql
index f14d609..66d9a99 100644
--- a/asterixdb/asterix-app/src/test/resources/runtimets/queries/feeds/start-feed/start-feed.1.ddl.aql
+++ b/asterixdb/asterix-app/src/test/resources/runtimets/queries/feeds/start-feed/start-feed.1.ddl.aql
@@ -50,10 +50,10 @@
 create dataset Tweets1(TweetMessageType) primary key tweetid;
 create dataset Tweets2(TweetMessageType) primary key tweetid;
 
-create feed TweetFeed using socket_adapter
-(
-    ("sockets"="127.0.0.1:10001"),
-    ("address-type"="IP"),
-    ("type-name"="TweetMessageType"),
-    ("format"="adm")
-);
\ No newline at end of file
+create feed TweetFeed with {
+  "adapter-name" : "socket_adapter",
+  "sockets" : "127.0.0.1:10001",
+  "address-type" : "IP",
+  "type-name" : "TweetMessageType",
+  "format" : "adm"
+};
\ No newline at end of file
diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/queries/feeds/start-started-feed/start-started-feed.0.ddl.aql b/asterixdb/asterix-app/src/test/resources/runtimets/queries/feeds/start-started-feed/start-started-feed.0.ddl.aql
index f7e30c1..483630a 100644
--- a/asterixdb/asterix-app/src/test/resources/runtimets/queries/feeds/start-started-feed/start-started-feed.0.ddl.aql
+++ b/asterixdb/asterix-app/src/test/resources/runtimets/queries/feeds/start-started-feed/start-started-feed.0.ddl.aql
@@ -28,13 +28,13 @@
 create dataset Tweets1(TweetMessageType) primary key tweetid;
 create dataset Tweets2(TweetMessageType) primary key tweetid;
 
-create feed TweetFeed using socket_adapter
-(
- ("sockets"="127.0.0.1:10001"),
- ("address-type"="IP"),
- ("type-name"="TweetMessageType"),
- ("format"="adm")
-);
+create feed TweetFeed with {
+  "adapter-name" : "socket_adapter",
+  "sockets" : "127.0.0.1:10001",
+  "address-type" : "IP",
+  "type-name" : "TweetMessageType",
+  "format" : "adm"
+};
 
 connect feed TweetFeed to dataset Tweets1;
 connect feed TweetFeed to dataset Tweets2;
diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/queries/feeds/stop-stopped-feed/stop-stopped-feed.0.ddl.aql b/asterixdb/asterix-app/src/test/resources/runtimets/queries/feeds/stop-stopped-feed/stop-stopped-feed.0.ddl.aql
index 00fb12d..932fd1f 100644
--- a/asterixdb/asterix-app/src/test/resources/runtimets/queries/feeds/stop-stopped-feed/stop-stopped-feed.0.ddl.aql
+++ b/asterixdb/asterix-app/src/test/resources/runtimets/queries/feeds/stop-stopped-feed/stop-stopped-feed.0.ddl.aql
@@ -29,13 +29,13 @@
 create dataset Tweets1(TweetMessageType) primary key tweetid;
 create dataset Tweets2(TweetMessageType) primary key tweetid;
 
-create feed TweetFeed using socket_adapter
-(
- ("sockets"="127.0.0.1:10001"),
- ("address-type"="IP"),
- ("type-name"="TweetMessageType"),
- ("format"="adm")
-);
+create feed TweetFeed with {
+ "adapter-name" : "socket_adapter",
+ "sockets" : "127.0.0.1:10001",
+ "address-type" : "IP",
+ "type-name" : "TweetMessageType",
+ "format" : "adm"
+};
 
 connect feed TweetFeed to dataset Tweets1;
 connect feed TweetFeed to dataset Tweets2;
diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/queries/feeds/twitter-feed/twitter-feed.1.ddl.aql b/asterixdb/asterix-app/src/test/resources/runtimets/queries/feeds/twitter-feed/twitter-feed.1.ddl.aql
index d7827c5..66cc3bb 100644
--- a/asterixdb/asterix-app/src/test/resources/runtimets/queries/feeds/twitter-feed/twitter-feed.1.ddl.aql
+++ b/asterixdb/asterix-app/src/test/resources/runtimets/queries/feeds/twitter-feed/twitter-feed.1.ddl.aql
@@ -4,7 +4,7 @@
  * distributed with this work for additional information
  * regarding copyright ownership.  The ASF licenses this file
  * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
+ * "License"; you may not use this file except in compliance
  * with the License.  You may obtain a copy of the License at
  *
  *   http://www.apache.org/licenses/LICENSE-2.0
@@ -46,9 +46,11 @@
 create dataset Tweets (Tweet)
 primary key id;
 
-create feed TwitterFeed using push_twitter(
-("type-name"="Tweet"),
-("format"="twitter-status"),
-("consumer.key"="************"),
-("access.token"="**********"),
-("access.token.secret"="*************"));
\ No newline at end of file
+create feed TwitterFeed with {
+ "adapter-name" : "push_twitter",
+ "type-name" : "Tweet",
+ "format" : "twitter-status",
+ "consumer.key" : "************",
+ "access.token" : "**********",
+ "access.token.secret" : "*************"
+};
diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/queries/filters/delete/delete.1.ddl.aql b/asterixdb/asterix-app/src/test/resources/runtimets/queries/filters/delete/delete.1.ddl.aql
index da5aeab..d8254fb 100644
--- a/asterixdb/asterix-app/src/test/resources/runtimets/queries/filters/delete/delete.1.ddl.aql
+++ b/asterixdb/asterix-app/src/test/resources/runtimets/queries/filters/delete/delete.1.ddl.aql
@@ -92,10 +92,10 @@
 create index text_idx if not exists on Tweet("text") type fulltext;
 create index state_idx if not exists on Tweet(geo_tag.stateID) type btree;
 
-create feed TweetFeed using socket_adapter
-(
-    ("sockets"="127.0.0.1:10001"),
-    ("address-type"="IP"),
-    ("type-name"="typeTweet"),
-    ("format"="adm")
-);
+create feed TweetFeed with {
+  "adapter-name" : "socket_adapter",
+  "sockets" : "127.0.0.1:10001",
+  "address-type" : "IP",
+  "type-name" : "typeTweet",
+  "format" : "adm"
+};
diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/queries/filters/upsert/upsert.1.ddl.aql b/asterixdb/asterix-app/src/test/resources/runtimets/queries/filters/upsert/upsert.1.ddl.aql
index cb270f9..ae8dbd0 100644
--- a/asterixdb/asterix-app/src/test/resources/runtimets/queries/filters/upsert/upsert.1.ddl.aql
+++ b/asterixdb/asterix-app/src/test/resources/runtimets/queries/filters/upsert/upsert.1.ddl.aql
@@ -92,10 +92,10 @@
 create index text_idx if not exists on Tweet("text") type btree;
 create index state_idx if not exists on Tweet(geo_tag.stateID) type btree;
 
-create feed TweetFeed using socket_adapter
-(
-    ("sockets"="127.0.0.1:10001"),
-    ("address-type"="IP"),
-    ("type-name"="typeTweet"),
-    ("format"="adm")
-);
+create feed TweetFeed with {
+  "adapter-name" : "socket_adapter",
+  "sockets" : "127.0.0.1:10001",
+  "address-type" : "IP",
+  "type-name" : "typeTweet",
+  "format" : "adm"
+};
diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/queries/hints/issue_251_dataset_hint_7/issue_251_dataset_hint_7.1.ddl.aql b/asterixdb/asterix-app/src/test/resources/runtimets/queries/hints/issue_251_dataset_hint_7/issue_251_dataset_hint_7.1.ddl.aql
index 460c9b4..a6a0add 100644
--- a/asterixdb/asterix-app/src/test/resources/runtimets/queries/hints/issue_251_dataset_hint_7/issue_251_dataset_hint_7.1.ddl.aql
+++ b/asterixdb/asterix-app/src/test/resources/runtimets/queries/hints/issue_251_dataset_hint_7/issue_251_dataset_hint_7.1.ddl.aql
@@ -39,9 +39,10 @@
 primary key id
 hints(cardinality=200);
 
-create feed TweetFeed
-using localfs
-(("path"="asterix_nc1://data/twitter/obamatweets.adm"),
-("format"="adm"),
-("type-name"="TweetType"),
-("tuple-interval"="10"));
+create feed TweetFeed with {
+ "adapter-name" : "localfs",
+ "path" : "asterix_nc1://data/twitter/obamatweets.adm",
+ "format" : "adm",
+ "type-name" : "TweetType",
+ "tuple-interval" : "10"
+};
\ No newline at end of file
diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/dml/scan-delete-btree-correlated-secondary-index-nullable/scan-delete-btree-correlated-secondary-index-nullable.1.ddl.sqlpp b/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/dml/scan-delete-btree-correlated-secondary-index-nullable/scan-delete-btree-correlated-secondary-index-nullable.1.ddl.sqlpp
index 70ae710..e25121b 100644
--- a/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/dml/scan-delete-btree-correlated-secondary-index-nullable/scan-delete-btree-correlated-secondary-index-nullable.1.ddl.sqlpp
+++ b/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/dml/scan-delete-btree-correlated-secondary-index-nullable/scan-delete-btree-correlated-secondary-index-nullable.1.ddl.sqlpp
@@ -59,11 +59,10 @@
   }
 };
 
-
-create feed CustomerFeed
-using localfs
-(("path"="asterix_nc1://data/semistructured/co1k/customer.adm"),
-("format"="adm"),
-("type-name"="CustomerType"),
-("tuple-interval"="10"));
-
+create feed CustomerFeed with {
+ "adapter-name" : "localfs",
+ "path" : "asterix_nc1://data/semistructured/co1k/customer.adm",
+ "format" : "adm",
+ "type-name" : "CustomerType",
+ "tuple-interval" : "10"
+};
\ No newline at end of file
diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/dml/scan-delete-inverted-index-ngram-correlated-secondary-index-nullable/scan-delete-inverted-index-ngram-correlated-secondary-index-nullable.1.ddl.sqlpp b/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/dml/scan-delete-inverted-index-ngram-correlated-secondary-index-nullable/scan-delete-inverted-index-ngram-correlated-secondary-index-nullable.1.ddl.sqlpp
index f867ad4..764a473 100644
--- a/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/dml/scan-delete-inverted-index-ngram-correlated-secondary-index-nullable/scan-delete-inverted-index-ngram-correlated-secondary-index-nullable.1.ddl.sqlpp
+++ b/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/dml/scan-delete-inverted-index-ngram-correlated-secondary-index-nullable/scan-delete-inverted-index-ngram-correlated-secondary-index-nullable.1.ddl.sqlpp
@@ -47,10 +47,11 @@
   }
 };
 
-create feed DBLPFeed
-using localfs
-((`path`=`asterix_nc1://data/dblp-small/dblp-small-nulls.adm`),
-(`format`=`adm`),
-(`delimiter`=`:`),
-(`type-name`=`DBLPType`),
-(`tuple-interval`=`10`));
+create feed DBLPFeed with {
+ "adapter-name" : "localfs",
+ "path":"asterix_nc1://data/dblp-small/dblp-small-nulls.adm",
+ "format":"adm",
+ "delimiter":":",
+ "type-name":"DBLPType",
+ "tuple-interval":"10"
+};
diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/dml/scan-delete-inverted-index-ngram-correlated-secondary-index/scan-delete-inverted-index-ngram-correlated-secondary-index.1.ddl.sqlpp b/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/dml/scan-delete-inverted-index-ngram-correlated-secondary-index/scan-delete-inverted-index-ngram-correlated-secondary-index.1.ddl.sqlpp
index 79b4547..2a0eaee 100644
--- a/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/dml/scan-delete-inverted-index-ngram-correlated-secondary-index/scan-delete-inverted-index-ngram-correlated-secondary-index.1.ddl.sqlpp
+++ b/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/dml/scan-delete-inverted-index-ngram-correlated-secondary-index/scan-delete-inverted-index-ngram-correlated-secondary-index.1.ddl.sqlpp
@@ -46,10 +46,11 @@
   }
 };
 
-create feed DBLPFeed
-using localfs
-((`path`=`asterix_nc1://data/dblp-small/dblp-small-id.txt`),
-(`format`=`delimited-text`),
-(`delimiter`=`:`),
-(`type-name`=`DBLPType`),
-(`tuple-interval`=`10`));
+create feed DBLPFeed with {
+ "adapter-name" : "localfs",
+ "path":"asterix_nc1://data/dblp-small/dblp-small-id.txt",
+ "format":"delimited-text",
+ "delimiter":":",
+ "type-name":"DBLPType",
+ "tuple-interval":"10"
+};
diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/dml/scan-delete-inverted-index-word-correlated-secondary-index-nullable/scan-delete-inverted-index-word-correlated-secondary-index-nullable.1.ddl.sqlpp b/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/dml/scan-delete-inverted-index-word-correlated-secondary-index-nullable/scan-delete-inverted-index-word-correlated-secondary-index-nullable.1.ddl.sqlpp
index e22bdc1..4dc54b6 100644
--- a/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/dml/scan-delete-inverted-index-word-correlated-secondary-index-nullable/scan-delete-inverted-index-word-correlated-secondary-index-nullable.1.ddl.sqlpp
+++ b/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/dml/scan-delete-inverted-index-word-correlated-secondary-index-nullable/scan-delete-inverted-index-word-correlated-secondary-index-nullable.1.ddl.sqlpp
@@ -47,9 +47,11 @@
   }
 };
 
-create feed DBLPFeed
-using localfs
-((`path`=`asterix_nc1://data/dblp-small/dblp-small-nulls.adm`),
-(`format`=`adm`),
-(`type-name`=`DBLPType`),
-(`tuple-interval`=`10`));
+create feed DBLPFeed with {
+ "adapter-name" : "localfs",
+ "path":"asterix_nc1://data/dblp-small/dblp-small-nulls.adm",
+ "format":"adm",
+ "delimiter":":",
+ "type-name":"DBLPType",
+ "tuple-interval":"10"
+};
diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/dml/scan-delete-inverted-index-word-correlated-secondary-index/scan-delete-inverted-index-word-correlated-secondary-index.1.ddl.sqlpp b/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/dml/scan-delete-inverted-index-word-correlated-secondary-index/scan-delete-inverted-index-word-correlated-secondary-index.1.ddl.sqlpp
index 7ea63ee..b7b64c3 100644
--- a/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/dml/scan-delete-inverted-index-word-correlated-secondary-index/scan-delete-inverted-index-word-correlated-secondary-index.1.ddl.sqlpp
+++ b/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/dml/scan-delete-inverted-index-word-correlated-secondary-index/scan-delete-inverted-index-word-correlated-secondary-index.1.ddl.sqlpp
@@ -47,11 +47,11 @@
 };
 
 
-create feed DBLPFeed
-using localfs
-((`path`=`asterix_nc1://data/dblp-small/dblp-small-id.txt`),
-(`format`=`delimited-text`),
-(`delimiter`=`:`),
-(`type-name`=`DBLPType`),
-(`tuple-interval`=`10`));
-
+create feed DBLPFeed with {
+ "adapter-name" : "localfs",
+ "path":"asterix_nc1://data/dblp-small/dblp-small-id.txt",
+ "format":"delimited-text",
+ "delimiter":":",
+ "type-name":"DBLPType",
+ "tuple-interval":"10"
+};
diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/dml/scan-delete-rtree-correlated-secondary-index-nullable/scan-delete-rtree-correlated-secondary-index-nullable.1.ddl.sqlpp b/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/dml/scan-delete-rtree-correlated-secondary-index-nullable/scan-delete-rtree-correlated-secondary-index-nullable.1.ddl.sqlpp
index 8481c6f..e6226ca 100644
--- a/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/dml/scan-delete-rtree-correlated-secondary-index-nullable/scan-delete-rtree-correlated-secondary-index-nullable.1.ddl.sqlpp
+++ b/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/dml/scan-delete-rtree-correlated-secondary-index-nullable/scan-delete-rtree-correlated-secondary-index-nullable.1.ddl.sqlpp
@@ -50,10 +50,11 @@
   }
 };
 
-create feed MyFeed
-using localfs
-((`path`=`asterix_nc1://data/spatial/spatialDataNulls.json`),
-(`format`=`adm`),
-(`type-name`=`MyRecord`),
-(`tuple-interval`=`10`));
+create feed MyFeed with {
+ "adapter-name" : "localfs",
+ "path" : "asterix_nc1://data/spatial/spatialDataNulls.json",
+ "format" : "adm",
+ "type-name" : "MyRecord",
+ "tuple-interval" : "10"
+};
 
diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/dml/scan-delete-rtree-correlated-secondary-index/scan-delete-rtree-correlated-secondary-index.1.ddl.sqlpp b/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/dml/scan-delete-rtree-correlated-secondary-index/scan-delete-rtree-correlated-secondary-index.1.ddl.sqlpp
index 82494ee..d4a392e 100644
--- a/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/dml/scan-delete-rtree-correlated-secondary-index/scan-delete-rtree-correlated-secondary-index.1.ddl.sqlpp
+++ b/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/dml/scan-delete-rtree-correlated-secondary-index/scan-delete-rtree-correlated-secondary-index.1.ddl.sqlpp
@@ -51,9 +51,10 @@
   }
 };
 
-create feed MyFeed
-using localfs
-((`path`=`asterix_nc1://data/spatial/spatialData.json`),
-(`format`=`adm`),
-(`type-name`=`MyRecord`),
-(`tuple-interval`=`10`));
+create feed MyFeed with {
+ "adapter-name" : "localfs",
+ "path" : "asterix_nc1://data/spatial/spatialData.json",
+ "format" : "adm",
+ "type-name" : "MyRecord",
+ "tuple-interval" : "10"
+};
diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/dml/scan-insert-rtree-correlated-secondary-index-nullable/scan-insert-rtree-correlated-secondary-index-nullable.1.ddl.sqlpp b/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/dml/scan-insert-rtree-correlated-secondary-index-nullable/scan-insert-rtree-correlated-secondary-index-nullable.1.ddl.sqlpp
index 7847d7e..f9e08de 100644
--- a/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/dml/scan-insert-rtree-correlated-secondary-index-nullable/scan-insert-rtree-correlated-secondary-index-nullable.1.ddl.sqlpp
+++ b/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/dml/scan-insert-rtree-correlated-secondary-index-nullable/scan-insert-rtree-correlated-secondary-index-nullable.1.ddl.sqlpp
@@ -65,10 +65,10 @@
   }
 };
 
-create feed MyFeed
-using localfs
-((`path`=`asterix_nc1://data/spatial/spatialDataNulls.json`),
-(`format`=`adm`),
-(`type-name`=`MyRecord`),
-(`tuple-interval`=`10`));
-
+create feed MyFeed with {
+ "adapter-name" : "localfs",
+ "path" : "asterix_nc1://data/spatial/spatialDataNulls.json",
+ "format" : "adm",
+ "type-name" : "MyRecord",
+ "tuple-interval" : "10"
+};
diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/dml/scan-insert-rtree-correlated-secondary-index-open/scan-insert-rtree-correlated-secondary-index-open.1.ddl.sqlpp b/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/dml/scan-insert-rtree-correlated-secondary-index-open/scan-insert-rtree-correlated-secondary-index-open.1.ddl.sqlpp
index f6a3ce6..c785252 100644
--- a/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/dml/scan-insert-rtree-correlated-secondary-index-open/scan-insert-rtree-correlated-secondary-index-open.1.ddl.sqlpp
+++ b/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/dml/scan-insert-rtree-correlated-secondary-index-open/scan-insert-rtree-correlated-secondary-index-open.1.ddl.sqlpp
@@ -64,10 +64,11 @@
   }
 };
 
-create feed MyFeed
-using localfs
-((`path`=`asterix_nc1://data/spatial/spatialData.json`),
-(`format`=`adm`),
-(`type-name`=`MyRecord`),
-(`tuple-interval`=`10`));
+create feed MyFeed with {
+ "adapter-name" : "localfs",
+ "path" : "asterix_nc1://data/spatial/spatialData.json",
+ "format" : "adm",
+ "type-name" : "MyRecord",
+ "tuple-interval" : "10"
+};
 
diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/dml/scan-insert-rtree-correlated-secondary-index/scan-insert-rtree-correlated-secondary-index.1.ddl.sqlpp b/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/dml/scan-insert-rtree-correlated-secondary-index/scan-insert-rtree-correlated-secondary-index.1.ddl.sqlpp
index 336d475..94e700a 100644
--- a/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/dml/scan-insert-rtree-correlated-secondary-index/scan-insert-rtree-correlated-secondary-index.1.ddl.sqlpp
+++ b/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/dml/scan-insert-rtree-correlated-secondary-index/scan-insert-rtree-correlated-secondary-index.1.ddl.sqlpp
@@ -57,19 +57,22 @@
   }
 };
 
-create feed MyFeed
-using localfs
-((`path`=`asterix_nc1://data/spatial/spatialData.json`),
-(`format`=`adm`),
-(`type-name`=`MyRecord`),
-(`tuple-interval`=`10`));
+create feed MyFeed with {
+ "adapter-name" : "localfs",
+ "path" : "asterix_nc1://data/spatial/spatialData.json",
+ "format" : "adm",
+ "type-name" : "MyRecord",
+ "tuple-interval" : "10"
+};
 
-create feed MyMiniFeed
-using localfs
-((`path`=`asterix_nc1://data/spatial/spatialData0.json`),
-(`format`=`adm`),
-(`type-name`=`MyMiniRecord`),
-(`tuple-interval`=`10`));
+
+create feed MyMiniFeed with {
+ "adapter-name" : "localfs",
+ "path" : "asterix_nc1://data/spatial/spatialData0.json",
+ "format" : "adm",
+ "type-name" : "MyMiniRecord",
+ "tuple-interval" : "10"
+};
 
 
 
diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/dml/using-correlated-prefix-merge-policy-with-feed/using-correlated-prefix-merge-policy-with-feed.1.ddl.sqlpp b/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/dml/using-correlated-prefix-merge-policy-with-feed/using-correlated-prefix-merge-policy-with-feed.1.ddl.sqlpp
index 1c22a9d..ad9b25a 100644
--- a/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/dml/using-correlated-prefix-merge-policy-with-feed/using-correlated-prefix-merge-policy-with-feed.1.ddl.sqlpp
+++ b/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/dml/using-correlated-prefix-merge-policy-with-feed/using-correlated-prefix-merge-policy-with-feed.1.ddl.sqlpp
@@ -57,10 +57,11 @@
   }
 };
 
-create feed LineItemFeed
-using localfs
-(("path"="asterix_nc1://data/tpch0.001/lineitem.tbl"),
-("format"="delimited-text"),
-("delimiter"="|"),
-("type-name"="LineItemType"),
-("tuple-interval"="10"));
+create feed LineItemFeed with {
+  "adapter-name" : "localfs",
+  "path" : "asterix_nc1://data/tpch0.001/lineitem.tbl",
+  "format" : "delimited-text",
+  "delimiter" : "|",
+  "type-name" : "LineItemType",
+  "tuple-interval" : "10"
+};
\ No newline at end of file
diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/external-library/return_invalid_type/return_invalid_type.1.ddl.sqlpp b/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/external-library/return_invalid_type/return_invalid_type.1.ddl.sqlpp
index e375558..385cee6 100644
--- a/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/external-library/return_invalid_type/return_invalid_type.1.ddl.sqlpp
+++ b/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/external-library/return_invalid_type/return_invalid_type.1.ddl.sqlpp
@@ -52,12 +52,22 @@
 
 create dataset SyntheticTweets(Tweet) primary key id;
 
-create feed  SyntheticTweetFeed using stream
-(("duration"="1"),
-("stream-source"="org.apache.asterix.external.input.stream.factory.TwitterFirehoseStreamFactory"),
-("tps"="50"),
-("type-name"="Tweet"),
-("tput-duration"="1"),
-("dataverse-dataset"="feeds:SyntheticTweets"),
-("format"="adm"),
-("mode"="controlled"));
+
+create feed TweetFeed with {
+  "adapter-name" : "socket_adapter",
+  "sockets" : "127.0.0.1:10001",
+  "address-type" : "IP",
+  "type-name" : "typeTweet",
+  "format" : "adm"
+};
+create feed  SyntheticTweetFeed with {
+  "adapter-name" : "stream",
+  "duration" : "1",
+  "stream-source" : "org.apache.asterix.external.input.stream.factory.TwitterFirehoseStreamFactory",
+  "tps" : "50",
+  "type-name" : "Tweet",
+  "tput-duration" : "1",
+  "dataverse-dataset" : "feeds:SyntheticTweets",
+  "format" : "adm",
+  "mode" : "controlled"
+};
\ No newline at end of file
diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/feeds/connect-feed-with-function/connect-feed-with-function.1.ddl.sqlpp b/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/feeds/connect-feed-with-function/connect-feed-with-function.1.ddl.sqlpp
index 4de5415..111486f 100644
--- a/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/feeds/connect-feed-with-function/connect-feed-with-function.1.ddl.sqlpp
+++ b/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/feeds/connect-feed-with-function/connect-feed-with-function.1.ddl.sqlpp
@@ -45,11 +45,11 @@
     object_merge((case (anyname.popularity = "Good!") when true then {"true_popularity":"Indeed Good!"} else {"true_popularity":"Indeed Bad!"} end), anyname)
 };
 
-create feed UserFeed using socket_adapter
-(
-    ("sockets"="127.0.0.1:10001"),
-    ("address-type"="IP"),
-    ("type-name"="TwitterUser"),
-    ("format"="adm"),
-    ("upsert-feed"="true")
-);
\ No newline at end of file
+create feed UserFeed with {
+    "adapter-name" : "socket_adapter",
+    "sockets" : "127.0.0.1:10001",
+    "address-type" : "IP",
+    "type-name" : "TwitterUser",
+    "format" : "adm",
+    "upsert-feed" : "true"
+};
\ No newline at end of file
diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/feeds/feed-with-external-function/feed-with-external-function.1.ddl.sqlpp b/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/feeds/feed-with-external-function/feed-with-external-function.1.ddl.sqlpp
index 9b0f2a0..4fdc669 100644
--- a/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/feeds/feed-with-external-function/feed-with-external-function.1.ddl.sqlpp
+++ b/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/feeds/feed-with-external-function/feed-with-external-function.1.ddl.sqlpp
@@ -43,11 +43,13 @@
   topics : {{string}}
 };
 
-create feed TweetFeed
-using localfs
-(("type-name"="TweetInputType"),
-("path"="asterix_nc1://data/twitter/obamatweets.adm"),
-("format"="adm"));
+create feed TweetFeed with
+{
+    "adapter-name" : "localfs",
+    "type-name" : "TweetInputType",
+    "path" : "asterix_nc1://data/twitter/obamatweets.adm",
+    "format" : "adm"
+};
 
 create dataset TweetsFeedIngest(TweetOutputType)
 primary key id;
diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/feeds/feeds_01/feeds_01.1.ddl.sqlpp b/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/feeds/feeds_01/feeds_01.1.ddl.sqlpp
index 7f79467..f381284 100644
--- a/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/feeds/feeds_01/feeds_01.1.ddl.sqlpp
+++ b/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/feeds/feeds_01/feeds_01.1.ddl.sqlpp
@@ -39,5 +39,10 @@
 
 create  dataset Tweets(TweetType) primary key id;
 
-create feed TweetFeed using localfs
-((`type-name`=`TweetType`),(`path`=`asterix_nc1://data/twitter/obamatweets.adm`),(`format`=`adm`),(`tuple-interval`=`10`));
+create feed TweetFeed with {
+ "adapter-name" : "localfs",
+ "type-name" : "TweetType",
+ "path" : "asterix_nc1://data/twitter/obamatweets.adm",
+ "format" : "adm",
+ "tuple-interval" : "10"
+};
diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/feeds/feeds_02/feeds_02.1.ddl.sqlpp b/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/feeds/feeds_02/feeds_02.1.ddl.sqlpp
index a0d01c2..de40e1a 100644
--- a/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/feeds/feeds_02/feeds_02.1.ddl.sqlpp
+++ b/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/feeds/feeds_02/feeds_02.1.ddl.sqlpp
@@ -39,8 +39,10 @@
 };
 
 create  dataset Tweets(TweetType) primary key id;
-create  feed TweetFeed using localfs
-((`path`=`asterix_nc1://data/twitter/obamatweets.adm`),
-(`format`=`adm`),
-(`type-name`=`TweetType`),
-(`tuple-interval`=`10`));
+create  feed TweetFeed with {
+  "adapter-name" : "localfs",
+  "path" : "asterix_nc1://data/twitter/obamatweets.adm",
+  "format": "adm",
+  "type-name" : "TweetType",
+  "tuple-interval" : "10"
+};
diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/feeds/feeds_03/feeds_03.1.ddl.sqlpp b/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/feeds/feeds_03/feeds_03.1.ddl.sqlpp
index 7b8e70c..4cff7b1 100644
--- a/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/feeds/feeds_03/feeds_03.1.ddl.sqlpp
+++ b/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/feeds/feeds_03/feeds_03.1.ddl.sqlpp
@@ -41,7 +41,10 @@
 x
 };
 
-create feed TweetFeed
-using localfs
-((`type-name`=`TweetType`),(`path`=`asterix_nc1://data/twitter/obamatweets.adm`),(`format`=`adm`)
-,(`tuple-interval`=`10`));
+create feed TweetFeed with {
+ "adapter-name" : "localfs",
+  "type-name" : "TweetType",
+  "path" : "asterix_nc1://data/twitter/obamatweets.adm",
+  "format" : "adm",
+  "tuple-interval" : "10"
+};
diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/feeds/feeds_07/feeds_07.1.ddl.sqlpp b/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/feeds/feeds_07/feeds_07.1.ddl.sqlpp
index 5553694..9e77b07 100644
--- a/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/feeds/feeds_07/feeds_07.1.ddl.sqlpp
+++ b/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/feeds/feeds_07/feeds_07.1.ddl.sqlpp
@@ -45,12 +45,14 @@
 
 create dataset SyntheticTweets(TweetMessageType) primary key id;
 
-create feed SyntheticTweetFeed using stream(
-(`duration`=`5`),
-(`tps`=`50`),
-(`type-name`=`TweetMessageType`),
-(`format`=`adm`),
-(`stream-source`=`org.apache.asterix.external.input.stream.factory.TwitterFirehoseStreamFactory`),
-(`tput-duration`=`5`),
-(`dataverse-dataset`=`feeds:SyntheticTweets`),
-(`mode`=`controlled`));
+create feed SyntheticTweetFeed with {
+  "adapter-name" : "stream",
+  "duration" : "5",
+  "tps" : "50",
+  "type-name" : "TweetMessageType",
+  "format" : "adm",
+  "stream-source" : "org.apache.asterix.external.input.stream.factory.TwitterFirehoseStreamFactory",
+  "tput-duration" : "5",
+  "dataverse-dataset" : "feeds:SyntheticTweets",
+  "mode" : "controlled"
+};
diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/feeds/feeds_08/feeds_08.1.ddl.sqlpp b/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/feeds/feeds_08/feeds_08.1.ddl.sqlpp
index 3b78e5a..1cf6a95 100644
--- a/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/feeds/feeds_08/feeds_08.1.ddl.sqlpp
+++ b/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/feeds/feeds_08/feeds_08.1.ddl.sqlpp
@@ -45,12 +45,15 @@
 
 create  dataset SyntheticTweets(TweetMessageType) primary key id;
 create  index ngram_index  on SyntheticTweets (message_text) type ngram (3);
-create  feed SyntheticTweetFeed using stream (
-(`duration`=`5`),
-(`tps`=`50`),
-(`stream-source`=`org.apache.asterix.external.input.stream.factory.TwitterFirehoseStreamFactory`),
-(`type-name`=`TweetMessageType`),
-(`tput-duration`=`5`),
-(`dataverse-dataset`=`feeds:SyntheticTweets`),
-(`format`=`adm`),
-(`mode`=`controlled`));
+
+create  feed SyntheticTweetFeed with {
+ "adapter-name" : "stream",
+ "duration" : "5",
+ "tps" : "50",
+ "stream-source" : "org.apache.asterix.external.input.stream.factory.TwitterFirehoseStreamFactory",
+ "type-name" : "TweetMessageType",
+ "tput-duration" : "5",
+ "dataverse-dataset" : "feeds:SyntheticTweets",
+ "format" : "adm",
+ "mode" : "controlled"
+};
diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/feeds/feeds_09/feeds_09.1.ddl.sqlpp b/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/feeds/feeds_09/feeds_09.1.ddl.sqlpp
index f979a3a..0c627bf 100644
--- a/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/feeds/feeds_09/feeds_09.1.ddl.sqlpp
+++ b/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/feeds/feeds_09/feeds_09.1.ddl.sqlpp
@@ -45,7 +45,14 @@
 };
 create  dataset SyntheticTweets(TweetMessageType) primary key id;
 create  index message_text  on SyntheticTweets (message_text) type btree;
-create  feed SyntheticTweetFeed using stream ((`duration`=`5`),
-(`tps`=`50`),(`tput-duration`=`5`),(`type-name`=`TweetMessageType`),
-(`dataverse-dataset`=`feeds:SyntheticTweets`),(`format`=`adm`),
-(`stream-source`=`org.apache.asterix.external.input.stream.factory.TwitterFirehoseStreamFactory`),(`mode`=`controlled`));
+
+create  feed SyntheticTweetFeed with {
+ "adapter-name" : "stream",
+ "duration" : "5",
+ "tps" : "50","tput-duration" : "5",
+ "type-name" : "TweetMessageType",
+ "dataverse-dataset" : "feeds:SyntheticTweets",
+ "format" : "adm",
+ "stream-source" : "org.apache.asterix.external.input.stream.factory.TwitterFirehoseStreamFactory",
+ "mode" : "controlled"
+};
diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/feeds/feeds_10/feeds_10.1.ddl.sqlpp b/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/feeds/feeds_10/feeds_10.1.ddl.sqlpp
index 8898864..c198723 100644
--- a/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/feeds/feeds_10/feeds_10.1.ddl.sqlpp
+++ b/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/feeds/feeds_10/feeds_10.1.ddl.sqlpp
@@ -36,8 +36,10 @@
 
 create  index usernameIdx  on Tweets (username) type btree;
 
-create  feed TweetFeed using localfs
-((`path`=`asterix_nc1://data/twitter/obamatweets.adm`),
-(`format`=`adm`),
-(`type-name`=`TweetType`),
-(`tuple-interval`=`10`));
+create  feed TweetFeed with {
+  "adapter-name" : "localfs",
+  "path" : "asterix_nc1://data/twitter/obamatweets.adm",
+  "format" : "adm",
+  "type-name" : "TweetType",
+  "tuple-interval" : "10"
+};
diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/feeds/feeds_11/feeds_11.1.ddl.sqlpp b/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/feeds/feeds_11/feeds_11.1.ddl.sqlpp
index 84c8047..f497dfe 100644
--- a/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/feeds/feeds_11/feeds_11.1.ddl.sqlpp
+++ b/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/feeds/feeds_11/feeds_11.1.ddl.sqlpp
@@ -31,8 +31,10 @@
 };
 
 create  dataset Tweets(TweetType) primary key id;
-create  feed TweetFeed using localfs
-((`path`=`asterix_nc1://data/twitter/obamatweets.adm`),
-(`format`=`adm`),
-(`type-name`=`TweetType`),
-(`tuple-interval`=`10`));
+create  feed TweetFeed with {
+  "adapter-name" : "localfs",
+  "path" : "asterix_nc1://data/twitter/obamatweets.adm",
+  "format" : "adm",
+  "type-name" : "TweetType",
+  "tuple-interval" : "10"
+};
diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/feeds/feeds_12/feeds_12.1.ddl.sqlpp b/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/feeds/feeds_12/feeds_12.1.ddl.sqlpp
index 9f1ce3a..de4bd7c 100644
--- a/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/feeds/feeds_12/feeds_12.1.ddl.sqlpp
+++ b/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/feeds/feeds_12/feeds_12.1.ddl.sqlpp
@@ -34,8 +34,10 @@
 
 create  dataset Tweets(TweetType) primary key id;
 
-create  feed TweetFeed using localfs
-((`path`=`asterix_nc1://data/twitter/obamatweets_duplicate.adm`),
-(`format`=`adm`),
-(`type-name`=`TweetType`),
-(`tuple-interval`=`10`));
+create feed TweetFeed with {
+  "adapter-name" : "localfs",
+  "path":"asterix_nc1://data/twitter/obamatweets_duplicate.adm",
+  "format":"adm",
+  "type-name":"TweetType",
+  "tuple-interval":"10"
+};
diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/feeds/insert-feed/insert-feed.1.ddl.sqlpp b/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/feeds/insert-feed/insert-feed.1.ddl.sqlpp
index be7c383..f7890c8 100644
--- a/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/feeds/insert-feed/insert-feed.1.ddl.sqlpp
+++ b/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/feeds/insert-feed/insert-feed.1.ddl.sqlpp
@@ -36,11 +36,11 @@
 
 create dataset TwitterUsers(TwitterUser) primary key `screen-name`;
 
-create feed UserFeed using socket_adapter
-(
-    ("sockets"="127.0.0.1:10001"),
-    ("address-type"="IP"),
-    ("type-name"="TwitterUser"),
-    ("format"="adm"),
-    ("insert-feed"="true")
-);
+create feed UserFeed with {
+ "adapter-name" : "socket_adapter",
+  "sockets" : "127.0.0.1:10001",
+  "address-type" : "IP",
+  "type-name" : "TwitterUser",
+  "format" : "adm",
+  "insert-feed" : "true"
+};
diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/feeds/issue_230_feeds/issue_230_feeds.1.ddl.sqlpp b/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/feeds/issue_230_feeds/issue_230_feeds.1.ddl.sqlpp
index 3141627..231e125 100644
--- a/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/feeds/issue_230_feeds/issue_230_feeds.1.ddl.sqlpp
+++ b/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/feeds/issue_230_feeds/issue_230_feeds.1.ddl.sqlpp
@@ -34,8 +34,10 @@
 
 create  dataset Tweets(TweetType) primary key id;
 
-create  feed TweetFeed using localfs
-((`path`=`asterix_nc1://data/twitter/obamatweets.adm`),
-(`format`=`adm`),
-(`type-name`=`TweetType`),
-(`tuple-interval`=`10`));
+create  feed TweetFeed with {
+  "adapter-name" : "localfs",
+  "path" : "asterix_nc1://data/twitter/obamatweets.adm",
+  "format" : "adm",
+  "type-name" : "TweetType",
+  "tuple-interval" : "10"
+};
diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/filters/delete/delete.1.ddl.sqlpp b/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/filters/delete/delete.1.ddl.sqlpp
index 0b9d178..3d0a5e4 100644
--- a/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/filters/delete/delete.1.ddl.sqlpp
+++ b/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/filters/delete/delete.1.ddl.sqlpp
@@ -92,10 +92,10 @@
 create index text_idx if not exists on Tweet(`text`) type fulltext;
 create index state_idx if not exists on Tweet(geo_tag.stateID) type btree;
 
-create feed TweetFeed using socket_adapter
-(
-    ("sockets"="127.0.0.1:10001"),
-    ("address-type"="IP"),
-    ("type-name"="typeTweet"),
-    ("format"="adm")
-);
+create feed TweetFeed with {
+  "adapter-name" : "socket_adapter",
+  "sockets" : "127.0.0.1:10001",
+  "address-type" : "IP",
+  "type-name" : "typeTweet",
+  "format" : "adm"
+};
diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/filters/upsert/upsert.1.ddl.sqlpp b/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/filters/upsert/upsert.1.ddl.sqlpp
index 589e7f9..91b3ee1 100644
--- a/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/filters/upsert/upsert.1.ddl.sqlpp
+++ b/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/filters/upsert/upsert.1.ddl.sqlpp
@@ -93,10 +93,10 @@
 create index text_idx if not exists on Tweet(`text`) type btree;
 create index state_idx if not exists on Tweet(geo_tag.stateID) type btree;
 
-create feed TweetFeed using socket_adapter
-(
-    ("sockets"="127.0.0.1:10001"),
-    ("address-type"="IP"),
-    ("type-name"="typeTweet"),
-    ("format"="adm")
-);
+create feed TweetFeed with {
+  "adapter-name" : "socket_adapter",
+  "sockets" : "127.0.0.1:10001",
+  "address-type" : "IP",
+  "type-name" : "typeTweet",
+  "format" : "adm"
+};
diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/hints/issue_251_dataset_hint_7/issue_251_dataset_hint_7.1.ddl.sqlpp b/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/hints/issue_251_dataset_hint_7/issue_251_dataset_hint_7.1.ddl.sqlpp
index ec7ede9..233ea32 100644
--- a/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/hints/issue_251_dataset_hint_7/issue_251_dataset_hint_7.1.ddl.sqlpp
+++ b/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/hints/issue_251_dataset_hint_7/issue_251_dataset_hint_7.1.ddl.sqlpp
@@ -41,8 +41,10 @@
 
 create  dataset Tweets(TweetType) primary key id hints (`CARDINALITY`=`200`);
 
-create feed TweetFeed using localfs(
-(`path`=`asterix_nc1://data/twitter/obamatweets.adm`),
-(`format`=`adm`),
-(`type-name`=`TweetType`),
-(`tuple-interval`=`10`));
+create feed TweetFeed with {
+ "adapter-name" : "localfs",
+ "path" : "asterix_nc1://data/twitter/obamatweets.adm",
+ "format" : "adm",
+ "type-name" : "TweetType",
+ "tuple-interval" : "10"
+};
\ No newline at end of file
diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/results/feeds/feeds_01/feeds_01.1.adm b/asterixdb/asterix-app/src/test/resources/runtimets/results/feeds/feeds_01/feeds_01.1.adm
index a6fa97e..85cd967 100644
--- a/asterixdb/asterix-app/src/test/resources/runtimets/results/feeds/feeds_01/feeds_01.1.adm
+++ b/asterixdb/asterix-app/src/test/resources/runtimets/results/feeds/feeds_01/feeds_01.1.adm
@@ -1 +1 @@
-{ "DataverseName": "feeds", "FeedName": "TweetFeed", "AdapterName": "localfs", "AdapterConfiguration": {{ { "Name": "type-name", "Value": "TweetType" }, { "Name": "path", "Value": "asterix_nc1://data/twitter/obamatweets.adm" }, { "Name": "format", "Value": "adm" }, { "Name": "tuple-interval", "Value": "10" }, { "Name": "is-feed", "Value": "true" }, { "Name": "dataverse", "Value": "feeds" }, { "Name": "feed", "Value": "TweetFeed" }, { "Name": "reader", "Value": "localfs" }, { "Name": "parser", "Value": "adm" } }}, "Timestamp": "Mon Oct 10 14:54:32 PDT 2016" }
+{ "DataverseName": "feeds", "FeedName": "TweetFeed", "AdapterConfiguration": {{ { "Name": "path", "Value": "asterix_nc1://data/twitter/obamatweets.adm" }, { "Name": "feed", "Value": "TweetFeed" }, { "Name": "adapter-name", "Value": "localfs" }, { "Name": "is-feed", "Value": "true" }, { "Name": "parser", "Value": "adm" }, { "Name": "reader", "Value": "localfs" }, { "Name": "format", "Value": "adm" }, { "Name": "tuple-interval", "Value": "10" }, { "Name": "type-name", "Value": "TweetType" }, { "Name": "dataverse", "Value": "feeds" } }}, "Timestamp": "Thu Dec 07 19:22:41 PST 2017" }
diff --git a/asterixdb/asterix-external-data/src/main/java/org/apache/asterix/external/adapter/factory/GenericAdapterFactory.java b/asterixdb/asterix-external-data/src/main/java/org/apache/asterix/external/adapter/factory/GenericAdapterFactory.java
index 0a47788..e4ed492 100644
--- a/asterixdb/asterix-external-data/src/main/java/org/apache/asterix/external/adapter/factory/GenericAdapterFactory.java
+++ b/asterixdb/asterix-external-data/src/main/java/org/apache/asterix/external/adapter/factory/GenericAdapterFactory.java
@@ -46,6 +46,7 @@
 import org.apache.asterix.external.util.ExternalDataUtils;
 import org.apache.asterix.external.util.FeedLogManager;
 import org.apache.asterix.external.util.FeedUtils;
+import org.apache.asterix.object.base.AdmObjectNode;
 import org.apache.asterix.om.types.ARecordType;
 import org.apache.hyracks.algebricks.common.constraints.AlgebricksAbsolutePartitionConstraint;
 import org.apache.hyracks.algebricks.common.exceptions.AlgebricksException;
diff --git a/asterixdb/asterix-external-data/src/main/java/org/apache/asterix/external/feed/api/IFeed.java b/asterixdb/asterix-external-data/src/main/java/org/apache/asterix/external/feed/api/IFeed.java
index f5c25f7..249c07d 100644
--- a/asterixdb/asterix-external-data/src/main/java/org/apache/asterix/external/feed/api/IFeed.java
+++ b/asterixdb/asterix-external-data/src/main/java/org/apache/asterix/external/feed/api/IFeed.java
@@ -24,26 +24,12 @@
 
 public interface IFeed extends Serializable {
 
-    public enum FeedType {
-        /**
-         * A feed that derives its data from an external source.
-         */
-        PRIMARY,
-
-        /**
-         * A feed that derives its data from another primary or secondary feed.
-         */
-        SECONDARY
-    }
-
     public String getFeedName();
 
     public String getDataverseName();
 
     public EntityId getFeedId();
 
-    public Map<String, String> getAdapterConfiguration();
-
-    public String getAdapterName();
+    public Map<String, String> getFeedConfiguration();
 
 }
diff --git a/asterixdb/asterix-external-data/src/main/java/org/apache/asterix/external/operators/FeedIntakeOperatorDescriptor.java b/asterixdb/asterix-external-data/src/main/java/org/apache/asterix/external/operators/FeedIntakeOperatorDescriptor.java
index 770e978..59a675f 100644
--- a/asterixdb/asterix-external-data/src/main/java/org/apache/asterix/external/operators/FeedIntakeOperatorDescriptor.java
+++ b/asterixdb/asterix-external-data/src/main/java/org/apache/asterix/external/operators/FeedIntakeOperatorDescriptor.java
@@ -77,14 +77,14 @@
         this.outRecDescs[0] = rDesc;
     }
 
-    public FeedIntakeOperatorDescriptor(JobSpecification spec, IFeed primaryFeed, String adapterLibraryName,
+    public FeedIntakeOperatorDescriptor(JobSpecification spec, IFeed feed, String adapterLibraryName,
             String adapterFactoryClassName, ARecordType adapterOutputType, FeedPolicyAccessor policyAccessor,
             RecordDescriptor rDesc) {
         super(spec, 0, 1);
-        this.feedId = new EntityId(FEED_EXTENSION_NAME, primaryFeed.getDataverseName(), primaryFeed.getFeedName());
+        this.feedId = new EntityId(FEED_EXTENSION_NAME, feed.getDataverseName(), feed.getFeedName());
         this.adaptorFactoryClassName = adapterFactoryClassName;
         this.adaptorLibraryName = adapterLibraryName;
-        this.adaptorConfiguration = primaryFeed.getAdapterConfiguration();
+        this.adaptorConfiguration = feed.getFeedConfiguration();
         this.adapterOutputType = adapterOutputType;
         this.policyAccessor = policyAccessor;
         this.outRecDescs[0] = rDesc;
diff --git a/asterixdb/asterix-external-data/src/main/java/org/apache/asterix/external/util/ExternalDataConstants.java b/asterixdb/asterix-external-data/src/main/java/org/apache/asterix/external/util/ExternalDataConstants.java
index a6c46c3..494efb5 100644
--- a/asterixdb/asterix-external-data/src/main/java/org/apache/asterix/external/util/ExternalDataConstants.java
+++ b/asterixdb/asterix-external-data/src/main/java/org/apache/asterix/external/util/ExternalDataConstants.java
@@ -95,6 +95,7 @@
     // a string representing the format of the record (for adapters which produces records with additional information like pk or metadata)
     public static final String KEY_RECORD_FORMAT = "record-format";
     public static final String KEY_META_TYPE_NAME = "meta-type-name";
+    public static final String KEY_ADAPTER_NAME = "adapter-name";
     public static final String READER_STREAM = "stream";
     public static final String KEY_HTTP_PROXY_HOST = "http-proxy-host";
     public static final String KEY_HTTP_PROXY_PORT = "http-proxy-port";
diff --git a/asterixdb/asterix-external-data/src/main/java/org/apache/asterix/external/util/ExternalDataUtils.java b/asterixdb/asterix-external-data/src/main/java/org/apache/asterix/external/util/ExternalDataUtils.java
index a418cbf..3bb7726 100644
--- a/asterixdb/asterix-external-data/src/main/java/org/apache/asterix/external/util/ExternalDataUtils.java
+++ b/asterixdb/asterix-external-data/src/main/java/org/apache/asterix/external/util/ExternalDataUtils.java
@@ -29,6 +29,8 @@
 import org.apache.asterix.external.api.IExternalDataSourceFactory.DataSourceType;
 import org.apache.asterix.external.api.IInputStreamFactory;
 import org.apache.asterix.external.api.IRecordReaderFactory;
+import org.apache.asterix.object.base.AdmObjectNode;
+import org.apache.asterix.object.base.AdmStringNode;
 import org.apache.asterix.om.types.ARecordType;
 import org.apache.asterix.om.types.ATypeTag;
 import org.apache.asterix.om.types.AUnionType;
diff --git a/asterixdb/asterix-lang-aql/src/main/javacc/AQL.jj b/asterixdb/asterix-lang-aql/src/main/javacc/AQL.jj
index 5c7c6f2..8b615f1 100644
--- a/asterixdb/asterix-lang-aql/src/main/javacc/AQL.jj
+++ b/asterixdb/asterix-lang-aql/src/main/javacc/AQL.jj
@@ -153,6 +153,7 @@
 import org.apache.asterix.metadata.utils.MetadataConstants;
 import org.apache.hyracks.algebricks.common.utils.Pair;
 import org.apache.hyracks.algebricks.common.utils.Triple;
+import org.apache.hyracks.algebricks.common.exceptions.AlgebricksException;
 import org.apache.hyracks.algebricks.core.algebra.expressions.IExpressionAnnotation;
 import org.apache.hyracks.algebricks.core.algebra.expressions.IndexedNLJoinExpressionAnnotation;
 import org.apache.hyracks.algebricks.core.algebra.functions.FunctionIdentifier;
@@ -733,19 +734,21 @@
 {
   Pair<Identifier,Identifier> nameComponents = null;
   boolean ifNotExists = false;
-  String adapterName = null;
-  Map<String,String> properties = null;
   CreateFeedStatement cfs = null;
   Pair<Identifier,Identifier> sourceNameComponents = null;
-
+  RecordConstructor withRecord = null;
 }
 {
   <FEED> nameComponents = QualifiedName() ifNotExists = IfNotExists()
-  <USING> adapterName = AdapterName() properties = Configuration()
-  {
-    cfs = new CreateFeedStatement(nameComponents, adapterName, properties, ifNotExists);
-    return cfs;
-  }
+  <WITH> withRecord = RecordConstructor()
+    {
+      try {
+        cfs = new CreateFeedStatement(nameComponents, withRecord, ifNotExists);
+        return cfs;
+      } catch (AlgebricksException e) {
+        throw new ParseException(e.getMessage());
+      }
+    }
 }
 
 CreateFeedPolicyStatement FeedPolicySpecification() throws ParseException:
diff --git a/asterixdb/asterix-lang-common/src/main/java/org/apache/asterix/lang/common/statement/CreateFeedStatement.java b/asterixdb/asterix-lang-common/src/main/java/org/apache/asterix/lang/common/statement/CreateFeedStatement.java
index 1e7a182..22038ad 100644
--- a/asterixdb/asterix-lang-common/src/main/java/org/apache/asterix/lang/common/statement/CreateFeedStatement.java
+++ b/asterixdb/asterix-lang-common/src/main/java/org/apache/asterix/lang/common/statement/CreateFeedStatement.java
@@ -21,9 +21,14 @@
 import org.apache.asterix.common.exceptions.CompilationException;
 import org.apache.asterix.common.functions.FunctionSignature;
 import org.apache.asterix.lang.common.base.Statement;
+import org.apache.asterix.lang.common.expression.RecordConstructor;
 import org.apache.asterix.lang.common.struct.Identifier;
+import org.apache.asterix.lang.common.util.ExpressionUtils;
+import org.apache.asterix.lang.common.util.MergePolicyUtils;
 import org.apache.asterix.lang.common.visitor.base.ILangVisitor;
+import org.apache.asterix.object.base.AdmObjectNode;
 import org.apache.hadoop.io.compress.bzip2.CBZip2InputStream;
+import org.apache.hyracks.algebricks.common.exceptions.AlgebricksException;
 import org.apache.hyracks.algebricks.common.utils.Pair;
 
 import java.util.Map;
@@ -36,15 +41,13 @@
 
     private final Pair<Identifier, Identifier> qName;
     private final boolean ifNotExists;
-    private final String adaptorName;
-    private final Map<String, String> adaptorConfiguration;
+    private final Map<String, String> feedConfigurations;
 
-    public CreateFeedStatement(Pair<Identifier, Identifier> qName, String adaptorName,
-            Map<String, String> adaptorConfiguration, boolean ifNotExists) {
+    public CreateFeedStatement(Pair<Identifier, Identifier> qName, RecordConstructor withRecord, boolean ifNotExists)
+            throws AlgebricksException {
         this.qName = qName;
         this.ifNotExists = ifNotExists;
-        this.adaptorName = adaptorName;
-        this.adaptorConfiguration = adaptorConfiguration;
+        this.feedConfigurations = MergePolicyUtils.toProperties(ExpressionUtils.toNode(withRecord));
     }
 
     public Identifier getDataverseName() {
@@ -57,14 +60,6 @@
 
     public boolean getIfNotExists() {
         return this.ifNotExists;
-    }
-
-    public String getAdaptorName() {
-        return adaptorName;
-    }
-
-    public Map<String, String> getAdaptorConfiguration() {
-        return adaptorConfiguration;
     }
 
     @Override
@@ -81,4 +76,8 @@
     public byte getCategory() {
         return Category.DDL;
     }
+
+    public Map<String, String> getFeedConfigurations() {
+        return feedConfigurations;
+    }
 }
diff --git a/asterixdb/asterix-lang-common/src/main/java/org/apache/asterix/lang/common/visitor/FormatPrintVisitor.java b/asterixdb/asterix-lang-common/src/main/java/org/apache/asterix/lang/common/visitor/FormatPrintVisitor.java
index ea81865..41c47c5 100644
--- a/asterixdb/asterix-lang-common/src/main/java/org/apache/asterix/lang/common/visitor/FormatPrintVisitor.java
+++ b/asterixdb/asterix-lang-common/src/main/java/org/apache/asterix/lang/common/visitor/FormatPrintVisitor.java
@@ -754,8 +754,8 @@
         out.print(skip(step) + "create " + FEED);
         out.print(generateFullName(cfs.getDataverseName(), cfs.getFeedName()));
         out.print(generateIfNotExists(cfs.getIfNotExists()));
-        out.print(" using " + cfs.getAdaptorName() + " ");
-        printConfiguration(cfs.getAdaptorConfiguration());
+        out.print(" using ");
+        printConfiguration(cfs.getFeedConfigurations());
         out.println(SEMICOLON);
         return null;
     }
diff --git a/asterixdb/asterix-lang-sqlpp/src/main/javacc/SQLPP.jj b/asterixdb/asterix-lang-sqlpp/src/main/javacc/SQLPP.jj
index c5d6d26..445e01d 100644
--- a/asterixdb/asterix-lang-sqlpp/src/main/javacc/SQLPP.jj
+++ b/asterixdb/asterix-lang-sqlpp/src/main/javacc/SQLPP.jj
@@ -169,6 +169,7 @@
 import org.apache.asterix.om.functions.BuiltinFunctions;
 import org.apache.hyracks.algebricks.common.utils.Pair;
 import org.apache.hyracks.algebricks.common.utils.Triple;
+import org.apache.hyracks.algebricks.common.exceptions.AlgebricksException;
 import org.apache.hyracks.algebricks.core.algebra.expressions.IExpressionAnnotation;
 import org.apache.hyracks.algebricks.core.algebra.expressions.IndexedNLJoinExpressionAnnotation;
 import org.apache.hyracks.algebricks.core.algebra.functions.FunctionIdentifier;
@@ -784,13 +785,18 @@
   Map<String,String> properties = null;
   CreateFeedStatement cfs = null;
   Pair<Identifier,Identifier> sourceNameComponents = null;
+  RecordConstructor withRecord = null;
 }
 {
   <FEED> nameComponents = QualifiedName() ifNotExists = IfNotExists()
-  <USING> adapterName = AdapterName() properties = Configuration()
+  <WITH> withRecord = RecordConstructor()
   {
-    cfs = new CreateFeedStatement(nameComponents, adapterName, properties, ifNotExists);
-    return cfs;
+    try {
+      cfs = new CreateFeedStatement(nameComponents, withRecord, ifNotExists);
+      return cfs;
+    } catch (AlgebricksException e) {
+      throw new ParseException(e.getMessage());
+    }
   }
 }
 
diff --git a/asterixdb/asterix-metadata/src/main/java/org/apache/asterix/metadata/MetadataTransactionContext.java b/asterixdb/asterix-metadata/src/main/java/org/apache/asterix/metadata/MetadataTransactionContext.java
index 406b3d6..0a0abd4 100644
--- a/asterixdb/asterix-metadata/src/main/java/org/apache/asterix/metadata/MetadataTransactionContext.java
+++ b/asterixdb/asterix-metadata/src/main/java/org/apache/asterix/metadata/MetadataTransactionContext.java
@@ -234,7 +234,7 @@
 
     public void dropFeed(String dataverseName, String feedName) {
         Feed feed = null;
-        feed = new Feed(dataverseName, feedName, null, null);
+        feed = new Feed(dataverseName, feedName, null);
         droppedCache.addFeedIfNotExists(feed);
         logAndApply(new MetadataLogicalOperation(feed, false));
     }
diff --git a/asterixdb/asterix-metadata/src/main/java/org/apache/asterix/metadata/bootstrap/MetadataRecordTypes.java b/asterixdb/asterix-metadata/src/main/java/org/apache/asterix/metadata/bootstrap/MetadataRecordTypes.java
index 2a04b58..e0f925c 100644
--- a/asterixdb/asterix-metadata/src/main/java/org/apache/asterix/metadata/bootstrap/MetadataRecordTypes.java
+++ b/asterixdb/asterix-metadata/src/main/java/org/apache/asterix/metadata/bootstrap/MetadataRecordTypes.java
@@ -356,17 +356,16 @@
     public static final String RECORD_NAME_FEED = "FeedRecordType";
     public static final int FEED_ARECORD_DATAVERSE_NAME_FIELD_INDEX = 0;
     public static final int FEED_ARECORD_FEED_NAME_FIELD_INDEX = 1;
-    public static final int FEED_ARECORD_ADAPTOR_NAME_INDEX = 2;
-    public static final int FEED_ARECORD_ADAPTOR_CONFIG_INDEX = 3;
-    public static final int FEED_ARECORD_TIMESTAMP_FIELD_INDEX = 4;
+    public static final int FEED_ARECORD_ADAPTOR_CONFIG_INDEX = 2;
+    public static final int FEED_ARECORD_TIMESTAMP_FIELD_INDEX = 3;
     public static final ARecordType FEED_RECORDTYPE = createRecordType(
             // RecordTypeName
             RECORD_NAME_FEED,
             // FieldNames
-            new String[] { FIELD_NAME_DATAVERSE_NAME, FIELD_NAME_FEED_NAME, FIELD_NAME_ADAPTER_NAME,
-                    FIELD_NAME_ADAPTER_CONFIGURATION, FIELD_NAME_TIMESTAMP },
+            new String[] { FIELD_NAME_DATAVERSE_NAME, FIELD_NAME_FEED_NAME, FIELD_NAME_ADAPTER_CONFIGURATION,
+                    FIELD_NAME_TIMESTAMP },
             // FieldTypes
-            new IAType[] { BuiltinType.ASTRING, BuiltinType.ASTRING, BuiltinType.ASTRING,
+            new IAType[] { BuiltinType.ASTRING, BuiltinType.ASTRING,
                     new AUnorderedListType(FEED_ADAPTER_CONFIGURATION_RECORDTYPE, null), BuiltinType.ASTRING },
             //IsOpen?
             true);
diff --git a/asterixdb/asterix-metadata/src/main/java/org/apache/asterix/metadata/declared/MetadataProvider.java b/asterixdb/asterix-metadata/src/main/java/org/apache/asterix/metadata/declared/MetadataProvider.java
index 1e0d597..08621b1 100644
--- a/asterixdb/asterix-metadata/src/main/java/org/apache/asterix/metadata/declared/MetadataProvider.java
+++ b/asterixdb/asterix-metadata/src/main/java/org/apache/asterix/metadata/declared/MetadataProvider.java
@@ -397,10 +397,10 @@
     public Triple<IOperatorDescriptor, AlgebricksPartitionConstraint, IAdapterFactory> buildFeedIntakeRuntime(
             JobSpecification jobSpec, Feed feed, FeedPolicyAccessor policyAccessor) throws Exception {
         Triple<IAdapterFactory, RecordDescriptor, IDataSourceAdapter.AdapterType> factoryOutput;
-        factoryOutput = FeedMetadataUtil.getPrimaryFeedFactoryAndOutput(feed, policyAccessor, mdTxnCtx,
+        factoryOutput = FeedMetadataUtil.getFeedFactoryAndOutput(feed, policyAccessor, mdTxnCtx,
                 getApplicationContext());
-        ARecordType recordType = FeedMetadataUtil.getOutputType(feed, feed.getAdapterConfiguration(),
-                ExternalDataConstants.KEY_TYPE_NAME);
+        ARecordType recordType = FeedMetadataUtil.getOutputType(feed,
+                feed.getFeedConfiguration().get(ExternalDataConstants.KEY_TYPE_NAME));
         IAdapterFactory adapterFactory = factoryOutput.first;
         FeedIntakeOperatorDescriptor feedIngestor = null;
         switch (factoryOutput.third) {
@@ -409,8 +409,8 @@
                         policyAccessor, factoryOutput.second);
                 break;
             case EXTERNAL:
-                String libraryName =
-                        feed.getAdapterName().trim().split(FeedConstants.NamingConstants.LIBRARY_NAME_SEPARATOR)[0];
+                String libraryName = feed.getFeedConfiguration().get(ExternalDataConstants.KEY_ADAPTER_NAME).trim()
+                        .split(FeedConstants.NamingConstants.LIBRARY_NAME_SEPARATOR)[0];
                 feedIngestor = new FeedIntakeOperatorDescriptor(jobSpec, feed, libraryName,
                         adapterFactory.getClass().getName(), recordType, policyAccessor, factoryOutput.second);
                 break;
diff --git a/asterixdb/asterix-metadata/src/main/java/org/apache/asterix/metadata/entities/Feed.java b/asterixdb/asterix-metadata/src/main/java/org/apache/asterix/metadata/entities/Feed.java
index ea0e4eb..52bea0b 100644
--- a/asterixdb/asterix-metadata/src/main/java/org/apache/asterix/metadata/entities/Feed.java
+++ b/asterixdb/asterix-metadata/src/main/java/org/apache/asterix/metadata/entities/Feed.java
@@ -25,6 +25,7 @@
 import org.apache.asterix.external.feed.api.IFeed;
 import org.apache.asterix.metadata.MetadataCache;
 import org.apache.asterix.metadata.api.IMetadataEntity;
+import org.apache.asterix.object.base.AdmObjectNode;
 
 /**
  * Feed POJO
@@ -37,16 +38,13 @@
     private EntityId feedId;
     /** A string representation of the instance **/
     private String displayName;
-    /** A string representation of the adapter name **/
-    private String adapterName;
-    /** Adapter configuration */
-    private Map<String, String> adapterConfiguration;
+    /** Feed configurations */
+    private Map<String, String> feedConfiguration;
 
-    public Feed(String dataverseName, String feedName,String adapterName, Map<String, String> configuration) {
+    public Feed(String dataverseName, String feedName, Map<String, String> feedConfiguration) {
         this.feedId = new EntityId(EXTENSION_NAME, dataverseName, feedName);
         this.displayName = "(" + feedId + ")";
-        this.adapterName = adapterName;
-        this.adapterConfiguration = configuration;
+        this.feedConfiguration = feedConfiguration;
     }
 
     @Override
@@ -97,12 +95,7 @@
     }
 
     @Override
-    public String getAdapterName() {
-        return adapterName;
-    }
-
-    @Override
-    public Map<String, String> getAdapterConfiguration() {
-        return adapterConfiguration;
+    public Map<String, String> getFeedConfiguration() {
+        return feedConfiguration;
     }
 }
diff --git a/asterixdb/asterix-metadata/src/main/java/org/apache/asterix/metadata/entitytupletranslators/FeedTupleTranslator.java b/asterixdb/asterix-metadata/src/main/java/org/apache/asterix/metadata/entitytupletranslators/FeedTupleTranslator.java
index 264da60..7b9c3a0 100644
--- a/asterixdb/asterix-metadata/src/main/java/org/apache/asterix/metadata/entitytupletranslators/FeedTupleTranslator.java
+++ b/asterixdb/asterix-metadata/src/main/java/org/apache/asterix/metadata/entitytupletranslators/FeedTupleTranslator.java
@@ -89,8 +89,6 @@
 
         AUnorderedList feedConfig =
                 (AUnorderedList) feedRecord.getValueByPos(MetadataRecordTypes.FEED_ARECORD_ADAPTOR_CONFIG_INDEX);
-        String adapterName = ((AString) feedRecord.getValueByPos(MetadataRecordTypes.FEED_ARECORD_ADAPTOR_NAME_INDEX))
-                .getStringValue();
 
         IACursor cursor = feedConfig.getCursor();
 
@@ -104,7 +102,7 @@
             value = ((AString) field.getValueByPos(MetadataRecordTypes.PROPERTIES_VALUE_FIELD_INDEX)).getStringValue();
             adaptorConfiguration.put(key, value);
         }
-        feed = new Feed(dataverseName, feedName, adapterName, adaptorConfiguration);
+        feed = new Feed(dataverseName, feedName, adaptorConfiguration);
         return feed;
     }
 
@@ -134,12 +132,6 @@
         stringSerde.serialize(aString, fieldValue.getDataOutput());
         recordBuilder.addField(MetadataRecordTypes.FEED_ARECORD_FEED_NAME_FIELD_INDEX, fieldValue);
 
-        // adaptor name
-        fieldValue.reset();
-        aString.setValue(feed.getAdapterName());
-        stringSerde.serialize(aString, fieldValue.getDataOutput());
-        recordBuilder.addField(MetadataRecordTypes.FEED_ARECORD_ADAPTOR_NAME_INDEX, fieldValue);
-
         // write adaptor configuration
         fieldValue.reset();
         writeFeedAdaptorField(recordBuilder, feed, fieldValue);
@@ -165,7 +157,7 @@
 
         listBuilder.reset((AUnorderedListType) MetadataRecordTypes.FEED_RECORDTYPE
                 .getFieldTypes()[MetadataRecordTypes.FEED_ARECORD_ADAPTOR_CONFIG_INDEX]);
-        for (Map.Entry<String, String> property : feed.getAdapterConfiguration().entrySet()) {
+        for (Map.Entry<String, String> property : feed.getFeedConfiguration().entrySet()) {
             String name = property.getKey();
             String value = property.getValue();
             listEleBuffer.reset();
diff --git a/asterixdb/asterix-metadata/src/main/java/org/apache/asterix/metadata/feeds/FeedMetadataUtil.java b/asterixdb/asterix-metadata/src/main/java/org/apache/asterix/metadata/feeds/FeedMetadataUtil.java
index c2d31bf..876f502 100644
--- a/asterixdb/asterix-metadata/src/main/java/org/apache/asterix/metadata/feeds/FeedMetadataUtil.java
+++ b/asterixdb/asterix-metadata/src/main/java/org/apache/asterix/metadata/feeds/FeedMetadataUtil.java
@@ -46,6 +46,9 @@
 import org.apache.asterix.metadata.entities.Feed;
 import org.apache.asterix.metadata.entities.FeedPolicyEntity;
 import org.apache.asterix.metadata.utils.MetadataConstants;
+import org.apache.asterix.object.base.AdmObjectNode;
+import org.apache.asterix.object.base.AdmStringNode;
+import org.apache.asterix.object.base.IAdmNode;
 import org.apache.asterix.om.types.ARecordType;
 import org.apache.asterix.om.types.ATypeTag;
 import org.apache.hyracks.algebricks.common.exceptions.AlgebricksException;
@@ -101,12 +104,15 @@
     public static void validateFeed(Feed feed, MetadataTransactionContext mdTxnCtx, ICcApplicationContext appCtx)
             throws AlgebricksException {
         try {
-            String adapterName = feed.getAdapterName();
-            Map<String, String> configuration = feed.getAdapterConfiguration();
-            ARecordType adapterOutputType = getOutputType(feed, configuration, ExternalDataConstants.KEY_TYPE_NAME);
-            ARecordType metaType = getOutputType(feed, configuration, ExternalDataConstants.KEY_META_TYPE_NAME);
+            Map<String, String> configuration = feed.getFeedConfiguration();
+            ARecordType adapterOutputType = getOutputType(feed, configuration.get(ExternalDataConstants.KEY_TYPE_NAME));
+            ARecordType metaType = getOutputType(feed, configuration.get(ExternalDataConstants.KEY_META_TYPE_NAME));
             ExternalDataUtils.prepareFeed(configuration, feed.getDataverseName(), feed.getFeedName());
             // Get adapter from metadata dataset <Metadata dataverse>
+            String adapterName = configuration.get(ExternalDataConstants.KEY_ADAPTER_NAME);
+            if (adapterName == null) {
+                throw new AlgebricksException("cannot find adatper name");
+            }
             DatasourceAdapter adapterEntity = MetadataManager.INSTANCE.getAdapter(mdTxnCtx,
                     MetadataConstants.METADATA_DATAVERSE_NAME, adapterName);
             // Get adapter from metadata dataset <The feed dataverse>
@@ -140,7 +146,7 @@
                         adapterOutputType, metaType);
             }
             if (metaType == null && configuration.containsKey(ExternalDataConstants.KEY_META_TYPE_NAME)) {
-                metaType = getOutputType(feed, configuration, ExternalDataConstants.KEY_META_TYPE_NAME);
+                metaType = getOutputType(feed, configuration.get(ExternalDataConstants.KEY_META_TYPE_NAME));
                 if (metaType == null) {
                     throw new AsterixException("Unknown specified feed meta output data type "
                             + configuration.get(ExternalDataConstants.KEY_META_TYPE_NAME));
@@ -150,7 +156,7 @@
                 if (!configuration.containsKey(ExternalDataConstants.KEY_TYPE_NAME)) {
                     throw new AsterixException("Unspecified feed output data type");
                 }
-                adapterOutputType = getOutputType(feed, configuration, ExternalDataConstants.KEY_TYPE_NAME);
+                adapterOutputType = getOutputType(feed, configuration.get(ExternalDataConstants.KEY_TYPE_NAME));
                 if (adapterOutputType == null) {
                     throw new AsterixException("Unknown specified feed output data type "
                             + configuration.get(ExternalDataConstants.KEY_TYPE_NAME));
@@ -162,7 +168,7 @@
     }
 
     @SuppressWarnings("rawtypes")
-    public static Triple<IAdapterFactory, RecordDescriptor, AdapterType> getPrimaryFeedFactoryAndOutput(Feed feed,
+    public static Triple<IAdapterFactory, RecordDescriptor, AdapterType> getFeedFactoryAndOutput(Feed feed,
             FeedPolicyAccessor policyAccessor, MetadataTransactionContext mdTxnCtx, ICcApplicationContext appCtx)
             throws AlgebricksException {
         // This method needs to be re-visited
@@ -175,11 +181,11 @@
         Triple<IAdapterFactory, RecordDescriptor, IDataSourceAdapter.AdapterType> feedProps = null;
         IDataSourceAdapter.AdapterType adapterType = null;
         try {
-            adapterName = feed.getAdapterName();
-            Map<String, String> configuration = feed.getAdapterConfiguration();
+            Map<String, String> configuration = feed.getFeedConfiguration();
+            adapterName = configuration.get(ExternalDataConstants.KEY_ADAPTER_NAME);
             configuration.putAll(policyAccessor.getFeedPolicy());
-            adapterOutputType = getOutputType(feed, configuration, ExternalDataConstants.KEY_TYPE_NAME);
-            metaType = getOutputType(feed, configuration, ExternalDataConstants.KEY_META_TYPE_NAME);
+            adapterOutputType = getOutputType(feed, configuration.get(ExternalDataConstants.KEY_TYPE_NAME));
+            metaType = getOutputType(feed, configuration.get(ExternalDataConstants.KEY_META_TYPE_NAME));
             ExternalDataUtils.prepareFeed(configuration, feed.getDataverseName(), feed.getFeedName());
             // Get adapter from metadata dataset <Metadata dataverse>
             adapterEntity = MetadataManager.INSTANCE.getAdapter(mdTxnCtx, MetadataConstants.METADATA_DATAVERSE_NAME,
@@ -214,13 +220,13 @@
                 adapterType = IDataSourceAdapter.AdapterType.INTERNAL;
             }
             if (metaType == null) {
-                metaType = getOutputType(feed, configuration, ExternalDataConstants.KEY_META_TYPE_NAME);
+                metaType = getOutputType(feed, configuration.get(ExternalDataConstants.KEY_META_TYPE_NAME));
             }
             if (adapterOutputType == null) {
                 if (!configuration.containsKey(ExternalDataConstants.KEY_TYPE_NAME)) {
                     throw new AsterixException("Unspecified feed output data type");
                 }
-                adapterOutputType = getOutputType(feed, configuration, ExternalDataConstants.KEY_TYPE_NAME);
+                adapterOutputType = getOutputType(feed, configuration.get(ExternalDataConstants.KEY_TYPE_NAME));
             }
             int numOfOutputs = 1;
             if (metaType != null) {
@@ -272,10 +278,9 @@
         }
     }
 
-    public static ARecordType getOutputType(IFeed feed, Map<String, String> configuration, String key)
+    public static ARecordType getOutputType(IFeed feed, String fqOutputType)
             throws AlgebricksException {
         ARecordType outputType = null;
-        String fqOutputType = configuration.get(key);
 
         if (fqOutputType == null) {
             return null;
@@ -291,7 +296,7 @@
             dataverseName = dataverseAndType[0];
             datatypeName = dataverseAndType[1];
         } else {
-            throw new IllegalArgumentException("Invalid value for the parameter " + key);
+            throw new IllegalArgumentException("Invalid parameter value " + fqOutputType);
         }
 
         MetadataTransactionContext ctx = null;

-- 
To view, visit https://asterix-gerrit.ics.uci.edu/2209
To unsubscribe, visit https://asterix-gerrit.ics.uci.edu/settings

Gerrit-MessageType: newchange
Gerrit-Change-Id: I2dfb0fdf74d28ae0c45dafcf6babb624bd8b2149
Gerrit-PatchSet: 1
Gerrit-Project: asterixdb
Gerrit-Branch: master
Gerrit-Owner: Xikui Wang <xkkwww@gmail.com>


Mime
View raw message