Skip to content

Commit

Permalink
quoted ks,table,column
Browse files Browse the repository at this point in the history
  • Loading branch information
brianmhess committed May 12, 2015
1 parent 22b539d commit c4a14b8
Show file tree
Hide file tree
Showing 6 changed files with 10 additions and 7 deletions.
3 changes: 3 additions & 0 deletions ChangeLog.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
## 0.0.11
- Added support for quoted Keyspaces, Tables, and Columns

## 0.0.10
- You want collections? You got 'em
- Added progress reporting - you can specify the rate at which
Expand Down
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,11 +15,11 @@ loading of various types of delimited files, including

### Downloading
This utility has already been built, and is available at
https://github.com/brianmhess/cassandra-loader/releases/download/v0.0.10/cassandra-loader
https://github.com/brianmhess/cassandra-loader/releases/download/v0.0.11/cassandra-loader

Get it with wget:
```
wget https://github.com/brianmhess/cassandra-loader/releases/download/v0.0.10/cassandra-loader
wget https://github.com/brianmhess/cassandra-loader/releases/download/v0.0.11/cassandra-loader
```

### Building
Expand Down
2 changes: 1 addition & 1 deletion build.gradle
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
apply plugin: 'java'
apply plugin: 'application'

def versionNum = '0.0.10'
def versionNum = '0.0.11'

task loader(type: Exec) {
dependsOn << 'uberloader'
Expand Down
2 changes: 1 addition & 1 deletion src/main/java/com/datastax/loader/CqlDelimLoad.java
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@
import com.datastax.driver.core.policies.DCAwareRoundRobinPolicy;

public class CqlDelimLoad {
private String version = "0.0.10";
private String version = "0.0.11";
private String host = null;
private int port = 9042;
private String username = null;
Expand Down
4 changes: 2 additions & 2 deletions src/main/java/com/datastax/loader/CqlDelimParser.java
Original file line number Diff line number Diff line change
Expand Up @@ -124,11 +124,11 @@ private void initPmap(String dateFormatString, BooleanParser.BoolStyle inBoolSty

// Validate the CQL schema, extract the keyspace and tablename, and process the rest of the schema
private void processCqlSchema(String cqlSchema, Session session) throws ParseException {
String kstnRegex = "^\\s*(\\w+)\\.(\\w+)\\s*[\\(]\\s*(\\w+\\s*(,\\s*\\w+\\s*)*)[\\)]\\s*$";
String kstnRegex = "^\\s*(\\\"?[A-Za-z0-9_]+\\\"?)\\.(\\\"?[A-Za-z0-9_]+\\\"?)\\s*[\\(]\\s*(\\\"?[A-Za-z0-9_]+\\\"?\\s*(,\\s*\\\"?[A-Za-z0-9_]+\\\"?\\s*)*)[\\)]\\s*$";
Pattern p = Pattern.compile(kstnRegex);
Matcher m = p.matcher(cqlSchema);
if (!m.find()) {
throw new ParseException("Badly formatted schema", 0);
throw new ParseException("Badly formatted schema " + cqlSchema, 0);
}
keyspace = m.group(1);
tablename = m.group(2);
Expand Down
2 changes: 1 addition & 1 deletion src/main/java/com/datastax/loader/CqlDelimUnload.java
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@


public class CqlDelimUnload {
private String version = "0.0.10";
private String version = "0.0.11";
private String host = null;
private int port = 9042;
private String username = null;
Expand Down

0 comments on commit c4a14b8

Please sign in to comment.