-
Notifications
You must be signed in to change notification settings - Fork 1
[WIP] GDrive abstract file batch source plugin extention #2
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
docs/GoogleDrive-batchsource.md
Outdated
| If no such file can be found, an error will be returned. | ||
|
|
||
| **Sample Size:** The maximum number of rows that will get investigated for automatic data type detection. | ||
| The default value is 1000. This is only used when the format is 'xls'. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this will be used in tsv and csv also
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Update to
**Sample Size:** The maximum number of rows that will get investigated for automatic data type detection.
The default value is 1000. This is used when the format is `xls`, `csv`, `tsv`, `delimited`.
docs/GoogleDrive-batchsource.md
Outdated
| The default value is 1000. This is only used when the format is 'xls'. | ||
|
|
||
| **Override:** A list of columns with the corresponding data types for whom the automatic data type detection gets | ||
| skipped. This is only used when the format is 'xls'. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
used in csv, tsv also
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Update to
**Override:** A list of columns with the corresponding data types for whom the automatic data type detection gets
skipped. This is used when the format is `xls`, `csv`, `tsv`, `delimited`.
src/main/java/io/cdap/plugin/google/drive/source/GoogleDriveFileSource.java
Outdated
Show resolved
Hide resolved
|
|
||
| @Override | ||
| public FileStatus[] listStatus(Path path) throws FileNotFoundException, IOException { | ||
| return GoogleDriveUtils.listStatus(driveService, path); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
are we handling filters for this
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
added support for filters
| // Query Google Drive for files in the directory | ||
| String query = "'" + dirId + "' in parents and trashed = false"; | ||
| FileList result = driveService.files().list() | ||
| .setQ(query) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
existing filters should be passed here
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
done
a09cada to
d832951
Compare
…actor Code Refactor
…-fields Make fields nullable
58ad16a to
54913a2
Compare
54913a2 to
e8dd7e0
Compare
…ileBatchSource-ui [PLUGIN-1906] Add AbstractFileBatchSource GDrive [UI + Docs]
e8dd7e0 to
2034022
Compare
b453f4a to
439d403
Compare
439d403 to
4dc5202
Compare
Description
New google drive plugin will
UI Changes
Reordering
Moved
AuthenticationaboveBasic[OLD]

[NEW]

New Fields
1) Structured Schema Required
Default Value
TrueDoc

UI [under basic]

Visibility
2) Format
Doc

UI [under basic]


Visibility
Structured Schema Requiredis set to true3) get-schema
Doc

UI [under basic]

Visibility
Structured Schema Requiredis set to true3) Path Field
4) Regex Path Filter
5) Read Files Recursively
false6) Allow Empty Input
false7) Sample Size
Doc

UI [under basic]

Default Value
1000Visibility
Structured Schema Requiredis set to true8) Override
Doc

UI [under basic]

Visibility
Structured Schema Requiredis set to true9) Sample Size
Doc

UI [under basic]

Default Value
1000Visibility
Structured Schema Requiredis set to true10) Delimiter
Doc

UI [under basic]

Visibility
Structured Schema Requiredis set to true and format is delimited11) Enable Quoted Values
Doc

UI [under basic]

Visibility
Structured Schema Requiredis set to true and format like csv12) Use First Row as Header
Doc

UI [under basic]

Visibility
Structured Schema Requiredis set to true and format like csv and xls13) File Encoding
Doc

UI [under advance]

Visibility
Structured Schema Requiredis set to true and format like csv and xls14) Terminate Reading After Empty Row
Doc

UI [under basic]

Visibility
Structured Schema Requiredis set to true and format xls15) Select Sheet Using
Doc

UI [under basic]

Visibility
Structured Schema Requiredis set to true and format xls16) Sheet Value
Doc

UI [under basic]

Visibility
Structured Schema Requiredis set to true and format xlsCode Changes
GoogleDriveFileSourceGoogleDriveFileSystemGoogleDriveRecordReader,GoogleDriveSourceFileFromFoldertoStructuredRecordto make it compatible with abstract file sourceGoogleDriveSourceConfig