Skip to content

Commit

Permalink
exclude system_views and system_virtual_schema
Browse files Browse the repository at this point in the history
  • Loading branch information
pdesmarets committed Jan 13, 2020
1 parent 1ffca30 commit 3574dcc
Show file tree
Hide file tree
Showing 5 changed files with 11 additions and 5 deletions.
2 changes: 1 addition & 1 deletion forward_engineering/helpers/keyspaceHelper.js
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ const getKeyspaceStatement = (keyspaceData) => {
const dataCenters = retrivePropertyFromConfig(keyspaceData, 0, "dataCenters", []);
const durableWrites = retrivePropertyFromConfig(keyspaceData, 0, "durableWrites", false);

if (!keyspaceData[0].addToCqlScript) {
if (keyspaceData[0] && !keyspaceData[0].addToCqlScript) {
return "";
} else if (keyspaceName === "") {
return "";
Expand Down
4 changes: 2 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "Cassandra",
"version": "0.1.36",
"versionDate": "2020-01-03",
"version": "0.1.37",
"versionDate": "2020-01-13",
"author": "hackolade",
"engines": {
"hackolade": "3.4.12",
Expand Down
4 changes: 4 additions & 0 deletions reverse_engineering/api.js
Original file line number Diff line number Diff line change
Expand Up @@ -93,6 +93,10 @@ module.exports = {
})
.catch(err => {
pipeline([], []);
})
.catch(err => {
logger.log('error', cassandra.prepareError(err), 'Retrieving schema');
keyspaceCallback(cassandra.prepareError(err));
});

const pipeline = (UDAs, UDFs) => {
Expand Down
2 changes: 1 addition & 1 deletion reverse_engineering/cassandraHelper.js
Original file line number Diff line number Diff line change
Expand Up @@ -170,7 +170,7 @@ module.exports = (_) => {

const getKeyspaceInfo = (keyspace) => {
const metaData = getKeyspaceMetaData(keyspace);
const strategy = metaData.strategy.split('.').slice(-1).pop();
const strategy = _.get(metaData, 'strategy', '').split('.').slice(-1).pop();
let keyspaceInfo = {
code: keyspace,
durableWrites: Boolean(metaData.durableWrites),
Expand Down
4 changes: 3 additions & 1 deletion reverse_engineering/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,9 @@
"system_auth",
"system_distributed",
"system_schema",
"system_traces"
"system_traces",
"system_views",
"system_virtual_schema"
],
"installed": true
}

0 comments on commit 3574dcc

Please sign in to comment.