-
-
Save NulledExceptions/26147bf12855e5a7de86dd081d2cad06 to your computer and use it in GitHub Desktop.
Revisions
-
ejlp12 revised this gist
Nov 15, 2018 . 1 changed file with 1 addition and 1 deletion.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -11,7 +11,7 @@ response = client.create_crawler( Targets={ 'S3Targets': [ { 'Path': 's3://ejlp12-etl-demo-bucket/data/csv', 'Exclusions': [ ] }, -
ejlp12 revised this gist
Nov 15, 2018 . No changes.There are no files selected for viewing
-
ejlp12 created this gist
Nov 15, 2018 .There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,47 @@ ``` import boto3 client = boto3.client('glue') response = client.create_crawler( Name='SalesCSVCrawler', Role='AWSGlueServiceRoleDefault', DatabaseName='sales-cvs', Description='Crawler for generated Sales schema', Targets={ 'S3Targets': [ { 'Path': 's3://eryan-etl-demo-bucket/data/csv', 'Exclusions': [ ] }, ] }, SchemaChangePolicy={ 'UpdateBehavior': 'UPDATE_IN_DATABASE', 'DeleteBehavior': 'DELETE_FROM_DATABASE' } #,Configuration='{ "Version": 1.0, "CrawlerOutput": { "Partitions": { "AddOrUpdateBehavior": "InheritFromTable" } } }' ) response = client.start_crawler( Name='SalesCSVCrawler' ) response = client.update_table( DatabaseName='sales-cvs', TableInput={ 'Name': 'csv', 'Description': 'Table Sales', 'StorageDescriptor': { 'SerdeInfo': { 'Name': 'OpenCSVSerde', 'SerializationLibrary': 'org.apache.hadoop.hive.serde2.OpenCSVSerde', 'Parameters': { 'separatorChar': ',' } } } } ) ```